[kernel] r21886 - in dists/wheezy-backports/linux: . debian debian/abi/3.14-0.bpo.2 debian/bin debian/config debian/config/alpha debian/config/arm64 debian/config/arm64/none debian/config/armel debian/config/armhf debian/config/hppa debian/config/i386 debian/config/ia64 debian/config/kernelarch-arm debian/config/kernelarch-mips debian/config/kernelarch-powerpc debian/config/kernelarch-s390 debian/config/kernelarch-sparc debian/config/kernelarch-x86 debian/config/m68k debian/config/mips debian/config/mips64 debian/config/mips64el debian/config/or1k debian/config/powerpc debian/config/ppc64el debian/config/sh4 debian/installer debian/installer/arm64 debian/installer/arm64/modules debian/installer/arm64/modules/arm64 debian/installer/armel/modules/armel-orion5x debian/installer/armel/modules/armel-versatile debian/installer/armhf/modules/armhf-armmp debian/installer/mips/modules/mips-octeon debian/installer/mips/modules/mips-sb1-bcm91250a debian/installer/mips64 debian/installer/mips64/modules debian/installer/mips64el debian/installer/mips64el/modules debian/installer/mipsel/modules/mipsel-loongson-3 debian/installer/modules debian/installer/ppc64el debian/installer/ppc64el/modules debian/patches debian/patches/bugfix/all debian/patches/bugfix/arm debian/patches/bugfix/arm64 debian/patches/bugfix/mips debian/patches/bugfix/powerpc debian/patches/bugfix/x86 debian/patches/debian debian/patches/debian/dfsg debian/patches/features/all debian/patches/features/all/aufs3 debian/patches/features/all/kdbus debian/patches/features/all/rt debian/patches/features/all/xen debian/patches/features/arm debian/patches/features/arm64 debian/patches/features/mips debian/patches/features/powerpc debian/patches/features/x86 debian/source debian/templates debian/templates/po

Ben Hutchings benh at moszumanska.debian.org
Sun Sep 21 14:23:19 UTC 2014


Author: benh
Date: Sun Sep 21 14:23:16 2014
New Revision: 21886

Log:
Merge changes from sid up to 3.16.3-2

Drop ABI reference for 3.14-0.bpo.2.

Added:
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/cdrom-core-modules
      - copied unchanged from r21884, dists/sid/linux/debian/installer/arm64/modules/arm64/cdrom-core-modules
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/efi-modules
      - copied unchanged from r21743, dists/trunk/linux/debian/installer/arm64/modules/arm64/efi-modules
   dists/wheezy-backports/linux/debian/patches/bugfix/all/aic94xx-remove-broken-fallback-for-missing-ctrl-a.patch
      - copied unchanged from r21884, dists/sid/linux/debian/patches/bugfix/all/aic94xx-remove-broken-fallback-for-missing-ctrl-a.patch
   dists/wheezy-backports/linux/debian/patches/bugfix/all/aio-fix-reqs_available-handling.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/bugfix/all/aio-fix-reqs_available-handling.patch
   dists/wheezy-backports/linux/debian/patches/bugfix/all/builddeb-put-the-dbg-files-into-the-correct-director.patch
      - copied unchanged from r21884, dists/sid/linux/debian/patches/bugfix/all/builddeb-put-the-dbg-files-into-the-correct-director.patch
   dists/wheezy-backports/linux/debian/patches/bugfix/arm64/
      - copied from r21884, dists/sid/linux/debian/patches/bugfix/arm64/
   dists/wheezy-backports/linux/debian/patches/debian/i2o-disable-i2o_ext_adaptec-on-64bit.patch
      - copied unchanged from r21884, dists/sid/linux/debian/patches/debian/i2o-disable-i2o_ext_adaptec-on-64bit.patch
   dists/wheezy-backports/linux/debian/patches/debian/revert-staging-sm7xxfb-remove-driver.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/debian/revert-staging-sm7xxfb-remove-driver.patch
   dists/wheezy-backports/linux/debian/patches/features/all/kdbus/
      - copied from r21884, dists/sid/linux/debian/patches/features/all/kdbus/
   dists/wheezy-backports/linux/debian/patches/features/all/sfc-Add-40G-link-capability-decoding.patch
      - copied unchanged from r21884, dists/sid/linux/debian/patches/features/all/sfc-Add-40G-link-capability-decoding.patch
   dists/wheezy-backports/linux/debian/patches/features/all/sfc-Adding-PCI-ID-for-Solarflare-7000-series-40G-net.patch
      - copied unchanged from r21884, dists/sid/linux/debian/patches/features/all/sfc-Adding-PCI-ID-for-Solarflare-7000-series-40G-net.patch
   dists/wheezy-backports/linux/debian/patches/features/all/virtio-scsi-Implement-change_queue_depth-for-virtscs.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/all/virtio-scsi-Implement-change_queue_depth-for-virtscs.patch
   dists/wheezy-backports/linux/debian/patches/features/arm/deb-pkg-add-automatic-support-for-armhf-architecture.patch
      - copied unchanged from r21884, dists/sid/linux/debian/patches/features/arm/deb-pkg-add-automatic-support-for-armhf-architecture.patch
   dists/wheezy-backports/linux/debian/patches/features/arm64/
      - copied from r21884, dists/sid/linux/debian/patches/features/arm64/
   dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Add-Loongson-3B-support.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Add-Loongson-3B-support.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Add-NUMA-support-for-Loongson-3.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Add-NUMA-support-for-Loongson-3.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Add-numa-api-support.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Add-numa-api-support.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Loongson-3-Enable-the-COP2-usage.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Loongson-3-Enable-the-COP2-usage.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Loongson-Modify-ChipConfig-register-definition.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Loongson-Modify-ChipConfig-register-definition.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Loongson-Rename-CONFIG_LEMOTE_MACH3A-to-CONFIG_.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Loongson-Rename-CONFIG_LEMOTE_MACH3A-to-CONFIG_.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Support-CPU-topology-files-in-sysfs.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Support-CPU-topology-files-in-sysfs.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Support-hard-limit-of-cpu-count-nr_cpu_ids.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Support-hard-limit-of-cpu-count-nr_cpu_ids.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Allow-KVM_CHECK_EXTENSION-on-the-vm-fd.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-Allow-KVM_CHECK_EXTENSION-on-the-vm-fd.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Don-t-keep-reference-to-irq-routing-table-in-irq.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-Don-t-keep-reference-to-irq-routing-table-in-irq.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Give-IRQFD-its-own-separate-enabling-Kconfig-opt.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-Give-IRQFD-its-own-separate-enabling-Kconfig-opt.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Move-all-accesses-to-kvm-irq_routing-into-irqchi.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-Move-all-accesses-to-kvm-irq_routing-into-irqchi.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Move-irq-notifier-implementation-into-eventfd.c.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-Move-irq-notifier-implementation-into-eventfd.c.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Move-more-code-under-CONFIG_HAVE_KVM_IRQFD.patch
      - copied unchanged from r21884, dists/sid/linux/debian/patches/features/powerpc/KVM-Move-more-code-under-CONFIG_HAVE_KVM_IRQFD.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-Controls-for-in-kernel-sPAPR-hypercal.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-Controls-for-in-kernel-sPAPR-hypercal.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Access-XICS-in-BE.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Access-XICS-in-BE.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Access-guest-VPA-in-BE.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Access-guest-VPA-in-BE.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Access-host-lppaca-and-shadow-slb-.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Access-host-lppaca-and-shadow-slb-.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Enable-for-little-endian-hosts.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Enable-for-little-endian-hosts.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Fix-ABIv2-indirect-branch-issue.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Fix-ABIv2-indirect-branch-issue.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Fix-ABIv2-on-LE.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Fix-ABIv2-on-LE.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Make-HTAB-code-LE-host-aware.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Make-HTAB-code-LE-host-aware.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-Move-vcore-definition-to-end-of-kvm_a.patch
      - copied unchanged from r21884, dists/sid/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-Move-vcore-definition-to-end-of-kvm_a.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-PR-Fix-sparse-endian-checks.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-PR-Fix-sparse-endian-checks.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-PR-Handle-hyp-doorbell-exits.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-PR-Handle-hyp-doorbell-exits.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3s-HV-Fix-tlbie-compile-error.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3s-HV-Fix-tlbie-compile-error.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3s-PR-Disable-AIL-mode-with-OPAL.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3s-PR-Disable-AIL-mode-with-OPAL.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Enable-IRQFD-support-for-the-XICS-interrupt-.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Enable-IRQFD-support-for-the-XICS-interrupt-.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Rename-and-add-argument-to-check_extension.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-Rename-and-add-argument-to-check_extension.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-irqchip-Provide-and-use-accessors-for-irq-routin.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-irqchip-Provide-and-use-accessors-for-irq-routin.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-prepare-for-KVM_-S-G-ET_MP_STATE-on-other-archit.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-prepare-for-KVM_-S-G-ET_MP_STATE-on-other-archit.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/PPC-Add-asm-helpers-for-BE-32bit-load-store.patch
      - copied unchanged from r21784, dists/trunk/linux/debian/patches/features/powerpc/PPC-Add-asm-helpers-for-BE-32bit-load-store.patch
   dists/wheezy-backports/linux/debian/patches/features/powerpc/deb-pkg-add-support-for-powerpc-little-endian.patch
      - copied unchanged from r21884, dists/sid/linux/debian/patches/features/powerpc/deb-pkg-add-support-for-powerpc-little-endian.patch
   dists/wheezy-backports/linux/debian/patches/features/x86/x86-memtest-WARN-if-bad-RAM-found.patch
      - copied unchanged from r21884, dists/sid/linux/debian/patches/features/x86/x86-memtest-WARN-if-bad-RAM-found.patch
Deleted:
   dists/wheezy-backports/linux/debian/abi/3.14-0.bpo.2/
   dists/wheezy-backports/linux/debian/config/armel/config.mv78xx0
   dists/wheezy-backports/linux/debian/installer/armel/modules/armel-orion5x/lzo-modules
   dists/wheezy-backports/linux/debian/installer/armel/modules/armel-versatile/lzo-modules
   dists/wheezy-backports/linux/debian/installer/mips/modules/mips-octeon/lzo-modules
   dists/wheezy-backports/linux/debian/installer/mips/modules/mips-sb1-bcm91250a/lzo-modules
   dists/wheezy-backports/linux/debian/installer/mips64el/modules/mips64el-loongson-2e
   dists/wheezy-backports/linux/debian/installer/mips64el/modules/mips64el-loongson-2f
   dists/wheezy-backports/linux/debian/patches/bugfix/all/bluetooth-allocate-static-minor-for-vhci.patch
   dists/wheezy-backports/linux/debian/patches/bugfix/all/net-l2tp-don-t-fall-back-on-UDP-get-set-sockopt.patch
   dists/wheezy-backports/linux/debian/patches/bugfix/all/net-sctp-inherit-auth_capable-on-INIT-collisions.patch
   dists/wheezy-backports/linux/debian/patches/bugfix/arm/bfa-Replace-large-udelay-with-mdelay.patch
   dists/wheezy-backports/linux/debian/patches/bugfix/mips/MIPS-Fix-branch-emulation-of-branch-likely-instructi.patch
   dists/wheezy-backports/linux/debian/patches/bugfix/mips/MIPS-O32-32-bit-Fix-bug-which-can-cause-incorrect-sy.patch
   dists/wheezy-backports/linux/debian/patches/bugfix/mips/MIPS-OCTEON-make-get_system_type-thread-safe.patch
   dists/wheezy-backports/linux/debian/patches/bugfix/mips/MIPS-SB1-Fix-excessive-kernel-warnings.patch
   dists/wheezy-backports/linux/debian/patches/bugfix/mips/MIPS-prevent-user-from-setting-FCSR-cause-bits.patch
   dists/wheezy-backports/linux/debian/patches/bugfix/mips/MIPS-ptrace-Avoid-smp_processor_id-in-preemptible-co.patch
   dists/wheezy-backports/linux/debian/patches/bugfix/mips/MIPS-tlbex-fix-a-missing-statement-for-HUGETLB.patch
   dists/wheezy-backports/linux/debian/patches/bugfix/powerpc/ppc64el-powernv-calls-to-support-little-endian.patch
   dists/wheezy-backports/linux/debian/patches/debian/dfsg/staging-rtl8192e-remove-built-in-firmware-images.patch
   dists/wheezy-backports/linux/debian/patches/debian/libata-avoid-abi-change-in-3.14.15.patch
   dists/wheezy-backports/linux/debian/patches/debian/mutex-avoid-abi-change-in-3.14.14.patch
   dists/wheezy-backports/linux/debian/patches/debian/ppc64el-disable-zImage.patch
   dists/wheezy-backports/linux/debian/patches/features/all/ARM-sunxi-ahci-and-gmac.patch
   dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-remove-circular-includes.patch
   dists/wheezy-backports/linux/debian/patches/features/all/mvsas-Recognise-device-subsystem-9485-9485-as-88SE94.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/0001-sparc64-use-generic-rwsem-spinlocks-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/0002-kernel-SRCU-provide-a-static-initializer.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/0002-x86-highmem-add-a-already-used-pte-check.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/0003-arm-highmem-flush-tlb-on-unmap.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/0005-futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/API-cleanup-use-local_lock-not-__local_lock-for-soft.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/HACK-printk-drop-the-logbuf_lock-more-often.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/Revert-migrate_disable-pushd-down-in-atomic_dec_and_.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/Revert-x86-Disable-IST-stacks-for-debug-int-3-stack-.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/acpi-rt-Convert-acpi_gbl_hardware-lock-back-to-a-raw.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/allow-preemption-in-recursive-migrate_disable-call.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/arch-use-pagefault-disabled.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/arm-at91-pit-remove-irq-handler-when-clock-is-unused.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/arm-at91-tclib-default-to-tclib-timer-for-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/arm-convert-boot-lock-to-raw.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/arm-disable-highmem-on-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/arm-enable-highmem-for-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/arm-preempt-lazy-support.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/arm-unwind-use_raw_lock.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/ata-disable-interrupts-if-non-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/blk-mq-revert-raw-locks-post-pone-notifier-to-POST_D.patchto-POST_D.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/block-mq-use-cpu_light.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/block-shorten-interrupt-disabled-regions.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/block-use-cpu-chill.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/bug-rt-dependend-variants.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/clocksource-tclib-allow-higher-clockrates.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/completion-use-simple-wait-queues.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/cond-resched-lock-rt-tweak.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/cond-resched-softirq-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/condition-migration_disable-on-lock-acquisition.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/cpu-hotplug-Document-why-PREEMPT_RT-uses-a-spinlock.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/cpu-rt-rework-cpu-down.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/cpu-rt-variants.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/cpu_chill-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/cpu_down_move_migrate_enable_back.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/cpumask-disable-offstack-on-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/debugobjects-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/disable-preempt-lazy-on-x86-64.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/dm-make-rt-aware.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/drivers-net-8139-disable-irq-nosync.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/drivers-net-fix-livelock-issues.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/drivers-net-gianfar-make-rt-aware.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/drivers-net-vortex-fix-locking-issues.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/drivers-random-reduce-preempt-disabled-region.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/drivers-serial-cleanup-locking-for-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/drivers-tty-fix-omap-lock-crap.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/drivers-tty-pl011-irq-disable-madness.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/drm-i915-drop-trace_i915_gem_ring_dispatch-onrt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/early-printk-consolidate.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/epoll-use-get-cpu-light.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/filemap-fix-up.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/fix-rt-int3-x86_32-3.2-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/fixup_opencoded_completions.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/fs-block-rt-support.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/fs-jbd-pull-plug-when-waiting-for-space.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/fs-jbd-replace-bh_state-lock.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/fs-jbd2-pull-your-plug-when-waiting-for-space.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/fs-namespace-preemption-fix.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/fs-ntfs-disable-interrupt-non-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/fs-replace-bh_uptodate_lock-for-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/ftrace-migrate-disable-tracing.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/futex-requeue-pi-fix.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/genirq-disable-irqpoll-on-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/genirq-do-not-invoke-the-affinity-callback-via-a-wor.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/genirq-force-threading.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/genirq-nodebug-shirq.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/hotplug-light-get-online-cpus.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/hotplug-sync_unplug-no-27-5cn-27-in-task-name.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/hotplug-use-migrate-disable.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/hrtimer-Move-schedule_work-call-to-helper-thread.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/hrtimer-raise-softirq-if-hrtimer-irq-stalled.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/hrtimers-prepare-full-preemption.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/hwlat-detector-Don-t-ignore-threshold-module-paramet.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/hwlat-detector-Update-hwlat_detector-to-add-outer-lo.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/hwlat-detector-Use-thread-instead-of-stop-machine.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/hwlat-detector-Use-trace_clock_local-if-available.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/hwlatdetect.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/i2c-omap-drop-the-lock-hard-irq-context.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/i915_compile_fix.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/ide-use-nort-local-irq-variants.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/idr-use-local-lock-for-protection.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/infiniband-mellanox-ib-use-nort-irq.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/inpt-gameport-use-local-irq-nort.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/ipc-make-rt-aware.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/ipc-mqueue-add-a-critical-section-to-avoid-a-deadlock.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/ipc-sem-rework-semaphore-wakeups.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/irq-allow-disabling-of-softirq-processing-in-irq-thread-context.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/irq_work-allow-certain-work-in-hard-irq-context.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/jump-label-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/kconfig-disable-a-few-options-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/kconfig-preempt-rt-full.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/kernel-cpu-fix-cpu-down-problem-if-kthread-s-cpu-is-.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/kernel-hotplug-restore-original-cpu-mask-oncpu-down.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/kernel-hrtimer-be-non-freezeable-in-cpu_chill.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/kgb-serial-hackaround.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/latency-hist.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/leds-trigger-disable-CPU-trigger-on-RT.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/lglocks-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/list_bl.h-make-list-head-locking-RT-safe.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/local-irq-rt-depending-variants.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/local-var.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/local-vars-migrate-disable.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/localversion.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/lockdep-no-softirq-accounting-on-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/md-disable-bcache.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/md-raid5-percpu-handling-rt-aware.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/migrate-disable-rt-variant.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/migrate_disable-pushd-down-in-atomic_dec_and_spin_lo.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/migrate_disable-pushd-down-in-rt_spin_trylock_irqsav.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/migrate_disable-pushd-down-in-rt_write_trylock_irqsa.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mips-disable-highmem-on-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mips-enable-interrupts-in-signal.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mm-bounce-local-irq-save-nort.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mm-cgroup-page-bit-spinlock.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mm-convert-swap-to-percpu-locked.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mm-disable-sloub-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mm-enable-slub.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mm-make-vmstat-rt-aware.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mm-page-alloc-fix.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mm-page-alloc-use-list-last-entry.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mm-page-alloc-use-local-lock-on-target-cpu.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mm-page_alloc-reduce-lock-sections-further.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mm-prepare-pf-disable-discoupling.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mm-protect-activate-switch-mm.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mm-remove-preempt-count-from-pf.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mm-rt-kmap-atomic-scheduling.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mm-scatterlist-dont-disable-irqs-on-RT.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mm-vmalloc-use-get-cpu-light.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mmci-remove-bogus-irq-save.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/move_sched_delayed_work_to_helper.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/mutex-no-spin-on-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/net-another-local-irq-disable-alloc-atomic-headache.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/net-fix-iptable-xt-write-recseq-begin-rt-fallout.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/net-flip-lock-dep-thingy.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/net-gianfar-do-not-disable-interrupts.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/net-gianfar-do-not-try-to-cleanup-TX-packets-if-they.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/net-ip_send_unicast_reply-add-missing-local-serializ.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/net-make-devnet_rename_seq-a-mutex.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/net-netif-rx-ni-use-local-bh-disable.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/net-netif_rx_ni-migrate-disable.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/net-sched-dev_deactivate_many-use-msleep-1-instead-o.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/net-tx-action-avoid-livelock-on-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/net-use-cpu-chill.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/net-use-cpu-light-in-ip-send-unicast-reply.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/net-wireless-warn-nort.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/oleg-signal-rt-fix.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/panic-disable-random-on-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/pci-access-use-__wake_up_all_locked.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/percpu-rwsem-compilefix.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/percpu_ida-use-locklocks.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/perf-make-swevent-hrtimer-irqsafe.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/perf-move-irq-work-to-softirq-in-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/peter_zijlstra-frob-migrate_disable-2.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/peter_zijlstra-frob-migrate_disable.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/peter_zijlstra-frob-pagefault_disable.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/peter_zijlstra-frob-rcu.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/peterz-raw_pagefault_disable.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/peterz-srcu-crypto-chain.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/pid-h-include-atomic-h.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/ping-sysrq.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/posix-timers-avoid-wakeups-when-no-timers-are-active.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/posix-timers-no-broadcast.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/posix-timers-shorten-cpu-timers-thread.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/posix-timers-thread-posix-cpu-timers-on-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/power-disable-highmem-on-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/power-use-generic-rwsem-on-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/powerpc-preempt-lazy-support.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/preempt-lazy-support.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/preempt-nort-rt-variants.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/printk-27force_early_printk-27-boot-param-to-help-with-debugging.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/printk-kill.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/printk-rt-aware.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/radix-tree-rt-aware.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/random-make-it-work-on-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rcu-Eliminate-softirq-processing-from-rcutree.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rcu-disable-rcu-fast-no-hz-on-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rcu-make-RCU_BOOST-default-on-RT.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rcu-merge-rcu-bh-into-rcu-preempt-for-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rcu-more-swait-conversions.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rcu-tiny-merge-bh.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rcutree-rcu_bh_qs-disable-irq-while-calling-rcu_pree.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/re-migrate_disable-race-with-cpu-hotplug-3f.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/re-preempt_rt_full-arm-coredump-fails-for-cpu-3e-3d-4.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/read_lock-migrate_disable-pushdown-to-rt_read_lock.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/relay-fix-timer-madness.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/resource-counters-use-localirq-nort.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rt-Cleanup-of-unnecessary-do-while-0-in-read-write-_.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rt-Make-cpu_chill-use-hrtimer-instead-of-msleep.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rt-add-rt-locks.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rt-add-rt-spinlock-to-headers.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rt-add-rt-to-mutex-headers.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rt-introduce-cpu-chill.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rt-local-irq-lock.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rt-mutex-add-sleeping-spinlocks-support.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rt-preempt-base-config.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rt-rw-lockdep-annotations.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rt-sched-do-not-compare-cpu-masks-in-scheduler.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rt-sched-have-migrate_disable-ignore-bounded-threads.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rt-sched-numa-Move-task_numa_free-to-__put_task_stru.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rt-sched-postpone-actual-migration-disalbe-to-schedule.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rt-serial-warn-fix.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rt-tracing-show-padding-as-unsigned-short.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rtmutex-add-a-first-shot-of-ww_mutex.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rtmutex-avoid-include-hell.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rtmutex-futex-prepare-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rtmutex-lock-killable.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rtmutex-use-a-trylock-for-waiter-lock-in-trylock.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rtmutex-ww-bad-return-value-in-__mutex_lock_check_stamp.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rwlock-disable-migration-before-taking-a-lock.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rwsem-add-rt-variant.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/rwsem-rt-Do-not-allow-readers-to-nest.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-Add-better-debug-output-for-might_sleep.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-Adjust-p-sched_reset_on_fork-when-nothing-else.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-Check-for-idle-task-in-might_sleep.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-Consider-pi-boosting-in-setscheduler.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-Fix-broken-setscheduler.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-Init-idle-on_rq-in-init_idle.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-Queue-RT-tasks-to-head-when-prio-drops.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-clear-pf-thread-bound-on-fallback-rq.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-cond-resched.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-delay-put-task.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-disable-rt-group-sched-on-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-disable-ttwu-queue.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-do-not-clear-pf_no_setaffinity-flag-in-select_fallback_rq.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-dont-calculate-hweight-in-update_migrate_disab.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-limit-nr-migrate.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-might-sleep-do-not-account-rcu-depth.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-migrate-disable.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-mmdrop-delayed.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-rt-fix-migrate_enable-thinko.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-rt-mutex-wakeup.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-teach-migrate_disable-about-atomic-contexts.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-ttwu-ensure-success-return-is-correct.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/scsi-fcoe-rt-aware.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/scsi-qla2xxx-fix-bug-sleeping-function-called-from-invalid-context.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/seqlock-consolidate-spin_lock-unlock-waiting-with-sp.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/seqlock-prevent-rt-starvation.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/signal-fix-up-rcu-wreckage.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/signal-revert-ptrace-preempt-magic.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/simple-wait-rename-and-export-the-equivalent-of-wait.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/skbufhead-raw-lock.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/slub-enable-irqs-for-no-wait.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/slub_delay_ctor_on_rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/softirq-adapt-nohz-pending-debug-code-to-new-scheme.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/softirq-disable-softirq-stacks-for-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/softirq-init-softirq-local-lock-after-per-cpu-section-is-set-up.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/softirq-local-lock.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/softirq-make-fifo.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/softirq-make-migrate-disable-enable-conditioned-on-softirq_n.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/softirq-make-serving-softirqs-a-task-flag.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/softirq-preempt-fix-3-re.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/softirq-sanitize-softirq-pending.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/softirq-split-handling-function.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/softirq-split-locks.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/softirq-split-out-code.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/softirq-thread-do-softirq.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sparc-provide-EARLY_PRINTK-for-SPARC.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/spinlock-types-separate-raw.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/stomp-machine-create-lg_global_trylock_relax-primiti.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/stomp-machine-raw-lock.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/stomp-machine-use-lg_global_trylock_relax-to-dead-wi.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/suspend-prevernt-might-sleep-splats.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sysctl-include-atomic-h.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/sysfs-realtime-entry.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/tasklet-rt-prevent-tasklets-from-going-into-infinite-spin-in-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/tasklist-lock-fix-section-conflict.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/timekeeping-split-jiffies-lock.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/timer-Raise-softirq-if-there-s-irq_work.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/timer-delay-waking-softirqs-from-the-jiffy-tick.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/timer-do-not-spin_trylock-on-UP.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/timer-fd-avoid-live-lock.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/timer-handle-idle-trylock-in-get-next-timer-irq.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/timer-rt-Always-raise-the-softirq-if-there-s-irq_wor.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/timers-avoid-the-base-null-otptimization-on-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/timers-do-not-raise-softirq-unconditionally.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/timers-preempt-rt-support.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/timers-prepare-for-full-preemption-improve.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/timers-prepare-for-full-preemption.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/tracing-account-for-preempt-off-in-preempt_schedule.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/tracing-use-migrate_disable-to-prevent-beeing-pushed.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/treercu-use-simple-waitqueue.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/usb-fix-mouse-problem-copying-large-data.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/usb-use-_nort-in-giveback.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/use-local-spin_locks-in-local_lock.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/user-use-local-irq-nort.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/vtime-split-lock-and-seqcount.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/wait-simple-implementation.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/wait-simple-rework-for-completions.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/wait.h-include-atomic.h.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/work-queue-work-around-irqsafe-timer-optimization.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/workqueue-distangle-from-rq-lock.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/workqueue-prevent-deadlock-stall.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/workqueue-use-locallock.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/workqueue-use-rcu.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/write_lock-migrate_disable-pushdown-to-rt_write_lock.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/x86-crypto-reduce-preempt-disabled-regions.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/x86-disable-debug-stack.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/x86-io-apic-migra-no-unmask.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/x86-kvm-require-const-tsc-for-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/x86-mce-Defer-mce-wakeups-to-threads-for-PREEMPT_RT.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/x86-mce-timer-hrtimer.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/x86-preempt-lazy.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/x86-stackprot-no-random-on-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/rt/x86-use-gen-rwsem-spinlocks-rt.patch
   dists/wheezy-backports/linux/debian/patches/features/all/save-and-restore-adaptive-keyboard-mode-for-suspend-.patch
   dists/wheezy-backports/linux/debian/patches/features/all/support-Thinkpad-X1-Carbon-2nd-generation-s-adaptive.patch
   dists/wheezy-backports/linux/debian/patches/features/all/x86-memtest-WARN-if-bad-RAM-found.patch
   dists/wheezy-backports/linux/debian/patches/features/all/xen/
   dists/wheezy-backports/linux/debian/patches/features/arm/0001-spi-sunxi-Add-Allwinner-A31-SPI-controller-driver.patch
   dists/wheezy-backports/linux/debian/patches/features/arm/0002-spi-sun6i-Fix-define-for-SUN6I_TFR_CTL_CS_MASK.patch
   dists/wheezy-backports/linux/debian/patches/features/arm/0003-spi-sun6i-Set-bits_per_word_mask-to-only-support-8-b.patch
   dists/wheezy-backports/linux/debian/patches/features/arm/ARM-dt-sun4i-Add-A10-SPI-controller-nodes.patch
   dists/wheezy-backports/linux/debian/patches/features/arm/ARM-sun4i-dt-Add-USB-host-bindings.patch
   dists/wheezy-backports/linux/debian/patches/features/arm/ARM-sun4i-dt-Add-bindings-for-USB-clocks.patch
   dists/wheezy-backports/linux/debian/patches/features/arm/PHY-sunxi-Add-driver-for-sunxi-usb-phy.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/0001-MIPS-Loongson-Rename-PRID_IMP_LOONGSON1-and-PRID_IMP.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/0002-MIPS-Loongson-Add-basic-Loongson-3-definition.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/0003-MIPS-Loongson-Add-basic-Loongson-3-CPU-support.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/0004-MIPS-Loongson-3-Add-Lemote-3A-machtypes-definition.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/0005-MIPS-Loongson-Add-UEFI-like-firmware-interface-LEFI-.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/0006-MIPS-Loongson-3-Add-HT-linked-PCI-support.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/0007-MIPS-Loongson-3-Add-IRQ-init-and-dispatch-support.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/0008-MIPS-Loongson-3-Add-serial-port-support.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/0009-MIPS-Loongson-Add-swiotlb-to-support-All-Memory-DMA.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/0010-MIPS-Loongson-Add-Loongson-3-Kconfig-options.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/0011-MIPS-Loongson-3-Add-Loongson-3-SMP-support.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/0012-MIPS-Loongson-3-Add-CPU-hotplug-support.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/0013-MIPS-Loongson-Add-a-Loongson-3-default-config-file.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Define-some-more-PIIX4-registers-values.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Malta-Let-PIIX4-respond-to-PCI-special-cycles.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Malta-Setup-PM-I-O-region-on-boot.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Malta-add-suspend-state-entry-code.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Malta-hang-on-halt.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Malta-support-powering-down.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Octeon-Add-PCIe2-support-in-arch_setup_msi_irq.patch
   dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-octeon-Add-interface-mode-detection-for-Octeon-.patch
   dists/wheezy-backports/linux/debian/patches/series-rt
Modified:
   dists/wheezy-backports/linux/   (props changed)
   dists/wheezy-backports/linux/debian/   (props changed)
   dists/wheezy-backports/linux/debian/bin/genorig.py
   dists/wheezy-backports/linux/debian/bin/stable-update.sh
   dists/wheezy-backports/linux/debian/changelog
   dists/wheezy-backports/linux/debian/config/alpha/config
   dists/wheezy-backports/linux/debian/config/arm64/config
   dists/wheezy-backports/linux/debian/config/arm64/none/defines   (props changed)
   dists/wheezy-backports/linux/debian/config/armel/config-reduced
   dists/wheezy-backports/linux/debian/config/armel/config.ixp4xx
   dists/wheezy-backports/linux/debian/config/armel/config.kirkwood
   dists/wheezy-backports/linux/debian/config/armel/config.orion5x
   dists/wheezy-backports/linux/debian/config/armel/config.versatile
   dists/wheezy-backports/linux/debian/config/armel/defines
   dists/wheezy-backports/linux/debian/config/armhf/config
   dists/wheezy-backports/linux/debian/config/armhf/config.armmp
   dists/wheezy-backports/linux/debian/config/armhf/config.lpae
   dists/wheezy-backports/linux/debian/config/armhf/defines
   dists/wheezy-backports/linux/debian/config/config
   dists/wheezy-backports/linux/debian/config/defines
   dists/wheezy-backports/linux/debian/config/hppa/config
   dists/wheezy-backports/linux/debian/config/hppa/config.parisc64-smp
   dists/wheezy-backports/linux/debian/config/i386/config.486
   dists/wheezy-backports/linux/debian/config/ia64/config
   dists/wheezy-backports/linux/debian/config/kernelarch-arm/config
   dists/wheezy-backports/linux/debian/config/kernelarch-mips/config
   dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.4kc-malta
   dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.5kc-malta
   dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.loongson-2e
   dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.loongson-2f
   dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.loongson-3
   dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.octeon
   dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.r4k-ip22
   dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.r5k-ip32
   dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.sb1-bcm91250a
   dists/wheezy-backports/linux/debian/config/kernelarch-powerpc/config
   dists/wheezy-backports/linux/debian/config/kernelarch-powerpc/config-arch-64
   dists/wheezy-backports/linux/debian/config/kernelarch-powerpc/config-arch-64-be
   dists/wheezy-backports/linux/debian/config/kernelarch-powerpc/config-arch-64-le
   dists/wheezy-backports/linux/debian/config/kernelarch-s390/config
   dists/wheezy-backports/linux/debian/config/kernelarch-s390/config-arch-64
   dists/wheezy-backports/linux/debian/config/kernelarch-sparc/config
   dists/wheezy-backports/linux/debian/config/kernelarch-x86/config
   dists/wheezy-backports/linux/debian/config/kernelarch-x86/config-arch-32
   dists/wheezy-backports/linux/debian/config/kernelarch-x86/config-arch-64
   dists/wheezy-backports/linux/debian/config/m68k/config
   dists/wheezy-backports/linux/debian/config/mips/config
   dists/wheezy-backports/linux/debian/config/mips64/config   (contents, props changed)
   dists/wheezy-backports/linux/debian/config/mips64/defines   (contents, props changed)
   dists/wheezy-backports/linux/debian/config/mips64el/config   (props changed)
   dists/wheezy-backports/linux/debian/config/mips64el/defines   (contents, props changed)
   dists/wheezy-backports/linux/debian/config/or1k/defines   (props changed)
   dists/wheezy-backports/linux/debian/config/powerpc/config.powerpc
   dists/wheezy-backports/linux/debian/config/ppc64el/defines   (props changed)
   dists/wheezy-backports/linux/debian/config/sh4/config.sh7751r
   dists/wheezy-backports/linux/debian/config/sh4/config.sh7785lcr
   dists/wheezy-backports/linux/debian/installer/arm64/kernel-versions   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/ata-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/btrfs-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/core-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/crc-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/crypto-dm-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/crypto-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/event-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/ext4-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/fat-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/fuse-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/input-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/isofs-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/jfs-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/kernel-image   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/loop-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/md-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/mmc-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/multipath-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/nbd-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/nic-modules   (contents, props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/nic-shared-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/nic-usb-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/nic-wireless-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/ppp-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/sata-modules   (contents, props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/scsi-core-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/scsi-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/squashfs-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/udf-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/uinput-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/usb-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/usb-storage-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/virtio-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/xfs-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/zlib-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/arm64/package-list   (props changed)
   dists/wheezy-backports/linux/debian/installer/armel/modules/armel-orion5x/nic-modules
   dists/wheezy-backports/linux/debian/installer/armhf/modules/armhf-armmp/mmc-modules
   dists/wheezy-backports/linux/debian/installer/armhf/modules/armhf-armmp/usb-modules
   dists/wheezy-backports/linux/debian/installer/mips/modules/mips-octeon/usb-modules
   dists/wheezy-backports/linux/debian/installer/mips64/kernel-versions   (props changed)
   dists/wheezy-backports/linux/debian/installer/mips64/modules/   (props changed)
   dists/wheezy-backports/linux/debian/installer/mips64/modules/mips64   (props changed)
   dists/wheezy-backports/linux/debian/installer/mips64/modules/mips64-5kc-malta   (props changed)
   dists/wheezy-backports/linux/debian/installer/mips64/modules/mips64-octeon   (props changed)
   dists/wheezy-backports/linux/debian/installer/mips64/modules/mips64-sb1-bcm91250a   (props changed)
   dists/wheezy-backports/linux/debian/installer/mips64/package-list   (props changed)
   dists/wheezy-backports/linux/debian/installer/mips64el/kernel-versions   (contents, props changed)
   dists/wheezy-backports/linux/debian/installer/mips64el/modules/   (props changed)
   dists/wheezy-backports/linux/debian/installer/mips64el/modules/mips64el-5kc-malta   (props changed)
   dists/wheezy-backports/linux/debian/installer/mips64el/modules/mips64el-loongson-3   (props changed)
   dists/wheezy-backports/linux/debian/installer/mips64el/modules/mips64el-octeon   (props changed)
   dists/wheezy-backports/linux/debian/installer/mips64el/modules/mips64el-sb1-bcm91250a   (props changed)
   dists/wheezy-backports/linux/debian/installer/mips64el/package-list   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/affs-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/ata-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/btrfs-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/cdrom-core-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/crc-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/crypto-dm-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/crypto-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/event-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/fat-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/firewire-core-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/fuse-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/hfs-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/input-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/isofs-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/jfs-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/kernel-image   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/loop-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/md-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/minix-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/multipath-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/nbd-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/nfs-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/nic-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/nic-shared-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/nic-usb-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/nic-wireless-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/ntfs-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/pata-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/ppp-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/qnx4-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/sata-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/scsi-common-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/scsi-core-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/scsi-extra-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/scsi-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/sound-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/speakup-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/squashfs-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/udf-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/usb-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/usb-serial-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/usb-storage-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/virtio-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/xfs-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/mipsel/modules/mipsel-loongson-3/zlib-modules   (props changed)
   dists/wheezy-backports/linux/debian/installer/modules/crc-modules
   dists/wheezy-backports/linux/debian/installer/modules/crypto-modules
   dists/wheezy-backports/linux/debian/installer/modules/nic-wireless-modules
   dists/wheezy-backports/linux/debian/installer/modules/sound-modules
   dists/wheezy-backports/linux/debian/installer/modules/usb-modules
   dists/wheezy-backports/linux/debian/installer/package-list
   dists/wheezy-backports/linux/debian/installer/ppc64el/kernel-versions   (props changed)
   dists/wheezy-backports/linux/debian/installer/ppc64el/modules/   (props changed)
   dists/wheezy-backports/linux/debian/installer/ppc64el/package-list   (props changed)
   dists/wheezy-backports/linux/debian/patches/bugfix/all/disable-some-marvell-phys.patch
   dists/wheezy-backports/linux/debian/patches/bugfix/all/firmware-remove-redundant-log-messages-from-drivers.patch
   dists/wheezy-backports/linux/debian/patches/bugfix/all/kbuild-use-nostdinc-in-compile-tests.patch
   dists/wheezy-backports/linux/debian/patches/bugfix/x86/viafb-autoload-on-olpc-xo1.5-only.patch
   dists/wheezy-backports/linux/debian/patches/debian/aufs3-mark-as-staging.patch
   dists/wheezy-backports/linux/debian/patches/debian/btrfs-work-around-compiler-bug-on-arm.patch
   dists/wheezy-backports/linux/debian/patches/debian/cirrus-disable-modeset-by-default.patch
   dists/wheezy-backports/linux/debian/patches/debian/dfsg/files-1
   dists/wheezy-backports/linux/debian/patches/debian/dfsg/video-remove-nvidiafb-and-rivafb.patch
   dists/wheezy-backports/linux/debian/patches/debian/gitignore.patch
   dists/wheezy-backports/linux/debian/patches/debian/mgag200-disable-autoload.patch
   dists/wheezy-backports/linux/debian/patches/debian/powerpcspe-omit-uimage.patch
   dists/wheezy-backports/linux/debian/patches/features/all/Kbuild-kconfig-Verbose-version-of-listnewconfig.patch
   dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-add.patch
   dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-base.patch
   dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-kbuild.patch
   dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-mmap.patch
   dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-standalone.patch
   dists/wheezy-backports/linux/debian/patches/features/all/cgroups-Allow-memory-cgroup-support-to-be-included-b.patch
   dists/wheezy-backports/linux/debian/patches/series
   dists/wheezy-backports/linux/debian/patches/series-orig
   dists/wheezy-backports/linux/debian/rules
   dists/wheezy-backports/linux/debian/rules.defs
   dists/wheezy-backports/linux/debian/rules.real
   dists/wheezy-backports/linux/debian/source/options
   dists/wheezy-backports/linux/debian/templates/control.source.in
   dists/wheezy-backports/linux/debian/templates/po/es.po

Modified: dists/wheezy-backports/linux/debian/bin/genorig.py
==============================================================================
--- dists/wheezy-backports/linux/debian/bin/genorig.py	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/bin/genorig.py	Sun Sep 21 14:23:16 2014	(r21886)
@@ -81,7 +81,7 @@
 
     def upstream_patch(self, input_patch):
         self.log("Patching source with %s\n" % input_patch)
-        match = re.match(r'(^|.*/)patch-\d+\.\d+\.\d+(-\S+?)?(\.(?P<extension>(bz2|gz|xz)))?$', input_patch)
+        match = re.match(r'(^|.*/)patch-\d+\.\d+(\.\d+)?(-\S+?)?(\.(?P<extension>(bz2|gz|xz)))?$', input_patch)
         if not match:
             raise RuntimeError("Can't identify name of patch")
         cmdline = []

Modified: dists/wheezy-backports/linux/debian/bin/stable-update.sh
==============================================================================
--- dists/wheezy-backports/linux/debian/bin/stable-update.sh	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/bin/stable-update.sh	Sun Sep 21 14:23:16 2014	(r21886)
@@ -51,8 +51,8 @@
 fi
 
 case "$cur_pkg_ver" in
-    *~experimental*)
-	new_pkg_ver="$new_ver-1~experimental.1"
+    *~exp*)
+	new_pkg_ver="$new_ver-1~exp1"
 	;;
     *)
 	new_pkg_ver="$new_ver-1"

Modified: dists/wheezy-backports/linux/debian/changelog
==============================================================================
--- dists/wheezy-backports/linux/debian/changelog	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/changelog	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,4 +1,4 @@
-linux (3.14.15-2~bpo70+1) wheezy-backports; urgency=low
+linux (3.16.3-2~bpo70+1) wheezy-backports; urgency=low
 
   * Rebuild for wheezy:
     - Disable architectures that weren't part of wheezy
@@ -6,7 +6,487 @@
     - Change ABI number to 0.bpo.2
     - [arm] btrfs: Work around bug in gcc-4.6 (fixes FTBFS)
 
- -- Ben Hutchings <ben at decadent.org.uk>  Thu, 21 Aug 2014 15:07:27 -0700
+ -- Ben Hutchings <ben at decadent.org.uk>  Sun, 21 Sep 2014 15:19:54 +0100
+
+linux (3.16.3-2) unstable; urgency=medium
+
+  [ Ben Hutchings ]
+  * [s390*] syscall: Fix unimplented-syscall entries added before
+    memfd_create() (fixes FTBFS) (Closes: #762221)
+  * [armel/kirkwood] Change configuration to reduce kernel image size
+    (fixes FTBFS) (Closes: #762219)
+    - block: Change IOSCHED_DEADLINE to module
+    - gpu: Disable VGA_ARB
+
+  [ Aurelien Jarno ]
+  * [mips*/octeon] Enable OCTEON_USB, USB_EHCI_HCD, USB_OHCI_HCD,
+    and USB_OCTEON_EHCI, USB_OCTEON_OHCI (Closes: #762066).
+
+ -- Bastian Blank <waldi at debian.org>  Sat, 20 Sep 2014 11:43:05 +0200
+
+linux (3.16.3-1) unstable; urgency=medium
+
+  * New upstream stable update:
+    https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.16.3
+    - reiserfs: fix corruption introduced by balance_leaf refactor
+      (regression in 3.16) (Closes: #761457)
+    - reiserfs: Fix use after free in journal teardown
+    - media: v4l: vb2: Fix stream start and buffer completion race
+    - [x86] iommu/vt-d: Exclude devices using RMRRs from IOMMU API domains
+    - [powerpc*] powerpc/powernv: Fix IOMMU group lost (regression in 3.15)
+    - [x86] iommu/vt-d: Defer domain removal if device is assigned to a driver
+    - [x86] iommu/amd: Fix cleanup_domain for mass device removal
+    - [s390*] locking: Reenable optimistic spinning
+    - firmware: Do not use WARN_ON(!spin_is_locked())
+    - CAPABILITIES: remove undefined caps from all processes
+    - fanotify: fix double free of pending permission events
+    - ocfs2: do not write error flag to user structure we cannot copy from/to
+    - [powerpc*] mm: fix potential infinite loop in dissolve_free_huge_pages()
+    - drivers/mfd/rtsx_usb.c: export device table (Closes: #761428)
+    - [powerpc*] mm: Use read barrier when creating real_pte
+    - [powerpc*] thp: Add write barrier after updating the valid bit
+    - [powerpc*] thp: Invalidate old 64K based hash page mapping before insert
+      of 4k pte
+    - [powerpc*] thp: Handle combo pages in invalidate
+    - [powerpc*] thp: Invalidate with vpn in loop
+    - [powerpc*] thp: Use ACCESS_ONCE when loading pmdp
+    - SCSI: save command pool address of Scsi_Host (regression in 3.15)
+    - fix regression in SCSI_IOCTL_SEND_COMMAND (regression in 3.16)
+    - [mips*] GIC: Prevent array overrun
+    - [mips*] ptrace: Test correct task's flags in task_user_regset_view()
+    - [mips*] ptrace: Change GP regset to use correct core dump register layout
+    - [mips*] ptrace: Avoid smp_processor_id() when retrieving FPU IR
+    - [mips*] syscall: Fix AUDIT value for O32 processes on MIPS64
+    - [mips*] scall64-o32: Fix indirect syscall detection
+    - [mips,powerpc] bfa: Fix undefined bit shift on big-endian architectures
+      with 32-bit DMA address
+    - ACPI / hotplug: Check scan handlers in acpi_scan_hot_remove()
+      (regression in 3.14)
+    - ACPI: Run fixed event device notifications in process context
+      (regression in 3.15)
+    - ACPI / scan: Allow ACPI drivers to bind to PNP device objects
+      (regression in 3.16)
+    - ACPI / EC: Add support to disallow QR_EC to be issued when SCI_EVT isn't
+      set (regression in 3.14.13, 3.16)
+    - ACPI / EC: Add support to disallow QR_EC to be issued before completing
+      previous QR_EC (regression in 3.14.13, 3.16)
+    - ACPI / scan: not cache _SUN value in struct acpi_device_pnp
+      (regression in 3.14)
+    - ACPI / video: Add a disable_native_backlight quirk
+    - ACPI / video: Disable native_backlight on HP ENVY 15 Notebook PC
+    - ring-buffer: Always reset iterator to reader page
+    - ring-buffer: Up rb_iter_peek() loop count to 3
+    - vfs: get rid of propagate_umount() mistakenly treating slaves as busy.
+      (regression in 3.15)
+    - Bluetooth: Fix tracking local SSP authentication requirement
+    - Bluetooth: Avoid use of session socket after the session gets freed
+    - vfs: __generic_file_write_iter(): fix handling of sync error after DIO
+      (regression in 3.16)
+    - rbd: rework rbd_request_fn() (regression in 3.15)
+    - vfs: fix copy_tree() regression (regression in 3.14)
+    - md/raid1,raid10: always abort recover on write error.
+    - md/raid5: avoid livelock caused by non-aligned writes.
+      (regression in 3.16)
+    - md/raid6: avoid data corruption during recovery of double-degraded RAID6
+    - md/raid10: fix memory leak when reshaping a RAID10.
+    - xfs: ensure verifiers are attached to recovered buffers
+    - xfs: quotacheck leaves dquot buffers without verifiers
+    - xfs: don't dirty buffers beyond EOF
+    - xfs: don't zero partial page cache pages during O_DIRECT writes
+    - xfs: don't zero partial page cache pages during O_DIRECT reads
+    - libceph: set last_piece in ceph_msg_data_pages_cursor_init() correctly
+    - libceph: gracefully handle large reply messages from the mon
+    - libceph: do not hard code max auth ticket len (CVE-2014-6416,
+      CVE-2014-6417, CVE-2014-6418)
+    - CIFS: Fix async reading on reconnects
+    - CIFS: Possible null ptr deref in SMB2_tcon
+    - CIFS: Fix wrong directory attributes after rename
+    - mtd/ftl: fix the double free of the buffers allocated in build_maps()
+    - mtd: nand: omap: Fix 1-bit Hamming code scheme, omap_calculate_ecc()
+    - dm table: propagate QUEUE_FLAG_NO_SG_MERGE (regression in 3.16)
+    - KEYS: Fix use-after-free in assoc_array_gc()
+    - KEYS: Fix termination condition in assoc array garbage collection
+      (CVE-2014-3631)
+
+  [ Ben Hutchings ]
+  * sfc: Adding PCI ID for Solarflare 7000 series 40G network adapter.
+  * sfc: Add 40G link capability decoding
+  * Bump ABI to 2 (Closes: #761874)
+  * ata: Enable SATA_ZPODD
+  * tracing: Enable TRACER_SNAPSHOT
+  * Add memfd_create() and shared memory sealing (Closes: #760702):
+    - mm: allow drivers to prevent new writable mappings
+    - shm: add sealing API
+    - shm: add memfd_create() syscall
+    - shm: wait for pins to be released when sealing
+    - mm: Add memfd_create() system call
+    - [arm*,m68k,mips*,powerpc*,s390*,sparc*] Wire up memfd_create()
+  * udeb: Add ccm, ctr to crypto-modules (Closes: #761902)
+  * [armhf] udeb: Add ehci-platform, ohci-platform and phy-sun4i-usb to
+    usb-modules (Closes: #761591)
+
+  [ Ian Campbell ]
+  * [armhf] Enable support for Exynos5 systems. (Closes: #759291)
+  * [arm64] Enable crypto accelerator modules
+  * [arm64] Add cdrom-core-modules udeb
+
+  [ Aurelien Jarno ]
+  * [powerpc/powerpc64,ppc64el] Backport more KVM patches from 3.17. Enable
+    KVM_BOOK3S_64, KVM_BOOK3S_64_HV, KVM_BOOK3S_64_PR and KVM_XICS.  (Closes:
+    #761656).
+
+ -- Ben Hutchings <ben at decadent.org.uk>  Thu, 18 Sep 2014 03:32:47 +0100
+
+linux (3.16.2-3) unstable; urgency=medium
+
+  [ Ben Hutchings ]
+  * [armhf] udeb: Remove efi-modules, as EFI is not yet supported on ARM!
+  * [arm64] ata: Enable PHY_XYGENE, AHCI_XGENE as modules
+    - udeb: Add ahci_xgene to sata-modules (fixes FTBFS)
+  * [arm64] rtc: Enable RTC_DRV_XGENE as module
+  * mfd,mmc,memstick: Enable MFD_RTSX_USB, MMC_REALTEK_USB,
+    MEMSTICK_REALTEK_USB as modules (Closes: #761099)
+  * [mips64,mips64el] Properly add the 5kc-malta flavour (should fix FTBFS)
+  * batman-adv: Enable BATMAN_ADV_MCAST
+  * can: Enable CAN_GS_USB as module
+  * bluetooth: Enable BT_6LOWPAN
+  * ubi: Enable MTD_UBI_BLOCK
+  * md: Enable DM_ERA as module
+  * qlcnic: Enable QLCNIC_VXLAN
+  * net/wireless: Enable RSI_91X, RSI_USB as modules
+    - udeb: Add rsi_usb to nic-wireless-modules
+  * i2c: Enable I2C_ROBOTFUZZ_OSIF as module
+  * mfd,gpio,i2c,iio: Enable MFD_VIPERBOARD, GPIO_VIPERBOARD, I2C_VIPERBOARD,
+    VIPERBOARD_ADC as modules
+  * media/usb/gspca: Enable USB_GSPCA_DTCS033 as module
+  * media/pci/cx23885: Enable MEDIA_ALTERA_CI as module
+  * sound/usb: Enable SND_USB_HIFACE, SND_BCD2000 as modules
+  * usb/misc: Enable USB_EHSET_TEST_FIXTURE as module
+  * usb/gadget: Enable USB_NET2280 as module
+  * leds: Enable LEDS_TRIGGER_CPU as built-in and LEDS_TRIGGER_ONESHOT,
+    LEDS_TRIGGER_GPIO, LEDS_TRIGGER_TRANSIENT, LEDS_TRIGGER_CAMERA as modules
+  * uio: Enable UIO_MF624 as module
+  * iio: Enable HID_SENSOR_PROX, HID_SENSOR_DEVICE_ROTATION, HID_SENSOR_PRESS
+    as modules
+  * ecryptfs: Enable ECRYPT_FS_MESSAGING
+  * ceph: Enable CEPH_FSCACHE
+  * crypto: Enable CRYPTO_LZ4, CRYPTO_LZ4HC as modules
+  * [x86] mfd,gpio,i2c,watchdog: Enable KEMPLD_MFD, GPIO_KEMPLD, I2C_KEMPLD,
+    KEMPLD_WDT as modules
+  * [x86] staging: Enable R8723AU as module
+  * [x86] staging: Enable WIMAX_GDM72XX as modules
+    - gdmwm: Enable WIMAX_GDM72XX_USB, WIMAX_GDM72XX_USB_PM
+  * [x86] staging/media: Enable DVB_AS102, USB_MSI3101, MEDIA_TUNER_MSI001,
+    SOLO6X10 as modules
+  * [x86] dvb-usb-rtl28xxu: Enable DVB_RTL2832_SDR
+  * [x86] platform: Enable ALIENWARE_WMI, DELL_SMO8800, IBM_RTL,
+    SAMSUNG_Q10, INTEL_RST, INTEL_SMARTCONNECT (Closes: #749273), PVPANIC
+    as modules
+  * [x86] sony-laptop: Enable SONYPI_COMPAT
+  * [x86,ia64] firmware: Enable DMI_SYSFS
+  * [x86] Disable USB_SN9C102; this driver is deprecated in favour of the
+    gspca drivers
+  * [i386] usb/gadget: Enable USB_AMD5536UDC as module
+  * [i386] comedi: Enable COMEDI_AMPLC_DIO200_ISA, COMEDI_AMPLC_PC236_ISA,
+    COMEDI_AMPLC_PC263_ISA, COMEDI_DAS08_ISA, COMEDI_NI_LABPC_ISA as modules
+  * [i386] speakup: Enable SPEAKUP_SYNTH_DECPC as module
+  * [!x86] staging: Enable R8712U, R8188EU as modules (Closes: #742055, #760859)
+  * i2o: Disable I2O_EXT_ADAPTEC on 64-bit, as it assumes 32-bit virtual
+    addresses
+  * SCSI: aic94xx: Remove broken fallback for missing 'Ctrl-A' user settings
+  * udeb: Add ath6kl_sdio, libertas_cs, libertas_sdio, mwifiex_sdio,
+    r8192u_usb, r8723au, rtl8188eu, rtl818x_pci, rtl8723be, rtl8821ae,
+    spectrum_cs to nic-wireless-modules
+  * builddeb: put the dbg files into the correct directory
+  * [ppc64el] deb-pkg: Add support for powerpc little endian
+  * [armhf] deb-pkg: Add automatic support for armhf architecture
+  * debian/rules.real: Never make kernel-wedge errors non-fatal, as in
+    practice this meant we didn't see them until they appeared in unstable
+  * udeb: Fix typo in dependencies of speakup-modules (fixes FTBFS on
+    mips64el due to interaction with another bug in kernel-wedge)
+  * libceph: Apply critical fixes:
+    - set last_piece in ceph_msg_data_pages_cursor_init() correctly
+    - gracefully handle large reply messages from the mon
+    - add process_one_ticket() helper
+    - do not hard code max auth ticket len
+
+  [ Ian Campbell ]
+  * [armel/orion5x] udeb: Include mvmdio in nic-modules udeb.
+  * [arm64] Backport X-GENE Ethernet driver from v3.17-rcs
+  * [arm64] Including phy-xgene in sata-modules udeb since it is needed by
+    ahci_xgene.
+
+  [ Aurelien Jarno ]
+  * [mips64el] Drop loongson-2e and loongson-2f flavour as the minimum
+    supported ISA will be at least MIPS64.
+
+ -- Ben Hutchings <ben at decadent.org.uk>  Sat, 13 Sep 2014 03:49:53 +0100
+
+linux (3.16.2-2) unstable; urgency=medium
+
+  [ Ben Hutchings ]
+  * [armel,mips*] udeb: Remove lzo-modules, as LZO_COMPRESS is now built-in
+    (fixes FTBFS)
+
+ -- Ben Hutchings <ben at decadent.org.uk>  Mon, 08 Sep 2014 18:39:25 +0100
+
+linux (3.16.2-1) unstable; urgency=medium
+
+  * New upstream stable update (closes: #748615):
+    https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.16.1
+    https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.16.2
+    - isofs: Fix unbounded recursion when processing relocated directories
+      (CVE-2014-5471, CVE-2014-5472)
+    - kvm: iommu: fix the third parameter of kvm_iommu_put_pages
+      (CVE-2014-3601)
+
+  [ Ben Hutchings ]
+  * HID: Enable HID_RMI as module (Closes: #754519)
+  * Set ABI to 1
+  * [armhf,arm64] udeb: Add efi-modules
+  * ftrace: Enable more tracers (Closes: #563847, #758469):
+    - Enable FUNCTION_TRACER and DYNAMIC_FTRACE
+    - Enable FUNCTION_GRAPH_TRACER, FTRACE_SYSCALLS and STACK_TRACER 
+      (except on armel/kirkwood)
+  * [powerpc] drm: Disable DRM_RADEON_UMS, as radeon X driver now requires KMS
+  * aio: fix reqs_available handling (regression in 3.14.10)
+  * mm: Enable FRONTSWAP, ZSWAP (except armel/{ixp4xx,orion5x})
+    (Closes: #725703)
+  * [x86] mgag200: Enable auto-loading, but require mode-setting to be
+    explicitly enabled (as xserver-xorg-video-modesetting does)
+  * [armel] Remove obsolete mv78xx0 flavour
+  * virtio-scsi: Implement change_queue_depth for virtscsi targets
+    (Closes: #760324)
+  * sound/firewire: Enable SND_DICE, SND_FIREWORKS, SND_BEBOB as modules
+    (Closes: #756842)
+  * hid-sony: Enable SONY_FF (Closes: #760684)
+  * mtd: Enable MTD_SPI_NOR as module, since M25P80 now depends on it
+  * [m68k] Enable CGROUPS, required by systemd
+  * [armhf] Re-enable SPI_IMX as module
+  * [i386] comedi: Enable COMEDI_DAC02 as module, replacing COMEDI_POC
+  * sound: Disable SND_CS5535AUDIO on all but i386 and mips*/loongson-2f
+  * [mips*/loongson-2f] video: Re-add and enable sm7xxfb driver, removed
+    upstream in 3.15
+  * mnt: Fix flag handling on remount (CVE-2014-5206, CVE-2014-5207)
+    - mnt: Only change user settable mount flags in remount
+    - mnt: Move the test for MNT_LOCK_READONLY from change_mount_flags into
+      do_remount
+    - mnt: Correct permission checks in do_remount
+    - mnt: Change the default remount atime from relatime to the existing value
+    - mnt: Add tests for unprivileged remount cases that have found to be
+      faulty
+  * [armel/kirkwood] mm: Enable HIGHMEM (Closes: #760786)
+  * aufs: Update to aufs3.16-20140908:
+    - bugfix, missing mnt_want_write in moo
+    - new ioctl BRINFO
+    - bugfix, restore the lost unlock in an error path
+    - allow deleting a branch who has an opened dir
+    - bugfix, stop passing an error code to dput()
+    - possible bugfix, ptr in an array
+    - implement fhsm (not enabled)
+    - si_files has all opened files
+    - bugfix, use id instead of index to identify a branch
+    - new move-down flag AUFS_MVDOWN_FHSM_LOWER
+    - branch attr 'fhsm' is independent from rw/ro attrib
+    - support for a branch ro+fhsm
+    - fhsm notify after fixing inode attrib
+    - bugfix, hfile test in br_del_file()
+    - bugfix, pinning in mvdown
+    - bugfix, instantiate-revalidate race
+    - possible bugfix, temporary d_inode
+    - fhsm and br_del, allow the root dir only
+    - bugfix, get a removed dentry from an inode
+  * MAINTAINERS: Change aufs entry to say it's not upstream
+
+  [ Vagrant Cascadian ]
+  * [armmp] Enable IMX_IPUV3_CORE (closes: #756810).
+
+  [ Aurelien Jarno ]
+  * [mips*] Fix FP emulation for unaligned accesses.
+  * Update Spanish debconf template translations (Matias A. Bellone)
+    (Closes: #758591).
+  * [mips*/loongson3] Backport Loongson 3B support from 3.17.
+  * [powerpc,ppc64el] Backport KVM little endian support from 3.17.
+
+  [ maximilian attems ]
+  * Redisable UAS due to trouble with Seagate expansion drives
+    (closes: #755995, #759662), (reopen: #749014).
+
+  [ Ian Campbell ]
+  * [armhf] Remove incomplete list of hardware from image description. See
+    https://wiki.debian.org/DebianKernel/ARMMP for details.
+  * [armel/kirkwood] Enable CONFIG_MTD_SPI_NOR for flash access.
+
+  * [ppc64el] debian/patches/debian/ppc64el-disable-zImage.patch: remove patch.
+    The 'powerpc/boot: 64bit little endian wrapper' patch-set is in linux 3.16,
+    thus the default make/image-y target is OK now.
+
+ -- Ben Hutchings <ben at decadent.org.uk>  Mon, 08 Sep 2014 03:17:11 +0100
+
+linux (3.16-1~exp1) experimental; urgency=medium
+
+  * New upstream release: http://kernelnewbies.org/Linux_3.16
+
+  [ Aurelien Jarno ]
+  * [x86] vfio: Enable VFIO_PCI_VGA.
+  * udeb: rename crc32c.ko into crc32c_generic.ko in crc-modules.
+  * [mips*] Fix FP emulation.
+  * [mips*/loongson3] Enable TRANSPARENT_HUGEPAGE.
+
+  [ Bastian Blank ]
+  * [x86] Enable Xen PVH support.
+  * Enable more Nftables modules.
+  * [x86] Enable EARLY_PRINTK_EFI.
+  * Enable stack protector on all supported architectures. (closes: #756898)
+  * [powerpc64, s390x] Enable PCI hotplug.
+  * Enable RTL8723BE.
+  * Enable OPROFILE.
+  * [ppc64] Enable 64KiB pages.
+
+  [ Ben Hutchings ]
+  * udeb: Add new sound drivers to sound-modules (thanks to Samuel Thibault)
+    (Closes: #756998)
+  * [armhf] touchscreen: Enable TOUCHSCREEN_SUN4I as module (Closes: #757086)
+  * [!alpha,m68k,x86] Disable USELIB, only needed by libc5
+  * [arm*,ia64,ppc64el,s390*,sh4] Disable SYSFS_SYSCALL, only needed for
+    SVR4 compatibility
+  * [armel] Disable BINFMT_AOUT
+  * [armel] Re-enable ixp4xx flavour
+  * [armel] Change configuration to reduce kernel image size
+    - [/kirkwood] Change IPV6 to module
+    - [/ixp4xx,orion5x] Change IOSCHED_DEADLINE to module
+    - [/ixp4xx,orion5x] Disable SECURITY (i.e. Linux Security Modules,
+      including SELinux)
+
+ -- Ben Hutchings <ben at decadent.org.uk>  Sat, 09 Aug 2014 21:58:12 +0100
+
+linux (3.16~rc6-1~exp1) experimental; urgency=medium
+
+  * New upstream rc
+
+  [ Aurelien Jarno ]
+  * [mipsel/loongson3] Enable SND_HDA_INTEL.
+  * [mips/4kc-malta, mips/5kc-malta] Cleanup configuration file.
+  * [mips/sb1-bcm91250a] Cleanup configuration file.
+  * [mips/r4k-ip22] Cleanup configuration file.
+  * [mips/r5k-ip32] Cleanup configuration file.
+  * [mips64,mips64el] Add a 5kc-malta flavour.
+
+  [ Ben Hutchings ]
+  * [x86] wireless: Enable R8192EE as module (Closes: #755310)
+  * net: Re-enable CGROUP_NET_PRIO as builtin
+
+ -- maximilian attems <maks at debian.org>  Mon, 21 Jul 2014 21:51:45 +0200
+
+linux (3.16~rc5-1~exp1) experimental; urgency=medium
+
+  [ maximilian attems ]
+  * New upstream rc
+
+  [ Ben Hutchings ]
+  * aufs: Update to aufs3.x-rcN-20140714:
+    - tiny, no msg in spinlock regeion
+    - minor bugfix, correct error value in link(2)
+    - O_TMPFILE support
+    - bugfix, handling an error in opening a FIFO
+    - propagate aufs file references to new vmas created by remap_file_pages()
+    - begin supporting fallocate(2)
+    - linux-3.16, convert iovec into iov_iter
+    - allow an unprivileged mount under user_ns (enabled by module parameter)
+    - simply handing attribute string
+    - add mount option for copy-up on open
+    - add mount option for move-up on open
+    - add dirperm1 mount option
+    - mvdown, return a subset of statfs(2) optionally
+    - mvdown, tell about the branch is at the bottom
+
+ -- maximilian attems <maks at debian.org>  Tue, 15 Jul 2014 22:57:31 +0200
+
+linux (3.15.5-1~exp1) experimental; urgency=medium
+
+  * New upstream stable update:
+    https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.15.4
+    https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.15.5
+
+ -- maximilian attems <maks at debian.org>  Thu, 10 Jul 2014 16:02:29 +0200
+
+linux (3.15.3-1~exp1) experimental; urgency=medium
+
+  * New upstream stable update:
+    https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.15.2
+    https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.15.3
+
+  [ Yunqiang Su ]
+  * [mips,mipsel] Move common MIPS kernel config files to kernelarch-mips.
+  * [mips,mipsel] Clean mipsel installer by using symlinks to the mips
+    versions.
+  * [mips,mipsel] Add mips64 and mips64el support (Closes: #749688).
+
+ -- maximilian attems <maks at debian.org>  Wed, 02 Jul 2014 20:30:41 +0200
+
+linux (3.15.1-1~exp1) experimental; urgency=medium
+
+  * New upstream release: http://kernelnewbies.org/Linux_3.15
+  * New upstream stable update:
+    https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.15.1
+
+  [ maximilian attems ]
+  * Update policy version to 3.9.5 without changes
+
+  [ Ian Campbell ]
+  * [armhf] Enable HDMI on imx6qdl-wandboard, SolidRun HummingBoard and
+    Cubox -i. (Closes: #750406)
+
+  [ Ben Hutchings ]
+  * [powerpc] Build-depend on gcc-4.8 (>= 4.8.2-1) to ensure that
+    JUMP_LABEL works
+
+ -- maximilian attems <maks at debian.org>  Fri, 20 Jun 2014 23:13:13 +0200
+
+linux (3.15~rc8-1~exp1) experimental; urgency=medium
+
+  * New upstream release candidate
+
+  [ Ian Campbell ]
+  * [armhf] Enable Broadcom IEEE802.11n embedded FullMAC WLAN driver
+    (Closes: #734430)
+  * [armhf] Backport and enable sunxi MMC driver (Closes: #749484)
+
+ -- maximilian attems <maks at debian.org>  Tue, 03 Jun 2014 11:43:26 +0200
+
+linux (3.15~rc7-1~exp1) experimental; urgency=medium
+
+  * New upstream release candidate
+
+  [ maximilian attems ]
+  * Enable USB_UAS in topconfig (closes: #749014)
+
+  [ Ian Campbell ]
+  * [armhf] Enable SERIAL_OF_PLATFORM.
+  * [armhf] Enable DRM drivers DRM_IMX_* for IMX platform (Closes: #748406)
+  * [armhf] Enable SND_SOC_IMX_SPDIF (Closes: #748890)
+
+ -- maximilian attems <maks at debian.org>  Tue, 27 May 2014 10:55:32 +0200
+
+linux (3.15~rc5-1~exp1) experimental; urgency=medium
+
+  * New upstream release candidate
+
+  [ Ben Hutchings ]
+  * aufs: Update to aufs3.x-rcN-20140421
+  * [rt] Disable until it is updated for 3.15 or later
+
+  [ Aurelien Jarno ]
+  * [mipsel] Add a loongson-3 flavour to support Loongson 3A/3B machines.
+  * [mips/mipsel] Remove the sb1a-bcm91480b flavour.
+
+  [ Ian Campbell ]
+  * [armel/orion5x] Disable BPF_JIT, MEMCG, USER_NS to reduce kernel
+    size.
+  * [armel/kirkwood] Enable PCI_MVEBU for PCI support when booted via Device
+    Tree.
+
+ -- maximilian attems <maks at debian.org>  Fri, 16 May 2014 14:33:57 +0200
 
 linux (3.14.15-2) unstable; urgency=medium
 

Modified: dists/wheezy-backports/linux/debian/config/alpha/config
==============================================================================
--- dists/wheezy-backports/linux/debian/config/alpha/config	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/alpha/config	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,9 +1,4 @@
 ##
-## file: arch/Kconfig
-##
-# CONFIG_OPROFILE is not set
-
-##
 ## file: arch/alpha/Kconfig
 ##
 ## choice: Alpha system type
@@ -79,7 +74,6 @@
 CONFIG_PATA_ALI=m
 CONFIG_PATA_AMD=m
 CONFIG_PATA_CS5520=m
-CONFIG_PATA_CS5530=m
 CONFIG_PATA_CYPRESS=m
 CONFIG_PATA_EFAR=m
 CONFIG_PATA_HPT366=m
@@ -230,6 +224,7 @@
 CONFIG_SENSORS_GL518SM=m
 CONFIG_SENSORS_GL520SM=m
 CONFIG_SENSORS_IT87=m
+CONFIG_SENSORS_MAX1619=m
 CONFIG_SENSORS_LM63=m
 CONFIG_SENSORS_LM75=m
 CONFIG_SENSORS_LM77=m
@@ -240,7 +235,6 @@
 CONFIG_SENSORS_LM87=m
 CONFIG_SENSORS_LM90=m
 CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
 CONFIG_SENSORS_PC87360=m
 CONFIG_SENSORS_PCF8591=m
 CONFIG_SENSORS_SIS5595=m
@@ -352,9 +346,8 @@
 ##
 ## file: drivers/isdn/capi/Kconfig
 ##
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
 CONFIG_ISDN_CAPI_CAPI20=m
+CONFIG_ISDN_CAPI_MIDDLEWARE=y
 CONFIG_ISDN_CAPI_CAPIDRV=m
 
 ##
@@ -478,10 +471,6 @@
 CONFIG_MTDRAM_TOTAL_SIZE=4096
 CONFIG_MTDRAM_ERASE_SIZE=128
 CONFIG_MTD_BLOCK2MTD=m
-CONFIG_MTD_DOCPROBE_ADVANCED=y
-CONFIG_MTD_DOCPROBE_ADDRESS=0x0000
-CONFIG_MTD_DOCPROBE_HIGH=y
-CONFIG_MTD_DOCPROBE_55AA=y
 
 ##
 ## file: drivers/mtd/maps/Kconfig
@@ -503,7 +492,6 @@
 ## file: drivers/net/Kconfig
 ##
 CONFIG_NET_FC=y
-CONFIG_NETPOLL_TRAP=y
 CONFIG_NET_SB1000=m
 
 ##
@@ -887,7 +875,19 @@
 CONFIG_USB_SL811_CS=m
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/backlight/Kconfig
+##
+CONFIG_LCD_CLASS_DEVICE=m
+
+##
+## file: drivers/video/console/Kconfig
+##
+CONFIG_VGA_CONSOLE=y
+CONFIG_MDA_CONSOLE=m
+CONFIG_FRAMEBUFFER_CONSOLE=m
+
+##
+## file: drivers/video/fbdev/Kconfig
 ##
 CONFIG_FB=y
 CONFIG_FB_MODE_HELPERS=y
@@ -927,18 +927,6 @@
 CONFIG_FB_VIRTUAL=m
 
 ##
-## file: drivers/video/backlight/Kconfig
-##
-CONFIG_LCD_CLASS_DEVICE=m
-
-##
-## file: drivers/video/console/Kconfig
-##
-CONFIG_VGA_CONSOLE=y
-CONFIG_MDA_CONSOLE=m
-CONFIG_FRAMEBUFFER_CONSOLE=m
-
-##
 ## file: drivers/watchdog/Kconfig
 ##
 CONFIG_PCWATCHDOG=m
@@ -958,8 +946,10 @@
 ##
 ## file: init/Kconfig
 ##
+CONFIG_USELIB=y
 #. TODO
 # CONFIG_AUDIT is not set
+CONFIG_SYSFS_SYSCALL=y
 
 ##
 ## file: lib/Kconfig

Modified: dists/wheezy-backports/linux/debian/config/arm64/config
==============================================================================
--- dists/wheezy-backports/linux/debian/config/arm64/config	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/arm64/config	Sun Sep 21 14:23:16 2014	(r21886)
@@ -3,9 +3,31 @@
 ##
 CONFIG_ARCH_VEXPRESS=y
 CONFIG_ARCH_XGENE=y
-CONFIG_COMPAT=y
 CONFIG_SMP=y
 CONFIG_XEN=y
+CONFIG_COMPAT=y
+
+##
+## file: arch/arm64/crypto/Kconfig
+##
+CONFIG_ARM64_CRYPTO=y
+CONFIG_CRYPTO_SHA1_ARM64_CE=m
+CONFIG_CRYPTO_SHA2_ARM64_CE=m
+CONFIG_CRYPTO_GHASH_ARM64_CE=m
+CONFIG_CRYPTO_AES_ARM64_CE=m
+CONFIG_CRYPTO_AES_ARM64_CE_CCM=m
+CONFIG_CRYPTO_AES_ARM64_CE_BLK=m
+# CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set
+
+##
+## file: drivers/ata/Kconfig
+##
+CONFIG_AHCI_XGENE=m
+
+##
+## file: drivers/clk/Kconfig
+##
+CONFIG_COMMON_CLK_XGENE=y
 
 ##
 ## file: drivers/input/misc/Kconfig
@@ -31,6 +53,11 @@
 CONFIG_NE2K_PCI=m
 
 ##
+## file: drivers/net/ethernet/apm/xgene/Kconfig
+##
+CONFIG_NET_XGENE=m
+
+##
 ## file: drivers/net/ethernet/realtek/Kconfig
 ##
 CONFIG_8139CP=m
@@ -48,6 +75,11 @@
 CONFIG_SMSC911X=m
 
 ##
+## file: drivers/phy/Kconfig
+##
+CONFIG_PHY_XGENE=m
+
+##
 ## file: drivers/power/reset/Kconfig
 ##
 CONFIG_POWER_RESET_VEXPRESS=y
@@ -57,6 +89,7 @@
 ## file: drivers/rtc/Kconfig
 ##
 CONFIG_RTC_DRV_PL031=m
+CONFIG_RTC_DRV_XGENE=m
 
 ##
 ## file: drivers/tty/serial/Kconfig
@@ -84,3 +117,4 @@
 ## file: drivers/virtio/Kconfig
 ##
 CONFIG_VIRTIO_MMIO=m
+

Modified: dists/wheezy-backports/linux/debian/config/armel/config-reduced
==============================================================================
--- dists/wheezy-backports/linux/debian/config/armel/config-reduced	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/armel/config-reduced	Sun Sep 21 14:23:16 2014	(r21886)
@@ -4,6 +4,11 @@
 # CONFIG_KPROBES is not set
 
 ##
+## file: block/Kconfig.iosched
+##
+CONFIG_IOSCHED_DEADLINE=m
+
+##
 ## file: crypto/Kconfig
 ##
 # CONFIG_CRYPTO_FIPS is not set
@@ -17,12 +22,23 @@
 ## file: init/Kconfig
 ##
 # CONFIG_AUDITSYSCALL is not set
+#. Saves about 7K
+# CONFIG_MEMCG is not set
 # CONFIG_CHECKPOINT_RESTORE is not set
+#. Saves about 5K
+# CONFIG_USER_NS is not set
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 #. Saves about 17K, and none of the quirks are likely to be needed
 # CONFIG_PCI_QUIRKS is not set
 
 ##
+## file: kernel/power/Kconfig
+##
+# CONFIG_SUSPEND is not set
+# CONFIG_HIBERNATION is not set
+# CONFIG_PM_RUNTIME is not set
+
+##
 ## file: kernel/trace/Kconfig
 ##
 # CONFIG_FTRACE is not set
@@ -36,9 +52,16 @@
 ## file: mm/Kconfig
 ##
 # CONFIG_KSM is not set
+# CONFIG_FRONTSWAP is not set
 # CONFIG_ZSMALLOC is not set
 
 ##
+## file: net/Kconfig
+##
+#. Saves about 3K
+# CONFIG_BPF_JIT is not set
+
+##
 ## file: net/ipv6/Kconfig
 ##
 CONFIG_IPV6=m
@@ -54,11 +77,12 @@
 # CONFIG_NETLINK_MMAP is not set
 
 ##
-## file: security/yama/Kconfig
+## file: security/Kconfig
 ##
-# CONFIG_SECURITY_YAMA is not set
+# CONFIG_SECURITY is not set
 
 ##
 ## file: usr/Kconfig
 ##
 # CONFIG_RD_LZ4 is not set
+

Modified: dists/wheezy-backports/linux/debian/config/armel/config.ixp4xx
==============================================================================
--- dists/wheezy-backports/linux/debian/config/armel/config.ixp4xx	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/armel/config.ixp4xx	Sun Sep 21 14:23:16 2014	(r21886)
@@ -9,7 +9,6 @@
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_CMDLINE="console=ttyS0,115200"
 # CONFIG_XIP_KERNEL is not set
-CONFIG_KEXEC=y
 CONFIG_ATAGS_PROC=y
 # CONFIG_ARTHUR is not set
 
@@ -87,7 +86,6 @@
 # CONFIG_PATA_ATIIXP is not set
 # CONFIG_PATA_CMD64X is not set
 # CONFIG_PATA_CS5520 is not set
-# CONFIG_PATA_CS5530 is not set
 # CONFIG_PATA_CYPRESS is not set
 # CONFIG_PATA_EFAR is not set
 # CONFIG_PATA_HPT366 is not set
@@ -185,6 +183,7 @@
 # CONFIG_SENSORS_F71805F is not set
 # CONFIG_SENSORS_GL518SM is not set
 # CONFIG_SENSORS_GL520SM is not set
+CONFIG_SENSORS_MAX1619=m
 CONFIG_SENSORS_LM63=m
 CONFIG_SENSORS_LM75=m
 CONFIG_SENSORS_LM77=m
@@ -195,7 +194,6 @@
 CONFIG_SENSORS_LM87=m
 CONFIG_SENSORS_LM90=m
 CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
 # CONFIG_SENSORS_PC87360 is not set
 CONFIG_SENSORS_PCF8591=m
 # CONFIG_SENSORS_SIS5595 is not set
@@ -387,7 +385,6 @@
 ## file: drivers/net/Kconfig
 ##
 # CONFIG_NET_FC is not set
-# CONFIG_NETPOLL_TRAP is not set
 
 ##
 ## file: drivers/net/arcnet/Kconfig
@@ -630,11 +627,6 @@
 CONFIG_USB_SL811_HCD=m
 
 ##
-## file: drivers/video/Kconfig
-##
-# CONFIG_FB is not set
-
-##
 ## file: drivers/video/backlight/Kconfig
 ##
 # CONFIG_BACKLIGHT_CLASS_DEVICE is not set
@@ -646,6 +638,17 @@
 # CONFIG_VGACON_SOFT_SCROLLBACK is not set
 
 ##
+## file: drivers/video/fbdev/Kconfig
+##
+# CONFIG_FB is not set
+
+##
+## file: drivers/virtio/Kconfig
+##
+# CONFIG_VIRTIO_PCI is not set
+# CONFIG_VIRTIO_BALLOON is not set
+
+##
 ## file: drivers/watchdog/Kconfig
 ##
 CONFIG_IXP4XX_WATCHDOG=m
@@ -654,18 +657,9 @@
 # CONFIG_USBPCWATCHDOG is not set
 
 ##
-## file: fs/Kconfig.binfmt
-##
-CONFIG_BINFMT_AOUT=m
-
-##
 ## file: init/Kconfig
 ##
 CONFIG_LOG_BUF_SHIFT=14
-#. Saves about 7K
-# CONFIG_MEMCG is not set
-#. Saves about 5K
-# CONFIG_USER_NS is not set
 
 ##
 ## file: lib/Kconfig.debug
@@ -682,12 +676,6 @@
 ## end choice
 
 ##
-## file: net/Kconfig
-##
-#. Saves about 3K
-# CONFIG_BPF_JIT is not set
-
-##
 ## file: net/ax25/Kconfig
 ##
 CONFIG_HAMRADIO=y
@@ -786,9 +774,3 @@
 ##
 # CONFIG_SND_HDA_INTEL is not set
 
-##
-## file: drivers/virtio/Kconfig
-##
-# CONFIG_VIRTIO_PCI is not set
-# CONFIG_VIRTIO_BALLOON is not set
-

Modified: dists/wheezy-backports/linux/debian/config/armel/config.kirkwood
==============================================================================
--- dists/wheezy-backports/linux/debian/config/armel/config.kirkwood	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/armel/config.kirkwood	Sun Sep 21 14:23:16 2014	(r21886)
@@ -5,6 +5,7 @@
 CONFIG_ARCH_KIRKWOOD=y
 ## end choice
 CONFIG_PCI=y
+CONFIG_HIGHMEM=y
 CONFIG_UACCESS_WITH_MEMCPY=y
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
@@ -12,7 +13,6 @@
 CONFIG_ARM_ATAG_DTB_COMPAT=y
 CONFIG_CMDLINE=""
 # CONFIG_XIP_KERNEL is not set
-CONFIG_KEXEC=y
 CONFIG_ATAGS_PROC=y
 CONFIG_FPE_NWFPE=y
 # CONFIG_FPE_NWFPE_XP is not set
@@ -29,44 +29,17 @@
 ## file: arch/arm/mach-kirkwood/Kconfig
 ##
 CONFIG_MACH_D2NET_V2=y
-CONFIG_MACH_DOCKSTAR=y
-CONFIG_MACH_ESATA_SHEEVAPLUG=y
-CONFIG_MACH_GURUPLUG=y
-CONFIG_MACH_INETSPACE_V2=y
-CONFIG_MACH_MV88F6281GTW_GE=y
 CONFIG_MACH_NET2BIG_V2=y
 CONFIG_MACH_NET5BIG_V2=y
-CONFIG_MACH_NETSPACE_MAX_V2=y
-CONFIG_MACH_NETSPACE_V2=y
 CONFIG_MACH_OPENRD_BASE=y
 CONFIG_MACH_OPENRD_CLIENT=y
 CONFIG_MACH_OPENRD_ULTIMATE=y
 CONFIG_MACH_RD88F6192_NAS=y
 CONFIG_MACH_RD88F6281=y
-CONFIG_MACH_SHEEVAPLUG=y
 CONFIG_MACH_T5325=y
 CONFIG_MACH_TS219=y
 CONFIG_MACH_TS41X=y
 CONFIG_ARCH_KIRKWOOD_DT=y
-CONFIG_MACH_DLINK_KIRKWOOD_DT=y
-CONFIG_MACH_DOCKSTAR_DT=y
-CONFIG_MACH_DREAMPLUG_DT=y
-CONFIG_MACH_GOFLEXNET_DT=y
-CONFIG_MACH_GURUPLUG_DT=y
-CONFIG_MACH_IB62X0_DT=y
-CONFIG_MACH_ICONNECT_DT=y
-CONFIG_MACH_INETSPACE_V2_DT=y
-CONFIG_MACH_IOMEGA_IX2_200_DT=y
-CONFIG_MACH_KM_KIRKWOOD_DT=y
-CONFIG_MACH_LSXL_DT=y
-CONFIG_MACH_MPLCEC4_DT=y
-CONFIG_MACH_NETSPACE_LITE_V2_DT=y
-CONFIG_MACH_NETSPACE_MAX_V2_DT=y
-CONFIG_MACH_NETSPACE_MINI_V2_DT=y
-CONFIG_MACH_NETSPACE_V2_DT=y
-CONFIG_MACH_OPENBLOCKS_A6_DT=y
-CONFIG_MACH_TOPKICK_DT=y
-CONFIG_MACH_TS219_DT=y
 
 ##
 ## file: arch/arm/mm/Kconfig
@@ -77,6 +50,11 @@
 # CONFIG_CPU_DCACHE_WRITETHROUGH is not set
 
 ##
+## file: block/Kconfig.iosched
+##
+CONFIG_IOSCHED_DEADLINE=m
+
+##
 ## file: block/partitions/Kconfig
 ##
 CONFIG_ACORN_PARTITION=y
@@ -126,7 +104,6 @@
 # CONFIG_PATA_ATIIXP is not set
 # CONFIG_PATA_CMD64X is not set
 # CONFIG_PATA_CS5520 is not set
-# CONFIG_PATA_CS5530 is not set
 # CONFIG_PATA_CYPRESS is not set
 # CONFIG_PATA_EFAR is not set
 # CONFIG_PATA_HPT366 is not set
@@ -197,6 +174,11 @@
 # CONFIG_DRM is not set
 
 ##
+## file: drivers/gpu/vga/Kconfig
+##
+# CONFIG_VGA_ARB is not set
+
+##
 ## file: drivers/hwmon/Kconfig
 ##
 CONFIG_SENSORS_GPIO_FAN=m
@@ -241,9 +223,8 @@
 ##
 ## file: drivers/isdn/capi/Kconfig
 ##
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
 CONFIG_ISDN_CAPI_CAPI20=m
+CONFIG_ISDN_CAPI_MIDDLEWARE=y
 CONFIG_ISDN_CAPI_CAPIDRV=m
 
 ##
@@ -368,7 +349,6 @@
 CONFIG_MTD_NAND=y
 # CONFIG_MTD_NAND_DISKONCHIP is not set
 # CONFIG_MTD_NAND_CAFE is not set
-# CONFIG_MTD_ALAUDA is not set
 CONFIG_MTD_NAND_ORION=y
 
 ##
@@ -377,6 +357,11 @@
 # CONFIG_MTD_ONENAND is not set
 
 ##
+## file: drivers/mtd/spi-nor/Kconfig
+##
+CONFIG_MTD_SPI_NOR=y
+
+##
 ## file: drivers/mtd/ubi/Kconfig
 ##
 CONFIG_MTD_UBI=y
@@ -461,9 +446,9 @@
 CONFIG_MWIFIEX_SDIO=m
 
 ##
-## file: drivers/of/Kconfig
+## file: drivers/pci/host/Kconfig
 ##
-CONFIG_PROC_DEVICETREE=y
+CONFIG_PCI_MVEBU=y
 
 ##
 ## file: drivers/pcmcia/Kconfig
@@ -600,25 +585,26 @@
 CONFIG_USB_SL811_HCD=m
 
 ##
-## file: drivers/video/Kconfig
-##
-CONFIG_FB=m
-
-##
 ## file: drivers/video/console/Kconfig
 ##
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_FRAMEBUFFER_CONSOLE=m
 
 ##
-## file: drivers/watchdog/Kconfig
+## file: drivers/video/fbdev/Kconfig
 ##
-CONFIG_ORION_WATCHDOG=m
+CONFIG_FB=m
 
 ##
-## file: fs/Kconfig.binfmt
+## file: drivers/virtio/Kconfig
 ##
-CONFIG_BINFMT_AOUT=m
+# CONFIG_VIRTIO_PCI is not set
+# CONFIG_VIRTIO_BALLOON is not set
+
+##
+## file: drivers/watchdog/Kconfig
+##
+CONFIG_ORION_WATCHDOG=m
 
 ##
 ## file: fs/jffs2/Kconfig
@@ -641,6 +627,13 @@
 # CONFIG_SUSPEND is not set
 
 ##
+## file: kernel/trace/Kconfig
+##
+# CONFIG_FUNCTION_GRAPH_TRACER is not set
+# CONFIG_FTRACE_SYSCALLS is not set
+# CONFIG_STACK_TRACER is not set
+
+##
 ## file: mm/Kconfig
 ##
 ## choice: Memory model
@@ -664,6 +657,11 @@
 CONFIG_ROSE=m
 
 ##
+## file: net/ipv6/Kconfig
+##
+CONFIG_IPV6=m
+
+##
 ## file: sound/soc/Kconfig
 ##
 CONFIG_SND_SOC=m
@@ -680,15 +678,3 @@
 CONFIG_SND_KIRKWOOD_SOC_OPENRD=m
 CONFIG_SND_KIRKWOOD_SOC_T5325=m
 
-##
-## file: drivers/virtio/Kconfig
-##
-# CONFIG_VIRTIO_PCI is not set
-# CONFIG_VIRTIO_BALLOON is not set
-
-##
-## file: unknown
-##
-#. This is replaced by CONFIG_MACH_DB88F628X_BP_DT but we don't use DT here yet
-CONFIG_MACH_DB88F6281_BP=y
-

Modified: dists/wheezy-backports/linux/debian/config/armel/config.orion5x
==============================================================================
--- dists/wheezy-backports/linux/debian/config/armel/config.orion5x	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/armel/config.orion5x	Sun Sep 21 14:23:16 2014	(r21886)
@@ -10,7 +10,6 @@
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_CMDLINE=""
 # CONFIG_XIP_KERNEL is not set
-CONFIG_KEXEC=y
 CONFIG_ATAGS_PROC=y
 CONFIG_VFP=y
 # CONFIG_ARTHUR is not set
@@ -37,10 +36,8 @@
 CONFIG_MACH_WRT350N_V2=y
 CONFIG_MACH_TS78XX=y
 CONFIG_MACH_MV2120=y
-CONFIG_MACH_D2NET=y
-CONFIG_MACH_BIGDISK=y
 CONFIG_MACH_NET2BIG=y
-CONFIG_MACH_MSS2=y
+CONFIG_MACH_MSS2_DT=y
 CONFIG_MACH_WNR854T=y
 CONFIG_MACH_RD88F5181L_GE=y
 CONFIG_MACH_RD88F5181L_FXO=y
@@ -105,7 +102,6 @@
 # CONFIG_PATA_ATIIXP is not set
 # CONFIG_PATA_CMD64X is not set
 # CONFIG_PATA_CS5520 is not set
-# CONFIG_PATA_CS5530 is not set
 # CONFIG_PATA_CYPRESS is not set
 # CONFIG_PATA_EFAR is not set
 # CONFIG_PATA_HPT366 is not set
@@ -217,9 +213,8 @@
 ##
 ## file: drivers/isdn/capi/Kconfig
 ##
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
 CONFIG_ISDN_CAPI_CAPI20=m
+CONFIG_ISDN_CAPI_MIDDLEWARE=y
 CONFIG_ISDN_CAPI_CAPIDRV=m
 
 ##
@@ -262,7 +257,6 @@
 # CONFIG_MTD_REDBOOT_PARTS is not set
 CONFIG_MTD_CMDLINE_PARTS=y
 # CONFIG_MTD_AFS_PARTS is not set
-CONFIG_MTD_BLKDEVS=y
 CONFIG_MTD_BLOCK=y
 CONFIG_FTL=m
 CONFIG_NFTL=m
@@ -327,7 +321,6 @@
 CONFIG_MTD_NAND=y
 # CONFIG_MTD_NAND_DISKONCHIP is not set
 # CONFIG_MTD_NAND_CAFE is not set
-# CONFIG_MTD_ALAUDA is not set
 CONFIG_MTD_NAND_ORION=y
 
 ##
@@ -519,24 +512,25 @@
 CONFIG_USB_SL811_HCD=m
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/console/Kconfig
 ##
-CONFIG_FB=m
+# CONFIG_VGA_CONSOLE is not set
 
 ##
-## file: drivers/video/console/Kconfig
+## file: drivers/video/fbdev/Kconfig
 ##
-# CONFIG_VGA_CONSOLE is not set
+CONFIG_FB=m
 
 ##
-## file: drivers/watchdog/Kconfig
+## file: drivers/virtio/Kconfig
 ##
-CONFIG_ORION_WATCHDOG=m
+# CONFIG_VIRTIO_PCI is not set
+# CONFIG_VIRTIO_BALLOON is not set
 
 ##
-## file: fs/Kconfig.binfmt
+## file: drivers/watchdog/Kconfig
 ##
-CONFIG_BINFMT_AOUT=m
+CONFIG_ORION_WATCHDOG=m
 
 ##
 ## file: mm/Kconfig
@@ -561,15 +555,3 @@
 CONFIG_NETROM=m
 CONFIG_ROSE=m
 
-##
-## file: drivers/virtio/Kconfig
-##
-# CONFIG_VIRTIO_PCI is not set
-# CONFIG_VIRTIO_BALLOON is not set
-
-##
-## file: unknown
-##
-#. This is replaced by CONFIG_MACH_EDMINI_V2_DT but we don't use DT here yet
-CONFIG_MACH_EDMINI_V2=y
-

Modified: dists/wheezy-backports/linux/debian/config/armel/config.versatile
==============================================================================
--- dists/wheezy-backports/linux/debian/config/armel/config.versatile	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/armel/config.versatile	Sun Sep 21 14:23:16 2014	(r21886)
@@ -9,7 +9,6 @@
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_CMDLINE=""
 # CONFIG_XIP_KERNEL is not set
-CONFIG_KEXEC=y
 CONFIG_ATAGS_PROC=y
 CONFIG_FPE_NWFPE=y
 # CONFIG_FPE_NWFPE_XP is not set
@@ -68,7 +67,6 @@
 # CONFIG_PATA_ATIIXP is not set
 # CONFIG_PATA_CMD64X is not set
 # CONFIG_PATA_CS5520 is not set
-# CONFIG_PATA_CS5530 is not set
 # CONFIG_PATA_CYPRESS is not set
 # CONFIG_PATA_EFAR is not set
 # CONFIG_PATA_HPT366 is not set
@@ -168,7 +166,6 @@
 ##
 # CONFIG_NET_FC is not set
 CONFIG_IFB=m
-# CONFIG_NETPOLL_TRAP is not set
 
 ##
 ## file: drivers/net/arcnet/Kconfig
@@ -369,9 +366,19 @@
 # CONFIG_USB_R8A66597_HCD is not set
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/backlight/Kconfig
+##
+CONFIG_BACKLIGHT_CLASS_DEVICE=m
+
+##
+## file: drivers/video/console/Kconfig
+##
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+
+##
+## file: drivers/video/fbdev/Kconfig
 ##
-CONFIG_VIDEO_OUTPUT_CONTROL=m
 CONFIG_FB=y
 CONFIG_FIRMWARE_EDID=y
 CONFIG_FB_MODE_HELPERS=y
@@ -403,17 +410,6 @@
 CONFIG_FB_VIRTUAL=m
 
 ##
-## file: drivers/video/backlight/Kconfig
-##
-CONFIG_BACKLIGHT_CLASS_DEVICE=m
-
-##
-## file: drivers/video/console/Kconfig
-##
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-
-##
 ## file: drivers/virtio/Kconfig
 ##
 CONFIG_VIRTIO_PCI=y

Modified: dists/wheezy-backports/linux/debian/config/armel/defines
==============================================================================
--- dists/wheezy-backports/linux/debian/config/armel/defines	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/armel/defines	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,8 +1,7 @@
 [base]
 flavours:
-# ixp4xx
+ ixp4xx
  kirkwood
- mv78xx0
  orion5x
  versatile
 kernel-arch: arm
@@ -41,10 +40,6 @@
 # QNAP TS-119/TS-219: 2097152 - 8 - 64 = 2097080
 check-size: 2097080
 
-[mv78xx0_description]
-hardware: Marvell 78xx0
-hardware-long: Marvell DB-78xx0-BP Development Board
-
 [orion5x_description]
 hardware: Marvell Orion
 hardware-long: Marvell Orion 5181, 5182 and 5281 based systems (QNAP TS-109/TS-209, etc)

Modified: dists/wheezy-backports/linux/debian/config/armhf/config
==============================================================================
--- dists/wheezy-backports/linux/debian/config/armhf/config	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/armhf/config	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,7 +1,6 @@
 ##
 ## file: arch/arm/Kconfig
 ##
-CONFIG_KEXEC=y
 CONFIG_ATAGS_PROC=y
 #. Enable floating point unit
 CONFIG_VFP=y

Modified: dists/wheezy-backports/linux/debian/config/armhf/config.armmp
==============================================================================
--- dists/wheezy-backports/linux/debian/config/armhf/config.armmp	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/armhf/config.armmp	Sun Sep 21 14:23:16 2014	(r21886)
@@ -6,9 +6,12 @@
 ## end choice
 # CONFIG_ARCH_MULTI_V6 is not set
 CONFIG_ARCH_MULTI_V7=y
+CONFIG_ARCH_VIRT=y
+CONFIG_PCI=y
 CONFIG_SMP=y
 CONFIG_SMP_ON_UP=y
 CONFIG_HIGHMEM=y
+CONFIG_XEN=y
 CONFIG_ARM_APPENDED_DTB=y
 CONFIG_ARM_ATAG_DTB_COMPAT=y
 ## choice: Kernel command line type
@@ -17,10 +20,6 @@
 ## end choice
 CONFIG_NEON=y
 
-CONFIG_PCI=y
-
-CONFIG_XEN=y
-
 ##
 ## file: arch/arm/Kconfig.debug
 ##
@@ -28,6 +27,14 @@
 # CONFIG_DEBUG_LL is not set
 
 ##
+## file: arch/arm/mach-exynos/Kconfig
+##
+CONFIG_ARCH_EXYNOS=y
+# CONFIG_ARCH_EXYNOS3 is not set
+# CONFIG_ARCH_EXYNOS4 is not set
+CONFIG_ARCH_EXYNOS5=y
+
+##
 ## file: arch/arm/mach-highbank/Kconfig
 ##
 CONFIG_ARCH_HIGHBANK=y
@@ -36,13 +43,7 @@
 ## file: arch/arm/mach-imx/Kconfig
 ##
 CONFIG_ARCH_MXC=y
-CONFIG_MXC_IRQ_PRIOR=y
 CONFIG_MACH_IMX51_DT=y
-CONFIG_MACH_MX51_BABBAGE=y
-CONFIG_MACH_EUKREA_CPUIMX51SD=y
-## choice: Baseboard
-CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD=y
-## end choice
 CONFIG_SOC_IMX53=y
 CONFIG_SOC_IMX6Q=y
 
@@ -83,11 +84,6 @@
 CONFIG_ARCH_VEXPRESS_CA9X4=y
 
 ##
-## file: arch/arm/mach-virt/Kconfig
-##
-CONFIG_ARCH_VIRT=y
-
-##
 ## file: arch/arm/mach-vt8500/Kconfig
 ##
 CONFIG_ARCH_WM8850=y
@@ -144,6 +140,7 @@
 ## file: drivers/clk/Kconfig
 ##
 CONFIG_CLK_TWL6040=m
+CONFIG_COMMON_CLK_S2MPS11=m
 
 ##
 ## file: drivers/cpufreq/Kconfig
@@ -170,22 +167,22 @@
 CONFIG_DMADEVICES=y
 CONFIG_AMBA_PL08X=y
 CONFIG_MV_XOR=y
+CONFIG_TI_EDMA=y
 CONFIG_PL330_DMA=y
 CONFIG_IMX_SDMA=y
 CONFIG_IMX_DMA=y
 CONFIG_MXS_DMA=y
 CONFIG_DMA_OMAP=y
 CONFIG_TI_CPPI41=m
-CONFIG_TI_EDMA=y
 
 ##
 ## file: drivers/gpio/Kconfig
 ##
 CONFIG_GPIO_SYSFS=y
 CONFIG_GPIO_DA9052=m
+CONFIG_GPIO_GENERIC_PLATFORM=m
 CONFIG_GPIO_TWL4030=y
 CONFIG_GPIO_TWL6040=y
-CONFIG_GPIO_GENERIC_PLATFORM=m
 
 ##
 ## file: drivers/gpu/drm/Kconfig
@@ -203,6 +200,11 @@
 CONFIG_DRM_TILCDC=m
 
 ##
+## file: drivers/gpu/ipu-v3/Kconfig
+##
+CONFIG_IMX_IPUV3_CORE=m
+
+##
 ## file: drivers/hwspinlock/Kconfig
 ##
 CONFIG_HWSPINLOCK_OMAP=m
@@ -215,13 +217,20 @@
 ##
 ## file: drivers/i2c/busses/Kconfig
 ##
+CONFIG_I2C_EXYNOS5=m
 CONFIG_I2C_GPIO=y
 CONFIG_I2C_IMX=m
 CONFIG_I2C_MV64XXX=m
 CONFIG_I2C_OMAP=y
+CONFIG_I2C_S3C2410=m
 CONFIG_I2C_VERSATILE=m
 
 ##
+## file: drivers/i2c/muxes/Kconfig
+##
+CONFIG_I2C_ARB_GPIO_CHALLENGE=m
+
+##
 ## file: drivers/iio/Kconfig
 ##
 CONFIG_IIO=m
@@ -261,8 +270,9 @@
 ## file: drivers/input/touchscreen/Kconfig
 ##
 CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_TSC2005=m
 CONFIG_TOUCHSCREEN_TI_AM335X_TSC=m
+CONFIG_TOUCHSCREEN_TSC2005=m
+CONFIG_TOUCHSCREEN_SUN4I=m
 
 ##
 ## file: drivers/iommu/Kconfig
@@ -306,10 +316,14 @@
 ## file: drivers/media/radio/Kconfig
 ##
 CONFIG_RADIO_ADAPTERS=y
-CONFIG_I2C_SI4713=m
 CONFIG_RADIO_SI4713=m
 
 ##
+## file: drivers/media/radio/si4713/Kconfig
+##
+CONFIG_I2C_SI4713=m
+
+##
 ## file: drivers/media/radio/wl128x/Kconfig
 ##
 CONFIG_RADIO_WL128X=m
@@ -326,6 +340,7 @@
 CONFIG_MFD_DA9052_I2C=y
 CONFIG_MFD_MC13XXX_SPI=m
 CONFIG_MFD_MC13XXX_I2C=m
+CONFIG_MFD_SEC_CORE=y
 CONFIG_MFD_TI_AM335X_TSCADC=m
 CONFIG_TWL6040_CORE=y
 
@@ -348,6 +363,8 @@
 ## file: drivers/mmc/host/Kconfig
 ##
 CONFIG_MMC_ARMMMCI=m
+CONFIG_MMC_DW=m
+CONFIG_MMC_DW_EXYNOS=m
 CONFIG_MMC_SDHCI=m
 CONFIG_MMC_SDHCI_PLTFM=m
 CONFIG_MMC_SDHCI_ESDHC_IMX=m
@@ -356,6 +373,7 @@
 CONFIG_MMC_MVSDIO=m
 CONFIG_MMC_SPI=m
 CONFIG_MMC_WMT=m
+CONFIG_MMC_SUNXI=m
 
 ##
 ## file: drivers/mtd/Kconfig
@@ -466,8 +484,8 @@
 ## file: drivers/net/ethernet/smsc/Kconfig
 ##
 CONFIG_NET_VENDOR_SMSC=y
-CONFIG_EPIC100=m
 CONFIG_SMC91X=m
+CONFIG_EPIC100=m
 CONFIG_SMC911X=m
 CONFIG_SMSC911X=m
 
@@ -499,7 +517,7 @@
 ## file: drivers/net/wireless/brcm80211/Kconfig
 ##
 CONFIG_BRCMFMAC=m
-CONFIG_BRCMFMAC_SDIO=m
+CONFIG_BRCMFMAC_SDIO=y
 
 ##
 ## file: drivers/net/wireless/ti/Kconfig
@@ -533,7 +551,15 @@
 ##
 ## file: drivers/phy/Kconfig
 ##
+CONFIG_OMAP_CONTROL_PHY=m
+CONFIG_OMAP_USB2=m
+CONFIG_TI_PIPE3=m
+CONFIG_TWL4030_USB=m
+CONFIG_PHY_EXYNOS5250_SATA=m
 CONFIG_PHY_SUN4I_USB=m
+CONFIG_PHY_SAMSUNG_USB2=m
+CONFIG_PHY_EXYNOS5250_USB2=y
+CONFIG_PHY_EXYNOS5_USBDRD=m
 
 ##
 ## file: drivers/pinctrl/Kconfig
@@ -573,10 +599,13 @@
 ## file: drivers/regulator/Kconfig
 ##
 CONFIG_REGULATOR=y
-CONFIG_REGULATOR_DA9052=m
 CONFIG_REGULATOR_ANATOP=m
+CONFIG_REGULATOR_DA9052=m
 CONFIG_REGULATOR_MC13783=m
 CONFIG_REGULATOR_MC13892=m
+CONFIG_REGULATOR_S2MPA01=m
+CONFIG_REGULATOR_S2MPS11=m
+CONFIG_REGULATOR_S5M8767=m
 CONFIG_REGULATOR_TWL4030=y
 CONFIG_REGULATOR_VEXPRESS=m
 
@@ -589,6 +618,7 @@
 CONFIG_RTC_DRV_PL030=m
 CONFIG_RTC_DRV_PL031=m
 CONFIG_RTC_DRV_VT8500=m
+CONFIG_RTC_DRV_S5M=m
 CONFIG_RTC_DRV_SUNXI=m
 CONFIG_RTC_DRV_MV=m
 CONFIG_RTC_DRV_MC13XXX=m
@@ -605,6 +635,7 @@
 ##
 CONFIG_SPI=y
 CONFIG_SPI_GPIO=y
+CONFIG_SPI_IMX=m
 CONFIG_SPI_OMAP24XX=m
 CONFIG_SPI_ORION=m
 CONFIG_SPI_PL022=m
@@ -617,6 +648,15 @@
 CONFIG_LIS3L02DQ=m
 
 ##
+## file: drivers/staging/imx-drm/Kconfig
+##
+CONFIG_DRM_IMX=m
+CONFIG_DRM_IMX_FB_HELPER=m
+CONFIG_DRM_IMX_LDB=m
+CONFIG_DRM_IMX_IPUV3=m
+CONFIG_DRM_IMX_HDMI=m
+
+##
 ## file: drivers/staging/tidspbridge/Kconfig
 ##
 CONFIG_TIDSPBRIDGE=m
@@ -639,11 +679,14 @@
 CONFIG_SERIAL_IMX_CONSOLE=y
 CONFIG_SERIAL_VT8500=y
 CONFIG_SERIAL_VT8500_CONSOLE=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SERIAL_OMAP=y
+CONFIG_SERIAL_OMAP_CONSOLE=y
 CONFIG_SERIAL_ARC=y
 CONFIG_SERIAL_ARC_CONSOLE=y
 CONFIG_SERIAL_ARC_NR_PORTS=1
-CONFIG_SERIAL_OMAP=y
-CONFIG_SERIAL_OMAP_CONSOLE=y
+CONFIG_SERIAL_SAMSUNG=y
+CONFIG_SERIAL_SAMSUNG_CONSOLE=y
 
 ##
 ## file: drivers/tty/serial/8250/Kconfig
@@ -672,6 +715,14 @@
 CONFIG_USB_CHIPIDEA_DEBUG=y
 
 ##
+## file: drivers/usb/dwc3/Kconfig
+##
+CONFIG_USB_DWC3=m
+CONFIG_USB_DWC3_HOST=y
+CONFIG_USB_DWC3_EXYNOS=m
+# CONFIG_USB_DWC3_PCI is not set
+
+##
 ## file: drivers/usb/gadget/Kconfig
 ##
 CONFIG_USB_GADGET=y
@@ -686,12 +737,19 @@
 ## file: drivers/usb/host/Kconfig
 ##
 CONFIG_USB_EHCI_HCD=m
+CONFIG_USB_EHCI_EXYNOS=m
 CONFIG_USB_EHCI_MXC=m
 CONFIG_USB_EHCI_HCD_OMAP=y
 CONFIG_USB_EHCI_HCD_PLATFORM=m
 CONFIG_USB_OHCI_HCD=m
+CONFIG_USB_OHCI_EXYNOS=m
 CONFIG_USB_OHCI_HCD_OMAP3=y
-CONFIG_USB_OHCI_HCD_PLATFORM=m 
+CONFIG_USB_OHCI_HCD_PLATFORM=m
+
+##
+## file: drivers/usb/misc/Kconfig
+##
+CONFIG_USB_HSIC_USB3503=m
 
 ##
 ## file: drivers/usb/musb/Kconfig
@@ -709,23 +767,9 @@
 ## file: drivers/usb/phy/Kconfig
 ##
 CONFIG_NOP_USB_XCEIV=y
-CONFIG_OMAP_CONTROL_USB=m
-CONFIG_OMAP_USB2=m
-CONFIG_OMAP_USB3=m
-CONFIG_TWL4030_USB=m
+CONFIG_AM335X_PHY_USB=m
 CONFIG_TWL6030_USB=m
 CONFIG_USB_MXS_PHY=m
-CONFIG_AM335X_CONTROL_USB=m
-CONFIG_AM335X_PHY_USB=m
-
-##
-## file: drivers/video/Kconfig
-##
-CONFIG_VIDEO_OUTPUT_CONTROL=y
-CONFIG_FB=y
-CONFIG_FB_ARMCLCD=y
-CONFIG_FB_VT8500=y
-CONFIG_FB_WM8505=y
 
 ##
 ## file: drivers/video/console/Kconfig
@@ -733,13 +777,15 @@
 CONFIG_FRAMEBUFFER_CONSOLE=y
 
 ##
-## file: drivers/video/omap2/displays/Kconfig
+## file: drivers/video/fbdev/Kconfig
 ##
-CONFIG_PANEL_GENERIC_DPI=y
-CONFIG_PANEL_ACX565AKM=y
+CONFIG_FB=y
+CONFIG_FB_ARMCLCD=y
+CONFIG_FB_VT8500=y
+CONFIG_FB_WM8505=y
 
 ##
-## file: drivers/video/omap2/dss/Kconfig
+## file: drivers/video/fbdev/omap2/dss/Kconfig
 ##
 CONFIG_OMAP2_DSS=m
 CONFIG_OMAP2_DSS_VENC=y
@@ -747,7 +793,7 @@
 CONFIG_OMAP2_DSS_SDI=y
 
 ##
-## file: drivers/video/omap2/omapfb/Kconfig
+## file: drivers/video/fbdev/omap2/omapfb/Kconfig
 ##
 CONFIG_FB_OMAP2=m
 
@@ -789,6 +835,7 @@
 CONFIG_SND_IMX_SOC=m
 CONFIG_SND_SOC_EUKREA_TLV320=m
 CONFIG_SND_SOC_IMX_SGTL5000=m
+CONFIG_SND_SOC_IMX_SPDIF=m
 CONFIG_SND_SOC_IMX_MC13783=m
 
 ##

Modified: dists/wheezy-backports/linux/debian/config/armhf/config.lpae
==============================================================================
--- dists/wheezy-backports/linux/debian/config/armhf/config.lpae	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/armhf/config.lpae	Sun Sep 21 14:23:16 2014	(r21886)
@@ -4,17 +4,18 @@
 CONFIG_ARM_DMA_IOMMU_ALIGNMENT=8
 
 ##
-## file: arch/arm/mm/Kconfig
-##
-CONFIG_ARM_LPAE=y
-
-##
 ## file: arch/arm/kvm/Kconfig
 ##
 CONFIG_VIRTUALIZATION=y
 CONFIG_KVM=y
 
 ##
+## file: arch/arm/mm/Kconfig
+##
+CONFIG_ARM_LPAE=y
+
+##
 ## file: drivers/iommu/Kconfig
 ##
 CONFIG_ARM_SMMU=y
+

Modified: dists/wheezy-backports/linux/debian/config/armhf/defines
==============================================================================
--- dists/wheezy-backports/linux/debian/config/armhf/defines	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/armhf/defines	Sun Sep 21 14:23:16 2014	(r21886)
@@ -19,11 +19,15 @@
 
 [armmp_description]
 hardware: ARMv7 multiplatform compatible SoCs
-hardware-long: ARMv7 multiplatform kernel for Marvell Armada 370/xp, Freescale iMX5x/iMX6
+hardware-long: ARMv7 multiplatform kernel. See
+  https://wiki.debian.org/DebianKernel/ARMMP for details of supported
+  platforms
 
 [armmp-lpae_description]
 hardware: ARMv7 multiplatform compatible SoCs supporting LPAE
-hardware-long: ARMv7 multiplatform kernel supporting LPAE
+hardware-long: ARMv7 multiplatform kernel supporting LPAE. See
+  https://wiki.debian.org/DebianKernel/ARMMP for details of supported
+  platforms.
 
 [armmp-lpae_image]
 configs:

Modified: dists/wheezy-backports/linux/debian/config/config
==============================================================================
--- dists/wheezy-backports/linux/debian/config/config	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/config	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,9 +1,12 @@
 ##
 ## file: arch/Kconfig
 ##
+CONFIG_OPROFILE=m
 CONFIG_KPROBES=y
 CONFIG_JUMP_LABEL=y
-CONFIG_UPROBES=y
+## choice: Stack Protector buffer overflow detection
+CONFIG_CC_STACKPROTECTOR_REGULAR=y
+## end choice
 
 ##
 ## file: block/Kconfig
@@ -112,6 +115,8 @@
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_ZLIB=m
 CONFIG_CRYPTO_LZO=m
+CONFIG_CRYPTO_LZ4=m
+CONFIG_CRYPTO_LZ4HC=m
 CONFIG_CRYPTO_ANSI_CPRNG=m
 CONFIG_CRYPTO_USER_API_HASH=m
 CONFIG_CRYPTO_USER_API_SKCIPHER=m
@@ -133,6 +138,7 @@
 ##
 CONFIG_ACPI_INITRD_TABLE_OVERRIDE=y
 # CONFIG_ACPI_BGRT is not set
+# CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not set
 
 ##
 ## file: drivers/ata/Kconfig
@@ -140,6 +146,7 @@
 CONFIG_ATA=m
 CONFIG_ATA_VERBOSE_ERROR=y
 CONFIG_ATA_ACPI=y
+CONFIG_SATA_ZPODD=y
 CONFIG_SATA_PMP=y
 CONFIG_SATA_AHCI=m
 # CONFIG_SATA_AHCI_PLATFORM is not set
@@ -171,8 +178,6 @@
 # CONFIG_PATA_ATIIXP is not set
 CONFIG_PATA_ATP867X=m
 CONFIG_PATA_CMD64X=m
-# CONFIG_PATA_CS5520 is not set
-# CONFIG_PATA_CS5530 is not set
 # CONFIG_PATA_CS5536 is not set
 # CONFIG_PATA_CYPRESS is not set
 # CONFIG_PATA_EFAR is not set
@@ -193,7 +198,6 @@
 # CONFIG_PATA_PDC_OLD is not set
 # CONFIG_PATA_RADISYS is not set
 CONFIG_PATA_RDC=m
-# CONFIG_PATA_SC1200 is not set
 CONFIG_PATA_SCH=m
 # CONFIG_PATA_SERVERWORKS is not set
 # CONFIG_PATA_SIL680 is not set
@@ -207,8 +211,8 @@
 # CONFIG_PATA_MPIIX is not set
 # CONFIG_PATA_NS87410 is not set
 # CONFIG_PATA_OPTI is not set
-# CONFIG_PATA_PLATFORM is not set
 # CONFIG_PATA_PCMCIA is not set
+# CONFIG_PATA_PLATFORM is not set
 # CONFIG_PATA_QDI is not set
 # CONFIG_PATA_RZ1000 is not set
 # CONFIG_PATA_WINBOND_VLB is not set
@@ -282,6 +286,7 @@
 CONFIG_VIRTIO_BLK=m
 # CONFIG_BLK_DEV_HD is not set
 CONFIG_BLK_DEV_RBD=m
+# CONFIG_BLK_DEV_RSXX is not set
 
 ##
 ## file: drivers/block/drbd/Kconfig
@@ -349,6 +354,12 @@
 CONFIG_IPWIRELESS=m
 
 ##
+## file: drivers/clk/Kconfig
+##
+# CONFIG_COMMON_CLK_SI5351 is not set
+# CONFIG_COMMON_CLK_SI570 is not set
+
+##
 ## file: drivers/connector/Kconfig
 ##
 CONFIG_CONNECTOR=y
@@ -400,8 +411,17 @@
 # CONFIG_DMATEST is not set
 
 ##
+## file: drivers/dma/dw/Kconfig
+##
+# CONFIG_DW_DMAC_CORE is not set
+# CONFIG_DW_DMAC is not set
+# CONFIG_DW_DMAC_PCI is not set
+
+##
 ## file: drivers/edac/Kconfig
 ##
+CONFIG_EDAC_LEGACY_SYSFS=y
+# CONFIG_EDAC_MCE_INJ is not set
 CONFIG_EDAC_I82975X=m
 CONFIG_EDAC_I3200=m
 CONFIG_EDAC_X38=m
@@ -424,6 +444,11 @@
 CONFIG_FIREWIRE_NOSY=m
 
 ##
+## file: drivers/firmware/Kconfig
+##
+CONFIG_DMI_SYSFS=y
+
+##
 ## file: drivers/firmware/efi/Kconfig
 ##
 CONFIG_EFI_VARS=m
@@ -452,15 +477,15 @@
 # CONFIG_GPIO_PCF857X is not set
 # CONFIG_GPIO_ADP5588 is not set
 # CONFIG_GPIO_CS5535 is not set
-# CONFIG_GPIO_LANGWELL is not set
 # CONFIG_GPIO_AMD8111 is not set
-# CONFIG_GPIO_PCH is not set
+# CONFIG_GPIO_INTEL_MID is not set
 # CONFIG_GPIO_ML_IOH is not set
 # CONFIG_GPIO_RDC321X is not set
 # CONFIG_GPIO_MAX7301 is not set
 # CONFIG_GPIO_MCP23S08 is not set
 # CONFIG_GPIO_MC33880 is not set
 # CONFIG_GPIO_74X164 is not set
+CONFIG_GPIO_VIPERBOARD=m
 
 ##
 ## file: drivers/gpu/drm/Kconfig
@@ -475,6 +500,11 @@
 # CONFIG_DRM_AST is not set
 
 ##
+## file: drivers/gpu/drm/bridge/Kconfig
+##
+# CONFIG_DRM_PTN3460 is not set
+
+##
 ## file: drivers/gpu/drm/cirrus/Kconfig
 ##
 CONFIG_DRM_CIRRUS_QEMU=m
@@ -581,9 +611,11 @@
 CONFIG_HID_SAITEK=m
 CONFIG_HID_SAMSUNG=m
 CONFIG_HID_SONY=m
+CONFIG_SONY_FF=y
 CONFIG_HID_SPEEDLINK=m
 CONFIG_HID_STEELSERIES=m
 CONFIG_HID_SUNPLUS=m
+CONFIG_HID_RMI=m
 CONFIG_HID_GREENASIA=m
 CONFIG_GREENASIA_FF=y
 CONFIG_HID_SMARTJOYPLUS=m
@@ -625,7 +657,6 @@
 # CONFIG_SENSORS_AD7314 is not set
 CONFIG_SENSORS_AD7414=m
 CONFIG_SENSORS_AD7418=m
-CONFIG_SENSORS_ADCXX=m
 CONFIG_SENSORS_ADM1029=m
 CONFIG_SENSORS_ADM9240=m
 # CONFIG_SENSORS_ADT7310 is not set
@@ -634,32 +665,28 @@
 CONFIG_SENSORS_ADT7470=m
 CONFIG_SENSORS_ADT7475=m
 CONFIG_SENSORS_ASC7621=m
+CONFIG_SENSORS_APPLESMC=m
 CONFIG_SENSORS_ATXP1=m
 CONFIG_SENSORS_DS620=m
 CONFIG_SENSORS_I5K_AMB=m
 CONFIG_SENSORS_F71882FG=m
 CONFIG_SENSORS_F75375S=m
+CONFIG_SENSORS_MC13783_ADC=m
 CONFIG_SENSORS_FSCHMD=m
 CONFIG_SENSORS_G760A=m
 # CONFIG_SENSORS_GPIO_FAN is not set
 # CONFIG_SENSORS_HIH6130 is not set
-# CONFIG_SENSORS_HTU21 is not set
-CONFIG_SENSORS_CORETEMP=m
 CONFIG_SENSORS_IBMAEM=m
 CONFIG_SENSORS_IBMPEX=m
 # CONFIG_SENSORS_IIO_HWMON is not set
+CONFIG_SENSORS_CORETEMP=m
 # CONFIG_SENSORS_IT87 is not set
 CONFIG_SENSORS_JC42=m
 CONFIG_SENSORS_LINEAGE=m
-CONFIG_SENSORS_LM70=m
-CONFIG_SENSORS_LM73=m
-CONFIG_SENSORS_LM93=m
 CONFIG_SENSORS_LTC4151=m
 CONFIG_SENSORS_LTC4215=m
 CONFIG_SENSORS_LTC4245=m
 CONFIG_SENSORS_LTC4261=m
-CONFIG_SENSORS_LM95241=m
-CONFIG_SENSORS_LM95245=m
 CONFIG_SENSORS_MAX1111=m
 CONFIG_SENSORS_MAX16065=m
 CONFIG_SENSORS_MAX1668=m
@@ -667,19 +694,26 @@
 CONFIG_SENSORS_MAX6639=m
 CONFIG_SENSORS_MAX6642=m
 CONFIG_SENSORS_MAX6650=m
+# CONFIG_SENSORS_HTU21 is not set
 # CONFIG_SENSORS_MCP3021 is not set
-CONFIG_SENSORS_NCT6775=m
-CONFIG_SENSORS_NTC_THERMISTOR=m
+CONFIG_SENSORS_ADCXX=m
+CONFIG_SENSORS_LM70=m
+CONFIG_SENSORS_LM73=m
+CONFIG_SENSORS_LM93=m
+CONFIG_SENSORS_LM95241=m
+CONFIG_SENSORS_LM95245=m
 CONFIG_SENSORS_PC87427=m
+CONFIG_SENSORS_NTC_THERMISTOR=m
+CONFIG_SENSORS_NCT6775=m
 # CONFIG_SENSORS_SHT15 is not set
 CONFIG_SENSORS_SHT21=m
-CONFIG_SENSORS_SMM665=m
 CONFIG_SENSORS_DME1737=m
 CONFIG_SENSORS_EMC1403=m
 CONFIG_SENSORS_EMC2103=m
 CONFIG_SENSORS_EMC6W201=m
 CONFIG_SENSORS_SMSC47M192=m
 CONFIG_SENSORS_SCH5627=m
+CONFIG_SENSORS_SMM665=m
 CONFIG_SENSORS_ADS1015=m
 CONFIG_SENSORS_ADS7828=m
 CONFIG_SENSORS_ADS7871=m
@@ -702,8 +736,6 @@
 CONFIG_SENSORS_W83627EHF=m
 CONFIG_SENSORS_WM831X=m
 CONFIG_SENSORS_WM8350=m
-CONFIG_SENSORS_APPLESMC=m
-CONFIG_SENSORS_MC13783_ADC=m
 CONFIG_SENSORS_ATK0110=m
 
 ##
@@ -724,15 +756,16 @@
 CONFIG_I2C_ISCH=m
 CONFIG_I2C_NFORCE2_S4985=m
 # CONFIG_I2C_CBUS_GPIO is not set
-# CONFIG_I2C_EG20T is not set
 # CONFIG_I2C_GPIO is not set
 CONFIG_I2C_OCORES=m
 CONFIG_I2C_PCA_PLATFORM=m
 CONFIG_I2C_SIMTEC=m
 # CONFIG_I2C_XILINX is not set
 CONFIG_I2C_DIOLAN_U2C=m
+CONFIG_I2C_ROBOTFUZZ_OSIF=m
 CONFIG_I2C_TAOS_EVM=m
 CONFIG_I2C_TINY_USB=m
+CONFIG_I2C_VIPERBOARD=m
 
 ##
 ## file: drivers/i2c/muxes/Kconfig
@@ -775,21 +808,29 @@
 ##
 ## file: drivers/iio/accel/Kconfig
 ##
+# CONFIG_BMA180 is not set
 CONFIG_HID_SENSOR_ACCEL_3D=m
-# CONFIG_KXSD9 is not set
 # CONFIG_IIO_ST_ACCEL_3AXIS is not set
+# CONFIG_KXSD9 is not set
+# CONFIG_MMA8452 is not set
 
 ##
 ## file: drivers/iio/adc/Kconfig
 ##
 # CONFIG_AD7266 is not set
 # CONFIG_AD7298 is not set
+# CONFIG_AD7476 is not set
 # CONFIG_AD7791 is not set
 # CONFIG_AD7793 is not set
-# CONFIG_AD7476 is not set
 # CONFIG_AD7887 is not set
+# CONFIG_AD7923 is not set
+# CONFIG_AD799X is not set
 # CONFIG_MAX1363 is not set
+# CONFIG_MCP320X is not set
+# CONFIG_MCP3422 is not set
+# CONFIG_NAU7802 is not set
 # CONFIG_TI_ADC081C is not set
+CONFIG_VIPERBOARD_ADC=m
 
 ##
 ## file: drivers/iio/amplifiers/Kconfig
@@ -803,14 +844,15 @@
 # CONFIG_AD5360 is not set
 # CONFIG_AD5380 is not set
 # CONFIG_AD5421 is not set
-# CONFIG_AD5624R_SPI is not set
 # CONFIG_AD5446 is not set
 # CONFIG_AD5449 is not set
 # CONFIG_AD5504 is not set
+# CONFIG_AD5624R_SPI is not set
+# CONFIG_AD5686 is not set
 # CONFIG_AD5755 is not set
 # CONFIG_AD5764 is not set
 # CONFIG_AD5791 is not set
-# CONFIG_AD5686 is not set
+# CONFIG_AD7303 is not set
 # CONFIG_MAX517 is not set
 # CONFIG_MCP4725 is not set
 
@@ -824,7 +866,9 @@
 ## file: drivers/iio/gyro/Kconfig
 ##
 # CONFIG_ADIS16080 is not set
+# CONFIG_ADIS16130 is not set
 # CONFIG_ADIS16136 is not set
+# CONFIG_ADIS16260 is not set
 # CONFIG_ADXRS450 is not set
 CONFIG_HID_SENSOR_GYRO_3D=m
 # CONFIG_IIO_ST_GYRO_3AXIS is not set
@@ -834,6 +878,7 @@
 ## file: drivers/iio/humidity/Kconfig
 ##
 # CONFIG_DHT11 is not set
+# CONFIG_SI7005 is not set
 
 ##
 ## file: drivers/iio/imu/Kconfig
@@ -854,11 +899,13 @@
 # CONFIG_CM32181 is not set
 # CONFIG_CM36651 is not set
 # CONFIG_GP2AP020A00F is not set
-# CONFIG_TCS3472 it not set
+CONFIG_HID_SENSOR_ALS=m
+CONFIG_HID_SENSOR_PROX=m
+# CONFIG_LTR501 is not set
+# CONFIG_TCS3472 is not set
 # CONFIG_SENSORS_TSL2563 is not set
 # CONFIG_TSL4531 is not set
 # CONFIG_VCNL4000 is not set
-CONFIG_HID_SENSOR_ALS=m
 
 ##
 ## file: drivers/iio/magnetometer/Kconfig
@@ -872,16 +919,25 @@
 ## file: drivers/iio/orientation/Kconfig
 ##
 CONFIG_HID_SENSOR_INCLINOMETER_3D=m
+CONFIG_HID_SENSOR_DEVICE_ROTATION=m
 
 ##
 ## file: drivers/iio/pressure/Kconfig
 ##
+CONFIG_HID_SENSOR_PRESS=m
+# CONFIG_MPL115 is not set
 # CONFIG_MPL3115 is not set
 # CONFIG_IIO_ST_PRESS is not set
 
 ##
+## file: drivers/iio/proximity/Kconfig
+##
+# CONFIG_AS3935 is not set
+
+##
 ## file: drivers/iio/temperature/Kconfig
 ##
+# CONFIG_MLX90614 is not set
 # CONFIG_TMP006 is not set
 
 ##
@@ -1053,6 +1109,7 @@
 # CONFIG_KEYBOARD_MCS is not set
 # CONFIG_KEYBOARD_MPR121 is not set
 CONFIG_KEYBOARD_OPENCORES=m
+# CONFIG_KEYBOARD_SAMSUNG is not set
 CONFIG_KEYBOARD_STOWAWAY=m
 
 ##
@@ -1063,6 +1120,7 @@
 # CONFIG_INPUT_MMA8450 is not set
 # CONFIG_INPUT_MPU3050 is not set
 # CONFIG_INPUT_GP2A is not set
+# CONFIG_INPUT_GPIO_BEEPER is not set
 # CONFIG_INPUT_GPIO_TILT_POLLED is not set
 CONFIG_INPUT_ATI_REMOTE2=m
 CONFIG_INPUT_KEYSPAN_REMOTE=m
@@ -1148,8 +1206,8 @@
 # CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set
 CONFIG_TOUCHSCREEN_TOUCHRIGHT=m
 CONFIG_TOUCHSCREEN_TOUCHWIN=m
-# CONFIG_TOUCHSCREEN_PIXCIR is not set
 CONFIG_TOUCHSCREEN_UCB1400=m
+# CONFIG_TOUCHSCREEN_PIXCIR is not set
 CONFIG_TOUCHSCREEN_WM97XX=m
 CONFIG_TOUCHSCREEN_WM9705=y
 CONFIG_TOUCHSCREEN_WM9712=y
@@ -1173,11 +1231,9 @@
 CONFIG_TOUCHSCREEN_USB_ZYTRONIC=y
 CONFIG_TOUCHSCREEN_USB_ETT_TC45USB=y
 CONFIG_TOUCHSCREEN_USB_NEXIO=y
-CONFIG_TOUCHSCREEN_USB_E2I=y
 CONFIG_TOUCHSCREEN_TOUCHIT213=m
 # CONFIG_TOUCHSCREEN_TSC2005 is not set
 CONFIG_TOUCHSCREEN_TSC2007=m
-CONFIG_TOUCHSCREEN_W90X900=m
 # CONFIG_TOUCHSCREEN_ST1232 is not set
 CONFIG_TOUCHSCREEN_SUR40=m
 CONFIG_TOUCHSCREEN_TPS6507X=m
@@ -1245,11 +1301,18 @@
 ##
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
+# CONFIG_LEDS_LM3530 is not set
+# CONFIG_LEDS_LM3642 is not set
 CONFIG_LEDS_NET48XX=m
 CONFIG_LEDS_PCA9532=m
 # CONFIG_LEDS_GPIO is not set
 CONFIG_LEDS_LP3944=m
+# CONFIG_LEDS_LP5521 is not set
+# CONFIG_LEDS_LP5523 is not set
+# CONFIG_LEDS_LP5562 is not set
+# CONFIG_LEDS_LP8501 is not set
 CONFIG_LEDS_PCA955X=m
+# CONFIG_LEDS_PCA963X is not set
 CONFIG_LEDS_WM831X_STATUS=m
 CONFIG_LEDS_WM8350=m
 CONFIG_LEDS_DAC124S085=m
@@ -1259,15 +1322,34 @@
 CONFIG_LEDS_LT3593=m
 CONFIG_LEDS_DELL_NETBOOKS=m
 CONFIG_LEDS_MC13783=m
+# CONFIG_LEDS_TCA6507 is not set
+# CONFIG_LEDS_LM355x is not set
+# CONFIG_LEDS_OT200 is not set
+# CONFIG_LEDS_BLINKM is not set
 
 ##
 ## file: drivers/leds/trigger/Kconfig
 ##
 CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_TIMER=m
+CONFIG_LEDS_TRIGGER_ONESHOT=m
 CONFIG_LEDS_TRIGGER_HEARTBEAT=m
 CONFIG_LEDS_TRIGGER_BACKLIGHT=m
+CONFIG_LEDS_TRIGGER_CPU=y
+CONFIG_LEDS_TRIGGER_GPIO=m
 CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
+CONFIG_LEDS_TRIGGER_TRANSIENT=m
+CONFIG_LEDS_TRIGGER_CAMERA=m
+
+##
+## file: drivers/mailbox/Kconfig
+##
+# CONFIG_MAILBOX is not set
+
+##
+## file: drivers/mcb/Kconfig
+##
+# CONFIG_MCB is not set
 
 ##
 ## file: drivers/md/Kconfig
@@ -1286,13 +1368,13 @@
 CONFIG_DM_CRYPT=m
 CONFIG_DM_SNAPSHOT=m
 CONFIG_DM_THIN_PROVISIONING=m
-# CONFIG_DM_DEBUG_BLOCK_STACK_TRACING is not set
 CONFIG_DM_CACHE=m
 CONFIG_DM_CACHE_MQ=y
 CONFIG_DM_CACHE_CLEANER=y
+CONFIG_DM_ERA=m
 CONFIG_DM_MIRROR=m
-CONFIG_DM_RAID=m
 CONFIG_DM_LOG_USERSPACE=m
+CONFIG_DM_RAID=m
 CONFIG_DM_ZERO=m
 CONFIG_DM_MULTIPATH=m
 CONFIG_DM_MULTIPATH_QL=m
@@ -1308,10 +1390,14 @@
 ##
 CONFIG_BCACHE=m
 # CONFIG_BCACHE_DEBUG is not set
-# CONFIG_BCACHE_EDEBUG is not set
 # CONFIG_BCACHE_CLOSURES_DEBUG is not set
 
 ##
+## file: drivers/md/persistent-data/Kconfig
+##
+# CONFIG_DM_DEBUG_BLOCK_STACK_TRACING is not set
+
+##
 ## file: drivers/media/Kconfig
 ##
 CONFIG_MEDIA_SUPPORT=m
@@ -1482,6 +1568,7 @@
 ## file: drivers/media/pci/cx23885/Kconfig
 ##
 CONFIG_VIDEO_CX23885=m
+CONFIG_MEDIA_ALTERA_CI=m
 
 ##
 ## file: drivers/media/pci/cx25821/Kconfig
@@ -1613,11 +1700,10 @@
 ##
 CONFIG_RADIO_ADAPTERS=y
 CONFIG_RADIO_SI470X=y
+# CONFIG_RADIO_SI4713 is not set
 CONFIG_USB_MR800=m
 CONFIG_RADIO_SHARK=m
 CONFIG_RADIO_SHARK2=m
-# CONFIG_I2C_SI4713 is not set
-# CONFIG_RADIO_SI4713 is not set
 CONFIG_USB_KEENE=m
 CONFIG_USB_RAREMONO=m
 CONFIG_USB_MA901=m
@@ -1633,6 +1719,11 @@
 # CONFIG_I2C_SI470X is not set
 
 ##
+## file: drivers/media/radio/si4713/Kconfig
+##
+# CONFIG_I2C_SI4713 is not set
+
+##
 ## file: drivers/media/radio/wl128x/Kconfig
 ##
 # CONFIG_RADIO_WL128X is not set
@@ -1650,6 +1741,7 @@
 CONFIG_IR_SONY_DECODER=m
 CONFIG_IR_RC5_SZ_DECODER=m
 CONFIG_IR_SANYO_DECODER=m
+CONFIG_IR_SHARP_DECODER=m
 CONFIG_IR_MCE_KBD_DECODER=m
 CONFIG_RC_DEVICES=y
 CONFIG_RC_ATI_REMOTE=m
@@ -1665,6 +1757,11 @@
 # CONFIG_IR_GPIO_CIR is not set
 
 ##
+## file: drivers/media/rc/img-ir/Kconfig
+##
+# CONFIG_IR_IMG is not set
+
+##
 ## file: drivers/media/rc/keymaps/Kconfig
 ##
 CONFIG_RC_MAP=m
@@ -1751,7 +1848,6 @@
 CONFIG_DVB_USB_CE6230=m
 CONFIG_DVB_USB_EC168=m
 CONFIG_DVB_USB_GL861=m
-CONFIG_DVB_USB_IT913X=m
 CONFIG_DVB_USB_LME2510=m
 CONFIG_DVB_USB_MXL111SF=m
 CONFIG_DVB_USB_RTL28XXU=m
@@ -1772,6 +1868,7 @@
 CONFIG_USB_GSPCA_BENQ=m
 CONFIG_USB_GSPCA_CONEX=m
 CONFIG_USB_GSPCA_CPIA1=m
+CONFIG_USB_GSPCA_DTCS033=m
 CONFIG_USB_GSPCA_ETOMS=m
 CONFIG_USB_GSPCA_FINEPIX=m
 CONFIG_USB_GSPCA_JEILINJ=m
@@ -1860,15 +1957,9 @@
 CONFIG_SMS_USB_DRV=m
 
 ##
-## file: drivers/media/usb/sn9c102/Kconfig
-##
-CONFIG_USB_SN9C102=m
-
-##
 ## file: drivers/media/usb/stk1160/Kconfig
 ##
 CONFIG_VIDEO_STK1160_COMMON=m
-CONFIG_VIDEO_STK1160=m
 CONFIG_VIDEO_STK1160_AC97=y
 
 ##
@@ -1942,6 +2033,7 @@
 CONFIG_MEMSTICK_JMICRON_38X=m
 CONFIG_MEMSTICK_R592=m
 CONFIG_MEMSTICK_REALTEK_PCI=m
+CONFIG_MEMSTICK_REALTEK_USB=m
 
 ##
 ## file: drivers/message/fusion/Kconfig
@@ -1968,13 +2060,17 @@
 ## file: drivers/mfd/Kconfig
 ##
 # CONFIG_MFD_CS5535 is not set
+# CONFIG_MFD_BCM590XX is not set
+# CONFIG_MFD_CROS_EC is not set
 # CONFIG_MFD_DA9052_SPI is not set
 # CONFIG_MFD_MC13XXX_SPI is not set
 # CONFIG_MFD_MC13XXX_I2C is not set
 # CONFIG_HTC_PASIC3 is not set
 CONFIG_LPC_SCH=m
 # CONFIG_MFD_JANZ_CMODIO is not set
+# CONFIG_MFD_KEMPLD is not set
 # CONFIG_EZX_PCAP is not set
+CONFIG_MFD_VIPERBOARD=m
 # CONFIG_MFD_RETU is not set
 # CONFIG_MFD_PCF50633 is not set
 CONFIG_PCF50633_ADC=m
@@ -1982,6 +2078,7 @@
 # CONFIG_UCB1400_CORE is not set
 # CONFIG_MFD_RDC321X is not set
 CONFIG_MFD_RTSX_PCI=m
+CONFIG_MFD_RTSX_USB=m
 # CONFIG_MFD_SI476X_CORE is not set
 # CONFIG_MFD_SM501 is not set
 # CONFIG_ABX500_CORE is not set
@@ -1995,6 +2092,7 @@
 # CONFIG_TPS65010 is not set
 # CONFIG_TPS6507X is not set
 # CONFIG_MFD_TPS65217 is not set
+# CONFIG_MFD_TPS65218 is not set
 # CONFIG_MFD_TPS65912 is not set
 # CONFIG_MFD_TPS65912_I2C is not set
 # CONFIG_MFD_TPS65912_SPI is not set
@@ -2042,7 +2140,6 @@
 CONFIG_VMWARE_BALLOON=m
 # CONFIG_BMP085_I2C is not set
 # CONFIG_BMP085_SPI is not set
-# CONFIG_PCH_PHUB is not set
 # CONFIG_USB_SWITCH_FSA9480 is not set
 # CONFIG_LATTICE_ECP3_CONFIG is not set
 # CONFIG_SRAM is not set
@@ -2065,6 +2162,11 @@
 # CONFIG_CB710_DEBUG is not set
 
 ##
+## file: drivers/misc/echo/Kconfig
+##
+# CONFIG_ECHO is not set
+
+##
 ## file: drivers/misc/eeprom/Kconfig
 ##
 CONFIG_EEPROM_AT24=m
@@ -2095,7 +2197,7 @@
 ##
 ## file: drivers/mmc/core/Kconfig
 ##
-# CONFIG_MMC_UNSAFE_RESUME is not set
+# CONFIG_MMC_CLKGATE is not set
 
 ##
 ## file: drivers/mmc/host/Kconfig
@@ -2112,14 +2214,15 @@
 CONFIG_MMC_VIA_SDMMC=m
 CONFIG_MMC_VUB300=m
 CONFIG_MMC_USHC=m
+# CONFIG_MMC_USDHI6ROL0 is not set
 CONFIG_MMC_REALTEK_PCI=m
+CONFIG_MMC_REALTEK_USB=m
 
 ##
 ## file: drivers/mtd/Kconfig
 ##
 # CONFIG_MTD_TESTS is not set
 CONFIG_MTD_AR7_PARTS=m
-CONFIG_MTD_BLKDEVS=m
 CONFIG_RFD_FTL=m
 CONFIG_SSFDC=m
 # CONFIG_SM_FTL is not set
@@ -2133,7 +2236,6 @@
 # CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
 # CONFIG_MTD_DATAFLASH_OTP is not set
 CONFIG_MTD_M25P80=m
-CONFIG_M25PXX_USE_FAST_READ=y
 CONFIG_MTD_SST25L=m
 # CONFIG_MTD_DOCG3 is not set
 
@@ -2167,7 +2269,6 @@
 CONFIG_MTD_NAND_CS553X=m
 CONFIG_MTD_NAND_NANDSIM=m
 # CONFIG_MTD_NAND_PLATFORM is not set
-CONFIG_MTD_ALAUDA=m
 
 ##
 ## file: drivers/mtd/onenand/Kconfig
@@ -2179,6 +2280,11 @@
 CONFIG_MTD_ONENAND_2X_PROGRAM=y
 
 ##
+## file: drivers/mtd/spi-nor/Kconfig
+##
+CONFIG_MTD_SPI_NOR=m
+
+##
 ## file: drivers/mtd/ubi/Kconfig
 ##
 CONFIG_MTD_UBI=m
@@ -2186,6 +2292,7 @@
 CONFIG_MTD_UBI_BEB_LIMIT=20
 # CONFIG_MTD_UBI_FASTMAP is not set
 # CONFIG_MTD_UBI_GLUEBI is not set
+CONFIG_MTD_UBI_BLOCK=y
 
 ##
 ## file: drivers/net/Kconfig
@@ -2226,8 +2333,6 @@
 CONFIG_CAN_DEV=m
 CONFIG_CAN_CALC_BITTIMING=y
 # CONFIG_CAN_LEDS is not set
-# CONFIG_CAN_MCP251X is not set
-# CONFIG_PCH_CAN is not set
 # CONFIG_CAN_DEBUG_DEVICES is not set
 
 ##
@@ -2262,10 +2367,16 @@
 CONFIG_CAN_SOFTING_CS=m
 
 ##
+## file: drivers/net/can/spi/Kconfig
+##
+# CONFIG_CAN_MCP251X is not set
+
+##
 ## file: drivers/net/can/usb/Kconfig
 ##
 CONFIG_CAN_EMS_USB=m
 CONFIG_CAN_ESD_USB2=m
+CONFIG_CAN_GS_USB=m
 CONFIG_CAN_KVASER_USB=m
 CONFIG_CAN_PEAK_USB=m
 CONFIG_CAN_8DEV_USB=m
@@ -2399,6 +2510,7 @@
 ## file: drivers/net/ethernet/emulex/benet/Kconfig
 ##
 CONFIG_BE2NET=m
+CONFIG_BE2NET_VXLAN=y
 
 ##
 ## file: drivers/net/ethernet/i825xx/Kconfig
@@ -2452,14 +2564,10 @@
 ##
 CONFIG_MLX4_EN=m
 CONFIG_MLX4_EN_DCB=y
+CONFIG_MLX4_EN_VXLAN=y
 CONFIG_MLX4_DEBUG=y
 
 ##
-## file: drivers/net/ethernet/mellanox/mlx5/core/Kconfig
-##
-CONFIG_MLX5_DEBUG=y
-
-##
 ## file: drivers/net/ethernet/micrel/Kconfig
 ##
 CONFIG_NET_VENDOR_MICREL=y
@@ -2502,11 +2610,6 @@
 CONFIG_NET_VENDOR_OKI=y
 
 ##
-## file: drivers/net/ethernet/oki-semi/pch_gbe/Kconfig
-##
-# CONFIG_PCH_GBE is not set
-
-##
 ## file: drivers/net/ethernet/packetengines/Kconfig
 ##
 CONFIG_NET_PACKET_ENGINE=y
@@ -2521,6 +2624,8 @@
 CONFIG_QLCNIC=m
 CONFIG_QLCNIC_SRIOV=y
 CONFIG_QLCNIC_DCB=y
+CONFIG_QLCNIC_VXLAN=y
+CONFIG_QLCNIC_HWMON=y
 CONFIG_QLGE=m
 CONFIG_NETXEN_NIC=m
 
@@ -2542,6 +2647,11 @@
 # CONFIG_SH_ETH is not set
 
 ##
+## file: drivers/net/ethernet/samsung/Kconfig
+CONFIG_NET_VENDOR_SAMSUNG=y
+# CONFIG_SXGBE_ETH is not set
+
+##
 ## file: drivers/net/ethernet/seeq/Kconfig
 ##
 # CONFIG_NET_VENDOR_SEEQ is not set
@@ -2673,6 +2783,7 @@
 CONFIG_SMSC_PHY=m
 CONFIG_BROADCOM_PHY=m
 # CONFIG_BCM63XX_PHY is not set
+# CONFIG_BCM7XXX_PHY is not set
 CONFIG_BCM87XX_PHY=m
 CONFIG_ICPLUS_PHY=m
 CONFIG_REALTEK_PHY=m
@@ -2842,7 +2953,6 @@
 # CONFIG_ATH9K_AHB is not set
 # CONFIG_ATH9K_DEBUGFS is not set
 # CONFIG_ATH9K_WOW is not set
-# CONFIG_ATH9K_LEGACY_RATE_CONTROL is not set
 CONFIG_ATH9K_RFKILL=y
 CONFIG_ATH9K_HTC=m
 # CONFIG_ATH9K_HTC_DEBUGFS is not set
@@ -2856,6 +2966,11 @@
 # CONFIG_CARL9170_HWRNG is not set
 
 ##
+## file: drivers/net/wireless/ath/wcn36xx/Kconfig
+##
+# CONFIG_WCN36XX is not set
+
+##
 ## file: drivers/net/wireless/ath/wil6210/Kconfig
 ##
 CONFIG_WIL6210=m
@@ -2863,15 +2978,9 @@
 CONFIG_WIL6210_TRACING=y
 
 ##
-## file: drivers/net/wireless/ath/wcn36xx/Kconfig
-##
-# CONFIG_WCN36XX is not set
-
-##
 ## file: drivers/net/wireless/b43/Kconfig
 ##
 CONFIG_B43=m
-CONFIG_B43_BCMA=y
 CONFIG_B43_PCMCIA=y
 CONFIG_B43_SDIO=y
 CONFIG_B43_PHY_N=y
@@ -2937,9 +3046,9 @@
 CONFIG_IWLWIFI=m
 CONFIG_IWLDVM=m
 CONFIG_IWLMVM=m
+# CONFIG_IWLWIFI_BCAST_FILTERING is not set
 # CONFIG_IWLWIFI_DEBUG is not set
 # CONFIG_IWLWIFI_DEVICE_TRACING is not set
-CONFIG_IWLWIFI_P2P=y
 
 ##
 ## file: drivers/net/wireless/libertas/Kconfig
@@ -2971,6 +3080,14 @@
 # CONFIG_P54_SPI_DEFAULT_EEPROM is not set
 
 ##
+## file: drivers/net/wireless/rsi/Kconfig
+##
+CONFIG_RSI_91X=m
+CONFIG_RSI_DEBUGFS=y
+# CONFIG_RSI_SDIO is not set
+CONFIG_RSI_USB=m
+
+##
 ## file: drivers/net/wireless/rt2x00/Kconfig
 ##
 CONFIG_RT2X00=m
@@ -3007,6 +3124,7 @@
 CONFIG_RTL8192SE=m
 CONFIG_RTL8192DE=m
 CONFIG_RTL8723AE=m
+CONFIG_RTL8723BE=m
 CONFIG_RTL8188EE=m
 CONFIG_RTL8192CU=m
 # CONFIG_RTLWIFI_DEBUG is not set
@@ -3026,15 +3144,11 @@
 ## file: drivers/nfc/Kconfig
 ##
 CONFIG_NFC_PN533=m
+# CONFIG_NFC_TRF7970A is not set
 CONFIG_NFC_SIM=m
 CONFIG_NFC_PORT100=m
 
 ##
-## file: drivers/of/Kconfig
-##
-CONFIG_PROC_DEVICETREE=y
-
-##
 ## file: drivers/parport/Kconfig
 ##
 CONFIG_PARPORT=m
@@ -3097,8 +3211,19 @@
 ##
 # CONFIG_GENERIC_PHY is not set
 # CONFIG_PHY_EXYNOS_MIPI_VIDEO is not set
+# CONFIG_OMAP_CONTROL_PHY is not set
+# CONFIG_OMAP_USB2 is not set
+# CONFIG_TWL4030_USB is not set
 # CONFIG_PHY_EXYNOS_DP_VIDEO is not set
 # CONFIG_BCM_KONA_USB2_PHY is not set
+# CONFIG_PHY_SAMSUNG_USB2 is not set
+
+##
+## file: drivers/pinctrl/Kconfig
+##
+# CONFIG_PINMUX is not set
+# CONFIG_PINCONF is not set
+# CONFIG_DEBUG_PINCTRL is not set
 
 ##
 ## file: drivers/platform/x86/Kconfig
@@ -3201,6 +3326,7 @@
 ## file: drivers/rtc/Kconfig
 ##
 CONFIG_RTC_CLASS=y
+CONFIG_RTC_SYSTOHC=y
 CONFIG_RTC_HCTOSYS=y
 CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
 # CONFIG_RTC_DEBUG is not set
@@ -3212,12 +3338,15 @@
 # CONFIG_RTC_DRV_DS1307 is not set
 # CONFIG_RTC_DRV_DS1374 is not set
 # CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_DS3232 is not set
 # CONFIG_RTC_DRV_MAX6900 is not set
 # CONFIG_RTC_DRV_RS5C372 is not set
 # CONFIG_RTC_DRV_ISL1208 is not set
 # CONFIG_RTC_DRV_ISL12022 is not set
 # CONFIG_RTC_DRV_ISL12057 is not set
 # CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF2127 is not set
+# CONFIG_RTC_DRV_PCF8523 is not set
 # CONFIG_RTC_DRV_PCF8563 is not set
 # CONFIG_RTC_DRV_PCF8583 is not set
 # CONFIG_RTC_DRV_M41T80 is not set
@@ -3227,14 +3356,21 @@
 # CONFIG_RTC_DRV_FM3130 is not set
 # CONFIG_RTC_DRV_RX8581 is not set
 # CONFIG_RTC_DRV_RX8025 is not set
+# CONFIG_RTC_DRV_EM3027 is not set
+# CONFIG_RTC_DRV_RV3029C2 is not set
+# CONFIG_RTC_DRV_M41T93 is not set
 # CONFIG_RTC_DRV_M41T94 is not set
 # CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_DS1343 is not set
+# CONFIG_RTC_DRV_DS1347 is not set
 # CONFIG_RTC_DRV_DS1390 is not set
 # CONFIG_RTC_DRV_MAX6902 is not set
 # CONFIG_RTC_DRV_R9701 is not set
 # CONFIG_RTC_DRV_RS5C348 is not set
 # CONFIG_RTC_DRV_DS3234 is not set
 # CONFIG_RTC_DRV_PCF2123 is not set
+# CONFIG_RTC_DRV_RX4581 is not set
+# CONFIG_RTC_DRV_MCP795 is not set
 CONFIG_RTC_DRV_CMOS=m
 # CONFIG_RTC_DRV_DS1286 is not set
 # CONFIG_RTC_DRV_DS1511 is not set
@@ -3248,10 +3384,14 @@
 # CONFIG_RTC_DRV_BQ4802 is not set
 # CONFIG_RTC_DRV_RP5C01 is not set
 # CONFIG_RTC_DRV_V3020 is not set
+# CONFIG_RTC_DRV_DS2404 is not set
 CONFIG_RTC_DRV_WM831X=m
 CONFIG_RTC_DRV_WM8350=m
 CONFIG_RTC_DRV_PCF50633=m
 CONFIG_RTC_DRV_AB3100=m
+# CONFIG_RTC_DRV_MOXART is not set
+# CONFIG_RTC_DRV_XGENE is not set
+# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set
 
 ##
 ## file: drivers/scsi/Kconfig
@@ -3290,7 +3430,6 @@
 CONFIG_SCSI_AHA1542=m
 CONFIG_SCSI_AHA1740=m
 CONFIG_SCSI_AACRAID=m
-# CONFIG_SCSI_AIC7XXX_OLD is not set
 CONFIG_SCSI_MVUMI=m
 CONFIG_SCSI_ADVANSYS=m
 CONFIG_SCSI_HPTIOP=m
@@ -3457,8 +3596,8 @@
 CONFIG_SPI_BITBANG=m
 CONFIG_SPI_BUTTERFLY=m
 # CONFIG_SPI_GPIO is not set
-# CONFIG_SPI_FSL_DSPI is not set
 CONFIG_SPI_LM70_LLP=m
+# CONFIG_SPI_FSL_DSPI is not set
 # CONFIG_SPI_OC_TINY is not set
 # CONFIG_SPI_PXA2XX is not set
 # CONFIG_SPI_SC18IS602 is not set
@@ -3470,6 +3609,11 @@
 # CONFIG_SPI_TLE62X0 is not set
 
 ##
+## file: drivers/spmi/Kconfig
+##
+# CONFIG_SPMI is not set
+
+##
 ## file: drivers/ssb/Kconfig
 ##
 CONFIG_SSB=m
@@ -3483,19 +3627,19 @@
 CONFIG_STAGING=y
 
 ##
-## file: drivers/staging/android/Kconfig
+## file: drivers/staging/bcm/Kconfig
 ##
-# CONFIG_ANDROID is not set
+# CONFIG_BCM_WIMAX is not set
 
 ##
-## file: drivers/staging/asus_oled/Kconfig
+## file: drivers/staging/android/Kconfig
 ##
-# CONFIG_ASUS_OLED is not set
+# CONFIG_ANDROID is not set
 
 ##
-## file: drivers/staging/media/bcm2048/Kconfig
+## file: drivers/staging/ced1401/Kconfig
 ##
-# CONFIG_I2C_BCM2048 is not set
+# CONFIG_CED1401 is not set
 
 ##
 ## file: drivers/staging/comedi/Kconfig
@@ -3503,14 +3647,29 @@
 # CONFIG_COMEDI is not set
 
 ##
+## file: drivers/staging/cptm1217/Kconfig
+##
+# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set
+
+##
+## file: drivers/staging/cxt1e1/Kconfig
+##
+# CONFIG_CXT1E1 is not set
+
+##
 ## file: drivers/staging/crystalhd/Kconfig
 ##
 # CONFIG_CRYSTALHD is not set
 
 ##
-## file: drivers/staging/echo/Kconfig
+## file: drivers/staging/dgap/Kconfig
 ##
-# CONFIG_ECHO is not set
+# CONFIG_DGAP is not set
+
+##
+## file: drivers/staging/dgnc/Kconfig
+##
+# CONFIG_DGNC is not set
 
 ##
 ## file: drivers/staging/et131x/Kconfig
@@ -3523,11 +3682,36 @@
 # CONFIG_TRANZPORT is not set
 
 ##
+## file: drivers/staging/ft1000/Kconfig
+##
+# CONFIG_FT1000 is not set
+
+##
+## file: drivers/staging/gdm72xx/Kconfig
+##
+# CONFIG_WIMAX_GDM72XX is not set
+
+##
+## file: drivers/staging/gdm724x/Kconfig
+##
+# CONFIG_LTE_GDM724X is not set
+
+##
+## file: drivers/staging/gs_fpgaboot/Kconfig
+##
+# CONFIG_GS_FPGABOOT is not set
+
+##
 ## file: drivers/staging/line6/Kconfig
 ##
 # CONFIG_LINE6_USB is not set
 
 ##
+## file: drivers/staging/lirc/Kconfig
+##
+# CONFIG_LIRC_STAGING is not set
+
+##
 ## file: drivers/staging/lustre/lustre/Kconfig
 ##
 # CONFIG_LUSTRE_FS is not set
@@ -3538,9 +3722,14 @@
 # CONFIG_STAGING_MEDIA is not set
 
 ##
-## file: drivers/staging/media/omap24xx/Kconfig
+## file: drivers/staging/mt29f_spinand/Kconfig
+##
+# CONFIG_MTD_SPINAND_MT29F is not set
+
+##
+## file: drivers/staging/ozwpan/Kconfig
 ##
-# CONFIG_VIDEO_TCM825X is not set
+# CONFIG_USB_WPAN_HCD is not set
 
 ##
 ## file: drivers/staging/panel/Kconfig
@@ -3553,14 +3742,11 @@
 # CONFIG_IDE_PHISON is not set
 
 ##
-## file: drivers/staging/rtl8187se/Kconfig
-##
-# CONFIG_R8187SE is not set
-
-##
 ## file: drivers/staging/rtl8188eu/Kconfig
 ##
-# CONFIG_R8188EU is not set
+CONFIG_R8188EU=m
+CONFIG_88EU_AP_MODE=y
+CONFIG_88EU_P2P=y
 
 ##
 ## file: drivers/staging/rtl8192e/Kconfig
@@ -3580,17 +3766,17 @@
 ##
 ## file: drivers/staging/rtl8712/Kconfig
 ##
-# CONFIG_R8712U is not set
+CONFIG_R8712U=m
 
 ##
-## file: drivers/staging/rtl8821ae/Kconfig
+## file: drivers/staging/rtl8723au/Kconfig
 ##
-# CONFIG_R8821AE is not set
+# CONFIG_R8723AU is not set
 
 ##
-## file: drivers/staging/rts5139/Kconfig
+## file: drivers/staging/rtl8821ae/Kconfig
 ##
-# CONFIG_RTS5139 is not set
+# CONFIG_R8821AE is not set
 
 ##
 ## file: drivers/staging/rts5208/Kconfig
@@ -3642,6 +3828,11 @@
 CONFIG_SPEAKUP_SYNTH_DUMMY=m
 
 ##
+## file: drivers/staging/ste_rmi4/Kconfig
+##
+# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set
+
+##
 ## file: drivers/staging/usbip/Kconfig
 ##
 # CONFIG_USBIP_CORE is not set
@@ -3667,6 +3858,16 @@
 # CONFIG_PRISM2_USB is not set
 
 ##
+## file: drivers/staging/xgifb/Kconfig
+##
+# CONFIG_FB_XGI is not set
+
+##
+## file: drivers/staging/xillybus/Kconfig
+##
+# CONFIG_XILLYBUS is not set
+
+##
 ## file: drivers/target/Kconfig
 ##
 CONFIG_TARGET_CORE=m
@@ -3738,11 +3939,11 @@
 # CONFIG_SERIAL_MAX310X is not set
 CONFIG_SERIAL_MFD_HSU=m
 # CONFIG_SERIAL_SCCNXP is not set
+# CONFIG_SERIAL_SC16IS7XX is not set
 # CONFIG_SERIAL_TIMBERDALE is not set
 # CONFIG_SERIAL_ALTERA_JTAGUART is not set
 # CONFIG_SERIAL_ALTERA_UART is not set
 # CONFIG_SERIAL_IFX6X60 is not set
-# CONFIG_SERIAL_PCH_UART is not set
 # CONFIG_SERIAL_XILINX_PS_UART is not set
 # CONFIG_SERIAL_ARC is not set
 CONFIG_SERIAL_RP2=m
@@ -3768,13 +3969,13 @@
 ##
 CONFIG_UIO=m
 CONFIG_UIO_CIF=m
-# CONFIG_UIO_PDRV is not set
 # CONFIG_UIO_PDRV_GENIRQ is not set
 # CONFIG_UIO_DMEM_GENIRQ is not set
 CONFIG_UIO_AEC=m
 CONFIG_UIO_SERCOS3=m
 CONFIG_UIO_PCI_GENERIC=m
 CONFIG_UIO_NETX=m
+CONFIG_UIO_MF624=m
 
 ##
 ## file: drivers/usb/Kconfig
@@ -3804,11 +4005,18 @@
 ##
 ## file: drivers/usb/core/Kconfig
 ##
-# CONFIG_USB_DEBUG is not set
 CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
 CONFIG_USB_DEFAULT_PERSIST=y
 CONFIG_USB_DYNAMIC_MINORS=y
 # CONFIG_USB_OTG is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+# CONFIG_USB_OTG_FSM is not set
+
+##
+## file: drivers/usb/dwc2/Kconfig
+##
+# CONFIG_USB_DWC2 is not set
 
 ##
 ## file: drivers/usb/dwc3/Kconfig
@@ -3819,14 +4027,27 @@
 ## file: drivers/usb/gadget/Kconfig
 ##
 # CONFIG_USB_GADGET is not set
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+# CONFIG_USB_GADGET_DEBUG_FS is not set
 # CONFIG_USB_GR_UDC is not set
+CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
+# CONFIG_USB_FOTG210_UDC is not set
+# CONFIG_USB_R8A66597 is not set
+# CONFIG_USB_PXA27X is not set
+# CONFIG_USB_MV_UDC is not set
+# CONFIG_USB_MV_U3D is not set
+# CONFIG_USB_M66592 is not set
+# CONFIG_USB_AMD5536UDC is not set
+# CONFIG_USB_NET2272 is not set
+CONFIG_USB_NET2280=m
+# CONFIG_USB_GOKU is not set
 
 ##
 ## file: drivers/usb/host/Kconfig
 ##
 # CONFIG_USB_C67X00_HCD is not set
 CONFIG_USB_XHCI_HCD=m
-# CONFIG_USB_XHCI_HCD_DEBUGGING is not set
 CONFIG_USB_EHCI_ROOT_HUB_TT=y
 CONFIG_USB_EHCI_TT_NEWSCHED=y
 # CONFIG_USB_EHCI_HCD_PLATFORM is not set
@@ -3835,6 +4056,8 @@
 # CONFIG_USB_ISP1760_HCD is not set
 # CONFIG_USB_ISP1362_HCD is not set
 # CONFIG_USB_FUSBH200_HCD is not set
+# CONFIG_USB_FOTG210_HCD is not set
+# CONFIG_USB_MAX3421_HCD is not set
 CONFIG_USB_OHCI_HCD_PCI=y
 # CONFIG_USB_OHCI_HCD_PLATFORM is not set
 CONFIG_USB_U132_HCD=m
@@ -3843,6 +4066,7 @@
 CONFIG_USB_HWA_HCD=m
 # CONFIG_USB_HCD_BCMA is not set
 # CONFIG_USB_HCD_SSB is not set
+# CONFIG_USB_HCD_TEST_MODE is not set
 
 ##
 ## file: drivers/usb/image/Kconfig
@@ -3870,8 +4094,10 @@
 CONFIG_USB_TRANCEVIBRATOR=m
 CONFIG_USB_IOWARRIOR=m
 CONFIG_USB_TEST=m
+CONFIG_USB_EHSET_TEST_FIXTURE=m
 CONFIG_USB_ISIGHTFW=m
 CONFIG_USB_YUREX=m
+# CONFIG_USB_HSIC_USB3503 is not set
 
 ##
 ## file: drivers/usb/misc/sisusbvga/Kconfig
@@ -3892,19 +4118,13 @@
 ##
 ## file: drivers/usb/phy/Kconfig
 ##
-# CONFIG_USB_OTG_FSM is not set
 # CONFIG_AB8500_USB is not set
 # CONFIG_FSL_USB2_OTG is not set
 # CONFIG_ISP1301_OMAP is not set
-# CONFIG_MV_U3D_PHY is not set
 # CONFIG_NOP_USB_XCEIV is not set
-# CONFIG_OMAP_CONTROL_USB is not set
-# CONFIG_OMAP_USB2 is not set
-# CONFIG_OMAP_USB3 is not set
 # CONFIG_AM335X_PHY_USB is not set
 # CONFIG_SAMSUNG_USB2PHY is not set
 # CONFIG_SAMSUNG_USB3PHY is not set
-# CONFIG_TWL4030_USB is not set
 # CONFIG_TWL6030_USB is not set
 # CONFIG_USB_GPIO_VBUS is not set
 # CONFIG_USB_ISP1301 is not set
@@ -3924,6 +4144,7 @@
 ##
 CONFIG_USB_SERIAL=m
 CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_SIMPLE=m
 CONFIG_USB_SERIAL_AIRCABLE=m
 CONFIG_USB_SERIAL_ARK3116=m
 CONFIG_USB_SERIAL_BELKIN=m
@@ -3934,7 +4155,6 @@
 CONFIG_USB_SERIAL_CYPRESS_M8=m
 CONFIG_USB_SERIAL_EMPEG=m
 CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_FUNSOFT=m
 CONFIG_USB_SERIAL_VISOR=m
 CONFIG_USB_SERIAL_IPAQ=m
 CONFIG_USB_SERIAL_IR=m
@@ -3953,7 +4173,6 @@
 CONFIG_USB_SERIAL_MOS7720=m
 CONFIG_USB_SERIAL_MOS7715_PARPORT=y
 CONFIG_USB_SERIAL_MOS7840=m
-CONFIG_USB_SERIAL_MOTOROLA=m
 CONFIG_USB_SERIAL_MXUPORT=m
 CONFIG_USB_SERIAL_NAVMAN=m
 CONFIG_USB_SERIAL_PL2303=m
@@ -3961,10 +4180,8 @@
 CONFIG_USB_SERIAL_QCAUX=m
 CONFIG_USB_SERIAL_QUALCOMM=m
 CONFIG_USB_SERIAL_SPCP8X5=m
-CONFIG_USB_SERIAL_HP4X=m
 CONFIG_USB_SERIAL_SAFE=m
 # CONFIG_USB_SERIAL_SAFE_PADDED is not set
-CONFIG_USB_SERIAL_SIEMENS_MPI=m
 CONFIG_USB_SERIAL_SIERRAWIRELESS=m
 CONFIG_USB_SERIAL_SYMBOL=m
 CONFIG_USB_SERIAL_TI=m
@@ -3973,15 +4190,11 @@
 CONFIG_USB_SERIAL_OPTION=m
 CONFIG_USB_SERIAL_OMNINET=m
 CONFIG_USB_SERIAL_OPTICON=m
-CONFIG_USB_SERIAL_VIVOPAY_SERIAL=m
 CONFIG_USB_SERIAL_XSENS_MT=m
-CONFIG_USB_SERIAL_ZIO=m
 CONFIG_USB_SERIAL_WISHBONE=m
 CONFIG_USB_SERIAL_ZTE=m
 CONFIG_USB_SERIAL_SSU100=m
 CONFIG_USB_SERIAL_QT2=m
-CONFIG_USB_SERIAL_FLASHLOADER=m
-CONFIG_USB_SERIAL_SUUNTO=m
 CONFIG_USB_SERIAL_DEBUG=m
 
 ##
@@ -4003,6 +4216,7 @@
 CONFIG_USB_STORAGE_KARMA=m
 CONFIG_USB_STORAGE_CYPRESS_ATACB=m
 CONFIG_USB_STORAGE_ENE_UB6250=m
+# CONFIG_USB_UAS is not set
 
 ##
 ## file: drivers/usb/wusbcore/Kconfig
@@ -4024,7 +4238,32 @@
 CONFIG_VHOST_SCSI=m
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/backlight/Kconfig
+##
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_BACKLIGHT_APPLE=m
+# CONFIG_BACKLIGHT_SAHARA is not set
+CONFIG_BACKLIGHT_WM831X=m
+# CONFIG_BACKLIGHT_ADP8860 is not set
+# CONFIG_BACKLIGHT_ADP8870 is not set
+# CONFIG_BACKLIGHT_LM3639 is not set
+# CONFIG_BACKLIGHT_OT200 is not set
+# CONFIG_BACKLIGHT_GPIO is not set
+# CONFIG_BACKLIGHT_LV5207LP is not set
+# CONFIG_BACKLIGHT_BD6107 is not set
+
+##
+## file: drivers/video/console/Kconfig
+##
+# CONFIG_VGACON_SOFT_SCROLLBACK is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+
+##
+## file: drivers/video/fbdev/Kconfig
 ##
 CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB_FOREIGN_ENDIAN is not set
@@ -4063,25 +4302,7 @@
 # CONFIG_FB_AUO_K190X is not set
 
 ##
-## file: drivers/video/backlight/Kconfig
-##
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-# CONFIG_LCD_CLASS_DEVICE is not set
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-# CONFIG_BACKLIGHT_GENERIC is not set
-CONFIG_BACKLIGHT_APPLE=m
-# CONFIG_BACKLIGHT_SAHARA is not set
-CONFIG_BACKLIGHT_WM831X=m
-
-##
-## file: drivers/video/console/Kconfig
-##
-# CONFIG_VGACON_SOFT_SCROLLBACK is not set
-# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-
-##
-## file: drivers/video/exynos/Kconfig
+## file: drivers/video/fbdev/exynos/Kconfig
 ##
 # CONFIG_EXYNOS_VIDEO is not set
 
@@ -4100,6 +4321,7 @@
 ##
 CONFIG_VIRTIO_PCI=m
 CONFIG_VIRTIO_BALLOON=m
+# CONFIG_VIRTIO_MMIO is not set
 
 ##
 ## file: drivers/vme/Kconfig
@@ -4146,6 +4368,7 @@
 CONFIG_SOFT_WATCHDOG=m
 CONFIG_WM831X_WATCHDOG=m
 CONFIG_WM8350_WATCHDOG=m
+# CONFIG_XILINX_WATCHDOG is not set
 # CONFIG_DW_WATCHDOG is not set
 CONFIG_SBC_FITPC2_WATCHDOG=m
 CONFIG_ITCO_WDT=m
@@ -4154,8 +4377,6 @@
 CONFIG_PC87413_WDT=m
 CONFIG_SMSC_SCH311X_WDT=m
 CONFIG_SMSC37B787_WDT=m
-CONFIG_W83697HF_WDT=m
-CONFIG_W83697UG_WDT=m
 CONFIG_SBC_EPX_C3_WATCHDOG=m
 # CONFIG_MEN_A21_WDT is not set
 CONFIG_XEN_WDT=m
@@ -4223,8 +4444,8 @@
 ## end choice
 # CONFIG_AUFS_HNOTIFY is not set
 CONFIG_AUFS_EXPORT=y
+# CONFIG_AUFS_FHSM is not set
 # CONFIG_AUFS_RDU is not set
-# CONFIG_AUFS_SP_IATTR is not set
 # CONFIG_AUFS_SHWH is not set
 # CONFIG_AUFS_BR_RAMFS is not set
 # CONFIG_AUFS_BR_FUSE is not set
@@ -4277,6 +4498,7 @@
 ## file: fs/ceph/Kconfig
 ##
 CONFIG_CEPH_FS=m
+CONFIG_CEPH_FSCACHE=y
 CONFIG_CEPH_FS_POSIX_ACL=y
 
 ##
@@ -4321,6 +4543,7 @@
 ## file: fs/ecryptfs/Kconfig
 ##
 CONFIG_ECRYPT_FS=m
+CONFIG_ECRYPT_FS_MESSAGING=y
 
 ##
 ## file: fs/efivarfs/Kconfig
@@ -4500,6 +4723,7 @@
 CONFIG_NFS_V4_1=y
 CONFIG_NFS_V4_2=y
 CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org"
+# CONFIG_NFS_V4_1_MIGRATION is not set
 CONFIG_NFS_FSCACHE=y
 # CONFIG_NFS_USE_LEGACY_DNS is not set
 
@@ -4623,6 +4847,7 @@
 ## file: fs/pstore/Kconfig
 ##
 # CONFIG_PSTORE_CONSOLE is not set
+# CONFIG_PSTORE_FTRACE is not set
 CONFIG_PSTORE_RAM=m
 
 ##
@@ -4729,10 +4954,11 @@
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
+CONFIG_CROSS_MEMORY_ATTACH=y
 CONFIG_FHANDLE=y
+# CONFIG_USELIB is not set
 CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
-# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set
 CONFIG_BSD_PROCESS_ACCT=y
 CONFIG_BSD_PROCESS_ACCT_V3=y
 CONFIG_TASKSTATS=y
@@ -4788,6 +5014,7 @@
 #. Unfortunately some useful options are conditional on EXPERT
 CONFIG_EXPERT=y
 CONFIG_UID16=y
+# CONFIG_SYSFS_SYSCALL is not set
 # CONFIG_SYSCTL_SYSCALL is not set
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
@@ -4815,8 +5042,8 @@
 # CONFIG_SLOB is not set
 ## end choice
 # CONFIG_MMAP_ALLOW_UNINITIALIZED is not set
-CONFIG_PROFILING=y
 # CONFIG_SYSTEM_TRUSTED_KEYRING is not set
+CONFIG_PROFILING=y
 CONFIG_MODULES=y
 CONFIG_MODULE_FORCE_LOAD=y
 CONFIG_MODULE_UNLOAD=y
@@ -4882,20 +5109,25 @@
 ## file: kernel/trace/Kconfig
 ##
 CONFIG_FTRACE=y
-# CONFIG_FUNCTION_TRACER is not set
+CONFIG_FUNCTION_TRACER=y
+CONFIG_FUNCTION_GRAPH_TRACER=y
 # CONFIG_IRQSOFF_TRACER is not set
 # CONFIG_SCHED_TRACER is not set
-# CONFIG_FTRACE_SYSCALLS is not set
+CONFIG_FTRACE_SYSCALLS=y
+CONFIG_TRACER_SNAPSHOT=y
 ## choice: Branch Profiling
 CONFIG_BRANCH_PROFILE_NONE=y
 # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
 # CONFIG_PROFILE_ALL_BRANCHES is not set
 ## end choice
-# CONFIG_STACK_TRACER is not set
+CONFIG_STACK_TRACER=y
 CONFIG_BLK_DEV_IO_TRACE=y
 CONFIG_KPROBE_EVENT=y
 CONFIG_UPROBE_EVENT=y
+CONFIG_DYNAMIC_FTRACE=y
+# CONFIG_FUNCTION_PROFILER is not set
 # CONFIG_FTRACE_STARTUP_TEST is not set
+# CONFIG_TRACEPOINT_BENCHMARK is not set
 # CONFIG_RING_BUFFER_BENCHMARK is not set
 # CONFIG_RING_BUFFER_STARTUP_TEST is not set
 
@@ -4966,10 +5198,11 @@
 # CONFIG_LOCK_STAT is not set
 # CONFIG_DEBUG_ATOMIC_SLEEP is not set
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_LOCK_TORTURE_TEST is not set
 # CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_BUGVERBOSE=y
-# CONFIG_DEBUG_WRITECOUNT is not set
 # CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_PI_LIST is not set
 # CONFIG_DEBUG_SG is not set
 # CONFIG_DEBUG_NOTIFIERS is not set
 # CONFIG_DEBUG_CREDENTIALS is not set
@@ -4995,10 +5228,10 @@
 # CONFIG_ASYNC_RAID6_TEST is not set
 # CONFIG_TEST_STRING_HELPERS is not set
 # CONFIG_TEST_KSTRTOX is not set
-# CONFIG_FIREWIRE_OHCI_REMOTE_DMA is not set
 # CONFIG_DMA_API_DEBUG is not set
 # CONFIG_TEST_MODULE is not set
 # CONFIG_TEST_USER_COPY is not set
+# CONFIG_TEST_BPF is not set
 
 ##
 ## file: lib/fonts/Kconfig
@@ -5018,7 +5251,6 @@
 ##
 ## file: lib/xz/Kconfig
 ##
-# CONFIG_XZ_DEC_TEST is not set
 #. These are enabled again by arch config, matching the defaults
 # CONFIG_XZ_DEC_X86 is not set
 # CONFIG_XZ_DEC_POWERPC is not set
@@ -5026,6 +5258,7 @@
 # CONFIG_XZ_DEC_ARM is not set
 # CONFIG_XZ_DEC_ARMTHUMB is not set
 # CONFIG_XZ_DEC_SPARC is not set
+# CONFIG_XZ_DEC_TEST is not set
 
 ##
 ## file: mm/Kconfig
@@ -5044,10 +5277,10 @@
 ## choice: Transparent Hugepage Support sysfs defaults
 CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y
 ## end choice
-CONFIG_CROSS_MEMORY_ATTACH=y
 # CONFIG_CLEANCACHE is not set
-# CONFIG_FRONTSWAP is not set
+CONFIG_FRONTSWAP=y
 # CONFIG_CMA is not set
+CONFIG_ZSWAP=y
 CONFIG_MEM_SOFT_DIRTY=y
 CONFIG_ZSMALLOC=y
 # CONFIG_PGTABLE_MAPPING is not set
@@ -5063,7 +5296,7 @@
 # CONFIG_NETFILTER_DEBUG is not set
 CONFIG_NETFILTER_ADVANCED=y
 CONFIG_BRIDGE_NETFILTER=y
-CONFIG_CGROUP_NET_PRIO=m
+CONFIG_CGROUP_NET_PRIO=y
 CONFIG_BPF_JIT=y
 CONFIG_NET_PKTGEN=m
 # CONFIG_NET_TCPPROBE is not set
@@ -5103,12 +5336,14 @@
 CONFIG_BATMAN_ADV_BLA=y
 CONFIG_BATMAN_ADV_DAT=y
 CONFIG_BATMAN_ADV_NC=y
+CONFIG_BATMAN_ADV_MCAST=y
 # CONFIG_BATMAN_ADV_DEBUG is not set
 
 ##
 ## file: net/bluetooth/Kconfig
 ##
 CONFIG_BT=m
+CONFIG_BT_6LOWPAN=y
 
 ##
 ## file: net/bluetooth/bnep/Kconfig
@@ -5144,6 +5379,7 @@
 ## file: net/bridge/netfilter/Kconfig
 ##
 CONFIG_NF_TABLES_BRIDGE=m
+CONFIG_NFT_BRIDGE_META=m
 CONFIG_BRIDGE_NF_EBTABLES=m
 CONFIG_BRIDGE_EBT_BROUTE=m
 CONFIG_BRIDGE_EBT_T_FILTER=m
@@ -5245,7 +5481,6 @@
 CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
 CONFIG_IP_PIMSM_V1=y
 CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
 CONFIG_SYN_COOKIES=y
 CONFIG_NET_IPVTI=m
 CONFIG_INET_AH=m
@@ -5291,17 +5526,22 @@
 CONFIG_NF_TABLES_ARP=m
 CONFIG_IP_NF_IPTABLES=m
 CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_RPFILTER=m
+CONFIG_IP_NF_MATCH_TTL=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IP_NF_TARGET_SYNPROXY=m
 CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_NF_NAT_IPV4=m
 CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_MANGLE=m
 CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
 CONFIG_IP_NF_RAW=m
 CONFIG_IP_NF_SECURITY=m
 CONFIG_IP_NF_ARPTABLES=m
@@ -5312,7 +5552,6 @@
 ## file: net/ipv6/Kconfig
 ##
 CONFIG_IPV6=y
-CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
 CONFIG_IPV6_ROUTE_INFO=y
 CONFIG_IPV6_OPTIMISTIC_DAD=y
@@ -5347,10 +5586,12 @@
 CONFIG_IP6_NF_MATCH_EUI64=m
 CONFIG_IP6_NF_MATCH_FRAG=m
 CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_HL=m
 CONFIG_IP6_NF_MATCH_IPV6HEADER=m
 CONFIG_IP6_NF_MATCH_MH=m
 CONFIG_IP6_NF_MATCH_RPFILTER=m
 CONFIG_IP6_NF_MATCH_RT=m
+CONFIG_IP6_NF_TARGET_HL=m
 CONFIG_IP6_NF_FILTER=m
 CONFIG_IP6_NF_TARGET_REJECT=m
 CONFIG_IP6_NF_TARGET_SYNPROXY=m
@@ -5531,6 +5772,7 @@
 CONFIG_IP_SET_BITMAP_IPMAC=m
 CONFIG_IP_SET_BITMAP_PORT=m
 CONFIG_IP_SET_HASH_IP=m
+CONFIG_IP_SET_HASH_IPMARK=m
 CONFIG_IP_SET_HASH_IPPORT=m
 CONFIG_IP_SET_HASH_IPPORTIP=m
 CONFIG_IP_SET_HASH_IPPORTNET=m
@@ -5717,6 +5959,8 @@
 ##
 CONFIG_RPCSEC_GSS_KRB5=m
 CONFIG_SUNRPC_DEBUG=y
+CONFIG_SUNRPC_XPRT_RDMA_CLIENT=m
+CONFIG_SUNRPC_XPRT_RDMA_SERVER=m
 
 ##
 ## file: net/tipc/Kconfig
@@ -5860,6 +6104,7 @@
 CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
 # CONFIG_SND_RTCTIMER is not set
 CONFIG_SND_DYNAMIC_MINORS=y
+CONFIG_SND_MAX_CARDS=32
 CONFIG_SND_SUPPORT_OLD_API=y
 CONFIG_SND_VERBOSE_PROCFS=y
 # CONFIG_SND_VERBOSE_PRINTK is not set
@@ -5880,9 +6125,12 @@
 ## file: sound/firewire/Kconfig
 ##
 CONFIG_SND_FIREWIRE=y
+CONFIG_SND_DICE=m
 CONFIG_SND_FIREWIRE_SPEAKERS=m
 CONFIG_SND_ISIGHT=m
 CONFIG_SND_SCS1X=m
+CONFIG_SND_FIREWORKS=m
+CONFIG_SND_BEBOB=m
 
 ##
 ## file: sound/pci/Kconfig
@@ -5893,8 +6141,6 @@
 CONFIG_SND_ASIHPI=m
 # CONFIG_SND_AW2 is not set
 CONFIG_SND_OXYGEN=m
-CONFIG_SND_CS5530=m
-CONFIG_SND_CS5535AUDIO=m
 CONFIG_SND_CTXFI=m
 CONFIG_SND_DARLA20=m
 CONFIG_SND_GINA20=m
@@ -5972,6 +6218,8 @@
 CONFIG_SND_USB_CAIAQ_INPUT=y
 CONFIG_SND_USB_US122L=m
 CONFIG_SND_USB_6FIRE=m
+CONFIG_SND_USB_HIFACE=m
+CONFIG_SND_BCD2000=m
 
 ##
 ## file: usr/Kconfig
@@ -5983,3 +6231,4 @@
 CONFIG_RD_XZ=y
 CONFIG_RD_LZO=y
 CONFIG_RD_LZ4=y
+

Modified: dists/wheezy-backports/linux/debian/config/defines
==============================================================================
--- dists/wheezy-backports/linux/debian/config/defines	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/defines	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,6 +1,5 @@
 [abi]
 abiname: 0.bpo.2
-ignore-changes:
 
 [base]
 arches:
@@ -34,7 +33,7 @@
  rt
 
 [featureset-rt_base]
-enabled: true
+enabled: false
 
 [description]
 part-long-up: This kernel is not suitable for SMP (multi-processor,

Modified: dists/wheezy-backports/linux/debian/config/hppa/config
==============================================================================
--- dists/wheezy-backports/linux/debian/config/hppa/config	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/hppa/config	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,9 +1,4 @@
 ##
-## file: arch/Kconfig
-##
-# CONFIG_OPROFILE is not set
-
-##
 ## file: arch/parisc/Kconfig
 ##
 ## choice: Processor type
@@ -21,7 +16,6 @@
 ## file: arch/parisc/Kconfig.debug
 ##
 # CONFIG_DEBUG_RODATA is not set
-CONFIG_DEBUG_STACKOVERFLOW=y
 
 ##
 ## file: block/partitions/Kconfig
@@ -127,7 +121,7 @@
 ##
 CONFIG_INPUT_MISC=y
 # CONFIG_INPUT_UINPUT is not set
-# CONFIG_HP_SDC_RTC=m
+# CONFIG_HP_SDC_RTC is not set
 
 ##
 ## file: drivers/input/mouse/Kconfig
@@ -188,7 +182,6 @@
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_NET_FC is not set
-# CONFIG_NETPOLL_TRAP is not set
 
 ##
 ## file: drivers/net/appletalk/Kconfig
@@ -518,11 +511,6 @@
 # CONFIG_USB_USS720 is not set
 
 ##
-## file: drivers/usb/core/Kconfig
-##
-CONFIG_USB_DEBUG=y
-
-##
 ## file: drivers/usb/host/Kconfig
 ##
 CONFIG_USB_EHCI_HCD=m
@@ -531,7 +519,15 @@
 # CONFIG_USB_SL811_HCD is not set
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/console/Kconfig
+##
+CONFIG_DUMMY_CONSOLE_COLUMNS=160
+CONFIG_DUMMY_CONSOLE_ROWS=64
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_STI_CONSOLE=y
+
+##
+## file: drivers/video/fbdev/Kconfig
 ##
 CONFIG_FB=y
 CONFIG_FB_MODE_HELPERS=y
@@ -561,14 +557,6 @@
 # CONFIG_FB_VIRTUAL is not set
 
 ##
-## file: drivers/video/console/Kconfig
-##
-CONFIG_DUMMY_CONSOLE_COLUMNS=160
-CONFIG_DUMMY_CONSOLE_ROWS=64
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_STI_CONSOLE=y
-
-##
 ## file: drivers/w1/Kconfig
 ##
 # CONFIG_W1 is not set
@@ -579,8 +567,15 @@
 CONFIG_ROOT_NFS=y
 
 ##
+## file: init/Kconfig
+##
+CONFIG_SGETMASK_SYSCALL=y
+CONFIG_SYSFS_SYSCALL=y
+
+##
 ## file: lib/Kconfig.debug
 ##
+CONFIG_DEBUG_STACKOVERFLOW=y
 # CONFIG_LOCKUP_DETECTOR is not set
 
 ##

Modified: dists/wheezy-backports/linux/debian/config/hppa/config.parisc64-smp
==============================================================================
--- dists/wheezy-backports/linux/debian/config/hppa/config.parisc64-smp	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/hppa/config.parisc64-smp	Sun Sep 21 14:23:16 2014	(r21886)
@@ -22,15 +22,6 @@
 CONFIG_AGP_PARISC=y
 
 ##
-## file: drivers/gpu/drm/Kconfig
-##
-#. for ATI FireGL DRM in C8000 workstation
-CONFIG_DRM=y
-CONFIG_DRM_KMS_HELPER=y
-CONFIG_DRM_TTM=m
-CONFIG_DRM_RADEON=m
-
-##
 ## file: drivers/char/ipmi/Kconfig
 ##
 CONFIG_IPMI_HANDLER=m
@@ -40,6 +31,13 @@
 CONFIG_IPMI_POWEROFF=m
 
 ##
+## file: drivers/gpu/drm/Kconfig
+##
+#. for ATI FireGL DRM in C8000 workstation
+CONFIG_DRM=y
+CONFIG_DRM_RADEON=m
+
+##
 ## file: mm/Kconfig
 ##
 ## choice: Memory model

Modified: dists/wheezy-backports/linux/debian/config/i386/config.486
==============================================================================
--- dists/wheezy-backports/linux/debian/config/i386/config.486	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/i386/config.486	Sun Sep 21 14:23:16 2014	(r21886)
@@ -107,7 +107,7 @@
 CONFIG_MOXA_INTELLIO=m
 
 ##
-## file: drivers/video/geode/Kconfig
+## file: drivers/video/fbdev/geode/Kconfig
 ##
 CONFIG_FB_GEODE=y
 CONFIG_FB_GEODE_LX=m

Modified: dists/wheezy-backports/linux/debian/config/ia64/config
==============================================================================
--- dists/wheezy-backports/linux/debian/config/ia64/config	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/ia64/config	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,9 +1,4 @@
 ##
-## file: arch/Kconfig
-##
-CONFIG_OPROFILE=m
-
-##
 ## file: arch/ia64/Kconfig
 ##
 CONFIG_HOTPLUG_CPU=y
@@ -74,7 +69,6 @@
 CONFIG_PATA_AMD=m
 CONFIG_PATA_CMD64X=m
 CONFIG_PATA_CS5520=m
-CONFIG_PATA_CS5530=m
 CONFIG_PATA_EFAR=m
 CONFIG_PATA_HPT366=m
 CONFIG_PATA_HPT37X=m
@@ -201,6 +195,7 @@
 CONFIG_SENSORS_GL518SM=m
 CONFIG_SENSORS_GL520SM=m
 CONFIG_SENSORS_IT87=m
+CONFIG_SENSORS_MAX1619=m
 CONFIG_SENSORS_LM63=m
 CONFIG_SENSORS_LM75=m
 CONFIG_SENSORS_LM77=m
@@ -211,7 +206,6 @@
 CONFIG_SENSORS_LM87=m
 CONFIG_SENSORS_LM90=m
 CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
 CONFIG_SENSORS_PC87360=m
 CONFIG_SENSORS_PCF8591=m
 CONFIG_SENSORS_SIS5595=m
@@ -272,7 +266,6 @@
 # CONFIG_BLK_DEV_CMD64X is not set
 # CONFIG_BLK_DEV_TRIFLEX is not set
 # CONFIG_BLK_DEV_CS5520 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
 # CONFIG_BLK_DEV_HPT366 is not set
 # CONFIG_BLK_DEV_SC1200 is not set
 # CONFIG_BLK_DEV_PIIX is not set
@@ -349,9 +342,8 @@
 ##
 ## file: drivers/isdn/capi/Kconfig
 ##
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-# CONFIG_ISDN_CAPI_MIDDLEWARE is not set
 CONFIG_ISDN_CAPI_CAPI20=m
+# CONFIG_ISDN_CAPI_MIDDLEWARE is not set
 
 ##
 ## file: drivers/isdn/hardware/avm/Kconfig
@@ -722,7 +714,13 @@
 CONFIG_USB_SL811_CS=m
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/console/Kconfig
+##
+CONFIG_VGA_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+
+##
+## file: drivers/video/fbdev/Kconfig
 ##
 CONFIG_FB=y
 CONFIG_FB_MODE_HELPERS=y
@@ -761,12 +759,6 @@
 # CONFIG_FB_VIRTUAL is not set
 
 ##
-## file: drivers/video/console/Kconfig
-##
-CONFIG_VGA_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-
-##
 ## file: fs/pstore/Kconfig
 ##
 CONFIG_PSTORE=y

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-arm/config
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-arm/config	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-arm/config	Sun Sep 21 14:23:16 2014	(r21886)
@@ -4,6 +4,7 @@
 CONFIG_MMU=y
 CONFIG_AEABI=y
 # CONFIG_OABI_COMPAT is not set
+CONFIG_KEXEC=y
 
 ##
 ## file: arch/arm/Kconfig.debug

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-mips/config
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-mips/config	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-mips/config	Sun Sep 21 14:23:16 2014	(r21886)
@@ -31,3 +31,9 @@
 ##
 CONFIG_EXT4_FS=y
 
+##
+## file: init/Kconfig
+##
+CONFIG_SGETMASK_SYSCALL=y
+CONFIG_SYSFS_SYSCALL=y
+

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.4kc-malta
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.4kc-malta	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.4kc-malta	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,9 +1,4 @@
 ##
-## file: arch/Kconfig
-##
-CONFIG_OPROFILE=m
-
-##
 ## file: arch/mips/Kconfig
 ##
 ## choice: System type
@@ -95,6 +90,7 @@
 CONFIG_SENSORS_ADM1026=m
 CONFIG_SENSORS_ADM1031=m
 CONFIG_SENSORS_DS1621=m
+CONFIG_SENSORS_MAX1619=m
 CONFIG_SENSORS_LM63=m
 CONFIG_SENSORS_LM75=m
 CONFIG_SENSORS_LM77=m
@@ -105,7 +101,6 @@
 CONFIG_SENSORS_LM87=m
 CONFIG_SENSORS_LM90=m
 CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
 CONFIG_SENSORS_PCF8591=m
 
 ##
@@ -139,7 +134,6 @@
 CONFIG_KEYBOARD_NEWTON=m
 CONFIG_KEYBOARD_SUNKBD=m
 
-
 ##
 ## file: drivers/input/mouse/Kconfig
 ##
@@ -296,7 +290,7 @@
 ##
 CONFIG_8139CP=m
 CONFIG_8139TOO=m
-CONFIG_8139TOO_PIO is not set
+# CONFIG_8139TOO_PIO is not set
 CONFIG_8139TOO_TUNE_TWISTER=y
 CONFIG_8139TOO_8129=y
 
@@ -432,7 +426,12 @@
 CONFIG_USB_SL811_HCD=m
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/console/Kconfig
+##
+CONFIG_FRAMEBUFFER_CONSOLE=y
+
+##
+## file: drivers/video/fbdev/Kconfig
 ##
 CONFIG_FB=y
 CONFIG_FB_MODE_HELPERS=y
@@ -468,11 +467,6 @@
 CONFIG_FB_VIRTUAL=m
 
 ##
-## file: drivers/video/console/Kconfig
-##
-CONFIG_FRAMEBUFFER_CONSOLE=y
-
-##
 ## file: drivers/watchdog/Kconfig
 ##
 CONFIG_PCIPCWATCHDOG=m
@@ -585,3 +579,4 @@
 CONFIG_SND_VIA82XX_MODEM=m
 CONFIG_SND_VX222=m
 CONFIG_SND_YMFPCI=m
+

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.5kc-malta
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.5kc-malta	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.5kc-malta	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,9 +1,4 @@
 ##
-## file: arch/Kconfig
-##
-CONFIG_OPROFILE=m
-
-##
 ## file: arch/mips/Kconfig
 ##
 ## choice: System type
@@ -98,6 +93,7 @@
 CONFIG_SENSORS_ADM1026=m
 CONFIG_SENSORS_ADM1031=m
 CONFIG_SENSORS_DS1621=m
+CONFIG_SENSORS_MAX1619=m
 CONFIG_SENSORS_LM63=m
 CONFIG_SENSORS_LM75=m
 CONFIG_SENSORS_LM77=m
@@ -108,7 +104,6 @@
 CONFIG_SENSORS_LM87=m
 CONFIG_SENSORS_LM90=m
 CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
 CONFIG_SENSORS_PCF8591=m
 
 ##
@@ -298,7 +293,7 @@
 ##
 CONFIG_8139CP=m
 CONFIG_8139TOO=m
-CONFIG_8139TOO_PIO is not set
+# CONFIG_8139TOO_PIO is not set
 CONFIG_8139TOO_TUNE_TWISTER=y
 CONFIG_8139TOO_8129=y
 
@@ -434,7 +429,12 @@
 CONFIG_USB_SL811_HCD=m
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/console/Kconfig
+##
+CONFIG_FRAMEBUFFER_CONSOLE=y
+
+##
+## file: drivers/video/fbdev/Kconfig
 ##
 CONFIG_FB=y
 CONFIG_FB_MODE_HELPERS=y
@@ -470,11 +470,6 @@
 CONFIG_FB_VIRTUAL=m
 
 ##
-## file: drivers/video/console/Kconfig
-##
-CONFIG_FRAMEBUFFER_CONSOLE=y
-
-##
 ## file: drivers/watchdog/Kconfig
 ##
 CONFIG_PCIPCWATCHDOG=m
@@ -587,3 +582,4 @@
 CONFIG_SND_VIA82XX_MODEM=m
 CONFIG_SND_VX222=m
 CONFIG_SND_YMFPCI=m
+

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.loongson-2e
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.loongson-2e	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.loongson-2e	Sun Sep 21 14:23:16 2014	(r21886)
@@ -17,7 +17,7 @@
 ## file: arch/mips/loongson/Kconfig
 ##
 ## choice: Machine Type
-CONFIG_LEMOTE_MACH2E=y
+CONFIG_LEMOTE_FULOONG2E=y
 ## end choice
 
 ##
@@ -74,11 +74,6 @@
 # CONFIG_SCSI_LPFC is not set
 
 ##
-## file: drivers/staging/sm7xxfb/Kconfig
-##
-CONFIG_FB_SM7XX=y
-
-##
 ## file: drivers/tty/Kconfig
 ##
 CONFIG_VT=y
@@ -111,13 +106,6 @@
 CONFIG_USB_MON=y
 
 ##
-## file: drivers/video/Kconfig
-##
-CONFIG_VIDEO_OUTPUT_CONTROL=y
-CONFIG_FB=y
-CONFIG_FB_RADEON=y
-
-##
 ## file: drivers/video/backlight/Kconfig
 ##
 CONFIG_LCD_CLASS_DEVICE=y
@@ -129,3 +117,9 @@
 ##
 CONFIG_FRAMEBUFFER_CONSOLE=y
 
+##
+## file: drivers/video/fbdev/Kconfig
+##
+CONFIG_FB=y
+CONFIG_FB_RADEON=y
+

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.loongson-2f
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.loongson-2f	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.loongson-2f	Sun Sep 21 14:23:16 2014	(r21886)
@@ -113,15 +113,6 @@
 CONFIG_USB_MON=y
 
 ##
-## file: drivers/video/Kconfig
-##
-CONFIG_VIDEO_OUTPUT_CONTROL=y
-CONFIG_FB=y
-CONFIG_FB_SIS=y
-CONFIG_FB_SIS_300=y
-CONFIG_FB_SIS_315=y
-
-##
 ## file: drivers/video/backlight/Kconfig
 ##
 CONFIG_LCD_CLASS_DEVICE=y
@@ -133,3 +124,16 @@
 ##
 CONFIG_FRAMEBUFFER_CONSOLE=y
 
+##
+## file: drivers/video/fbdev/Kconfig
+##
+CONFIG_FB=y
+CONFIG_FB_SIS=y
+CONFIG_FB_SIS_300=y
+CONFIG_FB_SIS_315=y
+
+##
+## file: sound/pci/Kconfig
+##
+CONFIG_SND_CS5535AUDIO=m
+

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.loongson-3
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.loongson-3	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.loongson-3	Sun Sep 21 14:23:16 2014	(r21886)
@@ -18,7 +18,7 @@
 ## file: arch/mips/loongson/Kconfig
 ##
 ## choice: Machine Type
-CONFIG_LEMOTE_MACH3A=y
+CONFIG_LOONGSON_MACH3X=y
 ## end choice
 
 ##
@@ -93,16 +93,15 @@
 CONFIG_USB_SL811_HCD=m
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/console/Kconfig
 ##
-CONFIG_VIDEO_OUTPUT_CONTROL=y
-CONFIG_FB=y
-CONFIG_FB_RADEON=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
 
 ##
-## file: drivers/video/console/Kconfig
+## file: drivers/video/fbdev/Kconfig
 ##
-CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FB=y
+CONFIG_FB_RADEON=y
 
 ##
 ## file: kernel/Kconfig.preempt
@@ -114,11 +113,7 @@
 ## end choice
 
 ##
-## file: mm/Kconfig
-##
-# CONFIG_TRANSPARENT_HUGEPAGE is not set
-
-##
 ## file: sound/pci/hda/Kconfig
 ##
 CONFIG_SND_HDA_INTEL=m
+

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.octeon
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.octeon	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.octeon	Sun Sep 21 14:23:16 2014	(r21886)
@@ -18,8 +18,8 @@
 ##
 ## file: arch/mips/cavium-octeon/Kconfig
 ##
-# CONFIG_CAVIUM_OCTEON_2ND_KERNEL is not set
 CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE=1
+# CONFIG_CAVIUM_OCTEON_2ND_KERNEL is not set
 CONFIG_CAVIUM_OCTEON_LOCK_L2=y
 CONFIG_CAVIUM_OCTEON_LOCK_L2_TLB=y
 CONFIG_CAVIUM_OCTEON_LOCK_L2_EXCEPTION=y
@@ -105,6 +105,11 @@
 CONFIG_OCTEON_ETHERNET=y
 
 ##
+## file: drivers/staging/octeon-usb/Kconfig
+##
+CONFIG_OCTEON_USB=y
+
+##
 ## file: drivers/tty/serial/8250/Kconfig
 ##
 CONFIG_SERIAL_8250=y
@@ -113,6 +118,14 @@
 CONFIG_SERIAL_8250_RUNTIME_UARTS=2
 
 ##
+## file: drivers/usb/host/Kconfig
+##
+CONFIG_USB_EHCI_HCD=m
+CONFIG_USB_OCTEON_EHCI=m
+CONFIG_USB_OCTEON_OHCI=m
+CONFIG_USB_OHCI_HCD=m
+
+##
 ## file: kernel/power/Kconfig
 ##
 # CONFIG_SUSPEND is not set

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.r4k-ip22
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.r4k-ip22	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.r4k-ip22	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,9 +1,4 @@
 ##
-## file: arch/Kconfig
-##
-# CONFIG_OPROFILE is not set
-
-##
 ## file: arch/mips/Kconfig
 ##
 ## choice: System type
@@ -35,11 +30,6 @@
 # CONFIG_ATA is not set
 
 ##
-## file: net/bluetooth/Kconfig
-##
-# CONFIG_BT is not set
-
-##
 ## file: drivers/char/Kconfig
 ##
 CONFIG_PRINTER=m
@@ -54,8 +44,8 @@
 ##
 # CONFIG_SENSORS_ADM9240 is not set
 # CONFIG_SENSORS_ATXP1 is not set
-# CONFIG_SENSORS_W83627EHF is not set
 # CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83627EHF is not set
 
 ##
 ## file: drivers/i2c/Kconfig
@@ -140,17 +130,17 @@
 CONFIG_SERIAL_IP22_ZILOG_CONSOLE=y
 
 ##
-## file: drivers/video/Kconfig
-##
-CONFIG_FB=y
-
-##
 ## file: drivers/video/console/Kconfig
 ##
 CONFIG_SGI_NEWPORT_CONSOLE=y
 CONFIG_FRAMEBUFFER_CONSOLE=y
 
 ##
+## file: drivers/video/fbdev/Kconfig
+##
+CONFIG_FB=y
+
+##
 ## file: drivers/w1/Kconfig
 ##
 # CONFIG_W1 is not set
@@ -161,7 +151,13 @@
 CONFIG_INDYDOG=m
 
 ##
+## file: net/bluetooth/Kconfig
+##
+# CONFIG_BT is not set
+
+##
 ## file: sound/mips/Kconfig
 ##
 CONFIG_SND_MIPS=y
 CONFIG_SND_SGI_HAL2=m
+

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.r5k-ip32
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.r5k-ip32	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.r5k-ip32	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,9 +1,4 @@
 ##
-## file: arch/Kconfig
-##
-# CONFIG_OPROFILE is not set
-
-##
 ## file: arch/mips/Kconfig
 ##
 ## choice: System type
@@ -241,16 +236,16 @@
 CONFIG_USB_UHCI_HCD=m
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/console/Kconfig
 ##
-CONFIG_FB=y
-CONFIG_FB_GBE=y
-# CONFIG_FB_3DFX is not set
+CONFIG_FRAMEBUFFER_CONSOLE=y
 
 ##
-## file: drivers/video/console/Kconfig
+## file: drivers/video/fbdev/Kconfig
 ##
-CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FB=y
+CONFIG_FB_GBE=y
+# CONFIG_FB_3DFX is not set
 
 ##
 ## file: drivers/w1/Kconfig
@@ -277,3 +272,4 @@
 # CONFIG_SND_HDSPM is not set
 CONFIG_SND_KORG1212=m
 # CONFIG_SND_PCXHR is not set
+

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.sb1-bcm91250a
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.sb1-bcm91250a	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-mips/config.sb1-bcm91250a	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,9 +1,4 @@
 ##
-## file: arch/Kconfig
-##
-# CONFIG_OPROFILE is not set
-
-##
 ## file: arch/mips/Kconfig
 ##
 ## choice: System type
@@ -43,7 +38,6 @@
 CONFIG_ATA=y
 CONFIG_PATA_ALI=m
 CONFIG_PATA_AMD=m
-CONFIG_PATA_CS5530=m
 CONFIG_PATA_CYPRESS=y
 CONFIG_PATA_EFAR=m
 CONFIG_PATA_NS87415=m
@@ -62,7 +56,6 @@
 ## file: drivers/char/Kconfig
 ##
 CONFIG_PRINTER=m
-## CONFIG_PPDEV is not set
 CONFIG_RTC=m
 
 ##
@@ -236,7 +229,13 @@
 CONFIG_USB_SL811_HCD=m
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/console/Kconfig
+##
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+
+##
+## file: drivers/video/fbdev/Kconfig
 ##
 CONFIG_FB=y
 CONFIG_FB_MODE_HELPERS=y
@@ -261,12 +260,6 @@
 CONFIG_FB_TRIDENT=m
 
 ##
-## file: drivers/video/console/Kconfig
-##
-CONFIG_FRAMEBUFFER_CONSOLE=y
-# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
-
-##
 ## file: drivers/w1/Kconfig
 ##
 # CONFIG_W1 is not set
@@ -283,3 +276,4 @@
 CONFIG_IP_PNP=y
 CONFIG_IP_PNP_DHCP=y
 CONFIG_IP_PNP_BOOTP=y
+

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-powerpc/config
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-powerpc/config	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-powerpc/config	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,9 +1,4 @@
 ##
-## file: arch/Kconfig
-##
-CONFIG_OPROFILE=m
-
-##
 ## file: arch/powerpc/Kconfig
 ##
 # CONFIG_HOTPLUG_CPU is not set
@@ -209,11 +204,6 @@
 CONFIG_DRM_NOUVEAU_BACKLIGHT=y
 
 ##
-## file: drivers/gpu/drm/radeon/Kconfig
-##
-CONFIG_DRM_RADEON_UMS=y
-
-##
 ## file: drivers/hid/Kconfig
 ##
 CONFIG_HID_APPLEIR=m
@@ -236,6 +226,7 @@
 CONFIG_SENSORS_GL518SM=m
 CONFIG_SENSORS_GL520SM=m
 CONFIG_SENSORS_IT87=m
+CONFIG_SENSORS_MAX1619=m
 CONFIG_SENSORS_LM63=m
 CONFIG_SENSORS_LM75=m
 CONFIG_SENSORS_LM77=m
@@ -246,7 +237,6 @@
 CONFIG_SENSORS_LM87=m
 CONFIG_SENSORS_LM90=m
 CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
 CONFIG_SENSORS_PC87360=m
 CONFIG_SENSORS_PCF8591=m
 CONFIG_SENSORS_SIS5595=m
@@ -356,9 +346,8 @@
 ##
 ## file: drivers/isdn/capi/Kconfig
 ##
-# CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON is not set
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
 CONFIG_ISDN_CAPI_CAPI20=m
+CONFIG_ISDN_CAPI_MIDDLEWARE=y
 
 ##
 ## file: drivers/isdn/hardware/avm/Kconfig
@@ -450,7 +439,6 @@
 ## file: drivers/net/Kconfig
 ##
 CONFIG_NET_FC=y
-CONFIG_NETPOLL_TRAP=y
 
 ##
 ## file: drivers/net/arcnet/Kconfig
@@ -677,11 +665,6 @@
 CONFIG_PCMCIA_HERMES=m
 
 ##
-## file: drivers/of/Kconfig
-##
-CONFIG_PROC_DEVICETREE=y
-
-##
 ## file: drivers/pci/hotplug/Kconfig
 ##
 # CONFIG_HOTPLUG_PCI is not set
@@ -810,7 +793,13 @@
 CONFIG_USB_SL811_CS=m
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/console/Kconfig
+##
+CONFIG_VGA_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+
+##
+## file: drivers/video/fbdev/Kconfig
 ##
 CONFIG_FB=y
 CONFIG_FB_MODE_HELPERS=y
@@ -852,12 +841,6 @@
 # CONFIG_FB_VIRTUAL is not set
 
 ##
-## file: drivers/video/console/Kconfig
-##
-CONFIG_VGA_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-
-##
 ## file: drivers/watchdog/Kconfig
 ##
 CONFIG_WATCHDOG_RTAS=m
@@ -866,6 +849,11 @@
 CONFIG_USBPCWATCHDOG=m
 
 ##
+## file: init/Kconfig
+##
+CONFIG_SGETMASK_SYSCALL=y
+
+##
 ## file: lib/Kconfig.debug
 ##
 # CONFIG_DEBUG_STACK_USAGE is not set

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-powerpc/config-arch-64
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-powerpc/config-arch-64	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-powerpc/config-arch-64	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,16 +1,24 @@
 ##
 ## file: arch/powerpc/Kconfig
 ##
+CONFIG_PPC_TRANSACTIONAL_MEM=y
 # CONFIG_CRASH_DUMP is not set
 CONFIG_IRQ_ALL_CPUS=y
 CONFIG_NUMA=y
 ## choice: Page size
-# CONFIG_PPC_64K_PAGES is not set
+CONFIG_PPC_64K_PAGES=y
 ## end choice
 CONFIG_SCHED_SMT=y
 CONFIG_CMDLINE="console=hvsi0 console=hvc0 console=ttyS0,9600 console=tty0"
 CONFIG_KERNEL_START=0xc000000000000000
-CONFIG_PPC_TRANSACTIONAL_MEM=y
+
+##
+## file: arch/powerpc/kvm/Kconfig
+##
+CONFIG_KVM_BOOK3S_64=m
+CONFIG_KVM_BOOK3S_64_HV=m
+CONFIG_KVM_BOOK3S_64_PR=m
+CONFIG_KVM_XICS=y
 
 ##
 ## file: arch/powerpc/platforms/Kconfig
@@ -25,6 +33,7 @@
 CONFIG_PPC64=y
 # CONFIG_TUNE_CELL is not set
 CONFIG_ALTIVEC=y
+CONFIG_VSX=y
 CONFIG_SMP=y
 
 ##
@@ -52,10 +61,6 @@
 CONFIG_BLK_DEV_RSXX=m
 
 ##
-## file: drivers/char/hw_random/Kconfig
-##
-
-##
 ## file: drivers/net/ethernet/ibm/Kconfig
 ##
 CONFIG_IBMVETH=m
@@ -80,7 +85,9 @@
 ##
 ## file: drivers/pci/hotplug/Kconfig
 ##
-# CONFIG_HOTPLUG_PCI is not set
+CONFIG_HOTPLUG_PCI=y
+CONFIG_HOTPLUG_PCI_RPA=m
+CONFIG_HOTPLUG_PCI_RPA_DLPAR=m
 
 ##
 ## file: drivers/scsi/Kconfig
@@ -106,7 +113,7 @@
 # CONFIG_SERIAL_ICOM is not set
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/fbdev/Kconfig
 ##
 # CONFIG_FB_CONTROL is not set
 # CONFIG_FB_PLATINUM is not set

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-powerpc/config-arch-64-be
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-powerpc/config-arch-64-be	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-powerpc/config-arch-64-be	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,9 +1,4 @@
 ##
-## file: arch/powerpc/platforms/Kconfig.cputype
-##
-CONFIG_NR_CPUS=32
-
-##
 ## file: arch/powerpc/platforms/cell/Kconfig
 ##
 CONFIG_PPC_IBM_CELL_BLADE=y
@@ -14,6 +9,11 @@
 CONFIG_CBE_THERM=m
 
 ##
+## file: arch/powerpc/platforms/Kconfig.cputype
+##
+CONFIG_NR_CPUS=32
+
+##
 ## file: arch/powerpc/platforms/maple/Kconfig
 ##
 CONFIG_PPC_MAPLE=y
@@ -83,12 +83,17 @@
 CONFIG_RTC_DRV_PS3=m
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/fbdev/Kconfig
 ##
 CONFIG_FB_PS3=y
 CONFIG_FB_PS3_DEFAULT_SIZE_M=9
 
 ##
+## file: init/Kconfig
+##
+CONFIG_SYSFS_SYSCALL=y
+
+##
 ## file: sound/ppc/Kconfig
 ##
 CONFIG_SND_PS3=m

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-powerpc/config-arch-64-le
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-powerpc/config-arch-64-le	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-powerpc/config-arch-64-le	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,19 +1,11 @@
 ##
-## file: arch/powerpc/Kconfig
-##
-## choice: Page size
-# CONFIG_PPC_4K_PAGES is not set
-CONFIG_PPC_64K_PAGES=y
-## end choice
-
-##
 ## file: arch/powerpc/platforms/Kconfig.cputype
 ##
+CONFIG_NR_CPUS=2048
 ## choice: Endianness selection
 # CONFIG_CPU_BIG_ENDIAN is not set
 CONFIG_CPU_LITTLE_ENDIAN=y
 ## end choice
-CONFIG_NR_CPUS=2048
 
 ##
 ## file: arch/powerpc/platforms/powermac/Kconfig

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-s390/config
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-s390/config	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-s390/config	Sun Sep 21 14:23:16 2014	(r21886)
@@ -5,11 +5,16 @@
 CONFIG_SMP=y
 CONFIG_NR_CPUS=32
 CONFIG_HOTPLUG_CPU=y
+CONFIG_SCHED_BOOK=y
 CONFIG_MATHEMU=y
 CONFIG_PACK_STACK=y
 # CONFIG_CHECK_STACK is not set
 CONFIG_QDIO=y
-# CONFIG_ZFCPDUMP is not set
+CONFIG_PCI_NR_FUNCTIONS=64
+CONFIG_PCI_NR_MSI=256
+CONFIG_CHSC_SCH=m
+CONFIG_SCM_BUS=y
+CONFIG_EADM_SCH=m
 CONFIG_SECCOMP=y
 CONFIG_PFAULT=y
 # CONFIG_SHARED_KERNEL is not set
@@ -23,10 +28,17 @@
 CONFIG_S390_GUEST=y
 
 ##
+## file: arch/s390/Kconfig.debug
+##
+CONFIG_STRICT_DEVMEM=y
+# CONFIG_S390_PTDUMP is not set
+
+##
 ## file: arch/s390/kvm/Kconfig
 ##
 CONFIG_VIRTUALIZATION=y
 CONFIG_KVM=m
+# CONFIG_KVM_S390_UCONTROL is not set
 
 ##
 ## file: block/partitions/Kconfig
@@ -91,6 +103,8 @@
 CONFIG_DASD_FBA=m
 CONFIG_DASD_DIAG=m
 # CONFIG_DASD_EER is not set
+CONFIG_SCM_BLOCK=m
+CONFIG_SCM_BLOCK_CLUSTER_WRITE=y
 
 ##
 ## file: drivers/s390/char/Kconfig
@@ -106,11 +120,12 @@
 CONFIG_SCLP_VT220_TTY=y
 CONFIG_SCLP_VT220_CONSOLE=y
 CONFIG_SCLP_CPI=m
+CONFIG_SCLP_ASYNC=m
 CONFIG_S390_TAPE=m
 CONFIG_S390_TAPE_34XX=m
 CONFIG_S390_TAPE_3590=m
 CONFIG_VMLOGRDR=m
-CONFIG_VMCP=m
+CONFIG_VMCP=y
 CONFIG_MONREADER=m
 CONFIG_MONWRITER=m
 CONFIG_S390_VMUR=m
@@ -140,7 +155,7 @@
 ##
 ## file: drivers/watchdog/Kconfig
 ##
-CONFIG_ZVM_WATCHDOG=m
+CONFIG_DIAG288_WATCHDOG=m
 
 ##
 ## file: init/Kconfig

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-s390/config-arch-64
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-s390/config-arch-64	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-s390/config-arch-64	Sun Sep 21 14:23:16 2014	(r21886)
@@ -11,3 +11,9 @@
 CONFIG_64BIT=y
 CONFIG_PCI=y
 
+##
+## file: drivers/pci/hotplug/Kconfig
+##
+CONFIG_HOTPLUG_PCI=y
+CONFIG_HOTPLUG_PCI_S390=y
+

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-sparc/config
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-sparc/config	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-sparc/config	Sun Sep 21 14:23:16 2014	(r21886)
@@ -30,7 +30,6 @@
 ##
 CONFIG_PATA_ALI=m
 CONFIG_PATA_CS5520=m
-CONFIG_PATA_CS5530=m
 CONFIG_PATA_NETCELL=m
 CONFIG_PATA_NS87415=m
 CONFIG_PATA_PDC2027X=m
@@ -113,6 +112,7 @@
 # CONFIG_SENSORS_F71805F is not set
 # CONFIG_SENSORS_GL518SM is not set
 # CONFIG_SENSORS_GL520SM is not set
+# CONFIG_SENSORS_MAX1619 is not set
 # CONFIG_SENSORS_LM63 is not set
 # CONFIG_SENSORS_LM75 is not set
 # CONFIG_SENSORS_LM77 is not set
@@ -123,7 +123,6 @@
 # CONFIG_SENSORS_LM87 is not set
 # CONFIG_SENSORS_LM90 is not set
 # CONFIG_SENSORS_LM92 is not set
-# CONFIG_SENSORS_MAX1619 is not set
 # CONFIG_SENSORS_PC87360 is not set
 # CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_SENSORS_SIS5595 is not set
@@ -267,7 +266,6 @@
 ## file: drivers/net/Kconfig
 ##
 CONFIG_NET_FC=y
-# CONFIG_NETPOLL_TRAP is not set
 
 ##
 ## file: drivers/net/arcnet/Kconfig
@@ -479,7 +477,17 @@
 # CONFIG_USB_SL811_HCD is not set
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/backlight/Kconfig
+##
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+##
+## file: drivers/video/console/Kconfig
+##
+CONFIG_FRAMEBUFFER_CONSOLE=y
+
+##
+## file: drivers/video/fbdev/Kconfig
 ##
 CONFIG_FB=y
 CONFIG_FB_MODE_HELPERS=y
@@ -521,19 +529,15 @@
 # CONFIG_FB_VIRTUAL is not set
 
 ##
-## file: drivers/video/backlight/Kconfig
-##
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-
-##
-## file: drivers/video/console/Kconfig
+## file: drivers/w1/Kconfig
 ##
-CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_W1 is not set
 
 ##
-## file: drivers/w1/Kconfig
+## file: init/Kconfig
 ##
-# CONFIG_W1 is not set
+CONFIG_SGETMASK_SYSCALL=y
+CONFIG_SYSFS_SYSCALL=y
 
 ##
 ## file: lib/xz/Kconfig

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-x86/config
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-x86/config	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-x86/config	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,7 +1,6 @@
 ##
 ## file: arch/Kconfig
 ##
-CONFIG_OPROFILE=m
 # CONFIG_OPROFILE_EVENT_MULTIPLEX is not set
 
 ##
@@ -33,9 +32,9 @@
 CONFIG_X86_MCE_INJECT=m
 CONFIG_I8K=m
 CONFIG_MICROCODE=y
-CONFIG_MICROCODE_EARLY=y
 CONFIG_MICROCODE_INTEL=y
 CONFIG_MICROCODE_AMD=y
+CONFIG_MICROCODE_EARLY=y
 CONFIG_X86_MSR=m
 CONFIG_X86_CPUID=m
 CONFIG_NODES_SHIFT=6
@@ -52,7 +51,6 @@
 CONFIG_EFI=y
 CONFIG_EFI_STUB=y
 CONFIG_SECCOMP=y
-CONFIG_CC_STACKPROTECTOR=y
 CONFIG_KEXEC=y
 CONFIG_CRASH_DUMP=y
 # CONFIG_KEXEC_JUMP is not set
@@ -81,6 +79,7 @@
 CONFIG_X86_VERBOSE_BOOTUP=y
 CONFIG_EARLY_PRINTK=y
 # CONFIG_EARLY_PRINTK_DBGP is not set
+CONFIG_EARLY_PRINTK_EFI=y
 # CONFIG_X86_PTDUMP is not set
 CONFIG_DEBUG_RODATA=y
 # CONFIG_DEBUG_RODATA_TEST is not set
@@ -118,6 +117,7 @@
 ##
 CONFIG_XEN=y
 # CONFIG_XEN_DEBUG_FS is not set
+CONFIG_XEN_PVH=y
 
 ##
 ## file: block/partitions/Kconfig
@@ -155,10 +155,8 @@
 ## file: drivers/acpi/Kconfig
 ##
 CONFIG_ACPI=y
-# CONFIG_ACPI_PROCFS is not set
 # CONFIG_ACPI_PROCFS_POWER is not set
 # CONFIG_ACPI_EC_DEBUGFS is not set
-# CONFIG_ACPI_PROC_EVENT is not set
 CONFIG_ACPI_AC=m
 CONFIG_ACPI_BATTERY=m
 CONFIG_ACPI_BUTTON=m
@@ -196,8 +194,6 @@
 CONFIG_PATA_AMD=m
 CONFIG_PATA_ATIIXP=m
 CONFIG_PATA_CMD64X=m
-CONFIG_PATA_CS5520=m
-CONFIG_PATA_CS5530=m
 CONFIG_PATA_EFAR=m
 CONFIG_PATA_HPT366=m
 CONFIG_PATA_HPT37X=m
@@ -206,7 +202,6 @@
 CONFIG_PATA_OLDPIIX=m
 CONFIG_PATA_PDC2027X=m
 CONFIG_PATA_PDC_OLD=m
-CONFIG_PATA_SC1200=m
 CONFIG_PATA_SERVERWORKS=m
 CONFIG_PATA_SIL680=m
 CONFIG_PATA_TRIFLEX=m
@@ -322,6 +317,7 @@
 # CONFIG_IPMI_PANIC_EVENT is not set
 CONFIG_IPMI_DEVICE_INTERFACE=m
 CONFIG_IPMI_SI=m
+# CONFIG_IPMI_SI_PROBE_DEFAULTS is not set
 CONFIG_IPMI_WATCHDOG=m
 CONFIG_IPMI_POWEROFF=m
 
@@ -385,7 +381,6 @@
 ##
 CONFIG_DMADEVICES=y
 CONFIG_INTEL_IOATDMA=m
-CONFIG_PCH_DMA=m
 CONFIG_NET_DMA=y
 
 ##
@@ -439,8 +434,8 @@
 # CONFIG_GPIO_ICH is not set
 # CONFIG_GPIO_LYNXPOINT is not set
 # CONFIG_GPIO_INTEL_MID is not set
-CONFIG_GPIO_PCH=m
 CONFIG_GPIO_ML_IOH=m
+CONFIG_GPIO_KEMPLD=m
 
 ##
 ## file: drivers/gpu/drm/Kconfig
@@ -542,6 +537,7 @@
 CONFIG_SENSORS_GL518SM=m
 CONFIG_SENSORS_GL520SM=m
 CONFIG_SENSORS_IT87=m
+CONFIG_SENSORS_MAX1619=m
 CONFIG_SENSORS_LM63=m
 CONFIG_SENSORS_LM75=m
 CONFIG_SENSORS_LM77=m
@@ -552,7 +548,6 @@
 CONFIG_SENSORS_LM87=m
 CONFIG_SENSORS_LM90=m
 CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
 CONFIG_SENSORS_PC87360=m
 CONFIG_SENSORS_PCF8591=m
 CONFIG_SENSORS_SIS5595=m
@@ -596,7 +591,7 @@
 #. Sony Vaio Duo 13".
 CONFIG_I2C_DESIGNWARE_PLATFORM=m
 CONFIG_I2C_DESIGNWARE_PCI=m
-CONFIG_I2C_EG20T=m
+CONFIG_I2C_KEMPLD=m
 CONFIG_I2C_PARPORT=m
 CONFIG_I2C_PARPORT_LIGHT=m
 CONFIG_I2C_PCA_ISA=m
@@ -693,9 +688,8 @@
 ##
 ## file: drivers/isdn/capi/Kconfig
 ##
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
 CONFIG_ISDN_CAPI_CAPI20=m
+CONFIG_ISDN_CAPI_MIDDLEWARE=y
 CONFIG_ISDN_CAPI_CAPIDRV=m
 
 ##
@@ -764,6 +758,7 @@
 ## file: drivers/mfd/Kconfig
 ##
 CONFIG_LPC_ICH=m
+CONFIG_MFD_KEMPLD=m
 
 ##
 ## file: drivers/misc/Kconfig
@@ -772,13 +767,13 @@
 CONFIG_PHANTOM=m
 CONFIG_CS5535_MFGPT=m
 CONFIG_HP_ILO=m
-CONFIG_PCH_PHUB=m
 
 ##
 ## file: drivers/misc/mei/Kconfig
 ##
 CONFIG_INTEL_MEI=m
 CONFIG_INTEL_MEI_ME=m
+# CONFIG_INTEL_MEI_TXE is not set
 
 ##
 ## file: drivers/misc/vmw_vmci/Kconfig
@@ -852,8 +847,6 @@
 CONFIG_MTDRAM_TOTAL_SIZE=4096
 CONFIG_MTDRAM_ERASE_SIZE=128
 CONFIG_MTD_BLOCK2MTD=m
-# CONFIG_MTD_DOCPROBE_ADVANCED is not set
-CONFIG_MTD_DOCPROBE_ADDRESS=0
 
 ##
 ## file: drivers/mtd/maps/Kconfig
@@ -864,9 +857,6 @@
 CONFIG_MTD_PHYSMAP_START=0x8000000
 CONFIG_MTD_PHYSMAP_LEN=0x4000000
 CONFIG_MTD_PHYSMAP_BANKWIDTH=2
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_TS5500=m
 CONFIG_MTD_SBC_GXX=m
 # CONFIG_MTD_AMD76XROM is not set
 # CONFIG_MTD_ICHXROM is not set
@@ -889,7 +879,6 @@
 ##
 CONFIG_DUMMY=m
 CONFIG_NET_FC=y
-# CONFIG_NETPOLL_TRAP is not set
 CONFIG_NET_SB1000=m
 
 ##
@@ -908,13 +897,9 @@
 CONFIG_ARCNET_COM20020_CS=m
 
 ##
-## file: drivers/net/can/Kconfig
-##
-CONFIG_PCH_CAN=m
-
-##
 ## file: drivers/net/ethernet/Kconfig
 ##
+# CONFIG_CX_ECAT is not set
 CONFIG_FEALNX=m
 
 ##
@@ -941,6 +926,11 @@
 CONFIG_ADAPTEC_STARFIRE=m
 
 ##
+## file: drivers/net/ethernet/altera/Kconfig
+##
+# CONFIG_ALTERA_TSE is not set
+
+##
 ## file: drivers/net/ethernet/amd/Kconfig
 ##
 CONFIG_NET_VENDOR_AMD=y
@@ -1003,11 +993,6 @@
 CONFIG_FORCEDETH=m
 
 ##
-## file: drivers/net/ethernet/oki-semi/pch_gbe/Kconfig
-##
-CONFIG_PCH_GBE=m
-
-##
 ## file: drivers/net/ethernet/realtek/Kconfig
 ##
 CONFIG_NET_VENDOR_REALTEK=y
@@ -1169,7 +1154,7 @@
 # CONFIG_PCMCIA_DEBUG is not set
 
 ##
-## file: drivers/platform/chromeos/Kconfig
+## file: drivers/platform/chrome/Kconfig
 ##
 CONFIG_CHROME_PLATFORMS=y
 CONFIG_CHROMEOS_LAPTOP=m
@@ -1181,10 +1166,12 @@
 CONFIG_X86_PLATFORM_DEVICES=y
 CONFIG_ACER_WMI=m
 CONFIG_ACERHDF=m
+CONFIG_ALIENWARE_WMI=m
 CONFIG_ASUS_LAPTOP=m
 CONFIG_DELL_LAPTOP=m
 CONFIG_DELL_WMI=m
 CONFIG_DELL_WMI_AIO=m
+CONFIG_DELL_SMO8800=m
 CONFIG_FUJITSU_LAPTOP=m
 CONFIG_FUJITSU_TABLET=m
 CONFIG_AMILO_RFKILL=m
@@ -1195,6 +1182,7 @@
 CONFIG_PANASONIC_LAPTOP=m
 CONFIG_COMPAL_LAPTOP=m
 CONFIG_SONY_LAPTOP=m
+CONFIG_SONYPI_COMPAT=y
 CONFIG_IDEAPAD_LAPTOP=m
 CONFIG_THINKPAD_ACPI=m
 CONFIG_THINKPAD_ACPI_ALSA_SUPPORT=y
@@ -1216,9 +1204,14 @@
 CONFIG_TOSHIBA_BT_RFKILL=m
 CONFIG_ACPI_CMPC=m
 CONFIG_INTEL_IPS=m
+CONFIG_IBM_RTL=m
 CONFIG_SAMSUNG_LAPTOP=m
 CONFIG_INTEL_OAKTRAIL=m
+CONFIG_SAMSUNG_Q10=m
 CONFIG_APPLE_GMUX=m
+CONFIG_INTEL_RST=m
+CONFIG_INTEL_SMARTCONNECT=m
+CONFIG_PVPANIC=m
 
 ##
 ## file: drivers/pnp/Kconfig
@@ -1303,16 +1296,6 @@
 CONFIG_SFI=y
 
 ##
-## file: drivers/spi/Kconfig
-##
-CONFIG_SPI_TOPCLIFF_PCH=m
-
-##
-## file: drivers/staging/asus_oled/Kconfig
-##
-CONFIG_ASUS_OLED=m
-
-##
 ## file: drivers/staging/comedi/Kconfig
 ##
 CONFIG_COMEDI=m
@@ -1326,7 +1309,10 @@
 CONFIG_COMEDI_PARPORT=m
 CONFIG_COMEDI_SERIAL2002=m
 # CONFIG_COMEDI_SKEL is not set
+CONFIG_COMEDI_SSV_DNP=m
 # CONFIG_COMEDI_ISA_DRIVERS is not set
+CONFIG_COMEDI_UNIOXX5=m
+CONFIG_COMEDI_II_PCI20KC=m
 CONFIG_COMEDI_S526=m
 CONFIG_COMEDI_PCI_DRIVERS=y
 CONFIG_COMEDI_8255_PCI=m
@@ -1359,11 +1345,9 @@
 CONFIG_COMEDI_DAS08_PCI=m
 CONFIG_COMEDI_DT3000=m
 CONFIG_COMEDI_DYNA_PCI10XX=m
-CONFIG_COMEDI_UNIOXX5=m
 CONFIG_COMEDI_GSC_HPDI=m
 CONFIG_COMEDI_MF6X4=m
 CONFIG_COMEDI_ICP_MULTI=m
-CONFIG_COMEDI_II_PCI20KC=m
 CONFIG_COMEDI_DAQBOARD2000=m
 CONFIG_COMEDI_JR3_PCI=m
 CONFIG_COMEDI_KE_COUNTER=m
@@ -1383,7 +1367,6 @@
 CONFIG_COMEDI_NI_PCIMIO=m
 CONFIG_COMEDI_RTD520=m
 CONFIG_COMEDI_S626=m
-CONFIG_COMEDI_SSV_DNP=m
 CONFIG_COMEDI_PCMCIA_DRIVERS=y
 CONFIG_COMEDI_CB_DAS16_CS=m
 CONFIG_COMEDI_DAS08_CS=m
@@ -1411,6 +1394,16 @@
 CONFIG_ET131X=m
 
 ##
+## file: drivers/staging/gdm72xx/Kconfig
+##
+CONFIG_WIMAX_GDM72XX=m
+# CONFIG_WIMAX_GDM72XX_QOS is not set
+# CONFIG_WIMAX_GDM72XX_K_MODE is not set
+# CONFIG_WIMAX_GDM72XX_WIMAX2 is not set
+CONFIG_WIMAX_GDM72XX_USB=y
+CONFIG_WIMAX_GDM72XX_USB_PM=y
+
+##
 ## file: drivers/staging/iio/light/Kconfig
 ##
 #. Samsung Series 5 550, Chromebook Pixel
@@ -1428,6 +1421,7 @@
 ## file: drivers/staging/lustre/lnet/Kconfig
 ##
 CONFIG_LNET=m
+CONFIG_LNET_MAX_PAYLOAD=1048576
 # CONFIG_LNET_SELFTEST is not set
 CONFIG_LNET_XPRT_IB=m
 
@@ -1435,6 +1429,7 @@
 ## file: drivers/staging/lustre/lustre/Kconfig
 ##
 CONFIG_LUSTRE_FS=m
+CONFIG_LUSTRE_OBD_MAX_IOCTL_BUFFER=8192
 # CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK is not set
 CONFIG_LUSTRE_LLITE_LLOOP=m
 
@@ -1444,6 +1439,16 @@
 CONFIG_STAGING_MEDIA=y
 
 ##
+## file: drivers/staging/media/as102/Kconfig
+##
+CONFIG_DVB_AS102=m
+
+##
+## file: drivers/staging/media/bcm2048/Kconfig
+##
+# CONFIG_I2C_BCM2048 is not set
+
+##
 ## file: drivers/staging/media/go7007/Kconfig
 ##
 # CONFIG_VIDEO_GO7007 is not set
@@ -1462,16 +1467,30 @@
 CONFIG_LIRC_ZILOG=m
 
 ##
-## file: drivers/staging/rtl8187se/Kconfig
+## file: drivers/staging/media/msi3101/Kconfig
+##
+CONFIG_USB_MSI3101=m
+CONFIG_MEDIA_TUNER_MSI001=m
+
+##
+## file: drivers/staging/media/omap24xx/Kconfig
+##
+# CONFIG_VIDEO_TCM825X is not set
+
+##
+## file: drivers/staging/media/rtl2832u_sdr/Kconfig
+##
+CONFIG_DVB_RTL2832_SDR=m
+
+##
+## file: drivers/staging/media/sn9c102/Kconfig
 ##
-CONFIG_R8187SE=m
+# CONFIG_USB_SN9C102 is not set
 
 ##
-## file: drivers/staging/rtl8188eu/Kconfig
+## file: drivers/staging/media/solo6x10/Kconfig
 ##
-CONFIG_R8188EU=m
-CONFIG_88EU_AP_MODE=y
-CONFIG_88EU_P2P=y
+CONFIG_SOLO6X10=m
 
 ##
 ## file: drivers/staging/rtl8192e/Kconfig
@@ -1487,14 +1506,21 @@
 CONFIG_RTL8192E=m
 
 ##
+## file: drivers/staging/rtl8192ee/Kconfig
+##
+CONFIG_R8192EE=m
+
+##
 ## file: drivers/staging/rtl8192u/Kconfig
 ##
 CONFIG_RTL8192U=m
 
 ##
-## file: drivers/staging/rtl8712/Kconfig
+## file: drivers/staging/rtl8723au/Kconfig
 ##
-CONFIG_R8712U=m
+CONFIG_R8723AU=m
+CONFIG_8723AU_AP_MODE=y
+CONFIG_8723AU_BT_COEXIST=y
 
 ##
 ## file: drivers/staging/rtl8821ae/Kconfig
@@ -1502,12 +1528,6 @@
 CONFIG_R8821AE=m
 
 ##
-## file: drivers/staging/rts5139/Kconfig
-##
-CONFIG_RTS5139=m
-# CONFIG_RTS5139_DEBUG is not set
-
-##
 ## file: drivers/staging/rts5208/Kconfig
 ##
 CONFIG_RTS5208=m
@@ -1557,7 +1577,6 @@
 ## file: drivers/tty/serial/Kconfig
 ##
 CONFIG_SERIAL_JSM=m
-CONFIG_SERIAL_PCH_UART=m
 
 ##
 ## file: drivers/tty/serial/8250/Kconfig
@@ -1599,6 +1618,7 @@
 # CONFIG_USB_OHCI_HCD_SSB is not set
 CONFIG_USB_UHCI_HCD=m
 CONFIG_USB_SL811_HCD=m
+# CONFIG_USB_SL811_HCD_ISO is not set
 CONFIG_USB_SL811_CS=m
 
 ##
@@ -1610,11 +1630,17 @@
 ## file: drivers/vfio/pci/Kconfig
 ##
 CONFIG_VFIO_PCI=m
+CONFIG_VFIO_PCI_VGA=y
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/console/Kconfig
+##
+CONFIG_VGA_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+
+##
+## file: drivers/video/fbdev/Kconfig
 ##
-CONFIG_VIDEO_OUTPUT_CONTROL=m
 CONFIG_FB=y
 CONFIG_FB_MODE_HELPERS=y
 CONFIG_FB_TILEBLITTING=y
@@ -1662,13 +1688,7 @@
 CONFIG_FB_SIMPLE=y
 
 ##
-## file: drivers/video/console/Kconfig
-##
-CONFIG_VGA_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-
-##
-## file: drivers/video/geode/Kconfig
+## file: drivers/video/fbdev/geode/Kconfig
 ##
 # CONFIG_FB_GEODE is not set
 
@@ -1682,7 +1702,6 @@
 CONFIG_F71808E_WDT=m
 CONFIG_SP5100_TCO=m
 CONFIG_GEODE_WDT=m
-CONFIG_SC520_WDT=m
 CONFIG_EUROTECH_WDT=m
 CONFIG_IB700_WDT=m
 CONFIG_IBMASR=m
@@ -1692,10 +1711,10 @@
 CONFIG_IT8712F_WDT=m
 CONFIG_HP_WATCHDOG=m
 CONFIG_HPWDT_NMI_DECODING=y
+CONFIG_KEMPLD_WDT=m
 CONFIG_SC1200_WDT=m
 CONFIG_NV_TCO=m
 CONFIG_60XX_WDT=m
-CONFIG_SBC8360_WDT=m
 CONFIG_CPU5_WDT=m
 CONFIG_VIA_WDT=m
 CONFIG_W83627HF_WDT=m
@@ -1724,9 +1743,12 @@
 ##
 ## file: init/Kconfig
 ##
+CONFIG_USELIB=y
 ## choice: Cputime accounting
 # CONFIG_IRQ_TIME_ACCOUNTING is not set
 ## end choice
+CONFIG_SGETMASK_SYSCALL=y
+CONFIG_SYSFS_SYSCALL=y
 
 ##
 ## file: kernel/irq/Kconfig
@@ -1889,5 +1911,4 @@
 ## file: sound/pci/hda/Kconfig
 ##
 CONFIG_SND_HDA_INTEL=m
-CONFIG_SND_HDA_I915=y
 

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-x86/config-arch-32
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-x86/config-arch-32	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-x86/config-arch-32	Sun Sep 21 14:23:16 2014	(r21886)
@@ -63,15 +63,13 @@
 CONFIG_CRYPTO_TWOFISH_586=m
 
 ##
-## file: drivers/acpi/Kconfig
-##
-CONFIG_ACPI_BLACKLIST_YEAR=0
-
-##
 ## file: drivers/ata/Kconfig
 ##
+CONFIG_PATA_CS5520=m
+CONFIG_PATA_CS5530=m
 CONFIG_PATA_CS5535=m
 CONFIG_PATA_CS5536=m
+CONFIG_PATA_SC1200=m
 CONFIG_PATA_ISAPNP=m
 CONFIG_PATA_OPTI=m
 CONFIG_PATA_LEGACY=m
@@ -134,10 +132,16 @@
 CONFIG_CRYPTO_DEV_GEODE=m
 
 ##
+## file: drivers/dma/Kconfig
+##
+CONFIG_PCH_DMA=m
+
+##
 ## file: drivers/gpio/Kconfig
 ##
 CONFIG_GPIO_VX855=m
 CONFIG_GPIO_CS5535=m
+CONFIG_GPIO_PCH=m
 
 ##
 ## file: drivers/gpu/drm/Kconfig
@@ -147,6 +151,7 @@
 ##
 ## file: drivers/i2c/busses/Kconfig
 ##
+CONFIG_I2C_EG20T=m
 CONFIG_I2C_PXA=m
 CONFIG_SCx200_I2C=m
 CONFIG_SCx200_I2C_SCL=12
@@ -220,6 +225,7 @@
 ##
 CONFIG_CS5535_MFGPT=m
 CONFIG_CS5535_CLOCK_EVENT_SRC=m
+CONFIG_PCH_PHUB=m
 
 ##
 ## file: drivers/mtd/maps/Kconfig
@@ -234,6 +240,11 @@
 CONFIG_ARCNET_COM20020_ISA=m
 
 ##
+## file: drivers/net/can/Kconfig
+##
+CONFIG_PCH_CAN=m
+
+##
 ## file: drivers/net/can/cc770/Kconfig
 ##
 CONFIG_CAN_CC770=m
@@ -279,6 +290,11 @@
 CONFIG_NET_VENDOR_FUJITSU=y
 
 ##
+## file: drivers/net/ethernet/oki-semi/pch_gbe/Kconfig
+##
+CONFIG_PCH_GBE=m
+
+##
 ## file: drivers/net/ethernet/realtek/Kconfig
 ##
 CONFIG_8139TOO_PIO=y
@@ -333,7 +349,6 @@
 ## file: drivers/platform/x86/Kconfig
 ##
 CONFIG_TC1100_WMI=m
-CONFIG_XO15_EBOOK=m
 
 ##
 ## file: drivers/pnp/isapnp/Kconfig
@@ -374,6 +389,11 @@
 CONFIG_PCMCIA_NINJA_SCSI=m
 
 ##
+## file: drivers/spi/Kconfig
+##
+CONFIG_SPI_TOPCLIFF_PCH=m
+
+##
 ## file: drivers/staging/comedi/Kconfig
 ##
 CONFIG_COMEDI_ISA_DRIVERS=y
@@ -385,9 +405,14 @@
 CONFIG_COMEDI_PCL816=m
 CONFIG_COMEDI_PCL818=m
 CONFIG_COMEDI_PCM3724=m
+CONFIG_COMEDI_AMPLC_DIO200_ISA=m
+CONFIG_COMEDI_AMPLC_PC236_ISA=m
+CONFIG_COMEDI_AMPLC_PC263_ISA=m
 CONFIG_COMEDI_RTI800=m
 CONFIG_COMEDI_RTI802=m
+CONFIG_COMEDI_DAC02=m
 CONFIG_COMEDI_DAS16M1=m
+CONFIG_COMEDI_DAS08_ISA=m
 CONFIG_COMEDI_DAS16=m
 CONFIG_COMEDI_DAS800=m
 CONFIG_COMEDI_DAS1800=m
@@ -409,12 +434,12 @@
 CONFIG_COMEDI_NI_AT_AO=m
 CONFIG_COMEDI_NI_ATMIO=m
 CONFIG_COMEDI_NI_ATMIO16D=m
+CONFIG_COMEDI_NI_LABPC_ISA=m
 CONFIG_COMEDI_PCMAD=m
 CONFIG_COMEDI_PCMDA12=m
 CONFIG_COMEDI_PCMMIO=m
 CONFIG_COMEDI_PCMUIO=m
 CONFIG_COMEDI_MULTIQ3=m
-CONFIG_COMEDI_POC=m
 
 ##
 ## file: drivers/staging/olpc_dcon/Kconfig
@@ -424,17 +449,37 @@
 CONFIG_FB_OLPC_DCON_1_5=y
 
 ##
+## file: drivers/staging/speakup/Kconfig
+##
+CONFIG_SPEAKUP_SYNTH_DECPC=m
+
+##
 ## file: drivers/tty/Kconfig
 ##
 # CONFIG_ISI is not set
 
 ##
+## file: drivers/tty/serial/Kconfig
+##
+CONFIG_SERIAL_PCH_UART=m
+
+##
 ## file: drivers/tty/serial/8250/Kconfig
 ##
 CONFIG_SERIAL_8250_EXAR_ST16C554=m
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/usb/gadget/Kconfig
+##
+CONFIG_USB_AMD5536UDC=m
+
+##
+## file: drivers/video/console/Kconfig
+##
+CONFIG_MDA_CONSOLE=m
+
+##
+## file: drivers/video/fbdev/Kconfig
 ##
 CONFIG_FB_I810=m
 CONFIG_FB_I810_GTF=y
@@ -445,14 +490,10 @@
 CONFIG_FB_SAVAGE_I2C=y
 
 ##
-## file: drivers/video/console/Kconfig
-##
-CONFIG_MDA_CONSOLE=m
-
-##
 ## file: drivers/watchdog/Kconfig
 ##
 CONFIG_SCx200_WDT=m
+CONFIG_SBC8360_WDT=m
 CONFIG_SBC7240_WDT=m
 CONFIG_PCWATCHDOG=m
 CONFIG_MIXCOMWD=m
@@ -528,4 +569,6 @@
 ## file: sound/pci/Kconfig
 ##
 CONFIG_SND_SIS7019=m
+CONFIG_SND_CS5530=m
+CONFIG_SND_CS5535AUDIO=m
 

Modified: dists/wheezy-backports/linux/debian/config/kernelarch-x86/config-arch-64
==============================================================================
--- dists/wheezy-backports/linux/debian/config/kernelarch-x86/config-arch-64	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/kernelarch-x86/config-arch-64	Sun Sep 21 14:23:16 2014	(r21886)
@@ -8,6 +8,7 @@
 CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y
 # CONFIG_MAXSMP is not set
 CONFIG_NR_CPUS=512
+CONFIG_X86_16BIT=y
 CONFIG_DIRECT_GBPAGES=y
 CONFIG_NUMA=y
 CONFIG_AMD_NUMA=y
@@ -129,7 +130,7 @@
 CONFIG_ISI=m
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/fbdev/Kconfig
 ##
 CONFIG_FB_MATROX_G=y
 CONFIG_FB_MATROX_MAVEN=m

Modified: dists/wheezy-backports/linux/debian/config/m68k/config
==============================================================================
--- dists/wheezy-backports/linux/debian/config/m68k/config	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/m68k/config	Sun Sep 21 14:23:16 2014	(r21886)
@@ -556,7 +556,17 @@
 # CONFIG_VHOST_NET is not set
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/backlight/Kconfig
+##
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+##
+## file: drivers/video/console/Kconfig
+##
+CONFIG_FRAMEBUFFER_CONSOLE=y
+
+##
+## file: drivers/video/fbdev/Kconfig
 ##
 CONFIG_FB=y
 # CONFIG_FIRMWARE_EDID is not set
@@ -584,16 +594,6 @@
 # CONFIG_FB_METRONOME is not set
 
 ##
-## file: drivers/video/backlight/Kconfig
-##
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-
-##
-## file: drivers/video/console/Kconfig
-##
-CONFIG_FRAMEBUFFER_CONSOLE=y
-
-##
 ## file: drivers/video/logo/Kconfig
 ##
 # CONFIG_LOGO is not set
@@ -723,13 +723,14 @@
 ##
 ## file: init/Kconfig
 ##
+CONFIG_USELIB=y
 # CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
 CONFIG_LOG_BUF_SHIFT=16
-#. for now
-# CONFIG_CGROUPS is not set
 # CONFIG_SCHED_AUTOGROUP is not set
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SGETMASK_SYSCALL=y
+CONFIG_SYSFS_SYSCALL=y
 CONFIG_COMPAT_BRK=y
 # CONFIG_MODULE_SIG is not set
 

Modified: dists/wheezy-backports/linux/debian/config/mips/config
==============================================================================
--- dists/wheezy-backports/linux/debian/config/mips/config	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/mips/config	Sun Sep 21 14:23:16 2014	(r21886)
@@ -5,3 +5,4 @@
 CONFIG_CPU_BIG_ENDIAN=y
 # CONFIG_CPU_LITTLE_ENDIAN is not set
 ## end choice
+

Modified: dists/wheezy-backports/linux/debian/config/mips64/config
==============================================================================
--- dists/wheezy-backports/linux/debian/config/mips64/config	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/mips64/config	Sun Sep 21 14:23:16 2014	(r21886)
@@ -5,3 +5,4 @@
 CONFIG_CPU_BIG_ENDIAN=y
 # CONFIG_CPU_LITTLE_ENDIAN is not set
 ## end choice
+

Modified: dists/wheezy-backports/linux/debian/config/mips64/defines
==============================================================================
--- dists/wheezy-backports/linux/debian/config/mips64/defines	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/mips64/defines	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,6 +1,7 @@
 [base]
 flavours:
  sb1-bcm91250a
+ 5kc-malta
  octeon
 kernel-arch: mips
 

Modified: dists/wheezy-backports/linux/debian/config/mips64el/defines
==============================================================================
--- dists/wheezy-backports/linux/debian/config/mips64el/defines	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/mips64el/defines	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,8 +1,7 @@
 [base]
 flavours:
  sb1-bcm91250a
- loongson-2e
- loongson-2f
+ 5kc-malta
  loongson-3
  octeon
 kernel-arch: mips
@@ -27,21 +26,6 @@
 [5kc-malta_image]
 configs: kernelarch-mips/config.5kc-malta
 
-[loongson-2e_description]
-hardware: Loongson 2E
-hardware-long: Lemote Loongson 2E systems
-
-[loongson-2e_image]
-configs: kernelarch-mips/config.loongson-2e
-
-[loongson-2f_description]
-hardware: Loongson 2F
-hardware-long: Lemote Loongson 2F systems
-
-[loongson-2f_image]
-recommends: libc6-loongson2f
-configs: kernelarch-mips/config.loongson-2f
-
 [loongson-3_description]
 hardware: Loongson 3A/3B
 hardware-long: Loongson 3A or 3B based systems (e.g. from Loongson or Lemote)

Modified: dists/wheezy-backports/linux/debian/config/powerpc/config.powerpc
==============================================================================
--- dists/wheezy-backports/linux/debian/config/powerpc/config.powerpc	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/powerpc/config.powerpc	Sun Sep 21 14:23:16 2014	(r21886)
@@ -83,7 +83,7 @@
 CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/fbdev/Kconfig
 ##
 CONFIG_FB_CONTROL=y
 CONFIG_FB_PLATINUM=y
@@ -91,6 +91,11 @@
 CONFIG_FB_IMSTT=y
 
 ##
+## file: init/Kconfig
+##
+CONFIG_SYSFS_SYSCALL=y
+
+##
 ## file: mm/Kconfig
 ##
 ## choice: Memory model

Modified: dists/wheezy-backports/linux/debian/config/sh4/config.sh7751r
==============================================================================
--- dists/wheezy-backports/linux/debian/config/sh4/config.sh7751r	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/sh4/config.sh7751r	Sun Sep 21 14:23:16 2014	(r21886)
@@ -4,7 +4,6 @@
 ## choice: Processor sub-type selection
 CONFIG_CPU_SUBTYPE_SH7751R=y
 ## end choice
-CONFIG_SH_TIMER_TMU=y
 CONFIG_SH_PCLK_FREQ=60000000
 CONFIG_PCI=y
 
@@ -48,6 +47,11 @@
 CONFIG_PATA_PLATFORM=y
 
 ##
+## file: drivers/clocksource/Kconfig
+##
+CONFIG_SH_TIMER_TMU=y
+
+##
 ## file: drivers/hid/Kconfig
 ##
 CONFIG_HID=y
@@ -76,7 +80,6 @@
 ## file: drivers/mtd/Kconfig
 ##
 CONFIG_MTD=y
-CONFIG_MTD_BLKDEVS=y
 CONFIG_MTD_BLOCK=y
 
 ##
@@ -152,15 +155,15 @@
 CONFIG_USB_OHCI_HCD=y
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/console/Kconfig
 ##
-CONFIG_FB=y
-CONFIG_FB_SM501=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
 
 ##
-## file: drivers/video/console/Kconfig
+## file: drivers/video/fbdev/Kconfig
 ##
-CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FB=y
+CONFIG_FB_SM501=y
 
 ##
 ## file: mm/Kconfig

Modified: dists/wheezy-backports/linux/debian/config/sh4/config.sh7785lcr
==============================================================================
--- dists/wheezy-backports/linux/debian/config/sh4/config.sh7785lcr	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/config/sh4/config.sh7785lcr	Sun Sep 21 14:23:16 2014	(r21886)
@@ -4,7 +4,6 @@
 ## choice: Processor sub-type selection
 CONFIG_CPU_SUBTYPE_SH7785=y
 ## end choice
-CONFIG_SH_TIMER_TMU=y
 CONFIG_SH_PCLK_FREQ=50000000
 CONFIG_PCI=y
 
@@ -47,6 +46,11 @@
 CONFIG_SATA_SIL=y
 
 ##
+## file: drivers/clocksource/Kconfig
+##
+CONFIG_SH_TIMER_TMU=y
+
+##
 ## file: drivers/dma/Kconfig
 ##
 CONFIG_DMADEVICES=y
@@ -121,7 +125,6 @@
 ## file: drivers/mtd/Kconfig
 ##
 CONFIG_MTD=y
-CONFIG_MTD_BLKDEVS=y
 CONFIG_MTD_BLOCK=y
 
 ##
@@ -198,15 +201,15 @@
 CONFIG_USB_STORAGE=y
 
 ##
-## file: drivers/video/Kconfig
+## file: drivers/video/console/Kconfig
 ##
-CONFIG_FB=y
-CONFIG_FB_SM501=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
 
 ##
-## file: drivers/video/console/Kconfig
+## file: drivers/video/fbdev/Kconfig
 ##
-CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FB=y
+CONFIG_FB_SM501=y
 
 ##
 ## file: drivers/watchdog/Kconfig

Copied: dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/cdrom-core-modules (from r21884, dists/sid/linux/debian/installer/arm64/modules/arm64/cdrom-core-modules)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/cdrom-core-modules	Sun Sep 21 14:23:16 2014	(r21886, copy of r21884, dists/sid/linux/debian/installer/arm64/modules/arm64/cdrom-core-modules)
@@ -0,0 +1,2 @@
+#include <cdrom-core-modules>
+

Copied: dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/efi-modules (from r21743, dists/trunk/linux/debian/installer/arm64/modules/arm64/efi-modules)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/efi-modules	Sun Sep 21 14:23:16 2014	(r21886, copy of r21743, dists/trunk/linux/debian/installer/arm64/modules/arm64/efi-modules)
@@ -0,0 +1 @@
+#include <efi-modules>

Modified: dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/nic-modules
==============================================================================
--- dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/nic-modules	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/nic-modules	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,3 +1,4 @@
 smc91x
 smsc911x
 xen-netfront
+xgene-enet

Modified: dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/sata-modules
==============================================================================
--- dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/sata-modules	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/installer/arm64/modules/arm64/sata-modules	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1 +1,3 @@
 #include <sata-modules>
+ahci_xgene
+phy-xgene

Modified: dists/wheezy-backports/linux/debian/installer/armel/modules/armel-orion5x/nic-modules
==============================================================================
--- dists/wheezy-backports/linux/debian/installer/armel/modules/armel-orion5x/nic-modules	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/installer/armel/modules/armel-orion5x/nic-modules	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,2 +1,3 @@
 inet_lro
 mv643xx_eth
+mvmdio

Modified: dists/wheezy-backports/linux/debian/installer/armhf/modules/armhf-armmp/mmc-modules
==============================================================================
--- dists/wheezy-backports/linux/debian/installer/armhf/modules/armhf-armmp/mmc-modules	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/installer/armhf/modules/armhf-armmp/mmc-modules	Sun Sep 21 14:23:16 2014	(r21886)
@@ -2,3 +2,4 @@
 sdhci-esdhc-imx
 mmci
 omap_hsmmc
+sunxi-mmc

Modified: dists/wheezy-backports/linux/debian/installer/armhf/modules/armhf-armmp/usb-modules
==============================================================================
--- dists/wheezy-backports/linux/debian/installer/armhf/modules/armhf-armmp/usb-modules	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/installer/armhf/modules/armhf-armmp/usb-modules	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1 +1,2 @@
 #include <usb-modules>
+phy-sun4i-usb

Modified: dists/wheezy-backports/linux/debian/installer/mips/modules/mips-octeon/usb-modules
==============================================================================
--- dists/wheezy-backports/linux/debian/installer/mips/modules/mips-octeon/usb-modules	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/installer/mips/modules/mips-octeon/usb-modules	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1 +1,2 @@
 #include <usb-modules>
+octeon-hcd

Modified: dists/wheezy-backports/linux/debian/installer/mips64el/kernel-versions
==============================================================================
--- dists/wheezy-backports/linux/debian/installer/mips64el/kernel-versions	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/installer/mips64el/kernel-versions	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,7 +1,5 @@
 # arch version flavour       installedname suffix build-depends
 mips64el -       sb1-bcm91250a -             y      -
 mips64el -       5kc-malta     -             y      -
-mips64el -       loongson-2e   -             y      -
-mips64el -       loongson-2f   -             y      -
 mips64el -       loongson-3    -             y      -
 mips64el -       octeon        -             y      -

Modified: dists/wheezy-backports/linux/debian/installer/modules/crc-modules
==============================================================================
--- dists/wheezy-backports/linux/debian/installer/modules/crc-modules	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/installer/modules/crc-modules	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,5 +1,5 @@
 crc-ccitt
 libcrc32c
-crc32c
+crc32c_generic
 crc-itu-t
 crc16

Modified: dists/wheezy-backports/linux/debian/installer/modules/crypto-modules
==============================================================================
--- dists/wheezy-backports/linux/debian/installer/modules/crypto-modules	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/installer/modules/crypto-modules	Sun Sep 21 14:23:16 2014	(r21886)
@@ -4,4 +4,6 @@
 serpent_generic
 sha256_generic
 cbc ?
+ccm
+ctr
 xts

Modified: dists/wheezy-backports/linux/debian/installer/modules/nic-wireless-modules
==============================================================================
--- dists/wheezy-backports/linux/debian/installer/modules/nic-wireless-modules	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/installer/modules/nic-wireless-modules	Sun Sep 21 14:23:16 2014	(r21886)
@@ -2,6 +2,7 @@
 ar5523 ?
 at76c50x-usb ?
 ath5k ?
+ath6kl_sdio ?
 ath6kl_usb ?
 ath9k ?
 ath9k_htc ?
@@ -22,8 +23,11 @@
 iwldvm ?
 iwlmvm ?
 iwlwifi ?
+libertas_cs ?
+libertas_sdio ?
 libertas_tf_usb ?
 mwifiex_pcie ?
+mwifiex_sdio ?
 mwifiex_usb ?
 mwl8k ?
 orinoco ?
@@ -37,7 +41,10 @@
 prism54 ?
 r8187se ?
 r8192e_pci ?
+r8192u_usb ?
 r8712u ?
+r8723au ?
+rsi_usb ?
 rt2400pci ?
 rt2500pci ?
 rt2500usb ?
@@ -47,11 +54,16 @@
 rt73usb ?
 rtl8180 ?
 rtl8188ee ?
+rtl8188eu ?
+rtl818x_pci ?
 rtl8192ce ?
 rtl8192cu ?
 rtl8192de ?
 rtl8192se ?
 rtl8723ae ?
+rtl8723be ?
+rtl8821ae ?
+spectrum_cs ?
 usb8xxx ?
 vt6656_stage ?
 wavelan ?

Modified: dists/wheezy-backports/linux/debian/installer/modules/sound-modules
==============================================================================
--- dists/wheezy-backports/linux/debian/installer/modules/sound-modules	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/installer/modules/sound-modules	Sun Sep 21 14:23:16 2014	(r21886)
@@ -31,6 +31,7 @@
 snd-azt2316 ?
 snd-azt2320 ?
 snd-azt3328 ?
+snd-bebob ?
 snd-bt87x ?
 snd-ca0106 ?
 snd-cmi8328 ?
@@ -57,6 +58,7 @@
 snd-es1938 ?
 snd-es1968 ?
 snd-firewire-speakers ?
+snd-fireworks ?
 snd-fm801 ?
 snd-gina20 ?
 snd-gina24 ?
@@ -78,6 +80,7 @@
 snd-hda-codec-via ?
 snd-hda-codec ?
 snd-hda-intel ?
+snd-hda-tegra ?
 snd-hdsp ?
 snd-hdspm ?
 snd-ice1712 ?

Modified: dists/wheezy-backports/linux/debian/installer/modules/usb-modules
==============================================================================
--- dists/wheezy-backports/linux/debian/installer/modules/usb-modules	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/installer/modules/usb-modules	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,7 +1,9 @@
 ehci-hcd ?
 ehci-pci ?
+ehci-platform ?
 ohci-hcd ?
 ohci-pci ?
+ohci-platform ?
 uhci-hcd ?
 xhci-hcd ?
 usbcore ?

Modified: dists/wheezy-backports/linux/debian/installer/package-list
==============================================================================
--- dists/wheezy-backports/linux/debian/installer/package-list	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/installer/package-list	Sun Sep 21 14:23:16 2014	(r21886)
@@ -334,7 +334,7 @@
  This package contains squashfs modules.
 
 Package: speakup-modules
-Depends: kernel-image!
+Depends: kernel-image
 Priority: extra
 Description: speakup modules
  This package contains speakup modules.

Copied: dists/wheezy-backports/linux/debian/patches/bugfix/all/aic94xx-remove-broken-fallback-for-missing-ctrl-a.patch (from r21884, dists/sid/linux/debian/patches/bugfix/all/aic94xx-remove-broken-fallback-for-missing-ctrl-a.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/bugfix/all/aic94xx-remove-broken-fallback-for-missing-ctrl-a.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21884, dists/sid/linux/debian/patches/bugfix/all/aic94xx-remove-broken-fallback-for-missing-ctrl-a.patch)
@@ -0,0 +1,57 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Sun, 08 Jun 2014 23:37:44 +0100
+Subject: [SCSI] aic94xx: Remove broken fallback for missing 'Ctrl-A' user settings
+Forwarded: http://mid.gmane.org/1402267064.23860.42.camel@deadeye.wl.decadent.org.uk
+
+asd_process_ctrl_a_user() attempts to find user settings in flash, and
+if they are missing it prepares a substitute structure containing
+default values for PHY settings.  But having done so, it will still
+try to read user settings - from some random address in flash, as the
+local variable 'offs' has not been initialised.
+
+Since asd_common_setup() already sets default PHY settings, there
+seems to be no need to repeat them here, and we can just return 0.
+
+Compile-tested only.
+
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+ drivers/scsi/aic94xx/aic94xx_sds.c | 18 ++----------------
+ 1 file changed, 2 insertions(+), 16 deletions(-)
+
+diff --git a/drivers/scsi/aic94xx/aic94xx_sds.c b/drivers/scsi/aic94xx/aic94xx_sds.c
+index edb43fd..f5d51d2 100644
+--- a/drivers/scsi/aic94xx/aic94xx_sds.c
++++ b/drivers/scsi/aic94xx/aic94xx_sds.c
+@@ -981,29 +981,15 @@ static int asd_process_ctrla_phy_settings(struct asd_ha_struct *asd_ha,
+ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha,
+ 				   struct asd_flash_dir *flash_dir)
+ {
+-	int err, i;
++	int err;
+ 	u32 offs, size;
+ 	struct asd_ll_el *el;
+ 	struct asd_ctrla_phy_settings *ps;
+-	struct asd_ctrla_phy_settings dflt_ps;
+ 
+ 	err = asd_find_flash_de(flash_dir, FLASH_DE_CTRL_A_USER, &offs, &size);
+ 	if (err) {
+ 		ASD_DPRINTK("couldn't find CTRL-A user settings section\n");
+-		ASD_DPRINTK("Creating default CTRL-A user settings section\n");
+-
+-		dflt_ps.id0 = 'h';
+-		dflt_ps.num_phys = 8;
+-		for (i =0; i < ASD_MAX_PHYS; i++) {
+-			memcpy(dflt_ps.phy_ent[i].sas_addr,
+-			       asd_ha->hw_prof.sas_addr, SAS_ADDR_SIZE);
+-			dflt_ps.phy_ent[i].sas_link_rates = 0x98;
+-			dflt_ps.phy_ent[i].flags = 0x0;
+-			dflt_ps.phy_ent[i].sata_link_rates = 0x0;
+-		}
+-
+-		size = sizeof(struct asd_ctrla_phy_settings);
+-		ps = &dflt_ps;
++		return 0;
+ 	}
+ 
+ 	if (size == 0)

Copied: dists/wheezy-backports/linux/debian/patches/bugfix/all/aio-fix-reqs_available-handling.patch (from r21784, dists/trunk/linux/debian/patches/bugfix/all/aio-fix-reqs_available-handling.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/bugfix/all/aio-fix-reqs_available-handling.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/bugfix/all/aio-fix-reqs_available-handling.patch)
@@ -0,0 +1,161 @@
+From: Benjamin LaHaise <bcrl at kvack.org>
+Date: Sun, 24 Aug 2014 13:14:05 -0400
+Subject: aio: fix reqs_available handling
+Origin: https://git.kernel.org/linus/d856f32a86b2b015ab180ab7a55e455ed8d3ccc5
+
+As reported by Dan Aloni, commit f8567a3845ac ("aio: fix aio request
+leak when events are reaped by userspace") introduces a regression when
+user code attempts to perform io_submit() with more events than are
+available in the ring buffer.  Reverting that commit would reintroduce a
+regression when user space event reaping is used.
+
+Fixing this bug is a bit more involved than the previous attempts to fix
+this regression.  Since we do not have a single point at which we can
+count events as being reaped by user space and io_getevents(), we have
+to track event completion by looking at the number of events left in the
+event ring.  So long as there are as many events in the ring buffer as
+there have been completion events generate, we cannot call
+put_reqs_available().  The code to check for this is now placed in
+refill_reqs_available().
+
+A test program from Dan and modified by me for verifying this bug is available
+at http://www.kvack.org/~bcrl/20140824-aio_bug.c .
+
+Reported-by: Dan Aloni <dan at kernelim.com>
+Signed-off-by: Benjamin LaHaise <bcrl at kvack.org>
+Acked-by: Dan Aloni <dan at kernelim.com>
+Cc: Kent Overstreet <kmo at daterainc.com>
+Cc: Mateusz Guzik <mguzik at redhat.com>
+Cc: Petr Matousek <pmatouse at redhat.com>
+Cc: stable at vger.kernel.org      # v3.16 and anything that f8567a3845ac was backported to
+Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
+---
+ fs/aio.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
+ 1 file changed, 73 insertions(+), 4 deletions(-)
+
+--- a/fs/aio.c
++++ b/fs/aio.c
+@@ -141,6 +141,7 @@ struct kioctx {
+ 
+ 	struct {
+ 		unsigned	tail;
++		unsigned	completed_events;
+ 		spinlock_t	completion_lock;
+ 	} ____cacheline_aligned_in_smp;
+ 
+@@ -880,6 +881,68 @@ out:
+ 	return ret;
+ }
+ 
++/* refill_reqs_available
++ *	Updates the reqs_available reference counts used for tracking the
++ *	number of free slots in the completion ring.  This can be called
++ *	from aio_complete() (to optimistically update reqs_available) or
++ *	from aio_get_req() (the we're out of events case).  It must be
++ *	called holding ctx->completion_lock.
++ */
++static void refill_reqs_available(struct kioctx *ctx, unsigned head,
++                                  unsigned tail)
++{
++	unsigned events_in_ring, completed;
++
++	/* Clamp head since userland can write to it. */
++	head %= ctx->nr_events;
++	if (head <= tail)
++		events_in_ring = tail - head;
++	else
++		events_in_ring = ctx->nr_events - (head - tail);
++
++	completed = ctx->completed_events;
++	if (events_in_ring < completed)
++		completed -= events_in_ring;
++	else
++		completed = 0;
++
++	if (!completed)
++		return;
++
++	ctx->completed_events -= completed;
++	put_reqs_available(ctx, completed);
++}
++
++/* user_refill_reqs_available
++ *	Called to refill reqs_available when aio_get_req() encounters an
++ *	out of space in the completion ring.
++ */
++static void user_refill_reqs_available(struct kioctx *ctx)
++{
++	spin_lock_irq(&ctx->completion_lock);
++	if (ctx->completed_events) {
++		struct aio_ring *ring;
++		unsigned head;
++
++		/* Access of ring->head may race with aio_read_events_ring()
++		 * here, but that's okay since whether we read the old version
++		 * or the new version, and either will be valid.  The important
++		 * part is that head cannot pass tail since we prevent
++		 * aio_complete() from updating tail by holding
++		 * ctx->completion_lock.  Even if head is invalid, the check
++		 * against ctx->completed_events below will make sure we do the
++		 * safe/right thing.
++		 */
++		ring = kmap_atomic(ctx->ring_pages[0]);
++		head = ring->head;
++		kunmap_atomic(ring);
++
++		refill_reqs_available(ctx, head, ctx->tail);
++	}
++
++	spin_unlock_irq(&ctx->completion_lock);
++}
++
+ /* aio_get_req
+  *	Allocate a slot for an aio request.
+  * Returns NULL if no requests are free.
+@@ -888,8 +951,11 @@ static inline struct kiocb *aio_get_req(
+ {
+ 	struct kiocb *req;
+ 
+-	if (!get_reqs_available(ctx))
+-		return NULL;
++	if (!get_reqs_available(ctx)) {
++		user_refill_reqs_available(ctx);
++		if (!get_reqs_available(ctx))
++			return NULL;
++	}
+ 
+ 	req = kmem_cache_alloc(kiocb_cachep, GFP_KERNEL|__GFP_ZERO);
+ 	if (unlikely(!req))
+@@ -948,8 +1014,8 @@ void aio_complete(struct kiocb *iocb, lo
+ 	struct kioctx	*ctx = iocb->ki_ctx;
+ 	struct aio_ring	*ring;
+ 	struct io_event	*ev_page, *event;
++	unsigned tail, pos, head;
+ 	unsigned long	flags;
+-	unsigned tail, pos;
+ 
+ 	/*
+ 	 * Special case handling for sync iocbs:
+@@ -1010,10 +1076,14 @@ void aio_complete(struct kiocb *iocb, lo
+ 	ctx->tail = tail;
+ 
+ 	ring = kmap_atomic(ctx->ring_pages[0]);
++	head = ring->head;
+ 	ring->tail = tail;
+ 	kunmap_atomic(ring);
+ 	flush_dcache_page(ctx->ring_pages[0]);
+ 
++	ctx->completed_events++;
++	if (ctx->completed_events > 1)
++		refill_reqs_available(ctx, head, tail);
+ 	spin_unlock_irqrestore(&ctx->completion_lock, flags);
+ 
+ 	pr_debug("added to ring %p at [%u]\n", iocb, tail);
+@@ -1028,7 +1098,6 @@ void aio_complete(struct kiocb *iocb, lo
+ 
+ 	/* everything turned out well, dispose of the aiocb. */
+ 	kiocb_free(iocb);
+-	put_reqs_available(ctx, 1);
+ 
+ 	/*
+ 	 * We have to order our ring_info tail store above and test

Copied: dists/wheezy-backports/linux/debian/patches/bugfix/all/builddeb-put-the-dbg-files-into-the-correct-director.patch (from r21884, dists/sid/linux/debian/patches/bugfix/all/builddeb-put-the-dbg-files-into-the-correct-director.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/bugfix/all/builddeb-put-the-dbg-files-into-the-correct-director.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21884, dists/sid/linux/debian/patches/bugfix/all/builddeb-put-the-dbg-files-into-the-correct-director.patch)
@@ -0,0 +1,52 @@
+From: Michal Marek <mmarek at suse.cz>
+Date: Fri, 22 Aug 2014 15:51:03 +0200
+Subject: builddeb: put the dbg files into the correct directory
+Origin: https://git.kernel.org/cgit/linux/kernel/git/mmarek/kbuild.git//commit?id=2d0871396995139b37f9ceb153c8b07589148343
+
+Since the conversion of objtree to use relative pathnames (commit
+7e1c04779e, "kbuild: Use relative path for $(objtree)"), the debug
+info files have been ending up in /debian/dbgtmp/ in the regular
+linux-image package instead of the debug files package. Fix up the
+paths so that the debug files end up in the -dbg package.
+
+This is based on a similar patch by Darrick.
+
+Reported-and-tested-by: "Darrick J. Wong" <darrick.wong at oracle.com>
+Signed-off-by: Michal Marek <mmarek at suse.cz>
+---
+ scripts/package/builddeb | 22 ++++++++++------------
+ 1 file changed, 10 insertions(+), 12 deletions(-)
+
+diff --git a/scripts/package/builddeb b/scripts/package/builddeb
+index 35d5a58..7c0e6e4 100644
+--- a/scripts/package/builddeb
++++ b/scripts/package/builddeb
+@@ -152,18 +152,16 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
+ 		rmdir "$tmpdir/lib/modules/$version"
+ 	fi
+ 	if [ -n "$BUILD_DEBUG" ] ; then
+-		(
+-			cd $tmpdir
+-			for module in $(find lib/modules/ -name *.ko); do
+-				mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module)
+-				# only keep debug symbols in the debug file
+-				$OBJCOPY --only-keep-debug $module $dbg_dir/usr/lib/debug/$module
+-				# strip original module from debug symbols
+-				$OBJCOPY --strip-debug $module
+-				# then add a link to those
+-				$OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module
+-			done
+-		)
++		for module in $(find $tmpdir/lib/modules/ -name *.ko -printf '%P\n'); do
++			module=lib/modules/$module
++			mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module)
++			# only keep debug symbols in the debug file
++			$OBJCOPY --only-keep-debug $tmpdir/$module $dbg_dir/usr/lib/debug/$module
++			# strip original module from debug symbols
++			$OBJCOPY --strip-debug $tmpdir/$module
++			# then add a link to those
++			$OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $tmpdir/$module
++		done
+ 	fi
+ fi
+ 

Modified: dists/wheezy-backports/linux/debian/patches/bugfix/all/disable-some-marvell-phys.patch
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/bugfix/all/disable-some-marvell-phys.patch	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/bugfix/all/disable-some-marvell-phys.patch	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,9 +1,7 @@
 From: Ian Campbell <ijc at hellion.org.uk>
 Subject: phy/marvell: disable 4-port phys
 Date: Wed, 20 Nov 2013 08:30:14 +0000
-Forwarded: no
-
-See 723177 for more details. Briefly:
+Bug-Debian: https://bugs.debian.org/723177
 
 The Marvell PHY was originally disabled because it can cause networking
 failures on some systems. According to Lennert Buytenhek this is because some
@@ -12,9 +10,38 @@
 penultimate position of the model name) until they can be audited for
 correctness.
 
+[bwh: Also #if-out the init functions for these PHYs to avoid
+ compiler warnings]
+
 --- a/drivers/net/phy/marvell.c
 +++ b/drivers/net/phy/marvell.c
-@@ -975,6 +975,7 @@ static struct phy_driver marvell_drivers
+@@ -591,6 +591,7 @@ static int m88e1118_config_init(struct p
+ 	return phy_write(phydev, MII_BMCR, BMCR_RESET);
+ }
+ 
++#if 0
+ static int m88e1149_config_init(struct phy_device *phydev)
+ {
+ 	int err;
+@@ -616,7 +617,9 @@ static int m88e1149_config_init(struct p
+ 
+ 	return phy_write(phydev, MII_BMCR, BMCR_RESET);
+ }
++#endif
+ 
++#if 0
+ static int m88e1145_config_init(struct phy_device *phydev)
+ {
+ 	int err;
+@@ -682,6 +685,7 @@ static int m88e1145_config_init(struct p
+ 
+ 	return 0;
+ }
++#endif
+ 
+ /* marvell_read_status
+  *
+@@ -975,6 +979,7 @@ static struct phy_driver marvell_drivers
  		.suspend = &genphy_suspend,
  		.driver = { .owner = THIS_MODULE },
  	},
@@ -22,7 +49,7 @@
  	{
  		.phy_id = MARVELL_PHY_ID_88E1145,
  		.phy_id_mask = MARVELL_PHY_ID_MASK,
-@@ -990,6 +991,8 @@ static struct phy_driver marvell_drivers
+@@ -990,6 +995,8 @@ static struct phy_driver marvell_drivers
  		.suspend = &genphy_suspend,
  		.driver = { .owner = THIS_MODULE },
  	},
@@ -31,7 +58,7 @@
  	{
  		.phy_id = MARVELL_PHY_ID_88E1149R,
  		.phy_id_mask = MARVELL_PHY_ID_MASK,
-@@ -1005,6 +1008,8 @@ static struct phy_driver marvell_drivers
+@@ -1005,6 +1012,8 @@ static struct phy_driver marvell_drivers
  		.suspend = &genphy_suspend,
  		.driver = { .owner = THIS_MODULE },
  	},
@@ -40,7 +67,7 @@
  	{
  		.phy_id = MARVELL_PHY_ID_88E1240,
  		.phy_id_mask = MARVELL_PHY_ID_MASK,
-@@ -1020,6 +1025,7 @@ static struct phy_driver marvell_drivers
+@@ -1020,6 +1029,7 @@ static struct phy_driver marvell_drivers
  		.suspend = &genphy_suspend,
  		.driver = { .owner = THIS_MODULE },
  	},
@@ -48,7 +75,7 @@
  	{
  		.phy_id = MARVELL_PHY_ID_88E1116R,
  		.phy_id_mask = MARVELL_PHY_ID_MASK,
-@@ -1073,9 +1079,9 @@ static struct mdio_device_id __maybe_unu
+@@ -1073,9 +1083,9 @@ static struct mdio_device_id __maybe_unu
  	{ MARVELL_PHY_ID_88E1111, MARVELL_PHY_ID_MASK },
  	{ MARVELL_PHY_ID_88E1118, MARVELL_PHY_ID_MASK },
  	{ MARVELL_PHY_ID_88E1121R, MARVELL_PHY_ID_MASK },

Modified: dists/wheezy-backports/linux/debian/patches/bugfix/all/firmware-remove-redundant-log-messages-from-drivers.patch
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/bugfix/all/firmware-remove-redundant-log-messages-from-drivers.patch	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/bugfix/all/firmware-remove-redundant-log-messages-from-drivers.patch	Sun Sep 21 14:23:16 2014	(r21886)
@@ -96,8 +96,8 @@
      fw_size = firmware->size / sizeof(u32);
 --- a/drivers/bluetooth/ath3k.c
 +++ b/drivers/bluetooth/ath3k.c
-@@ -363,10 +363,8 @@ static int ath3k_load_patch(struct usb_d
- 		fw_version.rom_version);
+@@ -370,10 +370,8 @@ static int ath3k_load_patch(struct usb_d
+ 		le32_to_cpu(fw_version.rom_version));
  
  	ret = request_firmware(&firmware, filename, &udev->dev);
 -	if (ret < 0) {
@@ -108,8 +108,8 @@
  
  	pt_version.rom_version = *(int *)(firmware->data + firmware->size - 8);
  	pt_version.build_version = *(int *)
-@@ -425,10 +423,8 @@ static int ath3k_load_syscfg(struct usb_
- 		fw_version.rom_version, clk_value, ".dfu");
+@@ -432,10 +430,8 @@ static int ath3k_load_syscfg(struct usb_
+ 		le32_to_cpu(fw_version.rom_version), clk_value, ".dfu");
  
  	ret = request_firmware(&firmware, filename, &udev->dev);
 -	if (ret < 0) {
@@ -140,7 +140,7 @@
  		return -EIO;
 --- a/drivers/bluetooth/bfusb.c
 +++ b/drivers/bluetooth/bfusb.c
-@@ -658,10 +658,8 @@ static int bfusb_probe(struct usb_interf
+@@ -664,10 +664,8 @@ static int bfusb_probe(struct usb_interf
  	skb_queue_head_init(&data->pending_q);
  	skb_queue_head_init(&data->completed_q);
  
@@ -154,7 +154,7 @@
  
 --- a/drivers/bluetooth/bt3c_cs.c
 +++ b/drivers/bluetooth/bt3c_cs.c
-@@ -569,10 +569,8 @@ static int bt3c_open(bt3c_info_t *info)
+@@ -570,10 +570,8 @@ static int bt3c_open(bt3c_info_t *info)
  
  	/* Load firmware */
  	err = request_firmware(&firmware, "BT3CPCC.bin", &info->p_dev->dev);
@@ -232,10 +232,10 @@
  	where = 0;
 --- a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
 +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
-@@ -1095,10 +1095,8 @@ nvc0_graph_ctor_fw(struct nvc0_graph_pri
+@@ -1221,10 +1221,8 @@ nvc0_graph_ctor_fw(struct nvc0_graph_pri
  	if (ret) {
  		snprintf(f, sizeof(f), "nouveau/%s", fwname);
- 		ret = request_firmware(&fw, f, &device->pdev->dev);
+ 		ret = request_firmware(&fw, f, nv_device_base(device));
 -		if (ret) {
 -			nv_error(priv, "failed to load %s\n", fwname);
 +		if (ret)
@@ -288,7 +288,7 @@
  		       rdev->me_fw->size, fw_name);
 --- a/drivers/gpu/drm/radeon/r600.c
 +++ b/drivers/gpu/drm/radeon/r600.c
-@@ -2436,10 +2436,6 @@ int r600_init_microcode(struct radeon_de
+@@ -2434,10 +2434,6 @@ int r600_init_microcode(struct radeon_de
  
  out:
  	if (err) {
@@ -342,7 +342,7 @@
  	ret = qib_ibsd_ucode_loaded(dd->pport, fw);
 --- a/drivers/input/touchscreen/atmel_mxt_ts.c
 +++ b/drivers/input/touchscreen/atmel_mxt_ts.c
-@@ -985,10 +985,8 @@ static int mxt_load_fw(struct device *de
+@@ -1236,10 +1236,8 @@ static int mxt_load_fw(struct device *de
  	int ret;
  
  	ret = request_firmware(&fw, fn, dev);
@@ -352,8 +352,8 @@
  		return ret;
 -	}
  
- 	/* Change to the bootloader mode */
- 	mxt_write_object(data, MXT_GEN_COMMAND_T6,
+ 	/* Check for incorrect enc file */
+ 	ret = mxt_check_firmware_format(dev, fw);
 --- a/drivers/isdn/hardware/mISDN/speedfax.c
 +++ b/drivers/isdn/hardware/mISDN/speedfax.c
 @@ -392,11 +392,8 @@ setup_instance(struct sfax_hw *card)
@@ -371,7 +371,7 @@
  			  card->name, firmware->size);
 --- a/drivers/media/tuners/tuner-xc2028.c
 +++ b/drivers/media/tuners/tuner-xc2028.c
-@@ -1369,7 +1369,6 @@ static void load_firmware_cb(const struc
+@@ -1373,7 +1373,6 @@ static void load_firmware_cb(const struc
  
  	tuner_dbg("request_firmware_nowait(): %s\n", fw ? "OK" : "error");
  	if (!fw) {
@@ -685,15 +685,13 @@
  				printk(KERN_INFO "tda1004x: please rename the firmware file to %s\n",
 --- a/drivers/media/dvb-frontends/tda10071.c
 +++ b/drivers/media/dvb-frontends/tda10071.c
-@@ -951,14 +951,8 @@ static int tda10071_init(struct dvb_fron
+@@ -952,12 +952,8 @@ static int tda10071_init(struct dvb_fron
  
  		/* request the firmware, this will block and timeout */
  		ret = request_firmware(&fw, fw_file, priv->i2c->dev.parent);
 -		if (ret) {
--			dev_err(&priv->i2c->dev, "%s: did not find the " \
--					"firmware file. (%s) Please see " \
--					"linux/Documentation/dvb/ for more " \
--					"details on firmware-problems. (%d)\n",
+-			dev_err(&priv->i2c->dev,
+-					"%s: did not find the firmware file. (%s) Please see linux/Documentation/dvb/ for more details on firmware-problems. (%d)\n",
 -					KBUILD_MODNAME, fw_file, ret);
 +		if (ret)
  			goto error;
@@ -837,7 +835,7 @@
  	fw_data = (void *)fw_entry->data;
 --- a/drivers/media/pci/bt8xx/bttv-cards.c
 +++ b/drivers/media/pci/bt8xx/bttv-cards.c
-@@ -3799,10 +3799,8 @@ static int pvr_boot(struct bttv *btv)
+@@ -3814,10 +3814,8 @@ static int pvr_boot(struct bttv *btv)
  	int rc;
  
  	rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev);
@@ -1063,12 +1061,12 @@
  
 --- a/drivers/media/usb/s2255/s2255drv.c
 +++ b/drivers/media/usb/s2255/s2255drv.c
-@@ -2563,10 +2563,8 @@ static int s2255_probe(struct usb_interf
+@@ -2306,10 +2306,8 @@ static int s2255_probe(struct usb_interf
  	}
  	/* load the first chunk */
  	if (request_firmware(&dev->fw_data->fw,
 -			     FIRMWARE_FILE_NAME, &dev->udev->dev)) {
--		printk(KERN_ERR "sensoray 2255 failed to get firmware\n");
+-		dev_err(&interface->dev, "sensoray 2255 failed to get firmware\n");
 +			     FIRMWARE_FILE_NAME, &dev->udev->dev))
  		goto errorREQFW;
 -	}
@@ -1077,7 +1075,7 @@
  	pdata = (__le32 *) &dev->fw_data->fw->data[fw_size - 8];
 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
 +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
-@@ -88,10 +88,8 @@ int s5p_mfc_load_firmware(struct s5p_mfc
+@@ -86,10 +86,8 @@ int s5p_mfc_load_firmware(struct s5p_mfc
  
  	err = request_firmware((const struct firmware **)&fw_blob,
  				     dev->variant->fw_name, dev->v4l2_dev.dev);
@@ -1089,7 +1087,7 @@
  	if (fw_blob->size > dev->fw_size) {
  		mfc_err("MFC firmware is too big to be loaded\n");
  		release_firmware(fw_blob);
-@@ -121,10 +119,8 @@ int s5p_mfc_reload_firmware(struct s5p_m
+@@ -119,10 +117,8 @@ int s5p_mfc_reload_firmware(struct s5p_m
  
  	err = request_firmware((const struct firmware **)&fw_blob,
  				     dev->variant->fw_name, dev->v4l2_dev.dev);
@@ -1220,7 +1218,7 @@
  
 --- a/drivers/net/ethernet/broadcom/bnx2.c
 +++ b/drivers/net/ethernet/broadcom/bnx2.c
-@@ -3696,16 +3696,13 @@ static int bnx2_request_uncached_firmwar
+@@ -3700,16 +3700,13 @@ static int bnx2_request_uncached_firmwar
  	}
  
  	rc = request_firmware(&bp->mips_firmware, mips_fw_file, &bp->pdev->dev);
@@ -1242,7 +1240,7 @@
  	if (bp->mips_firmware->size < sizeof(*mips_fw) ||
 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
 +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
-@@ -12637,11 +12637,8 @@ static int bnx2x_init_firmware(struct bn
+@@ -12775,11 +12775,8 @@ static int bnx2x_init_firmware(struct bn
  	BNX2X_DEV_INFO("Loading %s\n", fw_file_name);
  
  	rc = request_firmware(&bp->firmware, fw_file_name, &bp->pdev->dev);
@@ -1257,7 +1255,7 @@
  	if (rc) {
 --- a/drivers/net/ethernet/broadcom/tg3.c
 +++ b/drivers/net/ethernet/broadcom/tg3.c
-@@ -11293,11 +11293,8 @@ static int tg3_request_firmware(struct t
+@@ -11286,11 +11286,8 @@ static int tg3_request_firmware(struct t
  {
  	const struct tg3_firmware_hdr *fw_hdr;
  
@@ -1450,7 +1448,7 @@
  	fwh = (struct at76_fw_header *)(fwe->fw->data);
 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c
 +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
-@@ -1082,12 +1082,8 @@ static void ath9k_hif_usb_firmware_cb(co
+@@ -1084,12 +1084,8 @@ static void ath9k_hif_usb_firmware_cb(co
  	struct hif_device_usb *hif_dev = context;
  	int ret;
  
@@ -1528,20 +1526,6 @@
  	if ((*fw)->size < sizeof(struct b43legacy_fw_header))
  		goto err_format;
  	hdr = (struct b43legacy_fw_header *)((*fw)->data);
---- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
-+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
-@@ -590,10 +590,8 @@ static const struct firmware *brcmf_sdio
- 
- found:
- 	err = request_firmware(&fw, name, &bus->sdiodev->func[2]->dev);
--	if ((err) || (!fw)) {
--		brcmf_err("fail to request firmware %s (%d)\n", name, err);
-+	if (err)
- 		return NULL;
--	}
- 
- 	return fw;
- }
 --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
 +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
 @@ -379,19 +379,13 @@ static int brcms_request_fw(struct brcms
@@ -1598,7 +1582,7 @@
  		IPW_ERROR("%s is too small (%zd)\n", name, (*raw)->size);
 --- a/drivers/net/wireless/iwlegacy/3945-mac.c
 +++ b/drivers/net/wireless/iwlegacy/3945-mac.c
-@@ -1866,7 +1866,6 @@ il3945_read_ucode(struct il_priv *il)
+@@ -1861,7 +1861,6 @@ il3945_read_ucode(struct il_priv *il)
  		sprintf(buf, "%s%u%s", name_pre, idx, ".ucode");
  		ret = request_firmware(&ucode_raw, buf, &il->pci_dev->dev);
  		if (ret < 0) {
@@ -1608,7 +1592,7 @@
  			else
 --- a/drivers/net/wireless/iwlwifi/iwl-drv.c
 +++ b/drivers/net/wireless/iwlwifi/iwl-drv.c
-@@ -928,13 +928,8 @@ static void iwl_req_fw_callback(const st
+@@ -979,13 +979,8 @@ static void iwl_req_fw_callback(const st
  
  	memset(&pieces, 0, sizeof(pieces));
  
@@ -1636,7 +1620,7 @@
  	}
 --- a/drivers/net/wireless/mwifiex/main.c
 +++ b/drivers/net/wireless/mwifiex/main.c
-@@ -420,11 +420,8 @@ static void mwifiex_fw_dpc(const struct
+@@ -421,11 +421,8 @@ static void mwifiex_fw_dpc(const struct
  	bool init_failed = false;
  	struct wireless_dev *wdev;
  
@@ -1651,7 +1635,7 @@
  	adapter->firmware = firmware;
 --- a/drivers/net/wireless/mwl8k.c
 +++ b/drivers/net/wireless/mwl8k.c
-@@ -5530,16 +5530,12 @@ static int mwl8k_firmware_load_success(s
+@@ -5715,16 +5715,12 @@ static int mwl8k_firmware_load_success(s
  static void mwl8k_fw_state_machine(const struct firmware *fw, void *context)
  {
  	struct mwl8k_priv *priv = context;
@@ -1669,7 +1653,7 @@
  		priv->fw_helper = fw;
  		rc = mwl8k_request_fw(priv, priv->fw_pref, &priv->fw_ucode,
  				      true);
-@@ -5574,11 +5570,8 @@ static void mwl8k_fw_state_machine(const
+@@ -5759,11 +5755,8 @@ static void mwl8k_fw_state_machine(const
  		break;
  
  	case FW_STATE_LOADING_ALT:
@@ -1682,7 +1666,7 @@
  		priv->fw_ucode = fw;
  		rc = mwl8k_firmware_load_success(priv);
  		if (rc)
-@@ -5616,10 +5609,8 @@ retry:
+@@ -5801,10 +5794,8 @@ retry:
  
  	/* Ask userland hotplug daemon for the device firmware */
  	rc = mwl8k_request_firmware(priv, fw_image, nowait);
@@ -1731,7 +1715,7 @@
 --- a/drivers/net/wireless/orinoco/orinoco_usb.c
 +++ b/drivers/net/wireless/orinoco/orinoco_usb.c
 @@ -1690,7 +1690,6 @@ static int ezusb_probe(struct usb_interf
- 		if (ezusb_firmware_download(upriv, &firmware))
+ 		if (ezusb_firmware_download(upriv, &firmware) < 0)
  			goto error;
  	} else {
 -		err("No firmware to download");
@@ -1805,7 +1789,7 @@
  		rt2x00_err(rt2x00dev, "Failed to read Firmware\n");
 --- a/drivers/net/wireless/rtlwifi/core.c
 +++ b/drivers/net/wireless/rtlwifi/core.c
-@@ -55,7 +55,6 @@ void rtl_fw_cb(const struct firmware *fi
+@@ -115,7 +115,6 @@ void rtl_fw_cb(const struct firmware *fi
  			if (!err)
  				goto found_alt;
  		}
@@ -1851,7 +1835,7 @@
  		wl1251_error("nvs size is not multiple of 32 bits: %zu",
 --- a/drivers/net/wireless/ti/wlcore/main.c
 +++ b/drivers/net/wireless/ti/wlcore/main.c
-@@ -752,10 +752,8 @@ static int wl12xx_fetch_firmware(struct
+@@ -748,10 +748,8 @@ static int wl12xx_fetch_firmware(struct
  
  	ret = request_firmware(&fw, fw_name, wl->dev);
  
@@ -1970,7 +1954,7 @@
  	}
 --- a/drivers/scsi/ipr.c
 +++ b/drivers/scsi/ipr.c
-@@ -3945,10 +3945,8 @@ static ssize_t ipr_store_update_fw(struc
+@@ -3983,10 +3983,8 @@ static ssize_t ipr_store_update_fw(struc
  	len = snprintf(fname, 99, "%s", buf);
  	fname[len-1] = '\0';
  
@@ -1984,7 +1968,7 @@
  
 --- a/drivers/scsi/pm8001/pm8001_ctl.c
 +++ b/drivers/scsi/pm8001/pm8001_ctl.c
-@@ -690,9 +690,6 @@ static ssize_t pm8001_store_update_fw(st
+@@ -676,9 +676,6 @@ static ssize_t pm8001_store_update_fw(st
  			       pm8001_ha->dev);
  
  	if (err) {
@@ -1996,7 +1980,7 @@
  	}
 --- a/drivers/scsi/qla1280.c
 +++ b/drivers/scsi/qla1280.c
-@@ -1560,8 +1560,6 @@ qla1280_request_firmware(struct scsi_qla
+@@ -1553,8 +1553,6 @@ qla1280_request_firmware(struct scsi_qla
  	err = request_firmware(&fw, fwname, &ha->pdev->dev);
  
  	if (err) {
@@ -2007,7 +1991,7 @@
  	}
 --- a/drivers/scsi/qla2xxx/qla_init.c
 +++ b/drivers/scsi/qla2xxx/qla_init.c
-@@ -5136,8 +5136,6 @@ qla2x00_load_risc(scsi_qla_host_t *vha,
+@@ -5358,8 +5358,6 @@ qla2x00_load_risc(scsi_qla_host_t *vha,
  	/* Load firmware blob. */
  	blob = qla2x00_request_firmware(vha);
  	if (!blob) {
@@ -2016,7 +2000,7 @@
  		ql_log(ql_log_info, vha, 0x0084,
  		    "Firmware images can be retrieved from: "QLA_FW_URL ".\n");
  		return QLA_FUNCTION_FAILED;
-@@ -5238,8 +5236,6 @@ qla24xx_load_risc_blob(scsi_qla_host_t *
+@@ -5461,8 +5459,6 @@ qla24xx_load_risc_blob(scsi_qla_host_t *
  	/* Load firmware blob. */
  	blob = qla2x00_request_firmware(vha);
  	if (!blob) {
@@ -2042,7 +2026,7 @@
  	if (qla82xx_validate_firmware_blob(vha,
 --- a/drivers/scsi/qla2xxx/qla_os.c
 +++ b/drivers/scsi/qla2xxx/qla_os.c
-@@ -5315,8 +5315,6 @@ qla2x00_request_firmware(scsi_qla_host_t
+@@ -5393,8 +5393,6 @@ qla2x00_request_firmware(scsi_qla_host_t
  		goto out;
  
  	if (request_firmware(&blob->fw, blob->name, &ha->pdev->dev)) {
@@ -2200,7 +2184,7 @@
  	}
 --- a/drivers/staging/rtl8192u/r819xU_firmware.c
 +++ b/drivers/staging/rtl8192u/r819xU_firmware.c
-@@ -280,10 +280,8 @@ bool init_firmware(struct net_device *de
+@@ -242,10 +242,8 @@ bool init_firmware(struct net_device *de
  		 */
  		if (rst_opt == OPT_SYSTEM_RESET) {
  			rc = request_firmware(&fw_entry, fw_name[init_step],&priv->udev->dev);
@@ -2224,26 +2208,26 @@
  		usb_set_intfdata(pusb_intf, NULL);
 --- a/drivers/staging/slicoss/slicoss.c
 +++ b/drivers/staging/slicoss/slicoss.c
-@@ -425,11 +425,8 @@ static int slic_card_download_gbrcv(stru
+@@ -402,11 +402,8 @@ static int slic_card_download_gbrcv(stru
  	}
  
  	ret = request_firmware(&fw, file, &adapter->pcidev->dev);
 -	if (ret) {
 -		dev_err(&adapter->pcidev->dev,
--			"SLICOSS: Failed to load firmware %s\n", file);
+-			"Failed to load firmware %s\n", file);
 +	if (ret)
  		return ret;
 -	}
  
  	rcvucodelen = *(u32 *)(fw->data + index);
  	index += 4;
-@@ -503,11 +500,8 @@ static int slic_card_download(struct ada
+@@ -480,11 +477,8 @@ static int slic_card_download(struct ada
  		return -ENOENT;
  	}
  	ret = request_firmware(&fw, file, &adapter->pcidev->dev);
 -	if (ret) {
 -		dev_err(&adapter->pcidev->dev,
--			"SLICOSS: Failed to load firmware %s\n", file);
+-			"Failed to load firmware %s\n", file);
 +	if (ret)
  		return ret;
 -	}
@@ -2253,7 +2237,7 @@
 --- a/drivers/staging/vt6656/firmware.c
 +++ b/drivers/staging/vt6656/firmware.c
 @@ -57,11 +57,8 @@ int FIRMWAREbDownload(struct vnt_private
- 	spin_unlock_irq(&pDevice->lock);
+ 	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Download firmware\n");
  
  	rc = request_firmware(&fw, FIRMWARE_NAME, dev);
 -	if (rc) {
@@ -2494,7 +2478,7 @@
  	BootMajorVersion = rec->data[0];
 --- a/drivers/usb/serial/io_ti.c
 +++ b/drivers/usb/serial/io_ti.c
-@@ -768,8 +768,6 @@ static int build_i2c_fw_hdr(__u8 *header
+@@ -784,8 +784,6 @@ static int build_i2c_fw_hdr(__u8 *header
  
  	err = request_firmware(&fw, fw_name, dev);
  	if (err) {
@@ -2503,7 +2487,7 @@
  		kfree(buffer);
  		return err;
  	}
-@@ -1315,8 +1313,6 @@ static int download_fw(struct edgeport_s
+@@ -1331,8 +1329,6 @@ static int download_fw(struct edgeport_s
  
  		err = request_firmware(&fw, fw_name, dev);
  		if (err) {
@@ -2526,8 +2510,8 @@
  	if (fw_p->size > TI_FIRMWARE_BUF_SIZE) {
  		dev_err(&dev->dev, "%s - firmware too large %zu\n", __func__, fw_p->size);
  		release_firmware(fw_p);
---- a/drivers/video/broadsheetfb.c
-+++ b/drivers/video/broadsheetfb.c
+--- a/drivers/video/fbdev/broadsheetfb.c
++++ b/drivers/video/fbdev/broadsheetfb.c
 @@ -741,10 +741,8 @@ static ssize_t broadsheet_loadstore_wave
  		return -EINVAL;
  
@@ -2540,8 +2524,8 @@
  
  	/* try to enforce reasonable min max on waveform */
  	if ((fw_entry->size < 8*1024) || (fw_entry->size > 64*1024)) {
---- a/drivers/video/metronomefb.c
-+++ b/drivers/video/metronomefb.c
+--- a/drivers/video/fbdev/metronomefb.c
++++ b/drivers/video/fbdev/metronomefb.c
 @@ -677,10 +677,8 @@ static int metronomefb_probe(struct plat
  		a) request the waveform file from userspace
  		b) process waveform and decode into metromem */
@@ -2642,12 +2626,13 @@
  	if (firmware->size < sizeof(header)) {
 --- a/sound/pci/echoaudio/echoaudio.c
 +++ b/sound/pci/echoaudio/echoaudio.c
-@@ -57,10 +57,8 @@ static int get_firmware(const struct fir
+@@ -57,11 +57,8 @@ static int get_firmware(const struct fir
  	DE_ACT(("firmware requested: %s\n", card_fw[fw_index].data));
  	snprintf(name, sizeof(name), "ea/%s", card_fw[fw_index].data);
  	err = request_firmware(fw_entry, name, pci_device(chip));
 -	if (err < 0)
--		snd_printk(KERN_ERR "get_firmware(): Firmware not available (%d)\n", err);
+-		dev_err(chip->card->dev,
+-			"get_firmware(): Firmware not available (%d)\n", err);
  #ifdef CONFIG_PM_SLEEP
 -	else
 +	if (!err)
@@ -2656,27 +2641,28 @@
  	return err;
 --- a/sound/pci/emu10k1/emu10k1_main.c
 +++ b/sound/pci/emu10k1/emu10k1_main.c
-@@ -879,10 +879,8 @@ static int snd_emu10k1_emu1010_init(stru
+@@ -887,12 +887,8 @@ static int snd_emu10k1_emu1010_init(stru
  		}
  
  		err = request_firmware(&emu->firmware, filename, &emu->pci->dev);
 -		if (err != 0) {
--			snd_printk(KERN_ERR "emu1010: firmware: %s not found. Err = %d\n", filename, err);
+-			dev_info(emu->card->dev,
+-				 "emu1010: firmware: %s not found. Err = %d\n",
+-				 filename, err);
 +		if (err != 0)
  			return err;
 -		}
- 		snd_printk(KERN_INFO "emu1010: firmware file = %s, size = 0x%zx\n",
+ 		dev_info(emu->card->dev,
+ 			 "emu1010: firmware file = %s, size = 0x%zx\n",
  			   filename, emu->firmware->size);
- 	}
 --- a/sound/pci/hda/hda_intel.c
 +++ b/sound/pci/hda/hda_intel.c
-@@ -3792,11 +3792,8 @@ static void azx_firmware_cb(const struct
+@@ -1407,10 +1407,8 @@ static void azx_firmware_cb(const struct
  	struct azx *chip = card->private_data;
  	struct pci_dev *pci = chip->pci;
  
 -	if (!fw) {
--		snd_printk(KERN_ERR SFX "%s: Cannot load firmware, aborting\n",
--			   pci_name(chip->pci));
+-		dev_err(card->dev, "Cannot load firmware, aborting\n");
 +	if (!fw)
  		goto error;
 -	}
@@ -2695,12 +2681,13 @@
  	}
 --- a/sound/pci/mixart/mixart_hwdep.c
 +++ b/sound/pci/mixart/mixart_hwdep.c
-@@ -558,10 +558,8 @@ int snd_mixart_setup_firmware(struct mix
+@@ -570,11 +570,8 @@ int snd_mixart_setup_firmware(struct mix
  
  	for (i = 0; i < 3; i++) {
  		sprintf(path, "mixart/%s", fw_files[i]);
 -		if (request_firmware(&fw_entry, path, &mgr->pci->dev)) {
--			snd_printk(KERN_ERR "miXart: can't load firmware %s\n", path);
+-			dev_err(&mgr->pci->dev,
+-				"miXart: can't load firmware %s\n", path);
 +		if (request_firmware(&fw_entry, path, &mgr->pci->dev))
  			return -ENOENT;
 -		}
@@ -2709,12 +2696,13 @@
  		release_firmware(fw_entry);
 --- a/sound/pci/pcxhr/pcxhr_hwdep.c
 +++ b/sound/pci/pcxhr/pcxhr_hwdep.c
-@@ -381,11 +381,8 @@ int pcxhr_setup_firmware(struct pcxhr_mg
+@@ -385,12 +385,8 @@ int pcxhr_setup_firmware(struct pcxhr_mg
  		if (!fw_files[fw_set][i])
  			continue;
  		sprintf(path, "pcxhr/%s", fw_files[fw_set][i]);
 -		if (request_firmware(&fw_entry, path, &mgr->pci->dev)) {
--			snd_printk(KERN_ERR "pcxhr: can't load firmware %s\n",
+-			dev_err(&mgr->pci->dev,
+-				"pcxhr: can't load firmware %s\n",
 -				   path);
 +		if (request_firmware(&fw_entry, path, &mgr->pci->dev))
  			return -ENOENT;
@@ -2739,21 +2727,22 @@
  	if (err) {
 --- a/sound/pci/rme9652/hdsp.c
 +++ b/sound/pci/rme9652/hdsp.c
-@@ -5145,10 +5145,8 @@ static int hdsp_request_fw_loader(struct
+@@ -5167,11 +5167,8 @@ static int hdsp_request_fw_loader(struct
  		return -EINVAL;
  	}
  
 -	if (request_firmware(&fw, fwfile, &hdsp->pci->dev)) {
--		snd_printk(KERN_ERR "Hammerfall-DSP: cannot load firmware %s\n", fwfile);
+-		dev_err(hdsp->card->dev,
+-			"cannot load firmware %s\n", fwfile);
 +	if (request_firmware(&fw, fwfile, &hdsp->pci->dev))
  		return -ENOENT;
 -	}
  	if (fw->size < HDSP_FIRMWARE_SIZE) {
- 		snd_printk(KERN_ERR "Hammerfall-DSP: too short firmware size %d (expected %d)\n",
- 			   (int)fw->size, HDSP_FIRMWARE_SIZE);
+ 		dev_err(hdsp->card->dev,
+ 			"too short firmware size %d (expected %d)\n",
 --- a/sound/soc/codecs/wm2000.c
 +++ b/sound/soc/codecs/wm2000.c
-@@ -893,10 +893,8 @@ static int wm2000_i2c_probe(struct i2c_c
+@@ -891,10 +891,8 @@ static int wm2000_i2c_probe(struct i2c_c
  	}
  
  	ret = request_firmware(&fw, filename, &i2c->dev);
@@ -2771,32 +2760,32 @@
  	ret = request_firmware(&fw, fwname, &device->dev);
  	if (ret < 0) {
  		kfree(rec);
--		snd_printk(KERN_ERR PREFIX "error requesting ezusb "
--				"firmware %s.\n", fwname);
+-		dev_err(&intf->dev,
+-			"error requesting ezusb firmware %s.\n", fwname);
  		return ret;
  	}
  	ret = usb6fire_fw_ihex_init(fw, rec);
-@@ -292,8 +290,6 @@ static int usb6fire_fw_fpga_upload(
+@@ -296,8 +294,6 @@ static int usb6fire_fw_fpga_upload(
  
  	ret = request_firmware(&fw, fwname, &device->dev);
  	if (ret < 0) {
--		snd_printk(KERN_ERR PREFIX "unable to get fpga firmware %s.\n",
+-		dev_err(&intf->dev, "unable to get fpga firmware %s.\n",
 -				fwname);
  		kfree(buffer);
  		return -EIO;
  	}
 --- a/sound/pci/cs46xx/cs46xx_lib.c
 +++ b/sound/pci/cs46xx/cs46xx_lib.c
-@@ -3265,11 +3265,8 @@ int snd_cs46xx_start_dsp(struct snd_cs46
+@@ -3284,11 +3284,8 @@ int snd_cs46xx_start_dsp(struct snd_cs46
  #ifdef CONFIG_SND_CS46XX_NEW_DSP
  	for (i = 0; i < CS46XX_DSP_MODULES; i++) {
  		err = load_firmware(chip, &chip->modules[i], module_names[i]);
 -		if (err < 0) {
--			snd_printk(KERN_ERR "firmware load error [%s]\n",
+-			dev_err(chip->card->dev, "firmware load error [%s]\n",
 -				   module_names[i]);
 +		if (err < 0)
  			return err;
 -		}
  		err = cs46xx_dsp_load_module(chip, chip->modules[i]);
  		if (err < 0) {
- 			snd_printk(KERN_ERR "image download error [%s]\n",
+ 			dev_err(chip->card->dev, "image download error [%s]\n",

Modified: dists/wheezy-backports/linux/debian/patches/bugfix/all/kbuild-use-nostdinc-in-compile-tests.patch
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/bugfix/all/kbuild-use-nostdinc-in-compile-tests.patch	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/bugfix/all/kbuild-use-nostdinc-in-compile-tests.patch	Sun Sep 21 14:23:16 2014	(r21886)
@@ -68,9 +68,9 @@
  
 +NOSTDINC_FLAGS += -nostdinc
 +
- include $(srctree)/arch/$(SRCARCH)/Makefile
- 
  ifdef CONFIG_READABLE_ASM
+ # Disable optimizations that make assembler listings hard to read.
+ # reorder blocks reorders the control in the function
 @@ -646,7 +648,7 @@ KBUILD_CFLAGS += $(call cc-option, -fno-
  endif
  

Modified: dists/wheezy-backports/linux/debian/patches/bugfix/x86/viafb-autoload-on-olpc-xo1.5-only.patch
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/bugfix/x86/viafb-autoload-on-olpc-xo1.5-only.patch	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/bugfix/x86/viafb-autoload-on-olpc-xo1.5-only.patch	Sun Sep 21 14:23:16 2014	(r21886)
@@ -14,8 +14,8 @@
 un-blacklist it in udev.
 
 ---
---- a/drivers/video/via/via-core.c
-+++ b/drivers/video/via/via-core.c
+--- a/drivers/video/fbdev/via/via-core.c
++++ b/drivers/video/fbdev/via/via-core.c
 @@ -753,7 +753,14 @@ static struct pci_device_id via_pci_tabl
  	  .driver_data = UNICHROME_VX900 },
  	{ }

Modified: dists/wheezy-backports/linux/debian/patches/debian/aufs3-mark-as-staging.patch
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/debian/aufs3-mark-as-staging.patch	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/debian/aufs3-mark-as-staging.patch	Sun Sep 21 14:23:16 2014	(r21886)
@@ -5,9 +5,11 @@
 This hasn't been reviewed upstream, so should have the same status
 as code in drivers/staging.
 
+Also note in the MAINTAINERS file that it's not upstream.
+
 --- a/fs/aufs/module.c
 +++ b/fs/aufs/module.c
-@@ -104,6 +104,7 @@ MODULE_DESCRIPTION(AUFS_NAME
+@@ -103,6 +103,7 @@ MODULE_DESCRIPTION(AUFS_NAME
  	" -- Advanced multi layered unification filesystem");
  MODULE_VERSION(AUFS_VERSION);
  MODULE_ALIAS_FS(AUFS_NAME);
@@ -15,3 +17,14 @@
  
  /* this module parameter has no meaning when SYSFS is disabled */
  int sysaufs_brs = 1;
+--- a/MAINTAINERS
++++ b/MAINTAINERS
+@@ -1705,7 +1705,7 @@ L:	aufs-users at lists.sourceforge.net (mem
+ W:	http://aufs.sourceforge.net
+ T:	git://git.code.sf.net/p/aufs/aufs3-linux
+ T:	git://github.com/sfjro/aufs3-linux.git
+-S:	Supported
++S:	Supported, not upstream
+ F:	Documentation/filesystems/aufs/
+ F:	Documentation/ABI/testing/debugfs-aufs
+ F:	Documentation/ABI/testing/sysfs-aufs

Modified: dists/wheezy-backports/linux/debian/patches/debian/btrfs-work-around-compiler-bug-on-arm.patch
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/debian/btrfs-work-around-compiler-bug-on-arm.patch	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/debian/btrfs-work-around-compiler-bug-on-arm.patch	Sun Sep 21 14:23:16 2014	(r21886)
@@ -17,7 +17,7 @@
 @@ -17,3 +17,8 @@ btrfs-$(CONFIG_BTRFS_FS_CHECK_INTEGRITY)
  btrfs-$(CONFIG_BTRFS_FS_RUN_SANITY_TESTS) += tests/free-space-tests.o \
  	tests/extent-buffer-tests.o tests/btrfs-tests.o \
- 	tests/extent-io-tests.o tests/inode-tests.o
+ 	tests/extent-io-tests.o tests/inode-tests.o tests/qgroup-tests.o
 +
 +# bwh: Fails to build with gcc-4.6 -O2
 +ifdef CONFIG_ARM

Modified: dists/wheezy-backports/linux/debian/patches/debian/cirrus-disable-modeset-by-default.patch
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/debian/cirrus-disable-modeset-by-default.patch	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/debian/cirrus-disable-modeset-by-default.patch	Sun Sep 21 14:23:16 2014	(r21886)
@@ -2,10 +2,10 @@
 Subject: cirrus: Disable by default
 Forwarded: not-needed
 
-Current Debian userland is not compatible with this driver, so set
-modeset=0 by default (making module init fail).
-xserver-xorg-video-cirrus will need to override this once it is
-compatible, by installing a modprobe config file.
+This kernel driver is incompatible with older versions of
+xserver-xorg-video-cirrus, so do not enable it by default.  It will be
+enabled by a modprobe configuration file installed by
+xserver-xorg-video-modesetting.
 
 --- a/drivers/gpu/drm/cirrus/cirrus_drv.c
 +++ b/drivers/gpu/drm/cirrus/cirrus_drv.c

Modified: dists/wheezy-backports/linux/debian/patches/debian/dfsg/files-1
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/debian/dfsg/files-1	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/debian/dfsg/files-1	Sun Sep 21 14:23:16 2014	(r21886)
@@ -20,11 +20,9 @@
 
 rm drivers/staging/keucr/init.h
 
-unifdef drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c -UREMOVE_DFSG 
-
 rm drivers/staging/wlags49_h2/ap_*.c
 rm drivers/staging/wlags49_h2/sta_*.c
 
 # These include apparently obfuscated code
-rm drivers/video/nvidia/
-rm drivers/video/riva/
+rm drivers/video/fbdev/nvidia/
+rm drivers/video/fbdev/riva/

Modified: dists/wheezy-backports/linux/debian/patches/debian/dfsg/video-remove-nvidiafb-and-rivafb.patch
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/debian/dfsg/video-remove-nvidiafb-and-rivafb.patch	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/debian/dfsg/video-remove-nvidiafb-and-rivafb.patch	Sun Sep 21 14:23:16 2014	(r21886)
@@ -13,9 +13,9 @@
 probably discontinued 10 years ago.
 
 ---
---- a/drivers/video/Kconfig
-+++ b/drivers/video/Kconfig
-@@ -1028,101 +1028,6 @@ config FB_ATMEL_STN
+--- a/drivers/video/fbdev/Kconfig
++++ b/drivers/video/fbdev/Kconfig
+@@ -991,101 +991,6 @@ config FB_ATMEL_STN
  
  	  If unsure, say N.
  
@@ -117,9 +117,9 @@
  config FB_I740
  	tristate "Intel740 support"
  	depends on FB && PCI
---- a/drivers/video/Makefile
-+++ b/drivers/video/Makefile
-@@ -38,8 +38,6 @@ obj-$(CONFIG_FB_PM2)              += pm2fb.o
+--- a/drivers/video/fbdev/Makefile
++++ b/drivers/video/fbdev/Makefile
+@@ -22,8 +22,6 @@ obj-$(CONFIG_FB_PM3)		  += pm3fb.o
  
  obj-$(CONFIG_FB_I740)		  += i740fb.o
  obj-$(CONFIG_FB_MATROX)		  += matrox/

Modified: dists/wheezy-backports/linux/debian/patches/debian/gitignore.patch
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/debian/gitignore.patch	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/debian/gitignore.patch	Sun Sep 21 14:23:16 2014	(r21886)
@@ -6,7 +6,7 @@
 --- a/.gitignore
 +++ b/.gitignore
 @@ -46,11 +46,6 @@
- /Module.symvers
+ /Module.markers
  
  #
 -# Debian directory (make deb-pkg)

Copied: dists/wheezy-backports/linux/debian/patches/debian/i2o-disable-i2o_ext_adaptec-on-64bit.patch (from r21884, dists/sid/linux/debian/patches/debian/i2o-disable-i2o_ext_adaptec-on-64bit.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/debian/i2o-disable-i2o_ext_adaptec-on-64bit.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21884, dists/sid/linux/debian/patches/debian/i2o-disable-i2o_ext_adaptec-on-64bit.patch)
@@ -0,0 +1,26 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Fri, 12 Sep 2014 13:24:26 +0100
+Subject: i2o: Disable I2O_EXT_ADAPTEC on 64-bit
+
+The code it enables works uses 32-bit numbers for userland virtual
+addresses:
+
+In file included from /tmp/buildd/linux-3.16.2/drivers/message/i2o/config-osm.c:39:0:
+/tmp/buildd/linux-3.16.2/drivers/message/i2o/i2o_config.c: In function 'i2o_cfg_passthru':
+/tmp/buildd/linux-3.16.2/drivers/message/i2o/i2o_config.c:893:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
+         (p->virt, (void __user *)sg[i].addr_bus,
+                   ^
+/tmp/buildd/linux-3.16.2/drivers/message/i2o/i2o_config.c:953:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
+         ((void __user *)sg[j].addr_bus, sg_list[j].virt,
+          ^
+
+--- a/drivers/message/i2o/Kconfig
++++ b/drivers/message/i2o/Kconfig
+@@ -37,6 +37,7 @@ config I2O_LCT_NOTIFY_ON_CHANGES
+ 
+ config I2O_EXT_ADAPTEC
+ 	bool "Enable Adaptec extensions"
++	depends on !64BIT || BROKEN
+ 	default y
+ 	---help---
+ 	  Say Y for support of raidutils for Adaptec I2O controllers. You also

Modified: dists/wheezy-backports/linux/debian/patches/debian/mgag200-disable-autoload.patch
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/debian/mgag200-disable-autoload.patch	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/debian/mgag200-disable-autoload.patch	Sun Sep 21 14:23:16 2014	(r21886)
@@ -4,18 +4,18 @@
 Forwarded: not-needed
 
 This kernel driver is incompatible with older versions of
-xserver-xorg-video-mga, so do not autoload it yet.  It will have to be
-loaded either by local configuration or as part of a package of a
-compatible X driver.
+xserver-xorg-video-mga, so do not enable it by default.  It will be
+enabled by a modprobe configuration file installed by
+xserver-xorg-video-modesetting.
 
 --- a/drivers/gpu/drm/mgag200/mgag200_drv.c
 +++ b/drivers/gpu/drm/mgag200/mgag200_drv.c
-@@ -38,7 +38,7 @@ static DEFINE_PCI_DEVICE_TABLE(pciidlist
- 	{0,}
- };
+@@ -21,7 +21,7 @@
+  * which then performs further device association and calls our graphics init
+  * functions
+  */
+-int mgag200_modeset = -1;
++int mgag200_modeset = 0;
  
--MODULE_DEVICE_TABLE(pci, pciidlist);
-+/*MODULE_DEVICE_TABLE(pci, pciidlist);*/
- 
- static void mgag200_kick_out_firmware_fb(struct pci_dev *pdev)
- {
+ MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
+ module_param_named(modeset, mgag200_modeset, int, 0400);

Modified: dists/wheezy-backports/linux/debian/patches/debian/powerpcspe-omit-uimage.patch
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/debian/powerpcspe-omit-uimage.patch	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/debian/powerpcspe-omit-uimage.patch	Sun Sep 21 14:23:16 2014	(r21886)
@@ -7,19 +7,17 @@
 Bug-Debian: https://bugs.debian.org/708094
 Forwarded: not-needed
 
-Index: linux-3.8.12/arch/powerpc/boot/Makefile
-===================================================================
---- linux-3.8.12.orig/arch/powerpc/boot/Makefile	2013-05-13 21:05:41.000000000 +0200
-+++ linux-3.8.12/arch/powerpc/boot/Makefile	2013-05-14 07:48:26.434286772 +0200
-@@ -204,7 +204,6 @@
+--- a/arch/powerpc/boot/Makefile
++++ b/arch/powerpc/boot/Makefile
+@@ -204,7 +204,6 @@ image-$(CONFIG_PPC_CHRP)		+= zImage.chrp
+ image-$(CONFIG_PPC_EFIKA)		+= zImage.chrp
  image-$(CONFIG_PPC_PMAC)		+= zImage.pmac
  image-$(CONFIG_PPC_HOLLY)		+= dtbImage.holly
- image-$(CONFIG_PPC_PRPMC2800)		+= dtbImage.prpmc2800
 -image-$(CONFIG_DEFAULT_UIMAGE)		+= uImage
  image-$(CONFIG_EPAPR_BOOT)		+= zImage.epapr
  
  #
-@@ -262,23 +261,6 @@
+@@ -262,23 +261,6 @@ image-$(CONFIG_MPC834x_MDS)		+= cuImage.
  image-$(CONFIG_MPC836x_MDS)		+= cuImage.mpc836x_mds
  image-$(CONFIG_ASP834x)			+= dtbImage.asp834x-redboot
  

Copied: dists/wheezy-backports/linux/debian/patches/debian/revert-staging-sm7xxfb-remove-driver.patch (from r21784, dists/trunk/linux/debian/patches/debian/revert-staging-sm7xxfb-remove-driver.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/debian/revert-staging-sm7xxfb-remove-driver.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/debian/revert-staging-sm7xxfb-remove-driver.patch)
@@ -0,0 +1,1906 @@
+From db0cf7f2156da3cd1b6570f939f355eb20dca69b Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Sun, 7 Sep 2014 20:31:52 +0100
+Subject: [PATCH] Revert "staging: sm7xxfb: remove driver"
+
+This reverts commit dc93c85235efa5201e9a3c116bc3fbd1afc1a182.
+We're still attempting to support the Loongson 2F platform which
+needs this.
+---
+ drivers/staging/Kconfig           |    2 +
+ drivers/staging/Makefile          |    1 +
+ drivers/staging/sm7xxfb/Kconfig   |   13 +
+ drivers/staging/sm7xxfb/Makefile  |    1 +
+ drivers/staging/sm7xxfb/TODO      |    9 +
+ drivers/staging/sm7xxfb/sm7xx.h   |  779 ++++++++++++++++++++++++++++
+ drivers/staging/sm7xxfb/sm7xxfb.c | 1026 +++++++++++++++++++++++++++++++++++++
+ 7 files changed, 1831 insertions(+)
+ create mode 100644 drivers/staging/sm7xxfb/Kconfig
+ create mode 100644 drivers/staging/sm7xxfb/Makefile
+ create mode 100644 drivers/staging/sm7xxfb/TODO
+ create mode 100644 drivers/staging/sm7xxfb/sm7xx.h
+ create mode 100644 drivers/staging/sm7xxfb/sm7xxfb.c
+
+diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
+index 4f38fc0..f57367c 100644
+--- a/drivers/staging/Kconfig
++++ b/drivers/staging/Kconfig
+@@ -80,6 +80,8 @@ source "drivers/staging/wlags49_h2/Kconfig"
+ 
+ source "drivers/staging/wlags49_h25/Kconfig"
+ 
++source "drivers/staging/sm7xxfb/Kconfig"
++
+ source "drivers/staging/crystalhd/Kconfig"
+ 
+ source "drivers/staging/cxt1e1/Kconfig"
+diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
+index 1e97ad2..65a1ff0 100644
+--- a/drivers/staging/Makefile
++++ b/drivers/staging/Makefile
+@@ -34,6 +34,7 @@ obj-$(CONFIG_DX_SEP)            += sep/
+ obj-$(CONFIG_IIO)		+= iio/
+ obj-$(CONFIG_WLAGS49_H2)	+= wlags49_h2/
+ obj-$(CONFIG_WLAGS49_H25)	+= wlags49_h25/
++obj-$(CONFIG_FB_SM7XX)		+= sm7xxfb/
+ obj-$(CONFIG_CRYSTALHD)		+= crystalhd/
+ obj-$(CONFIG_CXT1E1)		+= cxt1e1/
+ obj-$(CONFIG_FB_XGI)		+= xgifb/
+diff --git a/drivers/staging/sm7xxfb/Kconfig b/drivers/staging/sm7xxfb/Kconfig
+new file mode 100644
+index 0000000..e2922ae
+--- /dev/null
++++ b/drivers/staging/sm7xxfb/Kconfig
+@@ -0,0 +1,13 @@
++config FB_SM7XX
++	tristate "Silicon Motion SM7XX framebuffer support"
++	depends on FB && PCI
++	select FB_CFB_FILLRECT
++	select FB_CFB_COPYAREA
++	select FB_CFB_IMAGEBLIT
++	help
++	  Frame buffer driver for the Silicon Motion SM710, SM712, SM721
++	  and SM722 chips.
++
++	  This driver is also available as a module. The module will be
++	  called sm7xxfb. If you want to compile it as a module, say M
++	  here and read <file:Documentation/kbuild/modules.txt>.
+diff --git a/drivers/staging/sm7xxfb/Makefile b/drivers/staging/sm7xxfb/Makefile
+new file mode 100644
+index 0000000..48f471c
+--- /dev/null
++++ b/drivers/staging/sm7xxfb/Makefile
+@@ -0,0 +1 @@
++obj-$(CONFIG_FB_SM7XX) += sm7xxfb.o
+diff --git a/drivers/staging/sm7xxfb/TODO b/drivers/staging/sm7xxfb/TODO
+new file mode 100644
+index 0000000..1fcead5
+--- /dev/null
++++ b/drivers/staging/sm7xxfb/TODO
+@@ -0,0 +1,9 @@
++TODO:
++- Dual head support
++- 2D acceleration support
++- use kernel coding style
++- refine the code and remove unused code
++- move it to drivers/video/sm7xxfb.c
++
++Please send any patches to Greg Kroah-Hartman <greg at kroah.com> and
++Teddy Wang <teddy.wang at siliconmotion.com.cn>.
+diff --git a/drivers/staging/sm7xxfb/sm7xx.h b/drivers/staging/sm7xxfb/sm7xx.h
+new file mode 100644
+index 0000000..8599861
+--- /dev/null
++++ b/drivers/staging/sm7xxfb/sm7xx.h
+@@ -0,0 +1,779 @@
++/*
++ * Silicon Motion SM712 frame buffer device
++ *
++ * Copyright (C) 2006 Silicon Motion Technology Corp.
++ * Authors:	Ge Wang, gewang at siliconmotion.com
++ *		Boyod boyod.yang at siliconmotion.com.cn
++ *
++ * Copyright (C) 2009 Lemote, Inc.
++ * Author: Wu Zhangjin, wuzhangjin at gmail.com
++ *
++ *  This file is subject to the terms and conditions of the GNU General Public
++ *  License. See the file COPYING in the main directory of this archive for
++ *  more details.
++ */
++
++#define NR_PALETTE        256
++
++#define FB_ACCEL_SMI_LYNX 88
++
++#define SCREEN_X_RES      1024
++#define SCREEN_Y_RES      600
++#define SCREEN_BPP        16
++
++/*Assume SM712 graphics chip has 4MB VRAM */
++#define SM712_VIDEOMEMORYSIZE	  0x00400000
++/*Assume SM722 graphics chip has 8MB VRAM */
++#define SM722_VIDEOMEMORYSIZE	  0x00800000
++
++#define dac_reg	(0x3c8)
++#define dac_val	(0x3c9)
++
++extern void __iomem *smtc_RegBaseAddress;
++#define smtc_mmiowb(dat, reg)	writeb(dat, smtc_RegBaseAddress + reg)
++#define smtc_mmioww(dat, reg)	writew(dat, smtc_RegBaseAddress + reg)
++#define smtc_mmiowl(dat, reg)	writel(dat, smtc_RegBaseAddress + reg)
++
++#define smtc_mmiorb(reg)	readb(smtc_RegBaseAddress + reg)
++#define smtc_mmiorw(reg)	readw(smtc_RegBaseAddress + reg)
++#define smtc_mmiorl(reg)	readl(smtc_RegBaseAddress + reg)
++
++#define SIZE_SR00_SR04      (0x04 - 0x00 + 1)
++#define SIZE_SR10_SR24      (0x24 - 0x10 + 1)
++#define SIZE_SR30_SR75      (0x75 - 0x30 + 1)
++#define SIZE_SR80_SR93      (0x93 - 0x80 + 1)
++#define SIZE_SRA0_SRAF      (0xAF - 0xA0 + 1)
++#define SIZE_GR00_GR08      (0x08 - 0x00 + 1)
++#define SIZE_AR00_AR14      (0x14 - 0x00 + 1)
++#define SIZE_CR00_CR18      (0x18 - 0x00 + 1)
++#define SIZE_CR30_CR4D      (0x4D - 0x30 + 1)
++#define SIZE_CR90_CRA7      (0xA7 - 0x90 + 1)
++#define SIZE_VPR		(0x6C + 1)
++#define SIZE_DPR		(0x44 + 1)
++
++static inline void smtc_crtcw(int reg, int val)
++{
++	smtc_mmiowb(reg, 0x3d4);
++	smtc_mmiowb(val, 0x3d5);
++}
++
++static inline unsigned int smtc_crtcr(int reg)
++{
++	smtc_mmiowb(reg, 0x3d4);
++	return smtc_mmiorb(0x3d5);
++}
++
++static inline void smtc_grphw(int reg, int val)
++{
++	smtc_mmiowb(reg, 0x3ce);
++	smtc_mmiowb(val, 0x3cf);
++}
++
++static inline unsigned int smtc_grphr(int reg)
++{
++	smtc_mmiowb(reg, 0x3ce);
++	return smtc_mmiorb(0x3cf);
++}
++
++static inline void smtc_attrw(int reg, int val)
++{
++	smtc_mmiorb(0x3da);
++	smtc_mmiowb(reg, 0x3c0);
++	smtc_mmiorb(0x3c1);
++	smtc_mmiowb(val, 0x3c0);
++}
++
++static inline void smtc_seqw(int reg, int val)
++{
++	smtc_mmiowb(reg, 0x3c4);
++	smtc_mmiowb(val, 0x3c5);
++}
++
++static inline unsigned int smtc_seqr(int reg)
++{
++	smtc_mmiowb(reg, 0x3c4);
++	return smtc_mmiorb(0x3c5);
++}
++
++/* The next structure holds all information relevant for a specific video mode.
++ */
++
++struct ModeInit {
++	int mmSizeX;
++	int mmSizeY;
++	int bpp;
++	int hz;
++	unsigned char Init_MISC;
++	unsigned char Init_SR00_SR04[SIZE_SR00_SR04];
++	unsigned char Init_SR10_SR24[SIZE_SR10_SR24];
++	unsigned char Init_SR30_SR75[SIZE_SR30_SR75];
++	unsigned char Init_SR80_SR93[SIZE_SR80_SR93];
++	unsigned char Init_SRA0_SRAF[SIZE_SRA0_SRAF];
++	unsigned char Init_GR00_GR08[SIZE_GR00_GR08];
++	unsigned char Init_AR00_AR14[SIZE_AR00_AR14];
++	unsigned char Init_CR00_CR18[SIZE_CR00_CR18];
++	unsigned char Init_CR30_CR4D[SIZE_CR30_CR4D];
++	unsigned char Init_CR90_CRA7[SIZE_CR90_CRA7];
++};
++
++/**********************************************************************
++			 SM712 Mode table.
++ **********************************************************************/
++struct ModeInit VGAMode[] = {
++	{
++	 /*  mode#0: 640 x 480  16Bpp  60Hz */
++	 640, 480, 16, 60,
++	 /*  Init_MISC */
++	 0xE3,
++	 {			/*  Init_SR0_SR4 */
++	  0x03, 0x01, 0x0F, 0x00, 0x0E,
++	  },
++	 {			/*  Init_SR10_SR24 */
++	  0xFF, 0xBE, 0xEF, 0xFF, 0x00, 0x0E, 0x17, 0x2C,
++	  0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0xC4, 0x30, 0x02, 0x01, 0x01,
++	  },
++	 {			/*  Init_SR30_SR75 */
++	  0x32, 0x03, 0xA0, 0x09, 0xC0, 0x32, 0x32, 0x32,
++	  0x32, 0x32, 0x32, 0x32, 0x00, 0x00, 0x03, 0xFF,
++	  0x00, 0xFC, 0x00, 0x00, 0x20, 0x18, 0x00, 0xFC,
++	  0x20, 0x0C, 0x44, 0x20, 0x00, 0x32, 0x32, 0x32,
++	  0x04, 0x24, 0x63, 0x4F, 0x52, 0x0B, 0xDF, 0xEA,
++	  0x04, 0x50, 0x19, 0x32, 0x32, 0x00, 0x00, 0x32,
++	  0x01, 0x80, 0x7E, 0x1A, 0x1A, 0x00, 0x00, 0x00,
++	  0x50, 0x03, 0x74, 0x14, 0x07, 0x82, 0x07, 0x04,
++	  0x00, 0x45, 0x30, 0x30, 0x40, 0x30,
++	  },
++	 {			/*  Init_SR80_SR93 */
++	  0xFF, 0x07, 0x00, 0x6F, 0x7F, 0x7F, 0xFF, 0x32,
++	  0xF7, 0x00, 0x00, 0x00, 0xEF, 0xFF, 0x32, 0x32,
++	  0x00, 0x00, 0x00, 0x00,
++	  },
++	 {			/*  Init_SRA0_SRAF */
++	  0x00, 0xFF, 0xBF, 0xFF, 0xFF, 0xED, 0xED, 0xED,
++	  0x7B, 0xFF, 0xFF, 0xFF, 0xBF, 0xEF, 0xFF, 0xDF,
++	  },
++	 {			/*  Init_GR00_GR08 */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F,
++	  0xFF,
++	  },
++	 {			/*  Init_AR00_AR14 */
++	  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
++	  0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
++	  0x41, 0x00, 0x0F, 0x00, 0x00,
++	  },
++	 {			/*  Init_CR00_CR18 */
++	  0x5F, 0x4F, 0x4F, 0x00, 0x53, 0x1F, 0x0B, 0x3E,
++	  0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0xEA, 0x0C, 0xDF, 0x50, 0x40, 0xDF, 0x00, 0xE3,
++	  0xFF,
++	  },
++	 {			/*  Init_CR30_CR4D */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x03, 0x20,
++	  0x00, 0x00, 0x00, 0x40, 0x00, 0xE7, 0xFF, 0xFD,
++	  0x5F, 0x4F, 0x00, 0x54, 0x00, 0x0B, 0xDF, 0x00,
++	  0xEA, 0x0C, 0x2E, 0x00, 0x4F, 0xDF,
++	  },
++	 {			/*  Init_CR90_CRA7 */
++	  0x56, 0xDD, 0x5E, 0xEA, 0x87, 0x44, 0x8F, 0x55,
++	  0x0A, 0x8F, 0x55, 0x0A, 0x00, 0x00, 0x18, 0x00,
++	  0x11, 0x10, 0x0B, 0x0A, 0x0A, 0x0A, 0x0A, 0x00,
++	  },
++	 },
++	{
++	 /*  mode#1: 640 x 480  24Bpp  60Hz */
++	 640, 480, 24, 60,
++	 /*  Init_MISC */
++	 0xE3,
++	 {			/*  Init_SR0_SR4 */
++	  0x03, 0x01, 0x0F, 0x00, 0x0E,
++	  },
++	 {			/*  Init_SR10_SR24 */
++	  0xFF, 0xBE, 0xEF, 0xFF, 0x00, 0x0E, 0x17, 0x2C,
++	  0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0xC4, 0x30, 0x02, 0x01, 0x01,
++	  },
++	 {			/*  Init_SR30_SR75 */
++	  0x32, 0x03, 0xA0, 0x09, 0xC0, 0x32, 0x32, 0x32,
++	  0x32, 0x32, 0x32, 0x32, 0x00, 0x00, 0x03, 0xFF,
++	  0x00, 0xFC, 0x00, 0x00, 0x20, 0x18, 0x00, 0xFC,
++	  0x20, 0x0C, 0x44, 0x20, 0x00, 0x32, 0x32, 0x32,
++	  0x04, 0x24, 0x63, 0x4F, 0x52, 0x0B, 0xDF, 0xEA,
++	  0x04, 0x50, 0x19, 0x32, 0x32, 0x00, 0x00, 0x32,
++	  0x01, 0x80, 0x7E, 0x1A, 0x1A, 0x00, 0x00, 0x00,
++	  0x50, 0x03, 0x74, 0x14, 0x07, 0x82, 0x07, 0x04,
++	  0x00, 0x45, 0x30, 0x30, 0x40, 0x30,
++	  },
++	 {			/*  Init_SR80_SR93 */
++	  0xFF, 0x07, 0x00, 0x6F, 0x7F, 0x7F, 0xFF, 0x32,
++	  0xF7, 0x00, 0x00, 0x00, 0xEF, 0xFF, 0x32, 0x32,
++	  0x00, 0x00, 0x00, 0x00,
++	  },
++	 {			/*  Init_SRA0_SRAF */
++	  0x00, 0xFF, 0xBF, 0xFF, 0xFF, 0xED, 0xED, 0xED,
++	  0x7B, 0xFF, 0xFF, 0xFF, 0xBF, 0xEF, 0xFF, 0xDF,
++	  },
++	 {			/*  Init_GR00_GR08 */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F,
++	  0xFF,
++	  },
++	 {			/*  Init_AR00_AR14 */
++	  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
++	  0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
++	  0x41, 0x00, 0x0F, 0x00, 0x00,
++	  },
++	 {			/*  Init_CR00_CR18 */
++	  0x5F, 0x4F, 0x4F, 0x00, 0x53, 0x1F, 0x0B, 0x3E,
++	  0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0xEA, 0x0C, 0xDF, 0x50, 0x40, 0xDF, 0x00, 0xE3,
++	  0xFF,
++	  },
++	 {			/*  Init_CR30_CR4D */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x03, 0x20,
++	  0x00, 0x00, 0x00, 0x40, 0x00, 0xE7, 0xFF, 0xFD,
++	  0x5F, 0x4F, 0x00, 0x54, 0x00, 0x0B, 0xDF, 0x00,
++	  0xEA, 0x0C, 0x2E, 0x00, 0x4F, 0xDF,
++	  },
++	 {			/*  Init_CR90_CRA7 */
++	  0x56, 0xDD, 0x5E, 0xEA, 0x87, 0x44, 0x8F, 0x55,
++	  0x0A, 0x8F, 0x55, 0x0A, 0x00, 0x00, 0x18, 0x00,
++	  0x11, 0x10, 0x0B, 0x0A, 0x0A, 0x0A, 0x0A, 0x00,
++	  },
++	 },
++	{
++	 /*  mode#0: 640 x 480  32Bpp  60Hz */
++	 640, 480, 32, 60,
++	 /*  Init_MISC */
++	 0xE3,
++	 {			/*  Init_SR0_SR4 */
++	  0x03, 0x01, 0x0F, 0x00, 0x0E,
++	  },
++	 {			/*  Init_SR10_SR24 */
++	  0xFF, 0xBE, 0xEF, 0xFF, 0x00, 0x0E, 0x17, 0x2C,
++	  0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0xC4, 0x30, 0x02, 0x01, 0x01,
++	  },
++	 {			/*  Init_SR30_SR75 */
++	  0x32, 0x03, 0xA0, 0x09, 0xC0, 0x32, 0x32, 0x32,
++	  0x32, 0x32, 0x32, 0x32, 0x00, 0x00, 0x03, 0xFF,
++	  0x00, 0xFC, 0x00, 0x00, 0x20, 0x18, 0x00, 0xFC,
++	  0x20, 0x0C, 0x44, 0x20, 0x00, 0x32, 0x32, 0x32,
++	  0x04, 0x24, 0x63, 0x4F, 0x52, 0x0B, 0xDF, 0xEA,
++	  0x04, 0x50, 0x19, 0x32, 0x32, 0x00, 0x00, 0x32,
++	  0x01, 0x80, 0x7E, 0x1A, 0x1A, 0x00, 0x00, 0x00,
++	  0x50, 0x03, 0x74, 0x14, 0x07, 0x82, 0x07, 0x04,
++	  0x00, 0x45, 0x30, 0x30, 0x40, 0x30,
++	  },
++	 {			/*  Init_SR80_SR93 */
++	  0xFF, 0x07, 0x00, 0x6F, 0x7F, 0x7F, 0xFF, 0x32,
++	  0xF7, 0x00, 0x00, 0x00, 0xEF, 0xFF, 0x32, 0x32,
++	  0x00, 0x00, 0x00, 0x00,
++	  },
++	 {			/*  Init_SRA0_SRAF */
++	  0x00, 0xFF, 0xBF, 0xFF, 0xFF, 0xED, 0xED, 0xED,
++	  0x7B, 0xFF, 0xFF, 0xFF, 0xBF, 0xEF, 0xFF, 0xDF,
++	  },
++	 {			/*  Init_GR00_GR08 */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F,
++	  0xFF,
++	  },
++	 {			/*  Init_AR00_AR14 */
++	  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
++	  0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
++	  0x41, 0x00, 0x0F, 0x00, 0x00,
++	  },
++	 {			/*  Init_CR00_CR18 */
++	  0x5F, 0x4F, 0x4F, 0x00, 0x53, 0x1F, 0x0B, 0x3E,
++	  0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0xEA, 0x0C, 0xDF, 0x50, 0x40, 0xDF, 0x00, 0xE3,
++	  0xFF,
++	  },
++	 {			/*  Init_CR30_CR4D */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x03, 0x20,
++	  0x00, 0x00, 0x00, 0x40, 0x00, 0xE7, 0xFF, 0xFD,
++	  0x5F, 0x4F, 0x00, 0x54, 0x00, 0x0B, 0xDF, 0x00,
++	  0xEA, 0x0C, 0x2E, 0x00, 0x4F, 0xDF,
++	  },
++	 {			/*  Init_CR90_CRA7 */
++	  0x56, 0xDD, 0x5E, 0xEA, 0x87, 0x44, 0x8F, 0x55,
++	  0x0A, 0x8F, 0x55, 0x0A, 0x00, 0x00, 0x18, 0x00,
++	  0x11, 0x10, 0x0B, 0x0A, 0x0A, 0x0A, 0x0A, 0x00,
++	  },
++	 },
++
++	{			/*  mode#2: 800 x 600  16Bpp  60Hz */
++	 800, 600, 16, 60,
++	 /*  Init_MISC */
++	 0x2B,
++	 {			/*  Init_SR0_SR4 */
++	  0x03, 0x01, 0x0F, 0x03, 0x0E,
++	  },
++	 {			/*  Init_SR10_SR24 */
++	  0xFF, 0xBE, 0xEE, 0xFF, 0x00, 0x0E, 0x17, 0x2C,
++	  0x99, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0xC4, 0x30, 0x02, 0x01, 0x01,
++	  },
++	 {			/*  Init_SR30_SR75 */
++	  0x34, 0x03, 0x20, 0x09, 0xC0, 0x24, 0x24, 0x24,
++	  0x24, 0x24, 0x24, 0x24, 0x00, 0x00, 0x03, 0xFF,
++	  0x00, 0xFC, 0x00, 0x00, 0x20, 0x38, 0x00, 0xFC,
++	  0x20, 0x0C, 0x44, 0x20, 0x00, 0x24, 0x24, 0x24,
++	  0x04, 0x48, 0x83, 0x63, 0x68, 0x72, 0x57, 0x58,
++	  0x04, 0x55, 0x59, 0x24, 0x24, 0x00, 0x00, 0x24,
++	  0x01, 0x80, 0x7A, 0x1A, 0x1A, 0x00, 0x00, 0x00,
++	  0x50, 0x03, 0x74, 0x14, 0x1C, 0x85, 0x35, 0x13,
++	  0x02, 0x45, 0x30, 0x35, 0x40, 0x20,
++	  },
++	 {			/*  Init_SR80_SR93 */
++	  0x00, 0x00, 0x00, 0x6F, 0x7F, 0x7F, 0xFF, 0x24,
++	  0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x24, 0x24,
++	  0x00, 0x00, 0x00, 0x00,
++	  },
++	 {			/*  Init_SRA0_SRAF */
++	  0x00, 0xFF, 0xBF, 0xFF, 0xFF, 0xED, 0xED, 0xED,
++	  0x7B, 0xFF, 0xFF, 0xFF, 0xBF, 0xEF, 0xBF, 0xDF,
++	  },
++	 {			/*  Init_GR00_GR08 */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F,
++	  0xFF,
++	  },
++	 {			/*  Init_AR00_AR14 */
++	  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
++	  0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
++	  0x41, 0x00, 0x0F, 0x00, 0x00,
++	  },
++	 {			/*  Init_CR00_CR18 */
++	  0x7F, 0x63, 0x63, 0x00, 0x68, 0x18, 0x72, 0xF0,
++	  0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0x58, 0x0C, 0x57, 0x64, 0x40, 0x57, 0x00, 0xE3,
++	  0xFF,
++	  },
++	 {			/*  Init_CR30_CR4D */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x03, 0x20,
++	  0x00, 0x00, 0x00, 0x40, 0x00, 0xE7, 0xBF, 0xFD,
++	  0x7F, 0x63, 0x00, 0x69, 0x18, 0x72, 0x57, 0x00,
++	  0x58, 0x0C, 0xE0, 0x20, 0x63, 0x57,
++	  },
++	 {			/*  Init_CR90_CRA7 */
++	  0x56, 0x4B, 0x5E, 0x55, 0x86, 0x9D, 0x8E, 0xAA,
++	  0xDB, 0x2A, 0xDF, 0x33, 0x00, 0x00, 0x18, 0x00,
++	  0x20, 0x1F, 0x1A, 0x19, 0x0F, 0x0F, 0x0F, 0x00,
++	  },
++	 },
++	{			/*  mode#3: 800 x 600  24Bpp  60Hz */
++	 800, 600, 24, 60,
++	 0x2B,
++	 {			/*  Init_SR0_SR4 */
++	  0x03, 0x01, 0x0F, 0x03, 0x0E,
++	  },
++	 {			/*  Init_SR10_SR24 */
++	  0xFF, 0xBE, 0xEE, 0xFF, 0x00, 0x0E, 0x17, 0x2C,
++	  0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0xC4, 0x30, 0x02, 0x01, 0x01,
++	  },
++	 {			/*  Init_SR30_SR75 */
++	  0x36, 0x03, 0x20, 0x09, 0xC0, 0x36, 0x36, 0x36,
++	  0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x03, 0xFF,
++	  0x00, 0xFC, 0x00, 0x00, 0x20, 0x18, 0x00, 0xFC,
++	  0x20, 0x0C, 0x44, 0x20, 0x00, 0x36, 0x36, 0x36,
++	  0x04, 0x48, 0x83, 0x63, 0x68, 0x72, 0x57, 0x58,
++	  0x04, 0x55, 0x59, 0x36, 0x36, 0x00, 0x00, 0x36,
++	  0x01, 0x80, 0x7E, 0x1A, 0x1A, 0x00, 0x00, 0x00,
++	  0x50, 0x03, 0x74, 0x14, 0x1C, 0x85, 0x35, 0x13,
++	  0x02, 0x45, 0x30, 0x30, 0x40, 0x20,
++	  },
++	 {			/*  Init_SR80_SR93 */
++	  0xFF, 0x07, 0x00, 0x6F, 0x7F, 0x7F, 0xFF, 0x36,
++	  0xF7, 0x00, 0x00, 0x00, 0xEF, 0xFF, 0x36, 0x36,
++	  0x00, 0x00, 0x00, 0x00,
++	  },
++	 {			/*  Init_SRA0_SRAF */
++	  0x00, 0xFF, 0xBF, 0xFF, 0xFF, 0xED, 0xED, 0xED,
++	  0x7B, 0xFF, 0xFF, 0xFF, 0xBF, 0xEF, 0xBF, 0xDF,
++	  },
++	 {			/*  Init_GR00_GR08 */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F,
++	  0xFF,
++	  },
++	 {			/*  Init_AR00_AR14 */
++	  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
++	  0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
++	  0x41, 0x00, 0x0F, 0x00, 0x00,
++	  },
++	 {			/*  Init_CR00_CR18 */
++	  0x7F, 0x63, 0x63, 0x00, 0x68, 0x18, 0x72, 0xF0,
++	  0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0x58, 0x0C, 0x57, 0x64, 0x40, 0x57, 0x00, 0xE3,
++	  0xFF,
++	  },
++	 {			/*  Init_CR30_CR4D */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x03, 0x20,
++	  0x00, 0x00, 0x00, 0x40, 0x00, 0xE7, 0xBF, 0xFD,
++	  0x7F, 0x63, 0x00, 0x69, 0x18, 0x72, 0x57, 0x00,
++	  0x58, 0x0C, 0xE0, 0x20, 0x63, 0x57,
++	  },
++	 {			/*  Init_CR90_CRA7 */
++	  0x56, 0x4B, 0x5E, 0x55, 0x86, 0x9D, 0x8E, 0xAA,
++	  0xDB, 0x2A, 0xDF, 0x33, 0x00, 0x00, 0x18, 0x00,
++	  0x20, 0x1F, 0x1A, 0x19, 0x0F, 0x0F, 0x0F, 0x00,
++	  },
++	 },
++	{			/*  mode#7: 800 x 600  32Bpp  60Hz */
++	 800, 600, 32, 60,
++	 /*  Init_MISC */
++	 0x2B,
++	 {			/*  Init_SR0_SR4 */
++	  0x03, 0x01, 0x0F, 0x03, 0x0E,
++	  },
++	 {			/*  Init_SR10_SR24 */
++	  0xFF, 0xBE, 0xEE, 0xFF, 0x00, 0x0E, 0x17, 0x2C,
++	  0x99, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0xC4, 0x30, 0x02, 0x01, 0x01,
++	  },
++	 {			/*  Init_SR30_SR75 */
++	  0x34, 0x03, 0x20, 0x09, 0xC0, 0x24, 0x24, 0x24,
++	  0x24, 0x24, 0x24, 0x24, 0x00, 0x00, 0x03, 0xFF,
++	  0x00, 0xFC, 0x00, 0x00, 0x20, 0x38, 0x00, 0xFC,
++	  0x20, 0x0C, 0x44, 0x20, 0x00, 0x24, 0x24, 0x24,
++	  0x04, 0x48, 0x83, 0x63, 0x68, 0x72, 0x57, 0x58,
++	  0x04, 0x55, 0x59, 0x24, 0x24, 0x00, 0x00, 0x24,
++	  0x01, 0x80, 0x7A, 0x1A, 0x1A, 0x00, 0x00, 0x00,
++	  0x50, 0x03, 0x74, 0x14, 0x1C, 0x85, 0x35, 0x13,
++	  0x02, 0x45, 0x30, 0x35, 0x40, 0x20,
++	  },
++	 {			/*  Init_SR80_SR93 */
++	  0x00, 0x00, 0x00, 0x6F, 0x7F, 0x7F, 0xFF, 0x24,
++	  0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x24, 0x24,
++	  0x00, 0x00, 0x00, 0x00,
++	  },
++	 {			/*  Init_SRA0_SRAF */
++	  0x00, 0xFF, 0xBF, 0xFF, 0xFF, 0xED, 0xED, 0xED,
++	  0x7B, 0xFF, 0xFF, 0xFF, 0xBF, 0xEF, 0xBF, 0xDF,
++	  },
++	 {			/*  Init_GR00_GR08 */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F,
++	  0xFF,
++	  },
++	 {			/*  Init_AR00_AR14 */
++	  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
++	  0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
++	  0x41, 0x00, 0x0F, 0x00, 0x00,
++	  },
++	 {			/*  Init_CR00_CR18 */
++	  0x7F, 0x63, 0x63, 0x00, 0x68, 0x18, 0x72, 0xF0,
++	  0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0x58, 0x0C, 0x57, 0x64, 0x40, 0x57, 0x00, 0xE3,
++	  0xFF,
++	  },
++	 {			/*  Init_CR30_CR4D */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x03, 0x20,
++	  0x00, 0x00, 0x00, 0x40, 0x00, 0xE7, 0xBF, 0xFD,
++	  0x7F, 0x63, 0x00, 0x69, 0x18, 0x72, 0x57, 0x00,
++	  0x58, 0x0C, 0xE0, 0x20, 0x63, 0x57,
++	  },
++	 {			/*  Init_CR90_CRA7 */
++	  0x56, 0x4B, 0x5E, 0x55, 0x86, 0x9D, 0x8E, 0xAA,
++	  0xDB, 0x2A, 0xDF, 0x33, 0x00, 0x00, 0x18, 0x00,
++	  0x20, 0x1F, 0x1A, 0x19, 0x0F, 0x0F, 0x0F, 0x00,
++	  },
++	 },
++	/* We use 1024x768 table to light 1024x600 panel for lemote */
++	{			/*  mode#4: 1024 x 600  16Bpp  60Hz  */
++	 1024, 600, 16, 60,
++	 /*  Init_MISC */
++	 0xEB,
++	 {			/*  Init_SR0_SR4 */
++	  0x03, 0x01, 0x0F, 0x00, 0x0E,
++	  },
++	 {			/*  Init_SR10_SR24 */
++	  0xC8, 0x40, 0x14, 0x60, 0x00, 0x0A, 0x17, 0x20,
++	  0x51, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0xC4, 0x30, 0x02, 0x00, 0x01,
++	  },
++	 {			/*  Init_SR30_SR75 */
++	  0x22, 0x03, 0x24, 0x09, 0xC0, 0x22, 0x22, 0x22,
++	  0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0x03, 0xFF,
++	  0x00, 0xFC, 0x00, 0x00, 0x20, 0x18, 0x00, 0xFC,
++	  0x20, 0x0C, 0x44, 0x20, 0x00, 0x22, 0x22, 0x22,
++	  0x06, 0x68, 0xA7, 0x7F, 0x83, 0x24, 0xFF, 0x03,
++	  0x00, 0x60, 0x59, 0x22, 0x22, 0x00, 0x00, 0x22,
++	  0x01, 0x80, 0x7A, 0x1A, 0x1A, 0x00, 0x00, 0x00,
++	  0x50, 0x03, 0x16, 0x02, 0x0D, 0x82, 0x09, 0x02,
++	  0x04, 0x45, 0x3F, 0x30, 0x40, 0x20,
++	  },
++	 {			/*  Init_SR80_SR93 */
++	  0xFF, 0x07, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3A,
++	  0xF7, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x3A, 0x3A,
++	  0x00, 0x00, 0x00, 0x00,
++	  },
++	 {			/*  Init_SRA0_SRAF */
++	  0x00, 0xFB, 0x9F, 0x01, 0x00, 0xED, 0xED, 0xED,
++	  0x7B, 0xFB, 0xFF, 0xFF, 0x97, 0xEF, 0xBF, 0xDF,
++	  },
++	 {			/*  Init_GR00_GR08 */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F,
++	  0xFF,
++	  },
++	 {			/*  Init_AR00_AR14 */
++	  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
++	  0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
++	  0x41, 0x00, 0x0F, 0x00, 0x00,
++	  },
++	 {			/*  Init_CR00_CR18 */
++	  0xA3, 0x7F, 0x7F, 0x00, 0x85, 0x16, 0x24, 0xF5,
++	  0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0x03, 0x09, 0xFF, 0x80, 0x40, 0xFF, 0x00, 0xE3,
++	  0xFF,
++	  },
++	 {			/*  Init_CR30_CR4D */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x20,
++	  0x00, 0x00, 0x00, 0x40, 0x00, 0xFF, 0xBF, 0xFF,
++	  0xA3, 0x7F, 0x00, 0x82, 0x0b, 0x6f, 0x57, 0x00,
++	  0x5c, 0x0f, 0xE0, 0xe0, 0x7F, 0x57,
++	  },
++	 {			/*  Init_CR90_CRA7 */
++	  0x55, 0xD9, 0x5D, 0xE1, 0x86, 0x1B, 0x8E, 0x26,
++	  0xDA, 0x8D, 0xDE, 0x94, 0x00, 0x00, 0x18, 0x00,
++	  0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x15, 0x03,
++	  },
++	 },
++	{			/*  mode#5: 1024 x 768  24Bpp  60Hz */
++	 1024, 768, 24, 60,
++	 /*  Init_MISC */
++	 0xEB,
++	 {			/*  Init_SR0_SR4 */
++	  0x03, 0x01, 0x0F, 0x03, 0x0E,
++	  },
++	 {			/*  Init_SR10_SR24 */
++	  0xF3, 0xB6, 0xC0, 0xDD, 0x00, 0x0E, 0x17, 0x2C,
++	  0x99, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0xC4, 0x30, 0x02, 0x01, 0x01,
++	  },
++	 {			/*  Init_SR30_SR75 */
++	  0x38, 0x03, 0x20, 0x09, 0xC0, 0x3A, 0x3A, 0x3A,
++	  0x3A, 0x3A, 0x3A, 0x3A, 0x00, 0x00, 0x03, 0xFF,
++	  0x00, 0xFC, 0x00, 0x00, 0x20, 0x18, 0x00, 0xFC,
++	  0x20, 0x0C, 0x44, 0x20, 0x00, 0x00, 0x00, 0x3A,
++	  0x06, 0x68, 0xA7, 0x7F, 0x83, 0x24, 0xFF, 0x03,
++	  0x00, 0x60, 0x59, 0x3A, 0x3A, 0x00, 0x00, 0x3A,
++	  0x01, 0x80, 0x7E, 0x1A, 0x1A, 0x00, 0x00, 0x00,
++	  0x50, 0x03, 0x74, 0x14, 0x3B, 0x0D, 0x09, 0x02,
++	  0x04, 0x45, 0x30, 0x30, 0x40, 0x20,
++	  },
++	 {			/*  Init_SR80_SR93 */
++	  0xFF, 0x07, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3A,
++	  0xF7, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x3A, 0x3A,
++	  0x00, 0x00, 0x00, 0x00,
++	  },
++	 {			/*  Init_SRA0_SRAF */
++	  0x00, 0xFB, 0x9F, 0x01, 0x00, 0xED, 0xED, 0xED,
++	  0x7B, 0xFB, 0xFF, 0xFF, 0x97, 0xEF, 0xBF, 0xDF,
++	  },
++	 {			/*  Init_GR00_GR08 */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F,
++	  0xFF,
++	  },
++	 {			/*  Init_AR00_AR14 */
++	  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
++	  0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
++	  0x41, 0x00, 0x0F, 0x00, 0x00,
++	  },
++	 {			/*  Init_CR00_CR18 */
++	  0xA3, 0x7F, 0x7F, 0x00, 0x85, 0x16, 0x24, 0xF5,
++	  0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0x03, 0x09, 0xFF, 0x80, 0x40, 0xFF, 0x00, 0xE3,
++	  0xFF,
++	  },
++	 {			/*  Init_CR30_CR4D */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x20,
++	  0x00, 0x00, 0x00, 0x40, 0x00, 0xFF, 0xBF, 0xFF,
++	  0xA3, 0x7F, 0x00, 0x86, 0x15, 0x24, 0xFF, 0x00,
++	  0x01, 0x07, 0xE5, 0x20, 0x7F, 0xFF,
++	  },
++	 {			/*  Init_CR90_CRA7 */
++	  0x55, 0xD9, 0x5D, 0xE1, 0x86, 0x1B, 0x8E, 0x26,
++	  0xDA, 0x8D, 0xDE, 0x94, 0x00, 0x00, 0x18, 0x00,
++	  0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x15, 0x03,
++	  },
++	 },
++	{			/*  mode#4: 1024 x 768  32Bpp  60Hz */
++	 1024, 768, 32, 60,
++	 /*  Init_MISC */
++	 0xEB,
++	 {			/*  Init_SR0_SR4 */
++	  0x03, 0x01, 0x0F, 0x03, 0x0E,
++	  },
++	 {			/*  Init_SR10_SR24 */
++	  0xF3, 0xB6, 0xC0, 0xDD, 0x00, 0x0E, 0x17, 0x2C,
++	  0x99, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0xC4, 0x32, 0x02, 0x01, 0x01,
++	  },
++	 {			/*  Init_SR30_SR75 */
++	  0x38, 0x03, 0x20, 0x09, 0xC0, 0x3A, 0x3A, 0x3A,
++	  0x3A, 0x3A, 0x3A, 0x3A, 0x00, 0x00, 0x03, 0xFF,
++	  0x00, 0xFC, 0x00, 0x00, 0x20, 0x18, 0x00, 0xFC,
++	  0x20, 0x0C, 0x44, 0x20, 0x00, 0x00, 0x00, 0x3A,
++	  0x06, 0x68, 0xA7, 0x7F, 0x83, 0x24, 0xFF, 0x03,
++	  0x00, 0x60, 0x59, 0x3A, 0x3A, 0x00, 0x00, 0x3A,
++	  0x01, 0x80, 0x7E, 0x1A, 0x1A, 0x00, 0x00, 0x00,
++	  0x50, 0x03, 0x74, 0x14, 0x3B, 0x0D, 0x09, 0x02,
++	  0x04, 0x45, 0x30, 0x30, 0x40, 0x20,
++	  },
++	 {			/*  Init_SR80_SR93 */
++	  0xFF, 0x07, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3A,
++	  0xF7, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x3A, 0x3A,
++	  0x00, 0x00, 0x00, 0x00,
++	  },
++	 {			/*  Init_SRA0_SRAF */
++	  0x00, 0xFB, 0x9F, 0x01, 0x00, 0xED, 0xED, 0xED,
++	  0x7B, 0xFB, 0xFF, 0xFF, 0x97, 0xEF, 0xBF, 0xDF,
++	  },
++	 {			/*  Init_GR00_GR08 */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F,
++	  0xFF,
++	  },
++	 {			/*  Init_AR00_AR14 */
++	  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
++	  0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
++	  0x41, 0x00, 0x0F, 0x00, 0x00,
++	  },
++	 {			/*  Init_CR00_CR18 */
++	  0xA3, 0x7F, 0x7F, 0x00, 0x85, 0x16, 0x24, 0xF5,
++	  0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0x03, 0x09, 0xFF, 0x80, 0x40, 0xFF, 0x00, 0xE3,
++	  0xFF,
++	  },
++	 {			/*  Init_CR30_CR4D */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x20,
++	  0x00, 0x00, 0x00, 0x40, 0x00, 0xFF, 0xBF, 0xFF,
++	  0xA3, 0x7F, 0x00, 0x86, 0x15, 0x24, 0xFF, 0x00,
++	  0x01, 0x07, 0xE5, 0x20, 0x7F, 0xFF,
++	  },
++	 {			/*  Init_CR90_CRA7 */
++	  0x55, 0xD9, 0x5D, 0xE1, 0x86, 0x1B, 0x8E, 0x26,
++	  0xDA, 0x8D, 0xDE, 0x94, 0x00, 0x00, 0x18, 0x00,
++	  0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x15, 0x03,
++	  },
++	 },
++	{			/*  mode#6: 320 x 240  16Bpp  60Hz */
++	 320, 240, 16, 60,
++	 /*  Init_MISC */
++	 0xEB,
++	 {			/*  Init_SR0_SR4 */
++	  0x03, 0x01, 0x0F, 0x03, 0x0E,
++	  },
++	 {			/*  Init_SR10_SR24 */
++	  0xF3, 0xB6, 0xC0, 0xDD, 0x00, 0x0E, 0x17, 0x2C,
++	  0x99, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0xC4, 0x32, 0x02, 0x01, 0x01,
++	  },
++	 {			/*  Init_SR30_SR75 */
++	  0x38, 0x03, 0x20, 0x09, 0xC0, 0x3A, 0x3A, 0x3A,
++	  0x3A, 0x3A, 0x3A, 0x3A, 0x00, 0x00, 0x03, 0xFF,
++	  0x00, 0xFC, 0x00, 0x00, 0x20, 0x18, 0x00, 0xFC,
++	  0x20, 0x0C, 0x44, 0x20, 0x00, 0x00, 0x00, 0x3A,
++	  0x06, 0x68, 0xA7, 0x7F, 0x83, 0x24, 0xFF, 0x03,
++	  0x00, 0x60, 0x59, 0x3A, 0x3A, 0x00, 0x00, 0x3A,
++	  0x01, 0x80, 0x7E, 0x1A, 0x1A, 0x00, 0x00, 0x00,
++	  0x50, 0x03, 0x74, 0x14, 0x08, 0x43, 0x08, 0x43,
++	  0x04, 0x45, 0x30, 0x30, 0x40, 0x20,
++	  },
++	 {			/*  Init_SR80_SR93 */
++	  0xFF, 0x07, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3A,
++	  0xF7, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x3A, 0x3A,
++	  0x00, 0x00, 0x00, 0x00,
++	  },
++	 {			/*  Init_SRA0_SRAF */
++	  0x00, 0xFB, 0x9F, 0x01, 0x00, 0xED, 0xED, 0xED,
++	  0x7B, 0xFB, 0xFF, 0xFF, 0x97, 0xEF, 0xBF, 0xDF,
++	  },
++	 {			/*  Init_GR00_GR08 */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F,
++	  0xFF,
++	  },
++	 {			/*  Init_AR00_AR14 */
++	  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
++	  0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
++	  0x41, 0x00, 0x0F, 0x00, 0x00,
++	  },
++	 {			/*  Init_CR00_CR18 */
++	  0xA3, 0x7F, 0x7F, 0x00, 0x85, 0x16, 0x24, 0xF5,
++	  0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0x03, 0x09, 0xFF, 0x80, 0x40, 0xFF, 0x00, 0xE3,
++	  0xFF,
++	  },
++	 {			/*  Init_CR30_CR4D */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x20,
++	  0x00, 0x00, 0x30, 0x40, 0x00, 0xFF, 0xBF, 0xFF,
++	  0x2E, 0x27, 0x00, 0x2b, 0x0c, 0x0F, 0xEF, 0x00,
++	  0xFe, 0x0f, 0x01, 0xC0, 0x27, 0xEF,
++	  },
++	 {			/*  Init_CR90_CRA7 */
++	  0x55, 0xD9, 0x5D, 0xE1, 0x86, 0x1B, 0x8E, 0x26,
++	  0xDA, 0x8D, 0xDE, 0x94, 0x00, 0x00, 0x18, 0x00,
++	  0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x15, 0x03,
++	  },
++	 },
++
++	{			/*  mode#8: 320 x 240  32Bpp  60Hz */
++	 320, 240, 32, 60,
++	 /*  Init_MISC */
++	 0xEB,
++	 {			/*  Init_SR0_SR4 */
++	  0x03, 0x01, 0x0F, 0x03, 0x0E,
++	  },
++	 {			/*  Init_SR10_SR24 */
++	  0xF3, 0xB6, 0xC0, 0xDD, 0x00, 0x0E, 0x17, 0x2C,
++	  0x99, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0xC4, 0x32, 0x02, 0x01, 0x01,
++	  },
++	 {			/*  Init_SR30_SR75 */
++	  0x38, 0x03, 0x20, 0x09, 0xC0, 0x3A, 0x3A, 0x3A,
++	  0x3A, 0x3A, 0x3A, 0x3A, 0x00, 0x00, 0x03, 0xFF,
++	  0x00, 0xFC, 0x00, 0x00, 0x20, 0x18, 0x00, 0xFC,
++	  0x20, 0x0C, 0x44, 0x20, 0x00, 0x00, 0x00, 0x3A,
++	  0x06, 0x68, 0xA7, 0x7F, 0x83, 0x24, 0xFF, 0x03,
++	  0x00, 0x60, 0x59, 0x3A, 0x3A, 0x00, 0x00, 0x3A,
++	  0x01, 0x80, 0x7E, 0x1A, 0x1A, 0x00, 0x00, 0x00,
++	  0x50, 0x03, 0x74, 0x14, 0x08, 0x43, 0x08, 0x43,
++	  0x04, 0x45, 0x30, 0x30, 0x40, 0x20,
++	  },
++	 {			/*  Init_SR80_SR93 */
++	  0xFF, 0x07, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3A,
++	  0xF7, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x3A, 0x3A,
++	  0x00, 0x00, 0x00, 0x00,
++	  },
++	 {			/*  Init_SRA0_SRAF */
++	  0x00, 0xFB, 0x9F, 0x01, 0x00, 0xED, 0xED, 0xED,
++	  0x7B, 0xFB, 0xFF, 0xFF, 0x97, 0xEF, 0xBF, 0xDF,
++	  },
++	 {			/*  Init_GR00_GR08 */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F,
++	  0xFF,
++	  },
++	 {			/*  Init_AR00_AR14 */
++	  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
++	  0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
++	  0x41, 0x00, 0x0F, 0x00, 0x00,
++	  },
++	 {			/*  Init_CR00_CR18 */
++	  0xA3, 0x7F, 0x7F, 0x00, 0x85, 0x16, 0x24, 0xF5,
++	  0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++	  0x03, 0x09, 0xFF, 0x80, 0x40, 0xFF, 0x00, 0xE3,
++	  0xFF,
++	  },
++	 {			/*  Init_CR30_CR4D */
++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x20,
++	  0x00, 0x00, 0x30, 0x40, 0x00, 0xFF, 0xBF, 0xFF,
++	  0x2E, 0x27, 0x00, 0x2b, 0x0c, 0x0F, 0xEF, 0x00,
++	  0xFe, 0x0f, 0x01, 0xC0, 0x27, 0xEF,
++	  },
++	 {			/*  Init_CR90_CRA7 */
++	  0x55, 0xD9, 0x5D, 0xE1, 0x86, 0x1B, 0x8E, 0x26,
++	  0xDA, 0x8D, 0xDE, 0x94, 0x00, 0x00, 0x18, 0x00,
++	  0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x15, 0x03,
++	  },
++	 },
++};
++
++#define numVGAModes		ARRAY_SIZE(VGAMode)
+diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
+new file mode 100644
+index 0000000..c550b71
+--- /dev/null
++++ b/drivers/staging/sm7xxfb/sm7xxfb.c
+@@ -0,0 +1,1026 @@
++/*
++ * Silicon Motion SM7XX frame buffer device
++ *
++ * Copyright (C) 2006 Silicon Motion Technology Corp.
++ * Authors:  Ge Wang, gewang at siliconmotion.com
++ *	     Boyod boyod.yang at siliconmotion.com.cn
++ *
++ * Copyright (C) 2009 Lemote, Inc.
++ * Author:   Wu Zhangjin, wuzhangjin at gmail.com
++ *
++ * Copyright (C) 2011 Igalia, S.L.
++ * Author:   Javier M. Mellid <jmunhoz at igalia.com>
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ *
++ * Framebuffer driver for Silicon Motion SM710, SM712, SM721 and SM722 chips
++ */
++
++#include <linux/io.h>
++#include <linux/fb.h>
++#include <linux/pci.h>
++#include <linux/init.h>
++#include <linux/slab.h>
++#include <linux/uaccess.h>
++#include <linux/module.h>
++#include <linux/console.h>
++#include <linux/screen_info.h>
++
++#ifdef CONFIG_PM
++#include <linux/pm.h>
++#endif
++
++#include "sm7xx.h"
++
++/*
++* Private structure
++*/
++struct smtcfb_info {
++	struct pci_dev *pdev;
++	struct fb_info fb;
++	u16 chip_id;
++	u8  chip_rev_id;
++
++	void __iomem *lfb;	/* linear frame buffer */
++	void __iomem *dp_regs;	/* drawing processor control regs */
++	void __iomem *vp_regs;	/* video processor control regs */
++	void __iomem *cp_regs;	/* capture processor control regs */
++	void __iomem *mmio;	/* memory map IO port */
++
++	u_int width;
++	u_int height;
++	u_int hz;
++
++	u32 colreg[17];
++};
++
++void __iomem *smtc_RegBaseAddress;	/* Memory Map IO starting address */
++
++static struct fb_var_screeninfo smtcfb_var = {
++	.xres           = 1024,
++	.yres           = 600,
++	.xres_virtual   = 1024,
++	.yres_virtual   = 600,
++	.bits_per_pixel = 16,
++	.red            = {16, 8, 0},
++	.green          = {8, 8, 0},
++	.blue           = {0, 8, 0},
++	.activate       = FB_ACTIVATE_NOW,
++	.height         = -1,
++	.width          = -1,
++	.vmode          = FB_VMODE_NONINTERLACED,
++	.nonstd         = 0,
++	.accel_flags    = FB_ACCELF_TEXT,
++};
++
++static struct fb_fix_screeninfo smtcfb_fix = {
++	.id             = "smXXXfb",
++	.type           = FB_TYPE_PACKED_PIXELS,
++	.visual         = FB_VISUAL_TRUECOLOR,
++	.line_length    = 800 * 3,
++	.accel          = FB_ACCEL_SMI_LYNX,
++	.type_aux       = 0,
++	.xpanstep       = 0,
++	.ypanstep       = 0,
++	.ywrapstep      = 0,
++};
++
++struct vesa_mode {
++	char index[6];
++	u16  lfb_width;
++	u16  lfb_height;
++	u16  lfb_depth;
++};
++
++static struct vesa_mode vesa_mode_table[] = {
++	{"0x301", 640,  480,  8},
++	{"0x303", 800,  600,  8},
++	{"0x305", 1024, 768,  8},
++	{"0x307", 1280, 1024, 8},
++
++	{"0x311", 640,  480,  16},
++	{"0x314", 800,  600,  16},
++	{"0x317", 1024, 768,  16},
++	{"0x31A", 1280, 1024, 16},
++
++	{"0x312", 640,  480,  24},
++	{"0x315", 800,  600,  24},
++	{"0x318", 1024, 768,  24},
++	{"0x31B", 1280, 1024, 24},
++};
++
++struct screen_info smtc_scr_info;
++
++/* process command line options, get vga parameter */
++static int __init sm7xx_vga_setup(char *options)
++{
++	int i;
++
++	if (!options || !*options)
++		return -EINVAL;
++
++	smtc_scr_info.lfb_width = 0;
++	smtc_scr_info.lfb_height = 0;
++	smtc_scr_info.lfb_depth = 0;
++
++	pr_debug("sm7xx_vga_setup = %s\n", options);
++
++	for (i = 0; i < ARRAY_SIZE(vesa_mode_table); i++) {
++		if (strstr(options, vesa_mode_table[i].index)) {
++			smtc_scr_info.lfb_width  = vesa_mode_table[i].lfb_width;
++			smtc_scr_info.lfb_height =
++						vesa_mode_table[i].lfb_height;
++			smtc_scr_info.lfb_depth  = vesa_mode_table[i].lfb_depth;
++			return 0;
++		}
++	}
++
++	return -1;
++}
++__setup("vga=", sm7xx_vga_setup);
++
++static void sm712_setpalette(int regno, unsigned red, unsigned green,
++			     unsigned blue, struct fb_info *info)
++{
++	/* set bit 5:4 = 01 (write LCD RAM only) */
++	smtc_seqw(0x66, (smtc_seqr(0x66) & 0xC3) | 0x10);
++
++	smtc_mmiowb(regno, dac_reg);
++	smtc_mmiowb(red >> 10, dac_val);
++	smtc_mmiowb(green >> 10, dac_val);
++	smtc_mmiowb(blue >> 10, dac_val);
++}
++
++/* chan_to_field
++ *
++ * convert a colour value into a field position
++ *
++ * from pxafb.c
++ */
++
++static inline unsigned int chan_to_field(unsigned int chan,
++					 struct fb_bitfield *bf)
++{
++	chan &= 0xffff;
++	chan >>= 16 - bf->length;
++	return chan << bf->offset;
++}
++
++static int smtc_blank(int blank_mode, struct fb_info *info)
++{
++	/* clear DPMS setting */
++	switch (blank_mode) {
++	case FB_BLANK_UNBLANK:
++		/* Screen On: HSync: On, VSync : On */
++		smtc_seqw(0x01, (smtc_seqr(0x01) & (~0x20)));
++		smtc_seqw(0x6a, 0x16);
++		smtc_seqw(0x6b, 0x02);
++		smtc_seqw(0x21, (smtc_seqr(0x21) & 0x77));
++		smtc_seqw(0x22, (smtc_seqr(0x22) & (~0x30)));
++		smtc_seqw(0x23, (smtc_seqr(0x23) & (~0xc0)));
++		smtc_seqw(0x24, (smtc_seqr(0x24) | 0x01));
++		smtc_seqw(0x31, (smtc_seqr(0x31) | 0x03));
++		break;
++	case FB_BLANK_NORMAL:
++		/* Screen Off: HSync: On, VSync : On   Soft blank */
++		smtc_seqw(0x01, (smtc_seqr(0x01) & (~0x20)));
++		smtc_seqw(0x6a, 0x16);
++		smtc_seqw(0x6b, 0x02);
++		smtc_seqw(0x22, (smtc_seqr(0x22) & (~0x30)));
++		smtc_seqw(0x23, (smtc_seqr(0x23) & (~0xc0)));
++		smtc_seqw(0x24, (smtc_seqr(0x24) | 0x01));
++		smtc_seqw(0x31, ((smtc_seqr(0x31) & (~0x07)) | 0x00));
++		break;
++	case FB_BLANK_VSYNC_SUSPEND:
++		/* Screen On: HSync: On, VSync : Off */
++		smtc_seqw(0x01, (smtc_seqr(0x01) | 0x20));
++		smtc_seqw(0x20, (smtc_seqr(0x20) & (~0xB0)));
++		smtc_seqw(0x6a, 0x0c);
++		smtc_seqw(0x6b, 0x02);
++		smtc_seqw(0x21, (smtc_seqr(0x21) | 0x88));
++		smtc_seqw(0x22, ((smtc_seqr(0x22) & (~0x30)) | 0x20));
++		smtc_seqw(0x23, ((smtc_seqr(0x23) & (~0xc0)) | 0x20));
++		smtc_seqw(0x24, (smtc_seqr(0x24) & (~0x01)));
++		smtc_seqw(0x31, ((smtc_seqr(0x31) & (~0x07)) | 0x00));
++		smtc_seqw(0x34, (smtc_seqr(0x34) | 0x80));
++		break;
++	case FB_BLANK_HSYNC_SUSPEND:
++		/* Screen On: HSync: Off, VSync : On */
++		smtc_seqw(0x01, (smtc_seqr(0x01) | 0x20));
++		smtc_seqw(0x20, (smtc_seqr(0x20) & (~0xB0)));
++		smtc_seqw(0x6a, 0x0c);
++		smtc_seqw(0x6b, 0x02);
++		smtc_seqw(0x21, (smtc_seqr(0x21) | 0x88));
++		smtc_seqw(0x22, ((smtc_seqr(0x22) & (~0x30)) | 0x10));
++		smtc_seqw(0x23, ((smtc_seqr(0x23) & (~0xc0)) | 0xD8));
++		smtc_seqw(0x24, (smtc_seqr(0x24) & (~0x01)));
++		smtc_seqw(0x31, ((smtc_seqr(0x31) & (~0x07)) | 0x00));
++		smtc_seqw(0x34, (smtc_seqr(0x34) | 0x80));
++		break;
++	case FB_BLANK_POWERDOWN:
++		/* Screen On: HSync: Off, VSync : Off */
++		smtc_seqw(0x01, (smtc_seqr(0x01) | 0x20));
++		smtc_seqw(0x20, (smtc_seqr(0x20) & (~0xB0)));
++		smtc_seqw(0x6a, 0x0c);
++		smtc_seqw(0x6b, 0x02);
++		smtc_seqw(0x21, (smtc_seqr(0x21) | 0x88));
++		smtc_seqw(0x22, ((smtc_seqr(0x22) & (~0x30)) | 0x30));
++		smtc_seqw(0x23, ((smtc_seqr(0x23) & (~0xc0)) | 0xD8));
++		smtc_seqw(0x24, (smtc_seqr(0x24) & (~0x01)));
++		smtc_seqw(0x31, ((smtc_seqr(0x31) & (~0x07)) | 0x00));
++		smtc_seqw(0x34, (smtc_seqr(0x34) | 0x80));
++		break;
++	default:
++		return -EINVAL;
++	}
++
++	return 0;
++}
++
++static int smtc_setcolreg(unsigned regno, unsigned red, unsigned green,
++			  unsigned blue, unsigned trans, struct fb_info *info)
++{
++	struct smtcfb_info *sfb;
++	u32 val;
++
++	sfb = info->par;
++
++	if (regno > 255)
++		return 1;
++
++	switch (sfb->fb.fix.visual) {
++	case FB_VISUAL_DIRECTCOLOR:
++	case FB_VISUAL_TRUECOLOR:
++		/*
++		 * 16/32 bit true-colour, use pseudo-palette for 16 base color
++		 */
++		if (regno < 16) {
++			if (sfb->fb.var.bits_per_pixel == 16) {
++				u32 *pal = sfb->fb.pseudo_palette;
++				val = chan_to_field(red, &sfb->fb.var.red);
++				val |= chan_to_field(green, &sfb->fb.var.green);
++				val |= chan_to_field(blue, &sfb->fb.var.blue);
++#ifdef __BIG_ENDIAN
++				pal[regno] =
++				    ((red & 0xf800) >> 8) |
++				    ((green & 0xe000) >> 13) |
++				    ((green & 0x1c00) << 3) |
++				    ((blue & 0xf800) >> 3);
++#else
++				pal[regno] = val;
++#endif
++			} else {
++				u32 *pal = sfb->fb.pseudo_palette;
++				val = chan_to_field(red, &sfb->fb.var.red);
++				val |= chan_to_field(green, &sfb->fb.var.green);
++				val |= chan_to_field(blue, &sfb->fb.var.blue);
++#ifdef __BIG_ENDIAN
++				val =
++				    (val & 0xff00ff00 >> 8) |
++				    (val & 0x00ff00ff << 8);
++#endif
++				pal[regno] = val;
++			}
++		}
++		break;
++
++	case FB_VISUAL_PSEUDOCOLOR:
++		/* color depth 8 bit */
++		sm712_setpalette(regno, red, green, blue, info);
++		break;
++
++	default:
++		return 1;	/* unknown type */
++	}
++
++	return 0;
++
++}
++
++#ifdef __BIG_ENDIAN
++static ssize_t smtcfb_read(struct fb_info *info, char __user *buf, size_t
++				count, loff_t *ppos)
++{
++	unsigned long p = *ppos;
++
++	u32 *buffer, *dst;
++	u32 __iomem *src;
++	int c, i, cnt = 0, err = 0;
++	unsigned long total_size;
++
++	if (!info || !info->screen_base)
++		return -ENODEV;
++
++	if (info->state != FBINFO_STATE_RUNNING)
++		return -EPERM;
++
++	total_size = info->screen_size;
++
++	if (total_size == 0)
++		total_size = info->fix.smem_len;
++
++	if (p >= total_size)
++		return 0;
++
++	if (count >= total_size)
++		count = total_size;
++
++	if (count + p > total_size)
++		count = total_size - p;
++
++	buffer = kmalloc((count > PAGE_SIZE) ? PAGE_SIZE : count, GFP_KERNEL);
++	if (!buffer)
++		return -ENOMEM;
++
++	src = (u32 __iomem *) (info->screen_base + p);
++
++	if (info->fbops->fb_sync)
++		info->fbops->fb_sync(info);
++
++	while (count) {
++		c = (count > PAGE_SIZE) ? PAGE_SIZE : count;
++		dst = buffer;
++		for (i = c >> 2; i--;) {
++			*dst = fb_readl(src++);
++			*dst =
++			    (*dst & 0xff00ff00 >> 8) |
++			    (*dst & 0x00ff00ff << 8);
++			dst++;
++		}
++		if (c & 3) {
++			u8 *dst8 = (u8 *) dst;
++			u8 __iomem *src8 = (u8 __iomem *) src;
++
++			for (i = c & 3; i--;) {
++				if (i & 1) {
++					*dst8++ = fb_readb(++src8);
++				} else {
++					*dst8++ = fb_readb(--src8);
++					src8 += 2;
++				}
++			}
++			src = (u32 __iomem *) src8;
++		}
++
++		if (copy_to_user(buf, buffer, c)) {
++			err = -EFAULT;
++			break;
++		}
++		*ppos += c;
++		buf += c;
++		cnt += c;
++		count -= c;
++	}
++
++	kfree(buffer);
++
++	return (err) ? err : cnt;
++}
++
++static ssize_t
++smtcfb_write(struct fb_info *info, const char __user *buf, size_t count,
++	     loff_t *ppos)
++{
++	unsigned long p = *ppos;
++
++	u32 *buffer, *src;
++	u32 __iomem *dst;
++	int c, i, cnt = 0, err = 0;
++	unsigned long total_size;
++
++	if (!info || !info->screen_base)
++		return -ENODEV;
++
++	if (info->state != FBINFO_STATE_RUNNING)
++		return -EPERM;
++
++	total_size = info->screen_size;
++
++	if (total_size == 0)
++		total_size = info->fix.smem_len;
++
++	if (p > total_size)
++		return -EFBIG;
++
++	if (count > total_size) {
++		err = -EFBIG;
++		count = total_size;
++	}
++
++	if (count + p > total_size) {
++		if (!err)
++			err = -ENOSPC;
++
++		count = total_size - p;
++	}
++
++	buffer = kmalloc((count > PAGE_SIZE) ? PAGE_SIZE : count, GFP_KERNEL);
++	if (!buffer)
++		return -ENOMEM;
++
++	dst = (u32 __iomem *) (info->screen_base + p);
++
++	if (info->fbops->fb_sync)
++		info->fbops->fb_sync(info);
++
++	while (count) {
++		c = (count > PAGE_SIZE) ? PAGE_SIZE : count;
++		src = buffer;
++
++		if (copy_from_user(src, buf, c)) {
++			err = -EFAULT;
++			break;
++		}
++
++		for (i = c >> 2; i--;) {
++			fb_writel((*src & 0xff00ff00 >> 8) |
++				  (*src & 0x00ff00ff << 8), dst++);
++			src++;
++		}
++		if (c & 3) {
++			u8 *src8 = (u8 *) src;
++			u8 __iomem *dst8 = (u8 __iomem *) dst;
++
++			for (i = c & 3; i--;) {
++				if (i & 1) {
++					fb_writeb(*src8++, ++dst8);
++				} else {
++					fb_writeb(*src8++, --dst8);
++					dst8 += 2;
++				}
++			}
++			dst = (u32 __iomem *) dst8;
++		}
++
++		*ppos += c;
++		buf += c;
++		cnt += c;
++		count -= c;
++	}
++
++	kfree(buffer);
++
++	return (cnt) ? cnt : err;
++}
++#endif	/* ! __BIG_ENDIAN */
++
++static void sm7xx_set_timing(struct smtcfb_info *sfb)
++{
++	int i = 0, j = 0;
++	u32 m_nScreenStride;
++
++	dev_dbg(&sfb->pdev->dev,
++		"sfb->width=%d sfb->height=%d sfb->fb.var.bits_per_pixel=%d sfb->hz=%d\n",
++		sfb->width, sfb->height, sfb->fb.var.bits_per_pixel, sfb->hz);
++
++	for (j = 0; j < numVGAModes; j++) {
++		if (VGAMode[j].mmSizeX == sfb->width &&
++		    VGAMode[j].mmSizeY == sfb->height &&
++		    VGAMode[j].bpp == sfb->fb.var.bits_per_pixel &&
++		    VGAMode[j].hz == sfb->hz) {
++
++			dev_dbg(&sfb->pdev->dev,
++				"VGAMode[j].mmSizeX=%d VGAMode[j].mmSizeY=%d VGAMode[j].bpp=%d VGAMode[j].hz=%d\n",
++				VGAMode[j].mmSizeX, VGAMode[j].mmSizeY,
++				VGAMode[j].bpp, VGAMode[j].hz);
++
++			dev_dbg(&sfb->pdev->dev, "VGAMode index=%d\n", j);
++
++			smtc_mmiowb(0x0, 0x3c6);
++
++			smtc_seqw(0, 0x1);
++
++			smtc_mmiowb(VGAMode[j].Init_MISC, 0x3c2);
++
++			/* init SEQ register SR00 - SR04 */
++			for (i = 0; i < SIZE_SR00_SR04; i++)
++				smtc_seqw(i, VGAMode[j].Init_SR00_SR04[i]);
++
++			/* init SEQ register SR10 - SR24 */
++			for (i = 0; i < SIZE_SR10_SR24; i++)
++				smtc_seqw(i + 0x10,
++					  VGAMode[j].Init_SR10_SR24[i]);
++
++			/* init SEQ register SR30 - SR75 */
++			for (i = 0; i < SIZE_SR30_SR75; i++)
++				if ((i + 0x30) != 0x62 &&
++				    (i + 0x30) != 0x6a &&
++				    (i + 0x30) != 0x6b)
++					smtc_seqw(i + 0x30,
++						VGAMode[j].Init_SR30_SR75[i]);
++
++			/* init SEQ register SR80 - SR93 */
++			for (i = 0; i < SIZE_SR80_SR93; i++)
++				smtc_seqw(i + 0x80,
++					  VGAMode[j].Init_SR80_SR93[i]);
++
++			/* init SEQ register SRA0 - SRAF */
++			for (i = 0; i < SIZE_SRA0_SRAF; i++)
++				smtc_seqw(i + 0xa0,
++					  VGAMode[j].Init_SRA0_SRAF[i]);
++
++			/* init Graphic register GR00 - GR08 */
++			for (i = 0; i < SIZE_GR00_GR08; i++)
++				smtc_grphw(i, VGAMode[j].Init_GR00_GR08[i]);
++
++			/* init Attribute register AR00 - AR14 */
++			for (i = 0; i < SIZE_AR00_AR14; i++)
++				smtc_attrw(i, VGAMode[j].Init_AR00_AR14[i]);
++
++			/* init CRTC register CR00 - CR18 */
++			for (i = 0; i < SIZE_CR00_CR18; i++)
++				smtc_crtcw(i, VGAMode[j].Init_CR00_CR18[i]);
++
++			/* init CRTC register CR30 - CR4D */
++			for (i = 0; i < SIZE_CR30_CR4D; i++)
++				smtc_crtcw(i + 0x30,
++					   VGAMode[j].Init_CR30_CR4D[i]);
++
++			/* init CRTC register CR90 - CRA7 */
++			for (i = 0; i < SIZE_CR90_CRA7; i++)
++				smtc_crtcw(i + 0x90,
++					   VGAMode[j].Init_CR90_CRA7[i]);
++		}
++	}
++	smtc_mmiowb(0x67, 0x3c2);
++
++	/* set VPR registers */
++	writel(0x0, sfb->vp_regs + 0x0C);
++	writel(0x0, sfb->vp_regs + 0x40);
++
++	/* set data width */
++	m_nScreenStride =
++		(sfb->width * sfb->fb.var.bits_per_pixel) / 64;
++	switch (sfb->fb.var.bits_per_pixel) {
++	case 8:
++		writel(0x0, sfb->vp_regs + 0x0);
++		break;
++	case 16:
++		writel(0x00020000, sfb->vp_regs + 0x0);
++		break;
++	case 24:
++		writel(0x00040000, sfb->vp_regs + 0x0);
++		break;
++	case 32:
++		writel(0x00030000, sfb->vp_regs + 0x0);
++		break;
++	}
++	writel((u32) (((m_nScreenStride + 2) << 16) | m_nScreenStride),
++	       sfb->vp_regs + 0x10);
++
++}
++
++static void smtc_set_timing(struct smtcfb_info *sfb)
++{
++	switch (sfb->chip_id) {
++	case 0x710:
++	case 0x712:
++	case 0x720:
++		sm7xx_set_timing(sfb);
++		break;
++	}
++}
++
++static void smtcfb_setmode(struct smtcfb_info *sfb)
++{
++	switch (sfb->fb.var.bits_per_pixel) {
++	case 32:
++		sfb->fb.fix.visual       = FB_VISUAL_TRUECOLOR;
++		sfb->fb.fix.line_length  = sfb->fb.var.xres * 4;
++		sfb->fb.var.red.length   = 8;
++		sfb->fb.var.green.length = 8;
++		sfb->fb.var.blue.length  = 8;
++		sfb->fb.var.red.offset   = 16;
++		sfb->fb.var.green.offset = 8;
++		sfb->fb.var.blue.offset  = 0;
++		break;
++	case 24:
++		sfb->fb.fix.visual       = FB_VISUAL_TRUECOLOR;
++		sfb->fb.fix.line_length  = sfb->fb.var.xres * 3;
++		sfb->fb.var.red.length   = 8;
++		sfb->fb.var.green.length = 8;
++		sfb->fb.var.blue.length  = 8;
++		sfb->fb.var.red.offset   = 16;
++		sfb->fb.var.green.offset = 8;
++		sfb->fb.var.blue.offset  = 0;
++		break;
++	case 8:
++		sfb->fb.fix.visual       = FB_VISUAL_PSEUDOCOLOR;
++		sfb->fb.fix.line_length  = sfb->fb.var.xres;
++		sfb->fb.var.red.length   = 3;
++		sfb->fb.var.green.length = 3;
++		sfb->fb.var.blue.length  = 2;
++		sfb->fb.var.red.offset   = 5;
++		sfb->fb.var.green.offset = 2;
++		sfb->fb.var.blue.offset  = 0;
++		break;
++	case 16:
++	default:
++		sfb->fb.fix.visual       = FB_VISUAL_TRUECOLOR;
++		sfb->fb.fix.line_length  = sfb->fb.var.xres * 2;
++		sfb->fb.var.red.length   = 5;
++		sfb->fb.var.green.length = 6;
++		sfb->fb.var.blue.length  = 5;
++		sfb->fb.var.red.offset   = 11;
++		sfb->fb.var.green.offset = 5;
++		sfb->fb.var.blue.offset  = 0;
++		break;
++	}
++
++	sfb->width  = sfb->fb.var.xres;
++	sfb->height = sfb->fb.var.yres;
++	sfb->hz = 60;
++	smtc_set_timing(sfb);
++}
++
++static int smtc_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
++{
++	/* sanity checks */
++	if (var->xres_virtual < var->xres)
++		var->xres_virtual = var->xres;
++
++	if (var->yres_virtual < var->yres)
++		var->yres_virtual = var->yres;
++
++	/* set valid default bpp */
++	if ((var->bits_per_pixel != 8)  && (var->bits_per_pixel != 16) &&
++	    (var->bits_per_pixel != 24) && (var->bits_per_pixel != 32))
++		var->bits_per_pixel = 16;
++
++	return 0;
++}
++
++static int smtc_set_par(struct fb_info *info)
++{
++	smtcfb_setmode(info->par);
++
++	return 0;
++}
++
++static struct fb_ops smtcfb_ops = {
++	.owner        = THIS_MODULE,
++	.fb_check_var = smtc_check_var,
++	.fb_set_par   = smtc_set_par,
++	.fb_setcolreg = smtc_setcolreg,
++	.fb_blank     = smtc_blank,
++	.fb_fillrect  = cfb_fillrect,
++	.fb_imageblit = cfb_imageblit,
++	.fb_copyarea  = cfb_copyarea,
++#ifdef __BIG_ENDIAN
++	.fb_read      = smtcfb_read,
++	.fb_write     = smtcfb_write,
++#endif
++};
++
++/*
++ * alloc struct smtcfb_info and assign default values
++ */
++static struct smtcfb_info *smtc_alloc_fb_info(struct pci_dev *pdev)
++{
++	struct smtcfb_info *sfb;
++
++	sfb = kzalloc(sizeof(*sfb), GFP_KERNEL);
++
++	if (!sfb)
++		return NULL;
++
++	sfb->pdev = pdev;
++
++	sfb->fb.flags          = FBINFO_FLAG_DEFAULT;
++	sfb->fb.fbops          = &smtcfb_ops;
++	sfb->fb.fix            = smtcfb_fix;
++	sfb->fb.var            = smtcfb_var;
++	sfb->fb.pseudo_palette = sfb->colreg;
++	sfb->fb.par            = sfb;
++
++	return sfb;
++}
++
++/*
++ * free struct smtcfb_info
++ */
++static void smtc_free_fb_info(struct smtcfb_info *sfb)
++{
++	kfree(sfb);
++}
++
++/*
++ * Unmap in the memory mapped IO registers
++ */
++
++static void smtc_unmap_mmio(struct smtcfb_info *sfb)
++{
++	if (sfb && smtc_RegBaseAddress)
++		smtc_RegBaseAddress = NULL;
++}
++
++/*
++ * Map in the screen memory
++ */
++
++static int smtc_map_smem(struct smtcfb_info *sfb,
++		struct pci_dev *pdev, u_long smem_len)
++{
++
++	sfb->fb.fix.smem_start = pci_resource_start(pdev, 0);
++
++#ifdef __BIG_ENDIAN
++	if (sfb->fb.var.bits_per_pixel == 32)
++		sfb->fb.fix.smem_start += 0x800000;
++#endif
++
++	sfb->fb.fix.smem_len = smem_len;
++
++	sfb->fb.screen_base = sfb->lfb;
++
++	if (!sfb->fb.screen_base) {
++		dev_err(&pdev->dev,
++			"%s: unable to map screen memory\n", sfb->fb.fix.id);
++		return -ENOMEM;
++	}
++
++	return 0;
++}
++
++/*
++ * Unmap in the screen memory
++ *
++ */
++static void smtc_unmap_smem(struct smtcfb_info *sfb)
++{
++	if (sfb && sfb->fb.screen_base) {
++		iounmap(sfb->fb.screen_base);
++		sfb->fb.screen_base = NULL;
++	}
++}
++
++/*
++ * We need to wake up the device and make sure its in linear memory mode.
++ */
++static inline void sm7xx_init_hw(void)
++{
++	outb_p(0x18, 0x3c4);
++	outb_p(0x11, 0x3c5);
++}
++
++static int smtcfb_pci_probe(struct pci_dev *pdev,
++				   const struct pci_device_id *ent)
++{
++	struct smtcfb_info *sfb;
++	u_long smem_size = 0x00800000;	/* default 8MB */
++	int err;
++	unsigned long mmio_base;
++
++	dev_info(&pdev->dev, "Silicon Motion display driver.");
++
++	err = pci_enable_device(pdev);	/* enable SMTC chip */
++	if (err)
++		return err;
++
++	sprintf(smtcfb_fix.id, "sm%Xfb", ent->device);
++
++	sfb = smtc_alloc_fb_info(pdev);
++
++	if (!sfb) {
++		err = -ENOMEM;
++		goto failed_free;
++	}
++
++	sfb->chip_id = ent->device;
++
++	pci_set_drvdata(pdev, sfb);
++
++	sm7xx_init_hw();
++
++	/* get mode parameter from smtc_scr_info */
++	if (smtc_scr_info.lfb_width != 0) {
++		sfb->fb.var.xres = smtc_scr_info.lfb_width;
++		sfb->fb.var.yres = smtc_scr_info.lfb_height;
++		sfb->fb.var.bits_per_pixel = smtc_scr_info.lfb_depth;
++	} else {
++		/* default resolution 1024x600 16bit mode */
++		sfb->fb.var.xres = SCREEN_X_RES;
++		sfb->fb.var.yres = SCREEN_Y_RES;
++		sfb->fb.var.bits_per_pixel = SCREEN_BPP;
++	}
++
++#ifdef __BIG_ENDIAN
++	if (sfb->fb.var.bits_per_pixel == 24)
++		sfb->fb.var.bits_per_pixel = (smtc_scr_info.lfb_depth = 32);
++#endif
++	/* Map address and memory detection */
++	mmio_base = pci_resource_start(pdev, 0);
++	pci_read_config_byte(pdev, PCI_REVISION_ID, &sfb->chip_rev_id);
++
++	switch (sfb->chip_id) {
++	case 0x710:
++	case 0x712:
++		sfb->fb.fix.mmio_start = mmio_base + 0x00400000;
++		sfb->fb.fix.mmio_len = 0x00400000;
++		smem_size = SM712_VIDEOMEMORYSIZE;
++#ifdef __BIG_ENDIAN
++		sfb->lfb = ioremap(mmio_base, 0x00c00000);
++#else
++		sfb->lfb = ioremap(mmio_base, 0x00800000);
++#endif
++		sfb->mmio = (smtc_RegBaseAddress =
++		    sfb->lfb + 0x00700000);
++		sfb->dp_regs = sfb->lfb + 0x00408000;
++		sfb->vp_regs = sfb->lfb + 0x0040c000;
++#ifdef __BIG_ENDIAN
++		if (sfb->fb.var.bits_per_pixel == 32) {
++			sfb->lfb += 0x800000;
++			dev_info(&pdev->dev, "sfb->lfb=%p", sfb->lfb);
++		}
++#endif
++		if (!smtc_RegBaseAddress) {
++			dev_err(&pdev->dev,
++				"%s: unable to map memory mapped IO!",
++				sfb->fb.fix.id);
++			err = -ENOMEM;
++			goto failed_fb;
++		}
++
++		/* set MCLK = 14.31818 * (0x16 / 0x2) */
++		smtc_seqw(0x6a, 0x16);
++		smtc_seqw(0x6b, 0x02);
++		smtc_seqw(0x62, 0x3e);
++		/* enable PCI burst */
++		smtc_seqw(0x17, 0x20);
++		/* enable word swap */
++#ifdef __BIG_ENDIAN
++		if (sfb->fb.var.bits_per_pixel == 32)
++			smtc_seqw(0x17, 0x30);
++#endif
++		break;
++	case 0x720:
++		sfb->fb.fix.mmio_start = mmio_base;
++		sfb->fb.fix.mmio_len = 0x00200000;
++		smem_size = SM722_VIDEOMEMORYSIZE;
++		sfb->dp_regs = ioremap(mmio_base, 0x00a00000);
++		sfb->lfb = sfb->dp_regs + 0x00200000;
++		sfb->mmio = (smtc_RegBaseAddress =
++		    sfb->dp_regs + 0x000c0000);
++		sfb->vp_regs = sfb->dp_regs + 0x800;
++
++		smtc_seqw(0x62, 0xff);
++		smtc_seqw(0x6a, 0x0d);
++		smtc_seqw(0x6b, 0x02);
++		break;
++	default:
++		dev_err(&pdev->dev,
++			"No valid Silicon Motion display chip was detected!");
++
++		goto failed_fb;
++	}
++
++	/* can support 32 bpp */
++	if (15 == sfb->fb.var.bits_per_pixel)
++		sfb->fb.var.bits_per_pixel = 16;
++
++	sfb->fb.var.xres_virtual = sfb->fb.var.xres;
++	sfb->fb.var.yres_virtual = sfb->fb.var.yres;
++	err = smtc_map_smem(sfb, pdev, smem_size);
++	if (err)
++		goto failed;
++
++	smtcfb_setmode(sfb);
++
++	err = register_framebuffer(&sfb->fb);
++	if (err < 0)
++		goto failed;
++
++	dev_info(&pdev->dev,
++		 "Silicon Motion SM%X Rev%X primary display mode %dx%d-%d Init Complete.",
++		 sfb->chip_id, sfb->chip_rev_id, sfb->fb.var.xres,
++		 sfb->fb.var.yres, sfb->fb.var.bits_per_pixel);
++
++	return 0;
++
++failed:
++	dev_err(&pdev->dev, "Silicon Motion, Inc. primary display init fail.");
++
++	smtc_unmap_smem(sfb);
++	smtc_unmap_mmio(sfb);
++failed_fb:
++	smtc_free_fb_info(sfb);
++
++failed_free:
++	pci_disable_device(pdev);
++
++	return err;
++}
++
++/*
++ * 0x710 (LynxEM)
++ * 0x712 (LynxEM+)
++ * 0x720 (Lynx3DM, Lynx3DM+)
++ */
++static const struct pci_device_id smtcfb_pci_table[] = {
++	{ PCI_DEVICE(0x126f, 0x710), },
++	{ PCI_DEVICE(0x126f, 0x712), },
++	{ PCI_DEVICE(0x126f, 0x720), },
++	{0,}
++};
++
++static void smtcfb_pci_remove(struct pci_dev *pdev)
++{
++	struct smtcfb_info *sfb;
++
++	sfb = pci_get_drvdata(pdev);
++	smtc_unmap_smem(sfb);
++	smtc_unmap_mmio(sfb);
++	unregister_framebuffer(&sfb->fb);
++	smtc_free_fb_info(sfb);
++}
++
++#ifdef CONFIG_PM
++static int smtcfb_pci_suspend(struct device *device)
++{
++	struct pci_dev *pdev = to_pci_dev(device);
++	struct smtcfb_info *sfb;
++
++	sfb = pci_get_drvdata(pdev);
++
++	/* set the hw in sleep mode use external clock and self memory refresh
++	 * so that we can turn off internal PLLs later on
++	 */
++	smtc_seqw(0x20, (smtc_seqr(0x20) | 0xc0));
++	smtc_seqw(0x69, (smtc_seqr(0x69) & 0xf7));
++
++	console_lock();
++	fb_set_suspend(&sfb->fb, 1);
++	console_unlock();
++
++	/* additionally turn off all function blocks including internal PLLs */
++	smtc_seqw(0x21, 0xff);
++
++	return 0;
++}
++
++static int smtcfb_pci_resume(struct device *device)
++{
++	struct pci_dev *pdev = to_pci_dev(device);
++	struct smtcfb_info *sfb;
++
++	sfb = pci_get_drvdata(pdev);
++
++	/* reinit hardware */
++	sm7xx_init_hw();
++	switch (sfb->chip_id) {
++	case 0x710:
++	case 0x712:
++		/* set MCLK = 14.31818 *  (0x16 / 0x2) */
++		smtc_seqw(0x6a, 0x16);
++		smtc_seqw(0x6b, 0x02);
++		smtc_seqw(0x62, 0x3e);
++		/* enable PCI burst */
++		smtc_seqw(0x17, 0x20);
++#ifdef __BIG_ENDIAN
++		if (sfb->fb.var.bits_per_pixel == 32)
++			smtc_seqw(0x17, 0x30);
++#endif
++		break;
++	case 0x720:
++		smtc_seqw(0x62, 0xff);
++		smtc_seqw(0x6a, 0x0d);
++		smtc_seqw(0x6b, 0x02);
++		break;
++	}
++
++	smtc_seqw(0x34, (smtc_seqr(0x34) | 0xc0));
++	smtc_seqw(0x33, ((smtc_seqr(0x33) | 0x08) & 0xfb));
++
++	smtcfb_setmode(sfb);
++
++	console_lock();
++	fb_set_suspend(&sfb->fb, 0);
++	console_unlock();
++
++	return 0;
++}
++
++static SIMPLE_DEV_PM_OPS(sm7xx_pm_ops, smtcfb_pci_suspend, smtcfb_pci_resume);
++#define SM7XX_PM_OPS (&sm7xx_pm_ops)
++
++#else  /* !CONFIG_PM */
++
++#define SM7XX_PM_OPS NULL
++
++#endif /* !CONFIG_PM */
++
++static struct pci_driver smtcfb_driver = {
++	.name = "smtcfb",
++	.id_table = smtcfb_pci_table,
++	.probe = smtcfb_pci_probe,
++	.remove = smtcfb_pci_remove,
++	.driver.pm  = SM7XX_PM_OPS,
++};
++
++module_pci_driver(smtcfb_driver);
++
++MODULE_AUTHOR("Siliconmotion ");
++MODULE_DESCRIPTION("Framebuffer driver for SMI Graphic Cards");
++MODULE_LICENSE("GPL");

Modified: dists/wheezy-backports/linux/debian/patches/features/all/Kbuild-kconfig-Verbose-version-of-listnewconfig.patch
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/features/all/Kbuild-kconfig-Verbose-version-of-listnewconfig.patch	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/features/all/Kbuild-kconfig-Verbose-version-of-listnewconfig.patch	Sun Sep 21 14:23:16 2014	(r21886)
@@ -105,7 +105,7 @@
  
 --- a/scripts/kconfig/confdata.c
 +++ b/scripts/kconfig/confdata.c
-@@ -727,6 +727,14 @@ next_menu:
+@@ -732,6 +732,14 @@ next_menu:
  	return 0;
  }
  
@@ -120,7 +120,7 @@
  int conf_write(const char *name)
  {
  	FILE *out;
-@@ -1159,7 +1167,10 @@ bool conf_set_all_new_symbols(enum conf_
+@@ -1164,7 +1172,10 @@ bool conf_set_all_new_symbols(enum conf_
  	bool has_changed = false;
  
  	for_all_symbols(i, sym) {
@@ -134,9 +134,9 @@
  		case S_BOOLEAN:
 --- a/scripts/kconfig/expr.h
 +++ b/scripts/kconfig/expr.h
-@@ -109,6 +109,8 @@ struct symbol {
- /* choice values need to be set before calculating this symbol value */
- #define SYMBOL_NEED_SET_CHOICE_VALUES  0x100000
+@@ -112,6 +112,8 @@ struct symbol {
+ /* Set symbol to y if allnoconfig; used for symbols that hide others */
+ #define SYMBOL_ALLNOCONFIG_Y 0x200000
  
 +#define SYMBOL_NEW        0x200000 /* symbol is new (loaded config did not provide a value) */
 +

Modified: dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-add.patch
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-add.patch	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-add.patch	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,7 +1,7 @@
 From: J. R. Okajima <hooanon05 at yahoo.co.jp>
-Date: Sun Jun 15 16:10:12 2014 +0900
-Subject: aufs3.14-20140616
-Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/d201c504500b2091b88aa648e5163589e29b6822/tree/
+Date: Thu Sep 4 19:46:58 2014 +0900
+Subject: aufs3.16-20140908
+Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/888949daf96bf7e2b857dc38e22029513f94d4ae/tree/
 Bug-Debian: https://bugs.debian.org/541828
 
 Patch generated by debian/patches/features/all/aufs3/gen-patch
@@ -94,8 +94,8 @@
 +		When the aufs mount option 'noxino' is specified, it
 +		will be empty. About XINO files, see the aufs manual.
 --- a/Documentation/filesystems/aufs/README	1970-01-01 01:00:00.000000000 +0100
-+++ b/Documentation/filesystems/aufs/README	2014-06-17 18:23:40.779905015 +0100
-@@ -0,0 +1,368 @@
++++ b/Documentation/filesystems/aufs/README	2014-09-08 00:38:33.510569903 +0100
+@@ -0,0 +1,370 @@
 +
 +Aufs3 -- advanced multi layered unification filesystem version 3.x
 +http://aufs.sf.net
@@ -126,7 +126,7 @@
 +    UnionMount, and he pointed out an issue around a directory mutex
 +    lock and aufs addressed it. But it is still unsure whether aufs will
 +    be merged (or any other union solution).
-+<http://lkml.org/lkml/2013/3/12/637>
++<http://marc.info/?l=linux-kernel&m=136312705029295&w=1>
 +
 +
 +1. Features
@@ -447,6 +447,8 @@
 +The Parted Magic Project made a donation (2013/9 and 11).
 +Pavel Barta made a donation (2013/10).
 +Nikolay Pertsev made a donation (2014/5).
++James B made a donation (2014/7).
++Stefano Di Biase made a donation (2014/8).
 +
 +Thank you very much.
 +Donations are always, including future donations, very important and
@@ -629,8 +631,8 @@
 +helper, instead of doing in kernel space. Actually I am still thinking
 +about it. But currently I have implemented it in kernel space.
 --- a/Documentation/filesystems/aufs/design/02struct.txt	1970-01-01 01:00:00.000000000 +0100
-+++ b/Documentation/filesystems/aufs/design/02struct.txt	2014-01-20 03:24:33.508760970 +0000
-@@ -0,0 +1,242 @@
++++ b/Documentation/filesystems/aufs/design/02struct.txt	2014-09-08 00:38:33.510569903 +0100
+@@ -0,0 +1,251 @@
 +
 +# Copyright (C) 2005-2014 Junjiro R. Okajima
 +# 
@@ -865,6 +867,15 @@
 +changes something about the file.
 +"Move-down" is an opposite action of copy-up. Basically this action is
 +ran manually instead of automatically and internally.
++For desgin and implementation, aufs has to consider these issues.
++- whiteout for the file may exist on the lower branch.
++- ancestor directories may not exist on the lower branch.
++- diropq for the ancestor directories may exist on the upper branch.
++- free space on the lower branch will reduce.
++- another access to the file may happen during moving-down, including
++  UDBA.
++- the file should not be hard-linked nor pseudo-linked. they should be
++  handled by auplink utility later.
 +
 +Sometimes users want to move-down a file from the upper writable branch
 +to the lower readonly or writable branch. For instance,
@@ -874,8 +885,8 @@
 +
 +For this purpose, use "aumvdown" command in aufs-util.git.
 --- a/Documentation/filesystems/aufs/design/03lookup.txt	1970-01-01 01:00:00.000000000 +0100
-+++ b/Documentation/filesystems/aufs/design/03lookup.txt	2014-01-20 03:24:33.508760970 +0000
-@@ -0,0 +1,105 @@
++++ b/Documentation/filesystems/aufs/design/03lookup.txt	2014-07-15 14:04:48.724871625 +0100
+@@ -0,0 +1,133 @@
 +
 +# Copyright (C) 2005-2014 Junjiro R. Okajima
 +# 
@@ -918,6 +929,34 @@
 +"Revalidate Dentry and UDBA" in detail.
 +
 +
++Test Only the Highest One for the Directory Permission (dirperm1 option)
++----------------------------------------------------------------------
++Let's try case study.
++- aufs has two branches, upper readwrite and lower readonly.
++  /au = /rw + /ro
++- "dirA" exists under /ro, but /rw. and its mode is 0700.
++- user invoked "chmod a+rx /au/dirA"
++- the internal copy-up is activated and "/rw/dirA" is created and its
++  permission bits are set to world readble.
++- then "/au/dirA" becomes world readable?
++
++In this case, /ro/dirA is still 0700 since it exists in readonly branch,
++or it may be a natively readonly filesystem. If aufs respects the lower
++branch, it should not respond readdir request from other users. But user
++allowed it by chmod. Should really aufs rejects showing the entries
++under /ro/dirA?
++
++To be honest, I don't have a best solution for this case. So aufs
++implements 'dirperm1' and 'nodirperm1' and leave it to users.
++When dirperm1 is specified, aufs checks only the highest one for the
++directory permission, and shows the entries. Otherwise, as usual, checks
++every dir existing on all branches and rejects the request.
++
++As a side effect, dirperm1 option improves the performance of aufs
++because the number of permission check is reduced when the number of
++branch is many.
++
++
 +Loopback Mount
 +----------------------------------------------------------------------
 +Basically aufs supports any type of filesystem and block device for a
@@ -1126,6 +1165,129 @@
 +  where the source and the target exists and selects the higher
 +  one. If the selected branch is readonly, then aufs follows the
 +  copyup policy.
+--- a/Documentation/filesystems/aufs/design/06fhsm.txt	1970-01-01 01:00:00.000000000 +0100
++++ b/Documentation/filesystems/aufs/design/06fhsm.txt	2014-09-08 00:38:33.510569903 +0100
+@@ -0,0 +1,120 @@
++
++# Copyright (C) 2011-2014 Junjiro R. Okajima
++# 
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++# 
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++# 
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++
++
++File-based Hierarchical Storage Management (FHSM)
++----------------------------------------------------------------------
++Hierarchical Storage Management (or HSM) is a well-known feature in the
++storage world. Aufs provides this feature as file-based with multiple
++writable branches, based upon the principle of "Colder-Lower".
++Here the word "colder" means that the less used files, and "lower" means
++that the position in the order of the stacked branches.
++These multiple writable branches are prioritized, ie. the topmost one
++should be the fastest drive and be used heavily.
++
++o Characters in aufs FHSM story
++- aufs itself and a new branch attribute.
++- a new ioctl interface to move-down and to establish a connection with
++  the daemon ("move-down" is a converse of "copy-up").
++- userspace tool and daemon.
++
++The userspace daemon establishes a connection with aufs and waits for
++the notification. The notified information is very similar to struct
++statfs containing the number of consumed blocks and inodes.
++When the consumed blocks/inodes of a branch exceeds the user-specified
++upper watermark, the daemon activates its move-down process until the
++consumed blocks/inodes reaches the user-specified lower watermark.
++
++The actual move-down is done by aufs based upon the request from
++user-space since we need to maintain the inode number and the internal
++pointer arrays in aufs.
++
++Currently aufs FHSM handles the regular files only. Additionally they
++must not be hard-linked nor pseudo-linked.
++
++
++o Cowork of aufs and the user-space daemon
++  During the userspace daemon established the connection, aufs sends a
++  small notification to it whenever aufs writes something into the
++  writable branch. But it may cost high since aufs issues statfs(2)
++  internally. So user can specify a new option to cache the
++  info. Actually the notification is controlled by these factors.
++  + the specified cache time.
++  + classified as "force" by aufs internally.
++  Until the specified time expires, aufs doesn't send the info
++  except the forced cases. When aufs decide forcing, the info is always
++  notified to userspace.
++  For example, the number of free inodes is generally large enough and
++  the shortage of it happens rarely. So aufs doesn't force the
++  notification when creating a new file, directory and others. This is
++  the typical case which aufs doesn't force.
++  When aufs writes the actual filedata and the files consumes any of new
++  blocks, the aufs forces notifying.
++
++
++o Interfaces in aufs
++- New branch attribute.
++  + fhsm
++    Specifies that the branch is managed by FHSM feature. In other word,
++    participant in the FHSM.
++    When nofhsm is set to the branch, it will not be the source/target
++    branch of the move-down operation. This attribute is set
++    independently from coo and moo attributes, and if you want full
++    FHSM, you should specify them as well.
++- New mount option.
++  + fhsm_sec
++    Specifies a second to suppress many less important info to be
++    notified.
++- New ioctl.
++  + AUFS_CTL_FHSM_FD
++    create a new file descriptor which userspace can read the notification
++    (a subset of struct statfs) from aufs.
++- Module parameter 'brs'
++  It has to be set to 1. Otherwise the new mount option 'fhsm' will not
++  be set.
++- mount helpers /sbin/mount.aufs and /sbin/umount.aufs
++  When there are two or more branches with fhsm attributes,
++  /sbin/mount.aufs invokes the user-space daemon and /sbin/umount.aufs
++  terminates it. As a result of remounting and branch-manipulation, the
++  number of branches with fhsm attribute can be one. In this case,
++  /sbin/mount.aufs will terminate the user-space daemon.
++
++
++Finally the operation is done as these steps in kernel-space.
++- make sure that,
++  + no one else is using the file.
++  + the file is not hard-linked.
++  + the file is not pseudo-linked.
++  + the file is a regular file.
++  + the parent dir is not opaqued.
++- find the target writable branch.
++- make sure the file is not whiteout-ed by the upper (than the target)
++  branch.
++- make the parent dir on the target branch.
++- mutex lock the inode on the branch.
++- unlink the whiteout on the target branch (if exists).
++- lookup and create the whiteout-ed temporary name on the target branch.
++- copy the file as the whiteout-ed temporary name on the target branch.
++- rename the whiteout-ed temporary name to the original name.
++- unlink the file on the source branch.
++- maintain the internal pointer array and the external inode number
++  table (XINO).
++- maintain the timestamps and other attributes of the parent dir and the
++  file.
++
++And of course, in every step, an error may happen. So the operation
++should restore the original file state after an error happens.
 --- a/Documentation/filesystems/aufs/design/06mmap.txt	1970-01-01 01:00:00.000000000 +0100
 +++ b/Documentation/filesystems/aufs/design/06mmap.txt	2014-01-20 03:24:33.508760970 +0000
 @@ -0,0 +1,46 @@
@@ -1341,8 +1503,8 @@
 +Currently this approach is applied to file_operations and
 +vm_operations_struct for regular files only.
 --- a/Documentation/filesystems/aufs/design/99plan.txt	1970-01-01 01:00:00.000000000 +0100
-+++ b/Documentation/filesystems/aufs/design/99plan.txt	2014-01-20 03:24:33.508760970 +0000
-@@ -0,0 +1,95 @@
++++ b/Documentation/filesystems/aufs/design/99plan.txt	2014-07-15 14:04:48.724871625 +0100
+@@ -0,0 +1,58 @@
 +
 +# Copyright (C) 2005-2014 Junjiro R. Okajima
 +# 
@@ -1366,32 +1528,6 @@
 +easier to be reviewed.
 +
 +
-+Test Only the Highest One for the Directory Permission (dirperm1 option)
-+----------------------------------------------------------------------
-+Let's try case study.
-+- aufs has two branches, upper readwrite and lower readonly.
-+  /au = /rw + /ro
-+- "dirA" exists under /ro, but /rw. and its mode is 0700.
-+- user invoked "chmod a+rx /au/dirA"
-+- then "dirA" becomes world readable?
-+
-+In this case, /ro/dirA is still 0700 since it exists in readonly branch,
-+or it may be a natively readonly filesystem. If aufs respects the lower
-+branch, it should not respond readdir request from other users. But user
-+allowed it by chmod. Should really aufs rejects showing the entries
-+under /ro/dirA?
-+
-+To be honest, I don't have a best solution for this case. So I
-+implemented 'dirperm1' and 'nodirperm1' option in aufs1, and leave it to
-+users.
-+When dirperm1 is specified, aufs checks only the highest one for the
-+directory permission, and shows the entries. Otherwise, as usual, checks
-+every dir existing on all branches and rejects the request.
-+
-+As a side effect, dirperm1 option improves the performance of aufs
-+because the number of permission check is reduced.
-+
-+
 +Being Another Aufs's Readonly Branch (robr)
 +----------------------------------------------------------------------
 +Aufs1 allows aufs to be another aufs's readonly branch.
@@ -1399,17 +1535,6 @@
 +currecnly.
 +
 +
-+Copy-up on Open (coo=)
-+----------------------------------------------------------------------
-+By default the internal copy-up is executed when it is really necessary.
-+It is not done when a file is opened for writing, but when write(2) is
-+done. Users who have many (over 100) branches want to know and analyse
-+when and what file is copied-up. To insert a new upper branch which
-+contains such files only may improve the performance of aufs.
-+
-+Aufs1 implemented "coo=none | leaf | all" option.
-+
-+
 +Refresh the Opened File (refrof)
 +----------------------------------------------------------------------
 +This option is implemented in aufs1 but incomplete.
@@ -1439,8 +1564,8 @@
 +/new.
 +Otherwise from /new.
 --- a/fs/aufs/Kconfig	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/Kconfig	2013-11-03 20:29:04.115645964 +0000
-@@ -0,0 +1,179 @@
++++ b/fs/aufs/Kconfig	2014-09-08 00:38:33.510569903 +0100
+@@ -0,0 +1,177 @@
 +config AUFS_FS
 +	tristate "Aufs (Advanced multi layered unification filesystem) support"
 +	help
@@ -1530,6 +1655,15 @@
 +	/* typedef unsigned long/int __kernel_ino_t */
 +	/* alpha and s390x are int */
 +
++config AUFS_FHSM
++	bool "File-based Hierarchical Storage Management"
++	help
++	Hierarchical Storage Management (or HSM) is a well-known feature
++	in the storage world. Aufs provides this feature as file-based.
++	with multiple branches.
++	These multiple branches are prioritized, ie. the topmost one
++	should be the fastest drive and be used heavily.
++
 +config AUFS_RDU
 +	bool "Readdir in userspace"
 +	help
@@ -1542,17 +1676,6 @@
 +	shows better performance in most cases.
 +	See detail in aufs.5.
 +
-+config AUFS_SP_IATTR
-+	bool "Respect the attributes (mtime/ctime mainly) of special files"
-+	help
-+	When you write something to a special file, some attributes of it
-+	(mtime/ctime mainly) may be updated. Generally such updates are
-+	less important (actually some device drivers and NFS ignore
-+	it). But some applications (such like test program) requires
-+	such updates. If you need these updates, then enable this
-+	configuration which introduces some overhead.
-+	Currently this configuration handles FIFO only.
-+
 +config AUFS_SHWH
 +	bool "Show whiteouts"
 +	help
@@ -1621,7 +1744,7 @@
 +	When aufs supports Magic SysRq, enabled automatically.
 +endif
 --- a/fs/aufs/Makefile	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/Makefile	2013-11-03 20:29:04.115645964 +0000
++++ b/fs/aufs/Makefile	2014-09-08 00:38:33.510569903 +0100
 @@ -0,0 +1,42 @@
 +
 +include ${src}/magic.mk
@@ -1659,9 +1782,9 @@
 +aufs-$(CONFIG_AUFS_HNOTIFY) += hnotify.o
 +aufs-$(CONFIG_AUFS_HFSNOTIFY) += hfsnotify.o
 +aufs-$(CONFIG_AUFS_EXPORT) += export.o
++aufs-$(CONFIG_AUFS_FHSM) += fhsm.o
 +aufs-$(CONFIG_AUFS_POLL) += poll.o
 +aufs-$(CONFIG_AUFS_RDU) += rdu.o
-+aufs-$(CONFIG_AUFS_SP_IATTR) += f_op_sp.o
 +aufs-$(CONFIG_AUFS_BR_HFSPLUS) += hfsplus.o
 +aufs-$(CONFIG_AUFS_DEBUG) += debug.o
 +aufs-$(CONFIG_AUFS_MAGIC_SYSRQ) += sysrq.o
@@ -1728,8 +1851,8 @@
 +#endif /* __KERNEL__ */
 +#endif /* __AUFS_H__ */
 --- a/fs/aufs/branch.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/branch.c	2014-05-13 19:05:02.876347266 +0100
-@@ -0,0 +1,1219 @@
++++ b/fs/aufs/branch.c	2014-09-08 00:38:33.510569903 +0100
+@@ -0,0 +1,1445 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -1808,6 +1931,11 @@
 +		AuRwDestroy(&wbr->wbr_wh_rwsem);
 +	}
 +
++	if (br->br_fhsm) {
++		au_br_fhsm_fin(br->br_fhsm);
++		kfree(br->br_fhsm);
++	}
++
 +	key = br->br_dykey;
 +	for (i = 0; i < AuBrDynOp; i++, key++)
 +		if (*key)
@@ -1903,6 +2031,13 @@
 +			goto out_hnotify;
 +	}
 +
++	add_branch->br_fhsm = NULL;
++	if (au_br_fhsm(perm)) {
++		err = au_fhsm_br_alloc(add_branch);
++		if (unlikely(err))
++			goto out_wbr;
++	}
++
 +	err = au_sbr_realloc(au_sbi(sb), new_nbranch);
 +	if (!err)
 +		err = au_di_realloc(au_di(root), new_nbranch);
@@ -1911,8 +2046,8 @@
 +	if (!err)
 +		return add_branch; /* success */
 +
++out_wbr:
 +	kfree(add_branch->br_wbr);
-+
 +out_hnotify:
 +	au_hnotify_fin_br(add_branch);
 +out_br:
@@ -2295,6 +2430,54 @@
 +
 +/* ---------------------------------------------------------------------- */
 +
++static unsigned long long au_farray_cb(void *a,
++				       unsigned long long max __maybe_unused,
++				       void *arg)
++{
++	unsigned long long n;
++	struct file **p, *f;
++	struct au_sphlhead *files;
++	struct au_finfo *finfo;
++	struct super_block *sb = arg;
++
++	n = 0;
++	p = a;
++	files = &au_sbi(sb)->si_files;
++	spin_lock(&files->spin);
++	hlist_for_each_entry(finfo, &files->head, fi_hlist) {
++		f = finfo->fi_file;
++		if (file_count(f)
++		    && !special_file(file_inode(f)->i_mode)) {
++			get_file(f);
++			*p++ = f;
++			n++;
++			AuDebugOn(n > max);
++		}
++	}
++	spin_unlock(&files->spin);
++
++	return n;
++}
++
++static struct file **au_farray_alloc(struct super_block *sb,
++				     unsigned long long *max)
++{
++	*max = atomic_long_read(&au_sbi(sb)->si_nfiles);
++	return au_array_alloc(max, au_farray_cb, sb);
++}
++
++static void au_farray_free(struct file **a, unsigned long long max)
++{
++	unsigned long long ull;
++
++	for (ull = 0; ull < max; ull++)
++		if (a[ull])
++			fput(a[ull]);
++	au_array_free(a);
++}
++
++/* ---------------------------------------------------------------------- */
++
 +/*
 + * delete a branch
 + */
@@ -2401,6 +2584,8 @@
 +	AuDbg("b%d\n", bindex);
 +	for (ull = 0; !err && ull < max; ull++) {
 +		i = array[ull];
++		if (unlikely(!i))
++			break;
 +		if (i->i_ino == AUFS_ROOT_INO)
 +			continue;
 +
@@ -2455,6 +2640,137 @@
 +	return err;
 +}
 +
++static int test_dir_busy(struct file *file, aufs_bindex_t br_id,
++			 struct file **to_free, int *idx)
++{
++	int err;
++	unsigned char matched, root;
++	aufs_bindex_t bindex, bend;
++	struct au_fidir *fidir;
++	struct au_hfile *hfile;
++
++	err = 0;
++	root = IS_ROOT(file->f_dentry);
++	if (root) {
++		get_file(file);
++		to_free[*idx] = file;
++		(*idx)++;
++		goto out;
++	}
++
++	matched = 0;
++	fidir = au_fi(file)->fi_hdir;
++	AuDebugOn(!fidir);
++	bend = au_fbend_dir(file);
++	for (bindex = au_fbstart(file); bindex <= bend; bindex++) {
++		hfile = fidir->fd_hfile + bindex;
++		if (!hfile->hf_file)
++			continue;
++
++		if (hfile->hf_br->br_id == br_id) {
++			matched = 1;
++			break;
++		}
++	}
++	if (matched)
++		err = -EBUSY;
++
++out:
++	return err;
++}
++
++static int test_file_busy(struct super_block *sb, aufs_bindex_t br_id,
++			  struct file **to_free, int opened)
++{
++	int err, idx;
++	unsigned long long ull, max;
++	aufs_bindex_t bstart;
++	struct file *file, **array;
++	struct inode *inode;
++	struct dentry *root;
++	struct au_hfile *hfile;
++
++	array = au_farray_alloc(sb, &max);
++	err = PTR_ERR(array);
++	if (IS_ERR(array))
++		goto out;
++
++	err = 0;
++	idx = 0;
++	root = sb->s_root;
++	di_write_unlock(root);
++	for (ull = 0; ull < max; ull++) {
++		file = array[ull];
++		if (unlikely(!file))
++			break;
++
++		/* AuDbg("%pD\n", file); */
++		fi_read_lock(file);
++		bstart = au_fbstart(file);
++		inode = file_inode(file);
++		if (!S_ISDIR(inode->i_mode)) {
++			hfile = &au_fi(file)->fi_htop;
++			if (hfile->hf_br->br_id == br_id)
++				err = -EBUSY;
++		} else
++			err = test_dir_busy(file, br_id, to_free, &idx);
++		fi_read_unlock(file);
++		if (unlikely(err))
++			break;
++	}
++	di_write_lock_child(root);
++	au_farray_free(array, max);
++	AuDebugOn(idx > opened);
++
++out:
++	return err;
++}
++
++static void br_del_file(struct file **to_free, unsigned long long opened,
++			  aufs_bindex_t br_id)
++{
++	unsigned long long ull;
++	aufs_bindex_t bindex, bstart, bend, bfound;
++	struct file *file;
++	struct au_fidir *fidir;
++	struct au_hfile *hfile;
++
++	for (ull = 0; ull < opened; ull++) {
++		file = to_free[ull];
++		if (unlikely(!file))
++			break;
++
++		/* AuDbg("%pD\n", file); */
++		AuDebugOn(!S_ISDIR(file_inode(file)->i_mode));
++		bfound = -1;
++		fidir = au_fi(file)->fi_hdir;
++		AuDebugOn(!fidir);
++		fi_write_lock(file);
++		bstart = au_fbstart(file);
++		bend = au_fbend_dir(file);
++		for (bindex = bstart; bindex <= bend; bindex++) {
++			hfile = fidir->fd_hfile + bindex;
++			if (!hfile->hf_file)
++				continue;
++
++			if (hfile->hf_br->br_id == br_id) {
++				bfound = bindex;
++				break;
++			}
++		}
++		AuDebugOn(bfound < 0);
++		au_set_h_fptr(file, bfound, NULL);
++		if (bfound == bstart) {
++			for (bstart++; bstart <= bend; bstart++)
++				if (au_hf_dir(file, bstart)) {
++					au_set_fbstart(file, bstart);
++					break;
++				}
++		}
++		fi_write_unlock(file);
++	}
++}
++
 +static void au_br_do_del_brp(struct au_sbinfo *sbinfo,
 +			     const aufs_bindex_t bindex,
 +			     const aufs_bindex_t bend)
@@ -2547,17 +2863,29 @@
 +	au_br_do_free(br);
 +}
 +
++static unsigned long long empty_cb(void *array, unsigned long long max,
++				   void *arg)
++{
++	return max;
++}
++
 +int au_br_del(struct super_block *sb, struct au_opt_del *del, int remount)
 +{
 +	int err, rerr, i;
++	unsigned long long opened;
 +	unsigned int mnt_flags;
 +	aufs_bindex_t bindex, bend, br_id;
 +	unsigned char do_wh, verbose;
 +	struct au_branch *br;
 +	struct au_wbr *wbr;
++	struct dentry *root;
++	struct file **to_free;
 +
 +	err = 0;
-+	bindex = au_find_dbindex(sb->s_root, del->h_path.dentry);
++	opened = 0;
++	to_free = NULL;
++	root = sb->s_root;
++	bindex = au_find_dbindex(root, del->h_path.dentry);
 +	if (bindex < 0) {
 +		if (remount)
 +			goto out; /* success */
@@ -2577,10 +2905,20 @@
 +	}
 +	br = au_sbr(sb, bindex);
 +	AuDebugOn(!path_equal(&br->br_path, &del->h_path));
-+	i = atomic_read(&br->br_count);
-+	if (unlikely(i)) {
-+		AuVerbose(verbose, "%d file(s) opened\n", i);
-+		goto out;
++
++	br_id = br->br_id;
++	opened = atomic_read(&br->br_count);
++	if (unlikely(opened)) {
++		to_free = au_array_alloc(&opened, empty_cb, NULL);
++		err = PTR_ERR(to_free);
++		if (IS_ERR(to_free))
++			goto out;
++
++		err = test_file_busy(sb, br_id, to_free, opened);
++		if (unlikely(err)) {
++			AuVerbose(verbose, "%llu file(s) opened\n", opened);
++			goto out;
++		}
 +	}
 +
 +	wbr = br->br_wbr;
@@ -2594,7 +2932,7 @@
 +		}
 +	}
 +
-+	err = test_children_busy(sb->s_root, bindex, verbose);
++	err = test_children_busy(root, bindex, verbose);
 +	if (unlikely(err)) {
 +		if (do_wh)
 +			goto out_wh;
@@ -2602,7 +2940,16 @@
 +	}
 +
 +	err = 0;
-+	br_id = br->br_id;
++	if (to_free) {
++		/*
++		 * now we confirmed the branch is deletable.
++		 * let's free the remaining opened dirs on the branch.
++		 */
++		di_write_unlock(root);
++		br_del_file(to_free, opened, br_id);
++		di_write_lock_child(root);
++	}
++
 +	if (!remount)
 +		au_br_do_del(sb, bindex, br);
 +	else {
@@ -2612,10 +2959,10 @@
 +	}
 +
 +	if (!bindex) {
-+		au_cpup_attr_all(sb->s_root->d_inode, /*force*/1);
++		au_cpup_attr_all(root->d_inode, /*force*/1);
 +		sb->s_maxbytes = au_sbr_sb(sb, 0)->s_maxbytes;
 +	} else
-+		au_sub_nlink(sb->s_root->d_inode, del->h_path.dentry->d_inode);
++		au_sub_nlink(root->d_inode, del->h_path.dentry->d_inode);
 +	if (au_opt_test(mnt_flags, PLINK))
 +		au_plink_half_refresh(sb, br_id);
 +
@@ -2630,6 +2977,8 @@
 +		pr_warn("failed re-creating base whiteout, %s. (%d)\n",
 +			del->pathname, rerr);
 +out:
++	if (to_free)
++		au_farray_free(to_free, opened);
 +	return err;
 +}
 +
@@ -2729,62 +3078,16 @@
 +		|| do_need_sigen_inc(new, old);
 +}
 +
-+static unsigned long long au_farray_cb(void *a,
-+				       unsigned long long max __maybe_unused,
-+				       void *arg)
++static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex)
 +{
-+	unsigned long long n;
-+	struct file **p, *f;
-+	struct au_sphlhead *files;
-+	struct au_finfo *finfo;
-+	struct super_block *sb = arg;
-+
-+	n = 0;
-+	p = a;
-+	files = &au_sbi(sb)->si_files;
-+	spin_lock(&files->spin);
-+	hlist_for_each_entry(finfo, &files->head, fi_hlist) {
-+		f = finfo->fi_file;
-+		if (file_count(f)
-+		    && !special_file(file_inode(f)->i_mode)) {
-+			get_file(f);
-+			*p++ = f;
-+			n++;
-+			AuDebugOn(n > max);
-+		}
-+	}
-+	spin_unlock(&files->spin);
-+
-+	return n;
-+}
-+
-+static struct file **au_farray_alloc(struct super_block *sb,
-+				     unsigned long long *max)
-+{
-+	*max = atomic_long_read(&au_sbi(sb)->si_nfiles);
-+	return au_array_alloc(max, au_farray_cb, sb);
-+}
-+
-+static void au_farray_free(struct file **a, unsigned long long max)
-+{
-+	unsigned long long ull;
-+
-+	for (ull = 0; ull < max; ull++)
-+		if (a[ull])
-+			fput(a[ull]);
-+	au_array_free(a);
-+}
-+
-+static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex)
-+{
-+	int err, do_warn;
-+	unsigned int mnt_flags;
-+	unsigned long long ull, max;
-+	aufs_bindex_t br_id;
-+	unsigned char verbose;
-+	struct file *file, *hf, **array;
-+	struct inode *inode;
-+	struct au_hfile *hfile;
++	int err, do_warn;
++	unsigned int mnt_flags;
++	unsigned long long ull, max;
++	aufs_bindex_t br_id;
++	unsigned char verbose, writer;
++	struct file *file, *hf, **array;
++	struct inode *inode;
++	struct au_hfile *hfile;
 +
 +	mnt_flags = au_mntflags(sb);
 +	verbose = !!au_opt_test(mnt_flags, VERBOSE);
@@ -2798,6 +3101,8 @@
 +	br_id = au_sbr_id(sb, bindex);
 +	for (ull = 0; ull < max; ull++) {
 +		file = array[ull];
++		if (unlikely(!file))
++			break;
 +
 +		/* AuDbg("%pD\n", file); */
 +		fi_read_lock(file);
@@ -2850,11 +3155,12 @@
 +		hf = hfile->hf_file;
 +		/* fi_read_unlock(file); */
 +		spin_lock(&hf->f_lock);
-+		hf->f_mode &= ~FMODE_WRITE;
++		writer = !!(hf->f_mode & FMODE_WRITER);
++		hf->f_mode &= ~(FMODE_WRITE | FMODE_WRITER);
 +		spin_unlock(&hf->f_lock);
-+		if (!file_check_writeable(hf)) {
++		if (writer) {
++			put_write_access(file_inode(hf));
 +			__mnt_drop_write(hf->f_path.mnt);
-+			file_release_write(hf);
 +		}
 +	}
 +
@@ -2872,6 +3178,7 @@
 +	aufs_bindex_t bindex;
 +	struct dentry *root;
 +	struct au_branch *br;
++	struct au_br_fhsm *bf;
 +
 +	root = sb->s_root;
 +	bindex = au_find_dbindex(root, mod->h_root);
@@ -2893,11 +3200,21 @@
 +	if (br->br_perm == mod->perm)
 +		return 0; /* success */
 +
++	/* pre-allocate for non-fhsm --> fhsm */
++	bf = NULL;
++	if (!au_br_fhsm(br->br_perm) && au_br_fhsm(mod->perm)) {
++		err = au_fhsm_br_alloc(br);
++		if (unlikely(err))
++			goto out;
++		bf = br->br_fhsm;
++		br->br_fhsm = NULL;
++	}
++
 +	if (au_br_writable(br->br_perm)) {
 +		/* remove whiteout base */
 +		err = au_br_init_wh(sb, br, mod->perm);
 +		if (unlikely(err))
-+			goto out;
++			goto out_bf;
 +
 +		if (!au_br_writable(mod->perm)) {
 +			/* rw --> ro, file might be mmapped */
@@ -2933,25 +3250,57 @@
 +			}
 +		}
 +	}
++	if (unlikely(err))
++		goto out_bf;
 +
-+	if (!err) {
-+		if ((br->br_perm & AuBrAttr_UNPIN)
-+		    && !(mod->perm & AuBrAttr_UNPIN))
-+			au_br_dflags_force(br);
-+		else if (!(br->br_perm & AuBrAttr_UNPIN)
-+			 && (mod->perm & AuBrAttr_UNPIN))
-+			au_br_dflags_restore(br);
-+		*do_refresh |= need_sigen_inc(br->br_perm, mod->perm);
-+		br->br_perm = mod->perm;
-+	}
++	if (au_br_fhsm(br->br_perm)) {
++		if (!au_br_fhsm(mod->perm)) {
++			/* fhsm --> non-fhsm */
++			au_br_fhsm_fin(br->br_fhsm);
++			kfree(br->br_fhsm);
++			br->br_fhsm = NULL;
++		}
++	} else if (au_br_fhsm(mod->perm))
++		/* non-fhsm --> fhsm */
++		br->br_fhsm = bf;
++
++	if ((br->br_perm & AuBrAttr_UNPIN)
++	    && !(mod->perm & AuBrAttr_UNPIN))
++		au_br_dflags_force(br);
++	else if (!(br->br_perm & AuBrAttr_UNPIN)
++		 && (mod->perm & AuBrAttr_UNPIN))
++		au_br_dflags_restore(br);
++	*do_refresh |= need_sigen_inc(br->br_perm, mod->perm);
++	br->br_perm = mod->perm;
++	goto out; /* success */
 +
++out_bf:
++	kfree(bf);
 +out:
 +	AuTraceErr(err);
 +	return err;
 +}
++
++/* ---------------------------------------------------------------------- */
++
++int au_br_stfs(struct au_branch *br, struct aufs_stfs *stfs)
++{
++	int err;
++	struct kstatfs kstfs;
++
++	err = vfs_statfs(&br->br_path, &kstfs);
++	if (!err) {
++		stfs->f_blocks = kstfs.f_blocks;
++		stfs->f_bavail = kstfs.f_bavail;
++		stfs->f_files = kstfs.f_files;
++		stfs->f_ffree = kstfs.f_ffree;
++	}
++
++	return err;
++}
 --- a/fs/aufs/branch.h	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/branch.h	2014-01-20 03:24:33.508760970 +0000
-@@ -0,0 +1,264 @@
++++ b/fs/aufs/branch.h	2014-09-08 00:38:33.510569903 +0100
+@@ -0,0 +1,268 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -2997,6 +3346,16 @@
 +#endif
 +};
 +
++/* File-based Hierarchical Storage Management */
++struct au_br_fhsm {
++#ifdef CONFIG_AUFS_FHSM
++	struct mutex		bf_lock;
++	unsigned long		bf_jiffy;
++	struct aufs_stfs	bf_stfs;
++	int			bf_readable;
++#endif
++};
++
 +/* members for writable branch only */
 +enum {AuBrWh_BASE, AuBrWh_PLINK, AuBrWh_ORPH, AuBrWh_Last};
 +struct au_wbr {
@@ -3047,6 +3406,7 @@
 +	atomic_t		br_count;
 +
 +	struct au_wbr		*br_wbr;
++	struct au_br_fhsm	*br_fhsm;
 +
 +	/* xino truncation */
 +	atomic_t		br_xino_running;
@@ -3078,34 +3438,6 @@
 +	return au_br_mnt(br)->mnt_sb;
 +}
 +
-+/* branch permissions and attributes */
-+#define AuBrPerm_RW		1		/* writable, hardlinkable wh */
-+#define AuBrPerm_RO		(1 << 1)	/* readonly */
-+#define AuBrPerm_RR		(1 << 2)	/* natively readonly */
-+#define AuBrPerm_Mask		(AuBrPerm_RW | AuBrPerm_RO | AuBrPerm_RR)
-+
-+#define AuBrRAttr_WH		(1 << 3)	/* whiteout-able */
-+
-+#define AuBrWAttr_NoLinkWH	(1 << 4)	/* un-hardlinkable whiteouts */
-+
-+#define AuBrAttr_UNPIN		(1 << 5)	/* rename-able top dir of
-+						   branch */
-+
-+static inline int au_br_writable(int brperm)
-+{
-+	return brperm & AuBrPerm_RW;
-+}
-+
-+static inline int au_br_whable(int brperm)
-+{
-+	return brperm & (AuBrPerm_RW | AuBrRAttr_WH);
-+}
-+
-+static inline int au_br_wh_linkable(int brperm)
-+{
-+	return !(brperm & AuBrWAttr_NoLinkWH);
-+}
-+
 +static inline int au_br_rdonly(struct au_branch *br)
 +{
 +	return ((au_br_sb(br)->s_flags & MS_RDONLY)
@@ -3139,6 +3471,8 @@
 +struct au_opt_mod;
 +int au_br_mod(struct super_block *sb, struct au_opt_mod *mod, int remount,
 +	      int *do_refresh);
++struct aufs_stfs;
++int au_br_stfs(struct au_branch *br, struct aufs_stfs *stfs);
 +
 +/* xino.c */
 +static const loff_t au_loff_max = LLONG_MAX;
@@ -3214,10 +3548,29 @@
 +#define WbrWhMustAnyLock(wbr)	AuRwMustAnyLock(&wbr->wbr_wh_rwsem)
 +#define WbrWhMustWriteLock(wbr)	AuRwMustWriteLock(&wbr->wbr_wh_rwsem)
 +
++/* ---------------------------------------------------------------------- */
++
++#ifdef CONFIG_AUFS_FHSM
++static inline void au_br_fhsm_init(struct au_br_fhsm *brfhsm)
++{
++	mutex_init(&brfhsm->bf_lock);
++	brfhsm->bf_jiffy = 0;
++	brfhsm->bf_readable = 0;
++}
++
++static inline void au_br_fhsm_fin(struct au_br_fhsm *brfhsm)
++{
++	mutex_destroy(&brfhsm->bf_lock);
++}
++#else
++AuStubVoid(au_br_fhsm_init, struct au_br_fhsm *brfhsm)
++AuStubVoid(au_br_fhsm_fin, struct au_br_fhsm *brfhsm)
++#endif
++
 +#endif /* __KERNEL__ */
 +#endif /* __AUFS_BRANCH_H__ */
 --- a/fs/aufs/conf.mk	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/conf.mk	2013-11-03 20:29:04.119645964 +0000
++++ b/fs/aufs/conf.mk	2014-09-08 00:38:33.510569903 +0100
 @@ -0,0 +1,37 @@
 +
 +AuConfStr = CONFIG_AUFS_FS=${CONFIG_AUFS_FS}
@@ -3232,8 +3585,8 @@
 +	SBILIST \
 +	HNOTIFY HFSNOTIFY \
 +	EXPORT INO_T_64 \
++	FHSM \
 +	RDU \
-+	SP_IATTR \
 +	SHWH \
 +	BR_RAMFS \
 +	BR_FUSE POLL \
@@ -3257,8 +3610,8 @@
 +
 +-include ${srctree}/${src}/conf_priv.mk
 --- a/fs/aufs/cpup.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/cpup.c	2014-06-17 18:23:40.783905015 +0100
-@@ -0,0 +1,1289 @@
++++ b/fs/aufs/cpup.c	2014-09-08 00:38:33.510569903 +0100
+@@ -0,0 +1,1301 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -3758,7 +4111,7 @@
 +	int err;
 +	umode_t mode;
 +	unsigned int mnt_flags;
-+	unsigned char isdir;
++	unsigned char isdir, isreg, force;
 +	const unsigned char do_dt = !!au_ftest_cpup(cpg->flags, DTIME);
 +	struct au_dtime dt;
 +	struct path h_path;
@@ -3789,10 +4142,12 @@
 +	}
 +	h_path.dentry = h_dst;
 +
++	isreg = 0;
 +	isdir = 0;
 +	mode = h_inode->i_mode;
 +	switch (mode & S_IFMT) {
 +	case S_IFREG:
++		isreg = 1;
 +		err = vfsub_create(h_dir, &h_path, mode | S_IWUSR,
 +				   /*want_excl*/true);
 +		if (!err)
@@ -3841,6 +4196,16 @@
 +		au_xino_write(sb, cpg->bsrc, h_inode->i_ino, /*ino*/0);
 +		/* ignore this error */
 +
++	if (!err) {
++		force = 0;
++		if (isreg) {
++			force = !!cpg->len;
++			if (cpg->len == -1)
++				force = !!i_size_read(h_inode);
++		}
++		au_fhsm_wrote(sb, cpg->bdst, force);
++	}
++
 +	if (do_dt)
 +		au_dtime_revert(&dt);
 +	return err;
@@ -5378,8 +5743,8 @@
 +	return path_is_under(path + 0, path + 1);
 +}
 --- a/fs/aufs/dcsub.h	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/dcsub.h	2014-06-17 18:23:40.783905015 +0100
-@@ -0,0 +1,116 @@
++++ b/fs/aufs/dcsub.h	2014-07-15 14:04:48.724871625 +0100
+@@ -0,0 +1,120 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -5446,6 +5811,7 @@
 +{
 +	int err;
 +	struct inode *inode = d->d_inode;
++
 +	err = 0;
 +	if (unlikely(d_unhashed(d) || !inode || !inode->i_nlink))
 +		err = -ENOENT;
@@ -5456,6 +5822,7 @@
 +{
 +	int err;
 +	struct inode *inode = d->d_inode;
++
 +	err = au_d_hashed_positive(d);
 +	if (err
 +	    && inode
@@ -5468,6 +5835,7 @@
 +{
 +	int err;
 +	struct inode *inode;
++
 +	err = 0;
 +	if (!IS_ROOT(d))
 +		err = au_d_hashed_positive(d);
@@ -5482,6 +5850,7 @@
 +static inline int au_alive_dir(struct dentry *d)
 +{
 +	int err;
++
 +	err = au_d_alive(d);
 +	if (unlikely(err || IS_DEADDIR(d->d_inode)))
 +		err = -ENOENT;
@@ -5497,8 +5866,8 @@
 +#endif /* __KERNEL__ */
 +#endif /* __AUFS_DCSUB_H__ */
 --- a/fs/aufs/debug.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/debug.c	2014-06-17 18:23:40.783905015 +0100
-@@ -0,0 +1,518 @@
++++ b/fs/aufs/debug.c	2014-09-08 00:38:33.514569904 +0100
+@@ -0,0 +1,520 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -5557,6 +5926,7 @@
 +MODULE_PARM_DESC(debug, "debug print");
 +module_param_named(debug, aufs_debug, atomic_t, S_IRUGO | S_IWUSR | S_IWGRP);
 +
++DEFINE_MUTEX(au_dbg_mtx);	/* just to serialize the dbg msgs */
 +char *au_plevel = KERN_DEBUG;
 +#define dpri(fmt, ...) do {					\
 +	if ((au_plevel						\
@@ -5678,6 +6048,7 @@
 +{
 +	struct dentry *wh = NULL;
 +	int hn;
++	struct au_iinfo *iinfo;
 +
 +	if (!dentry || IS_ERR(dentry)) {
 +		dpri("d%d: err %ld\n", bindex, PTR_ERR(dentry));
@@ -5692,7 +6063,7 @@
 +	     d_unhashed(dentry) ? "un" : "");
 +	hn = -1;
 +	if (bindex >= 0 && dentry->d_inode && au_test_aufs(dentry->d_sb)) {
-+		struct au_iinfo *iinfo = au_ii(dentry->d_inode);
++		iinfo = au_ii(dentry->d_inode);
 +		if (iinfo) {
 +			hn = !!au_hn(iinfo->ii_hinode + bindex);
 +			wh = iinfo->ii_hinode[0 + bindex].hi_whdentry;
@@ -6018,8 +6389,8 @@
 +	return 0;
 +}
 --- a/fs/aufs/debug.h	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/debug.h	2014-01-20 03:24:33.508760970 +0000
-@@ -0,0 +1,247 @@
++++ b/fs/aufs/debug.h	2014-09-08 00:38:33.514569904 +0100
+@@ -0,0 +1,262 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -6132,6 +6503,7 @@
 +struct au_finfo;
 +struct dentry;
 +#ifdef CONFIG_AUFS_DEBUG
++extern struct mutex au_dbg_mtx;
 +extern char *au_plevel;
 +struct au_nhash;
 +void au_dpri_whlist(struct au_nhash *whlist);
@@ -6160,38 +6532,52 @@
 +int __init au_debug_init(void);
 +void au_debug_sbinfo_init(struct au_sbinfo *sbinfo);
 +#define AuDbgWhlist(w) do { \
++	mutex_lock(&au_dbg_mtx); \
 +	AuDbg(#w "\n"); \
 +	au_dpri_whlist(w); \
++	mutex_unlock(&au_dbg_mtx); \
 +} while (0)
 +
 +#define AuDbgVdir(v) do { \
++	mutex_lock(&au_dbg_mtx); \
 +	AuDbg(#v "\n"); \
 +	au_dpri_vdir(v); \
++	mutex_unlock(&au_dbg_mtx); \
 +} while (0)
 +
 +#define AuDbgInode(i) do { \
++	mutex_lock(&au_dbg_mtx); \
 +	AuDbg(#i "\n"); \
 +	au_dpri_inode(i); \
++	mutex_unlock(&au_dbg_mtx); \
 +} while (0)
 +
 +#define AuDbgDAlias(i) do { \
++	mutex_lock(&au_dbg_mtx); \
 +	AuDbg(#i "\n"); \
 +	au_dpri_dalias(i); \
++	mutex_unlock(&au_dbg_mtx); \
 +} while (0)
 +
 +#define AuDbgDentry(d) do { \
++	mutex_lock(&au_dbg_mtx); \
 +	AuDbg(#d "\n"); \
 +	au_dpri_dentry(d); \
++	mutex_unlock(&au_dbg_mtx); \
 +} while (0)
 +
 +#define AuDbgFile(f) do { \
++	mutex_lock(&au_dbg_mtx); \
 +	AuDbg(#f "\n"); \
 +	au_dpri_file(f); \
++	mutex_unlock(&au_dbg_mtx); \
 +} while (0)
 +
 +#define AuDbgSb(sb) do { \
++	mutex_lock(&au_dbg_mtx); \
 +	AuDbg(#sb "\n"); \
 +	au_dpri_sb(sb); \
++	mutex_unlock(&au_dbg_mtx); \
 +} while (0)
 +
 +#define AuDbgSleep(sec) do { \
@@ -6268,8 +6654,8 @@
 +#endif /* __KERNEL__ */
 +#endif /* __AUFS_DEBUG_H__ */
 --- a/fs/aufs/dentry.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/dentry.c	2014-06-17 18:23:40.783905015 +0100
-@@ -0,0 +1,1085 @@
++++ b/fs/aufs/dentry.c	2014-09-08 00:38:33.514569904 +0100
+@@ -0,0 +1,1096 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -6295,6 +6681,7 @@
 +#include "aufs.h"
 +
 +#define AuLkup_ALLOW_NEG	1
++#define AuLkup_IGNORE_PERM	(1 << 1)
 +#define au_ftest_lkup(flags, name)	((flags) & AuLkup_##name)
 +#define au_fset_lkup(flags, name) \
 +	do { (flags) |= AuLkup_##name; } while (0)
@@ -6321,12 +6708,14 @@
 +	int wh_found, opq;
 +	unsigned char wh_able;
 +	const unsigned char allow_neg = !!au_ftest_lkup(args->flags, ALLOW_NEG);
++	const unsigned char ignore_perm = !!au_ftest_lkup(args->flags,
++							  IGNORE_PERM);
 +
 +	wh_found = 0;
 +	br = au_sbr(dentry->d_sb, bindex);
 +	wh_able = !!au_br_whable(br->br_perm);
 +	if (wh_able)
-+		wh_found = au_wh_test(h_parent, wh_name, br, /*try_sio*/0);
++		wh_found = au_wh_test(h_parent, wh_name, /*try_sio*/0);
 +	h_dentry = ERR_PTR(wh_found);
 +	if (!wh_found)
 +		goto real_lookup;
@@ -6340,7 +6729,10 @@
 +		return NULL; /* success */
 +
 +real_lookup:
-+	h_dentry = vfsub_lkup_one(&dentry->d_name, h_parent);
++	if (!ignore_perm)
++		h_dentry = vfsub_lkup_one(&dentry->d_name, h_parent);
++	else
++		h_dentry = au_sio_lkup_one(&dentry->d_name, h_parent);
 +	if (IS_ERR(h_dentry))
 +		goto out;
 +
@@ -6364,7 +6756,7 @@
 +		goto out; /* success */
 +
 +	mutex_lock_nested(&h_inode->i_mutex, AuLsc_I_CHILD);
-+	opq = au_diropq_test(h_dentry, br);
++	opq = au_diropq_test(h_dentry);
 +	mutex_unlock(&h_inode->i_mutex);
 +	if (opq > 0)
 +		au_set_dbdiropq(dentry, bindex);
@@ -6398,7 +6790,7 @@
 +{
 +	int npositive, err;
 +	aufs_bindex_t bindex, btail, bdiropq;
-+	unsigned char isdir;
++	unsigned char isdir, dirperm1;
 +	struct qstr whname;
 +	struct au_do_lookup_args args = {
 +		.flags		= 0,
@@ -6407,8 +6799,10 @@
 +	const struct qstr *name = &dentry->d_name;
 +	struct dentry *parent;
 +	struct inode *inode;
++	struct super_block *sb;
 +
-+	err = au_test_shwh(dentry->d_sb, name);
++	sb = dentry->d_sb;
++	err = au_test_shwh(sb, name);
 +	if (unlikely(err))
 +		goto out;
 +
@@ -6420,6 +6814,7 @@
 +	isdir = !!(inode && S_ISDIR(inode->i_mode));
 +	if (!type)
 +		au_fset_lkup(args.flags, ALLOW_NEG);
++	dirperm1 = !!au_opt_test(au_mntflags(sb), DIRPERM1);
 +
 +	npositive = 0;
 +	parent = dget_parent(dentry);
@@ -6451,6 +6846,8 @@
 +		if (IS_ERR(h_dentry))
 +			goto out_parent;
 +		au_fclr_lkup(args.flags, ALLOW_NEG);
++		if (dirperm1)
++			au_fset_lkup(args.flags, IGNORE_PERM);
 +
 +		if (au_dbwh(dentry) >= 0)
 +			break;
@@ -6477,7 +6874,7 @@
 +		au_update_dbstart(dentry);
 +	}
 +	err = npositive;
-+	if (unlikely(!au_opt_test(au_mntflags(dentry->d_sb), UDBA_NONE)
++	if (unlikely(!au_opt_test(au_mntflags(sb), UDBA_NONE)
 +		     && au_dbstart(dentry) < 0)) {
 +		err = -EIO;
 +		AuIOErr("both of real entry and whiteout found, %pd, err %d\n",
@@ -6491,8 +6888,7 @@
 +	return err;
 +}
 +
-+struct dentry *au_sio_lkup_one(struct qstr *name, struct dentry *parent,
-+			       struct au_branch *br)
++struct dentry *au_sio_lkup_one(struct qstr *name, struct dentry *parent)
 +{
 +	struct dentry *dentry;
 +	int wkq_err;
@@ -6529,7 +6925,7 @@
 +	if (wh)
 +		h_dentry = au_whtmp_lkup(h_parent, br, &dentry->d_name);
 +	else
-+		h_dentry = au_sio_lkup_one(&dentry->d_name, h_parent, br);
++		h_dentry = au_sio_lkup_one(&dentry->d_name, h_parent);
 +	err = PTR_ERR(h_dentry);
 +	if (IS_ERR(h_dentry))
 +		goto out;
@@ -7087,7 +7483,6 @@
 +	 * {FS,I}NOTIFY.
 +	 * But {fs,i}notify doesn't fire some necessary events,
 +	 *	IN_ATTRIB for atime/nlink/pageio
-+	 *	IN_DELETE for NFS dentry
 +	 * Let's do REVAL test too.
 +	 */
 +	if (do_udba && inode) {
@@ -7267,10 +7662,6 @@
 +	if (unlikely(!au_di(dentry)))
 +		goto out;
 +
-+	inode = dentry->d_inode;
-+	if (inode && is_bad_inode(inode))
-+		goto out;
-+
 +	valid = 1;
 +	sb = dentry->d_sb;
 +	/*
@@ -7284,6 +7675,12 @@
 +		AuTraceErr(err);
 +		goto out;
 +	}
++	inode = dentry->d_inode;
++	if (unlikely(inode && is_bad_inode(inode))) {
++		err = -EINVAL;
++		AuTraceErr(err);
++		goto out_dgrade;
++	}
 +	if (unlikely(au_dbrange_test(dentry))) {
 +		err = -EINVAL;
 +		AuTraceErr(err);
@@ -7356,8 +7753,8 @@
 +	.d_release		= aufs_d_release
 +};
 --- a/fs/aufs/dentry.h	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/dentry.h	2014-06-17 18:23:40.783905015 +0100
-@@ -0,0 +1,234 @@
++++ b/fs/aufs/dentry.h	2014-07-15 14:04:48.728871625 +0100
+@@ -0,0 +1,233 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -7406,8 +7803,7 @@
 +/* dentry.c */
 +extern const struct dentry_operations aufs_dop;
 +struct au_branch;
-+struct dentry *au_sio_lkup_one(struct qstr *name, struct dentry *parent,
-+			       struct au_branch *br);
++struct dentry *au_sio_lkup_one(struct qstr *name, struct dentry *parent);
 +int au_h_verify(struct dentry *h_dentry, unsigned int udba, struct inode *h_dir,
 +		struct dentry *h_parent, struct au_branch *br);
 +
@@ -7593,7 +7989,7 @@
 +#endif /* __KERNEL__ */
 +#endif /* __AUFS_DENTRY_H__ */
 --- a/fs/aufs/dinfo.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/dinfo.c	2014-06-17 18:23:40.783905015 +0100
++++ b/fs/aufs/dinfo.c	2014-07-15 14:04:48.728871625 +0100
 @@ -0,0 +1,544 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
@@ -8140,8 +8536,8 @@
 +	return -1;
 +}
 --- a/fs/aufs/dir.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/dir.c	2014-03-13 00:59:36.876223577 +0000
-@@ -0,0 +1,639 @@
++++ b/fs/aufs/dir.c	2014-09-08 00:38:33.514569904 +0100
+@@ -0,0 +1,645 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -8361,6 +8757,8 @@
 +	finfo = au_fi(file);
 +	fidir = finfo->fi_hdir;
 +	if (fidir) {
++		au_sphl_del(&finfo->fi_hlist,
++			    &au_sbi(file->f_dentry->d_sb)->si_files);
 +		vdir_cache = fidir->fd_vdir_cache; /* lock-free */
 +		if (vdir_cache)
 +			au_vdir_free(vdir_cache);
@@ -8698,6 +9096,7 @@
 +			.actor = au_diractor(test_empty_cb)
 +		}
 +	};
++	int (*test_empty)(struct dentry *dentry, struct test_empty_arg *arg);
 +
 +	SiMustAnyLock(dentry->d_sb);
 +
@@ -8713,8 +9112,11 @@
 +	bstart = au_dbstart(dentry);
 +	if (au_opt_test(au_mntflags(dentry->d_sb), SHWH))
 +		au_fset_testempty(arg.flags, SHWH);
++	test_empty = do_test_empty;
++	if (au_opt_test(au_mntflags(dentry->d_sb), DIRPERM1))
++		test_empty = sio_test_empty;
 +	arg.bindex = bstart;
-+	err = do_test_empty(dentry, &arg);
++	err = test_empty(dentry, &arg);
 +	if (unlikely(err))
 +		goto out_whlist;
 +
@@ -8726,7 +9128,7 @@
 +		h_dentry = au_h_dptr(dentry, bindex);
 +		if (h_dentry && h_dentry->d_inode) {
 +			arg.bindex = bindex;
-+			err = do_test_empty(dentry, &arg);
++			err = test_empty(dentry, &arg);
 +		}
 +	}
 +
@@ -9381,7 +9783,7 @@
 +#endif /* __KERNEL__ */
 +#endif /* __AUFS_DYNOP_H__ */
 --- a/fs/aufs/export.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/export.c	2014-01-20 03:24:33.512760970 +0000
++++ b/fs/aufs/export.c	2014-09-08 00:38:33.514569904 +0100
 @@ -0,0 +1,831 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
@@ -10099,7 +10501,7 @@
 +	ii_read_lock_child(inode);
 +	bindex = au_ibstart(inode);
 +	if (!dir) {
-+		dentry = d_find_alias(inode);
++		dentry = d_find_any_alias(inode);
 +		if (unlikely(!dentry))
 +			goto out_unlock;
 +		AuDebugOn(au_test_anon(dentry));
@@ -10115,7 +10517,7 @@
 +	ii_read_unlock(dir);
 +	if (unlikely(!h_dir))
 +		goto out_parent;
-+	h_parent = d_find_alias(h_dir);
++	h_parent = d_find_any_alias(h_dir);
 +	if (unlikely(!h_parent))
 +		goto out_hparent;
 +
@@ -10215,8 +10617,8 @@
 +	atomic_set(&sbinfo->si_xigen_next, u);
 +}
 --- a/fs/aufs/f_op.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/f_op.c	2014-06-17 18:23:40.783905015 +0100
-@@ -0,0 +1,733 @@
++++ b/fs/aufs/f_op.c	2014-09-08 00:38:33.514569904 +0100
+@@ -0,0 +1,813 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -10275,8 +10677,6 @@
 +		au_set_fbstart(file, bindex);
 +		au_set_h_fptr(file, bindex, h_file);
 +		au_update_figen(file);
-+		finfo->fi_file = file;
-+		au_sphl_add(&finfo->fi_hlist, &au_sbi(dentry->d_sb)->si_files);
 +		/* todo: necessary? */
 +		/* file->f_ra = h_file->f_ra; */
 +	}
@@ -10402,10 +10802,12 @@
 +			  size_t count, loff_t *ppos)
 +{
 +	ssize_t err;
++	blkcnt_t blks;
++	aufs_bindex_t bstart;
 +	struct au_pin pin;
 +	struct dentry *dentry;
++	struct inode *inode, *h_inode;
 +	struct super_block *sb;
-+	struct inode *inode;
 +	struct file *h_file;
 +	char __user *buf = (char __user *)ubuf;
 +
@@ -10426,8 +10828,11 @@
 +		goto out;
 +	}
 +
++	bstart = au_fbstart(file);
 +	h_file = au_hf_top(file);
 +	get_file(h_file);
++	h_inode = h_file->f_dentry->d_inode;
++	blks = h_inode->i_blocks;
 +	au_unpin(&pin);
 +	di_read_unlock(dentry, AuLock_IR);
 +	fi_write_unlock(file);
@@ -10436,6 +10841,9 @@
 +	ii_write_lock_child(inode);
 +	au_cpup_attr_timesizes(inode);
 +	inode->i_mode = file_inode(h_file)->i_mode;
++	AuDbg("blks %llu, %llu\n", (u64)blks, (u64)h_inode->i_blocks);
++	if (err > 0)
++		au_fhsm_wrote(sb, bstart, /*force*/h_inode->i_blocks > blks);
 +	ii_write_unlock(inode);
 +	fput(h_file);
 +
@@ -10445,41 +10853,50 @@
 +	return err;
 +}
 +
-+static ssize_t au_do_aio(struct file *h_file, int rw, struct kiocb *kio,
-+			 const struct iovec *iov, unsigned long nv, loff_t pos)
++static ssize_t au_do_iter(struct file *h_file, int rw, struct kiocb *kio,
++			  struct iov_iter *iov_iter)
 +{
 +	ssize_t err;
 +	struct file *file;
-+	ssize_t (*func)(struct kiocb *, const struct iovec *, unsigned long,
-+			loff_t);
++	ssize_t (*iter)(struct kiocb *, struct iov_iter *);
++	ssize_t (*aio)(struct kiocb *, const struct iovec *, unsigned long,
++		       loff_t);
 +
 +	err = security_file_permission(h_file, rw);
 +	if (unlikely(err))
 +		goto out;
 +
 +	err = -ENOSYS;
-+	func = NULL;
-+	if (rw == MAY_READ)
-+		func = h_file->f_op->aio_read;
-+	else if (rw == MAY_WRITE)
-+		func = h_file->f_op->aio_write;
-+	if (func) {
-+		file = kio->ki_filp;
-+		kio->ki_filp = h_file;
++	iter = NULL;
++	aio = NULL;
++	if (rw == MAY_READ) {
++		iter = h_file->f_op->read_iter;
++		aio = h_file->f_op->aio_read;
++	} else if (rw == MAY_WRITE) {
++		iter = h_file->f_op->write_iter;
++		aio = h_file->f_op->aio_write;
++	}
++
++	file = kio->ki_filp;
++	kio->ki_filp = h_file;
++	if (iter) {
 +		lockdep_off();
-+		err = func(kio, iov, nv, pos);
++		err = iter(kio, iov_iter);
++		lockdep_on();
++	} else if (aio) {
++		lockdep_off();
++		err = aio(kio, iov_iter->iov, iov_iter->nr_segs, kio->ki_pos);
 +		lockdep_on();
-+		kio->ki_filp = file;
 +	} else
 +		/* currently there is no such fs */
 +		WARN_ON_ONCE(1);
++	kio->ki_filp = file;
 +
 +out:
 +	return err;
 +}
 +
-+static ssize_t aufs_aio_read(struct kiocb *kio, const struct iovec *iov,
-+			     unsigned long nv, loff_t pos)
++static ssize_t aufs_read_iter(struct kiocb *kio, struct iov_iter *iov_iter)
 +{
 +	ssize_t err;
 +	struct file *file, *h_file;
@@ -10499,7 +10916,7 @@
 +	di_read_unlock(dentry, AuLock_IR);
 +	fi_read_unlock(file);
 +
-+	err = au_do_aio(h_file, MAY_READ, kio, iov, nv, pos);
++	err = au_do_iter(h_file, MAY_READ, kio, iov_iter);
 +	/* todo: necessary? */
 +	/* file->f_ra = h_file->f_ra; */
 +	/* update without lock, I don't think it a problem */
@@ -10511,13 +10928,14 @@
 +	return err;
 +}
 +
-+static ssize_t aufs_aio_write(struct kiocb *kio, const struct iovec *iov,
-+			      unsigned long nv, loff_t pos)
++static ssize_t aufs_write_iter(struct kiocb *kio, struct iov_iter *iov_iter)
 +{
 +	ssize_t err;
++	blkcnt_t blks;
++	aufs_bindex_t bstart;
 +	struct au_pin pin;
 +	struct dentry *dentry;
-+	struct inode *inode;
++	struct inode *inode, *h_inode;
 +	struct file *file, *h_file;
 +	struct super_block *sb;
 +
@@ -10539,16 +10957,22 @@
 +		goto out;
 +	}
 +
++	bstart = au_fbstart(file);
 +	h_file = au_hf_top(file);
 +	get_file(h_file);
++	h_inode = h_file->f_dentry->d_inode;
++	blks = h_inode->i_blocks;
 +	au_unpin(&pin);
 +	di_read_unlock(dentry, AuLock_IR);
 +	fi_write_unlock(file);
 +
-+	err = au_do_aio(h_file, MAY_WRITE, kio, iov, nv, pos);
++	err = au_do_iter(h_file, MAY_WRITE, kio, iov_iter);
 +	ii_write_lock_child(inode);
 +	au_cpup_attr_timesizes(inode);
 +	inode->i_mode = file_inode(h_file)->i_mode;
++	AuDbg("blks %llu, %llu\n", (u64)blks, (u64)h_inode->i_blocks);
++	if (err > 0)
++		au_fhsm_wrote(sb, bstart, /*force*/h_inode->i_blocks > blks);
 +	ii_write_unlock(inode);
 +	fput(h_file);
 +
@@ -10604,11 +11028,13 @@
 +		  size_t len, unsigned int flags)
 +{
 +	ssize_t err;
++	blkcnt_t blks;
++	aufs_bindex_t bstart;
 +	struct au_pin pin;
 +	struct dentry *dentry;
-+	struct inode *inode;
-+	struct file *h_file;
++	struct inode *inode, *h_inode;
 +	struct super_block *sb;
++	struct file *h_file;
 +
 +	dentry = file->f_dentry;
 +	sb = dentry->d_sb;
@@ -10627,8 +11053,11 @@
 +		goto out;
 +	}
 +
++	bstart = au_fbstart(file);
 +	h_file = au_hf_top(file);
 +	get_file(h_file);
++	h_inode = h_file->f_dentry->d_inode;
++	blks = h_inode->i_blocks;
 +	au_unpin(&pin);
 +	di_read_unlock(dentry, AuLock_IR);
 +	fi_write_unlock(file);
@@ -10637,6 +11066,57 @@
 +	ii_write_lock_child(inode);
 +	au_cpup_attr_timesizes(inode);
 +	inode->i_mode = file_inode(h_file)->i_mode;
++	AuDbg("blks %llu, %llu\n", (u64)blks, (u64)h_inode->i_blocks);
++	if (err > 0)
++		au_fhsm_wrote(sb, bstart, /*force*/h_inode->i_blocks > blks);
++	ii_write_unlock(inode);
++	fput(h_file);
++
++out:
++	si_read_unlock(sb);
++	mutex_unlock(&inode->i_mutex);
++	return err;
++}
++
++static long aufs_fallocate(struct file *file, int mode, loff_t offset,
++			   loff_t len)
++{
++	long err;
++	struct au_pin pin;
++	struct dentry *dentry;
++	struct super_block *sb;
++	struct inode *inode;
++	struct file *h_file;
++
++	dentry = file->f_dentry;
++	sb = dentry->d_sb;
++	inode = dentry->d_inode;
++	au_mtx_and_read_lock(inode);
++
++	err = au_reval_and_lock_fdi(file, au_reopen_nondir, /*wlock*/1);
++	if (unlikely(err))
++		goto out;
++
++	err = au_ready_to_write(file, -1, &pin);
++	di_downgrade_lock(dentry, AuLock_IR);
++	if (unlikely(err)) {
++		di_read_unlock(dentry, AuLock_IR);
++		fi_write_unlock(file);
++		goto out;
++	}
++
++	h_file = au_hf_top(file);
++	get_file(h_file);
++	au_unpin(&pin);
++	di_read_unlock(dentry, AuLock_IR);
++	fi_write_unlock(file);
++
++	lockdep_off();
++	err = do_fallocate(h_file, mode, offset, len);
++	lockdep_on();
++	ii_write_lock_child(inode);
++	au_cpup_attr_timesizes(inode);
++	inode->i_mode = file_inode(h_file)->i_mode;
 +	ii_write_unlock(inode);
 +	fput(h_file);
 +
@@ -10926,8 +11406,9 @@
 +
 +	.read		= aufs_read,
 +	.write		= aufs_write,
-+	.aio_read	= aufs_aio_read,
-+	.aio_write	= aufs_aio_write,
++	.read_iter	= aufs_read_iter,
++	.write_iter	= aufs_write_iter,
++
 +#ifdef CONFIG_AUFS_POLL
 +	.poll		= aufs_poll,
 +#endif
@@ -10947,14 +11428,15 @@
 +	.splice_read	= aufs_splice_read,
 +#if 0
 +	.aio_splice_write = aufs_aio_splice_write,
-+	.aio_splice_read  = aufs_aio_splice_read
++	.aio_splice_read  = aufs_aio_splice_read,
 +#endif
++	.fallocate	= aufs_fallocate
 +};
---- a/fs/aufs/f_op_sp.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/f_op_sp.c	2014-06-17 18:23:40.787905015 +0100
-@@ -0,0 +1,386 @@
+--- a/fs/aufs/fhsm.c	1970-01-01 01:00:00.000000000 +0100
++++ b/fs/aufs/fhsm.c	2014-09-08 00:38:33.514569904 +0100
+@@ -0,0 +1,426 @@
 +/*
-+ * Copyright (C) 2005-2014 Junjiro R. Okajima
++ * Copyright (C) 2011-2014 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -10967,381 +11449,421 @@
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 + */
 +
 +/*
-+ * file operations for special files.
-+ * while they exist in aufs virtually,
-+ * their file I/O is handled out of aufs.
++ * File-based Hierarchy Storage Management
 + */
 +
-+#include <linux/aio.h>
++#include <linux/anon_inodes.h>
++#include <linux/poll.h>
++#include <linux/seq_file.h>
++#include <linux/statfs.h>
 +#include "aufs.h"
 +
-+/*
-+ * I don't think the size of this list grows much.
-+ * so here is a very simple list implemented in order to find finfo matching a
-+ * given file.
-+ */
-+static struct au_sphlhead au_finfo_sp = {
-+	.spin	= __SPIN_LOCK_INITIALIZER(au_finfo_sp.spin),
-+	.head	= HLIST_HEAD_INIT
-+};
-+
-+struct au_finfo_sp {
-+	struct hlist_node	hlist;
-+	struct file		*file;
-+	struct au_finfo		*finfo;
-+};
-+
-+struct au_finfo *au_fi_sp(struct file *file)
++static aufs_bindex_t au_fhsm_bottom(struct super_block *sb)
 +{
-+	struct au_finfo *finfo;
-+	struct au_finfo_sp *sp;
++	struct au_sbinfo *sbinfo;
++	struct au_fhsm *fhsm;
 +
-+	finfo = NULL;
-+	spin_lock(&au_finfo_sp.spin);
-+	hlist_for_each_entry(sp, &au_finfo_sp.head, hlist) {
-+		if (sp->file != file)
-+			continue;
-+		finfo = sp->finfo;
-+		break;
-+	}
-+	spin_unlock(&au_finfo_sp.spin);
++	SiMustAnyLock(sb);
 +
-+	return finfo;
++	sbinfo = au_sbi(sb);
++	fhsm = &sbinfo->si_fhsm;
++	AuDebugOn(!fhsm);
++	return fhsm->fhsm_bottom;
 +}
 +
-+static int au_fi_sp_add(struct file *file)
++void au_fhsm_set_bottom(struct super_block *sb, aufs_bindex_t bindex)
 +{
-+	int err;
-+	struct au_finfo_sp *sp;
-+
-+	err = -ENOMEM;
-+	sp = kmalloc(sizeof(*sp), GFP_NOFS);
-+	if (sp) {
-+		err = 0;
-+		sp->file = file;
-+		sp->finfo = file->private_data;
-+		spin_lock(&au_finfo_sp.spin);
-+		hlist_add_head(&sp->hlist, &au_finfo_sp.head);
-+		spin_unlock(&au_finfo_sp.spin);
-+	}
-+	return err;
-+}
++	struct au_sbinfo *sbinfo;
++	struct au_fhsm *fhsm;
 +
-+static void au_fi_sp_del(struct file *file)
-+{
-+	struct au_finfo_sp *sp, *do_free;
++	SiMustWriteLock(sb);
 +
-+	do_free = NULL;
-+	spin_lock(&au_finfo_sp.spin);
-+	hlist_for_each_entry(sp, &au_finfo_sp.head, hlist) {
-+		if (sp->file != file)
-+			continue;
-+		hlist_del(&sp->hlist);
-+		do_free = sp;
-+		break;
-+	}
-+	spin_unlock(&au_finfo_sp.spin);
-+	kfree(do_free);
++	sbinfo = au_sbi(sb);
++	fhsm = &sbinfo->si_fhsm;
++	AuDebugOn(!fhsm);
++	fhsm->fhsm_bottom = bindex;
 +}
 +
 +/* ---------------------------------------------------------------------- */
 +
-+static ssize_t aufs_aio_read_sp(struct kiocb *kio, const struct iovec *iov,
-+				unsigned long nv, loff_t pos)
++static int au_fhsm_test_jiffy(struct au_sbinfo *sbinfo, struct au_branch *br)
 +{
-+	ssize_t err;
-+	aufs_bindex_t bstart;
-+	unsigned char wbr;
-+	struct file *file, *h_file;
-+	struct super_block *sb;
-+
-+	file = kio->ki_filp;
-+	sb = file->f_dentry->d_sb;
-+	si_read_lock(sb, AuLock_FLUSH);
-+	fi_read_lock(file);
-+	bstart = au_fbstart(file);
-+	h_file = au_hf_top(file);
-+	fi_read_unlock(file);
-+	wbr = !!au_br_writable(au_sbr(sb, bstart)->br_perm);
-+	si_read_unlock(sb);
++	struct au_br_fhsm *bf;
 +
-+	/* do not change the file in kio */
-+	AuDebugOn(!h_file->f_op || !h_file->f_op->aio_read);
-+	err = h_file->f_op->aio_read(kio, iov, nv, pos);
-+	if (err > 0 && wbr)
-+		file_accessed(h_file);
++	bf = br->br_fhsm;
++	MtxMustLock(&bf->bf_lock);
 +
-+	return err;
++	return !bf->bf_readable
++		|| time_after(jiffies,
++			      bf->bf_jiffy + sbinfo->si_fhsm.fhsm_expire);
 +}
 +
-+static ssize_t aufs_aio_write_sp(struct kiocb *kio, const struct iovec *iov,
-+				 unsigned long nv, loff_t pos)
++/* ---------------------------------------------------------------------- */
++
++static void au_fhsm_notify(struct super_block *sb, int val)
 +{
-+	ssize_t err;
-+	aufs_bindex_t bstart;
-+	unsigned char wbr;
-+	struct super_block *sb;
-+	struct file *file, *h_file;
++	struct au_sbinfo *sbinfo;
++	struct au_fhsm *fhsm;
 +
-+	file = kio->ki_filp;
-+	sb = file->f_dentry->d_sb;
-+	si_read_lock(sb, AuLock_FLUSH);
-+	fi_read_lock(file);
-+	bstart = au_fbstart(file);
-+	h_file = au_hf_top(file);
-+	fi_read_unlock(file);
-+	wbr = !!au_br_writable(au_sbr(sb, bstart)->br_perm);
-+	si_read_unlock(sb);
++	SiMustAnyLock(sb);
 +
-+	/* do not change the file in kio */
-+	AuDebugOn(!h_file->f_op || !h_file->f_op->aio_write);
-+	err = h_file->f_op->aio_write(kio, iov, nv, pos);
-+	return err;
++	sbinfo = au_sbi(sb);
++	fhsm = &sbinfo->si_fhsm;
++	if (au_fhsm_pid(fhsm)
++	    && atomic_read(&fhsm->fhsm_readable) != -1) {
++		atomic_set(&fhsm->fhsm_readable, val);
++		if (val)
++			wake_up(&fhsm->fhsm_wqh);
++	}
 +}
 +
-+/* ---------------------------------------------------------------------- */
-+
-+static int aufs_release_sp(struct inode *inode, struct file *file)
++static int au_fhsm_stfs(struct super_block *sb, aufs_bindex_t bindex,
++			struct aufs_stfs *rstfs, int do_lock, int do_notify)
 +{
 +	int err;
-+	struct file *h_file;
++	struct au_branch *br;
++	struct au_br_fhsm *bf;
++
++	br = au_sbr(sb, bindex);
++	AuDebugOn(au_br_rdonly(br));
++	bf = br->br_fhsm;
++	AuDebugOn(!bf);
++
++	if (do_lock)
++		mutex_lock(&bf->bf_lock);
++	else
++		MtxMustLock(&bf->bf_lock);
++
++	/* sb->s_root for NFS is unreliable */
++	err = au_br_stfs(br, &bf->bf_stfs);
++	if (unlikely(err)) {
++		AuErr1("FHSM failed (%d), b%d, ignored.\n", bindex, err);
++		goto out;
++	}
++
++	bf->bf_jiffy = jiffies;
++	bf->bf_readable = 1;
++	if (do_notify)
++		au_fhsm_notify(sb, /*val*/1);
++	if (rstfs)
++		*rstfs = bf->bf_stfs;
++
++out:
++	if (do_lock)
++		mutex_unlock(&bf->bf_lock);
++	au_fhsm_notify(sb, /*val*/1);
 +
-+	fi_read_lock(file);
-+	h_file = au_hf_top(file);
-+	fi_read_unlock(file);
-+	/* close this fifo in aufs */
-+	err = h_file->f_op->release(inode, file); /* ignore */
-+	aufs_release_nondir(inode, file); /* ignore */
-+	au_fi_sp_del(file);
 +	return err;
 +}
 +
-+/* ---------------------------------------------------------------------- */
++void au_fhsm_wrote(struct super_block *sb, aufs_bindex_t bindex, int force)
++{
++	int err;
++	struct au_sbinfo *sbinfo;
++	struct au_fhsm *fhsm;
++	struct au_branch *br;
++	struct au_br_fhsm *bf;
 +
-+/* currently, support only FIFO */
-+enum {
-+	AuSp_FIFO, AuSp_FIFO_R, AuSp_FIFO_W, AuSp_FIFO_RW,
-+	/* AuSp_SOCK, AuSp_CHR, AuSp_BLK, */
-+	AuSp_Last
-+};
-+static int aufs_open_sp(struct inode *inode, struct file *file);
-+static struct au_sp_fop {
-+	int			done;
-+	struct file_operations	fop;	/* not 'const' */
-+	spinlock_t		spin;
-+} au_sp_fop[AuSp_Last] = {
-+	[AuSp_FIFO] = {
-+		.fop	= {
-+			.owner	= THIS_MODULE,
-+			.open	= aufs_open_sp
-+		}
-+	}
-+};
++	AuDbg("b%d, force %d\n", bindex, force);
++	SiMustAnyLock(sb);
 +
-+static void au_init_fop_sp(struct file *file)
++	sbinfo = au_sbi(sb);
++	fhsm = &sbinfo->si_fhsm;
++	if (!au_ftest_si(sbinfo, FHSM)
++	    || fhsm->fhsm_bottom == bindex)
++		return;
++
++	br = au_sbr(sb, bindex);
++	bf = br->br_fhsm;
++	AuDebugOn(!bf);
++	mutex_lock(&bf->bf_lock);
++	if (force
++	    || au_fhsm_pid(fhsm)
++	    || au_fhsm_test_jiffy(sbinfo, br))
++		err = au_fhsm_stfs(sb, bindex, /*rstfs*/NULL, /*do_lock*/0,
++				  /*do_notify*/1);
++	mutex_unlock(&bf->bf_lock);
++}
++
++void au_fhsm_wrote_all(struct super_block *sb, int force)
 +{
-+	struct au_sp_fop *p;
-+	int i;
-+	struct file *h_file;
++	aufs_bindex_t bindex, bend;
++	struct au_branch *br;
 +
-+	p = au_sp_fop;
-+	if (unlikely(!p->done)) {
-+		/* initialize first time only */
-+		static DEFINE_SPINLOCK(spin);
-+
-+		spin_lock(&spin);
-+		if (!p->done) {
-+			BUILD_BUG_ON(sizeof(au_sp_fop)/sizeof(*au_sp_fop)
-+				     != AuSp_Last);
-+			for (i = 0; i < AuSp_Last; i++)
-+				spin_lock_init(&p[i].spin);
-+			p->done = 1;
-+		}
-+		spin_unlock(&spin);
-+	}
-+
-+	switch (file->f_mode & (FMODE_READ | FMODE_WRITE)) {
-+	case FMODE_READ:
-+		i = AuSp_FIFO_R;
-+		break;
-+	case FMODE_WRITE:
-+		i = AuSp_FIFO_W;
-+		break;
-+	case FMODE_READ | FMODE_WRITE:
-+		i = AuSp_FIFO_RW;
-+		break;
-+	default:
-+		BUG();
++	/* exclude the bottom */
++	bend = au_fhsm_bottom(sb);
++	for (bindex = 0; bindex < bend; bindex++) {
++		br = au_sbr(sb, bindex);
++		if (au_br_fhsm(br->br_perm))
++			au_fhsm_wrote(sb, bindex, force);
 +	}
++}
 +
-+	p += i;
-+	if (unlikely(!p->done)) {
-+		/* initialize first time only */
-+		h_file = au_hf_top(file);
-+		spin_lock(&p->spin);
-+		if (!p->done) {
-+			p->fop = *h_file->f_op;
-+			p->fop.owner = THIS_MODULE;
-+			if (p->fop.aio_read)
-+				p->fop.aio_read = aufs_aio_read_sp;
-+			if (p->fop.aio_write)
-+				p->fop.aio_write = aufs_aio_write_sp;
-+			p->fop.release = aufs_release_sp;
-+			p->done = 1;
-+		}
-+		spin_unlock(&p->spin);
-+	}
-+	file->f_op = &p->fop;
++/* ---------------------------------------------------------------------- */
++
++static unsigned int au_fhsm_poll(struct file *file,
++				 struct poll_table_struct *wait)
++{
++	unsigned int mask;
++	struct au_sbinfo *sbinfo;
++	struct au_fhsm *fhsm;
++
++	mask = 0;
++	sbinfo = file->private_data;
++	fhsm = &sbinfo->si_fhsm;
++	poll_wait(file, &fhsm->fhsm_wqh, wait);
++	if (atomic_read(&fhsm->fhsm_readable))
++		mask = POLLIN /* | POLLRDNORM */;
++
++	AuTraceErr((int)mask);
++	return mask;
 +}
 +
-+static int au_cpup_sp(struct dentry *dentry)
++static int au_fhsm_do_read_one(struct aufs_stbr __user *stbr,
++			      struct aufs_stfs *stfs, __s16 brid)
 +{
 +	int err;
-+	struct au_pin pin;
-+	struct au_wr_dir_args wr_dir_args = {
-+		.force_btgt	= -1,
-+		.flags		= 0
-+	};
-+	struct au_cp_generic cpg = {
-+		.dentry	= dentry,
-+		.bdst	= -1,
-+		.bsrc	= -1,
-+		.len	= -1,
-+		.pin	= &pin,
-+		.flags	= AuCpup_DTIME
-+	};
 +
-+	AuDbg("%pd\n", dentry);
++	err = copy_to_user(&stbr->stfs, stfs, sizeof(*stfs));
++	if (!err)
++		err = __put_user(brid, &stbr->brid);
++	if (unlikely(err))
++		err = -EFAULT;
 +
-+	di_read_unlock(dentry, AuLock_IR);
-+	di_write_lock_child(dentry);
-+	err = au_wr_dir(dentry, /*src_dentry*/NULL, &wr_dir_args);
-+	if (unlikely(err < 0))
-+		goto out;
-+	cpg.bdst = err;
++	return err;
++}
++
++static ssize_t au_fhsm_do_read(struct super_block *sb,
++			       struct aufs_stbr __user *stbr, size_t count)
++{
++	ssize_t err;
++	int nstbr;
++	aufs_bindex_t bindex, bend;
++	struct au_branch *br;
++	struct au_br_fhsm *bf;
++
++	/* except the bottom branch */
 +	err = 0;
-+	if (cpg.bdst == au_dbstart(dentry))
-+		goto out; /* success */
++	nstbr = 0;
++	bend = au_fhsm_bottom(sb);
++	for (bindex = 0; !err && bindex < bend; bindex++) {
++		br = au_sbr(sb, bindex);
++		if (!au_br_fhsm(br->br_perm))
++			continue;
 +
-+	err = au_pin(&pin, dentry, cpg.bdst, au_opt_udba(dentry->d_sb),
-+		     AuPin_MNT_WRITE);
-+	if (!err) {
-+		err = au_sio_cpup_simple(&cpg);
-+		au_unpin(&pin);
++		bf = br->br_fhsm;
++		mutex_lock(&bf->bf_lock);
++		if (bf->bf_readable) {
++			err = -EFAULT;
++			if (count >= sizeof(*stbr))
++				err = au_fhsm_do_read_one(stbr++, &bf->bf_stfs,
++							  br->br_id);
++			if (!err) {
++				bf->bf_readable = 0;
++				count -= sizeof(*stbr);
++				nstbr++;
++			}
++		}
++		mutex_unlock(&bf->bf_lock);
 +	}
++	if (!err)
++		err = sizeof(*stbr) * nstbr;
 +
-+out:
-+	di_downgrade_lock(dentry, AuLock_IR);
 +	return err;
 +}
 +
-+static int au_do_open_sp(struct file *file, int flags)
++static ssize_t au_fhsm_read(struct file *file, char __user *buf, size_t count,
++			   loff_t *pos)
 +{
-+	int err;
-+	struct dentry *dentry;
++	ssize_t err;
++	int readable;
++	aufs_bindex_t nfhsm, bindex, bend;
++	struct au_sbinfo *sbinfo;
++	struct au_fhsm *fhsm;
++	struct au_branch *br;
 +	struct super_block *sb;
-+	struct file *h_file;
-+	struct inode *h_inode;
-+	struct au_finfo *finfo;
 +
-+	finfo = au_fi(file);
-+	err = au_fi_sp_add(file);
++	err = 0;
++	sbinfo = file->private_data;
++	fhsm = &sbinfo->si_fhsm;
++need_data:
++	spin_lock_irq(&fhsm->fhsm_wqh.lock);
++	if (!atomic_read(&fhsm->fhsm_readable)) {
++		if (vfsub_file_flags(file) & O_NONBLOCK)
++			err = -EAGAIN;
++		else
++			err = wait_event_interruptible_locked_irq
++				(fhsm->fhsm_wqh,
++				 atomic_read(&fhsm->fhsm_readable));
++	}
++	spin_unlock_irq(&fhsm->fhsm_wqh.lock);
 +	if (unlikely(err))
 +		goto out;
 +
-+	dentry = file->f_dentry;
-+	AuDbg("%pd\n", dentry);
++	/* sb may already be dead */
++	au_rw_read_lock(&sbinfo->si_rwsem);
++	readable = atomic_read(&fhsm->fhsm_readable);
++	if (readable > 0) {
++		sb = sbinfo->si_sb;
++		AuDebugOn(!sb);
++		/* exclude the bottom branch */
++		nfhsm = 0;
++		bend = au_fhsm_bottom(sb);
++		for (bindex = 0; bindex < bend; bindex++) {
++			br = au_sbr(sb, bindex);
++			if (au_br_fhsm(br->br_perm))
++				nfhsm++;
++		}
++		err = -EMSGSIZE;
++		if (nfhsm * sizeof(struct aufs_stbr) <= count) {
++			atomic_set(&fhsm->fhsm_readable, 0);
++			err = au_fhsm_do_read(sbinfo->si_sb, (void __user *)buf,
++					     count);
++		}
++	}
++	au_rw_read_unlock(&sbinfo->si_rwsem);
++	if (!readable)
++		goto need_data;
 +
-+	/*
-+	 * try copying-up.
-+	 * operate on the ro branch is not an error.
-+	 */
-+	au_cpup_sp(dentry); /* ignore */
++out:
++	return err;
++}
++
++static int au_fhsm_release(struct inode *inode, struct file *file)
++{
++	struct au_sbinfo *sbinfo;
++	struct au_fhsm *fhsm;
++
++	/* sb may already be dead */
++	sbinfo = file->private_data;
++	fhsm = &sbinfo->si_fhsm;
++	spin_lock(&fhsm->fhsm_spin);
++	fhsm->fhsm_pid = 0;
++	spin_unlock(&fhsm->fhsm_spin);
++	kobject_put(&sbinfo->si_kobj);
++
++	return 0;
++}
++
++static const struct file_operations au_fhsm_fops = {
++	.owner		= THIS_MODULE,
++	.llseek		= noop_llseek,
++	.read		= au_fhsm_read,
++	.poll		= au_fhsm_poll,
++	.release	= au_fhsm_release
++};
 +
-+	/* prepare h_file */
-+	err = au_do_open_nondir(file, vfsub_file_flags(file));
++int au_fhsm_fd(struct super_block *sb, int oflags)
++{
++	int err, fd;
++	struct au_sbinfo *sbinfo;
++	struct au_fhsm *fhsm;
++
++	err = -EPERM;
++	if (unlikely(!capable(CAP_SYS_ADMIN)))
++		goto out;
++
++	err = -EINVAL;
++	if (unlikely(oflags & ~(O_CLOEXEC | O_NONBLOCK)))
++		goto out;
++
++	err = 0;
++	sbinfo = au_sbi(sb);
++	fhsm = &sbinfo->si_fhsm;
++	spin_lock(&fhsm->fhsm_spin);
++	if (!fhsm->fhsm_pid)
++		fhsm->fhsm_pid = current->pid;
++	else
++		err = -EBUSY;
++	spin_unlock(&fhsm->fhsm_spin);
 +	if (unlikely(err))
-+		goto out_del;
++		goto out;
 +
-+	sb = dentry->d_sb;
-+	h_file = au_hf_top(file);
-+	h_inode = file_inode(h_file);
-+	di_read_unlock(dentry, AuLock_IR);
-+	fi_write_unlock(file);
-+	si_read_unlock(sb);
-+	/* open this fifo in aufs */
-+	err = h_inode->i_fop->open(file_inode(file), file);
++	oflags |= O_RDONLY;
++	/* oflags |= FMODE_NONOTIFY; */
++	fd = anon_inode_getfd("[aufs_fhsm]", &au_fhsm_fops, sbinfo, oflags);
++	err = fd;
++	if (unlikely(fd < 0))
++		goto out_pid;
++
++	/* succeed reglardless 'fhsm' status */
++	kobject_get(&sbinfo->si_kobj);
 +	si_noflush_read_lock(sb);
-+	fi_write_lock(file);
-+	di_read_lock_child(dentry, AuLock_IR);
-+	if (!err) {
-+		au_init_fop_sp(file);
-+		goto out; /* success */
-+	} else
-+		au_set_h_fptr(file, au_fbstart(file), NULL);
++	if (au_ftest_si(sbinfo, FHSM))
++		au_fhsm_wrote_all(sb, /*force*/0);
++	si_read_unlock(sb);
++	goto out; /* success */
 +
-+out_del:
-+	au_fi_sp_del(file);
-+	file->private_data = finfo;
++out_pid:
++	spin_lock(&fhsm->fhsm_spin);
++	fhsm->fhsm_pid = 0;
++	spin_unlock(&fhsm->fhsm_spin);
 +out:
++	AuTraceErr(err);
 +	return err;
 +}
 +
-+static int aufs_open_sp(struct inode *inode, struct file *file)
++/* ---------------------------------------------------------------------- */
++
++int au_fhsm_br_alloc(struct au_branch *br)
 +{
 +	int err;
-+	struct super_block *sb;
 +
-+	sb = file->f_dentry->d_sb;
-+	si_read_lock(sb, AuLock_FLUSH);
-+	err = au_do_open(file, au_do_open_sp, /*fidir*/NULL);
-+	si_read_unlock(sb);
++	err = 0;
++	br->br_fhsm = kmalloc(sizeof(*br->br_fhsm), GFP_NOFS);
++	if (br->br_fhsm)
++		au_br_fhsm_init(br->br_fhsm);
++	else
++		err = -ENOMEM;
++
 +	return err;
 +}
 +
 +/* ---------------------------------------------------------------------- */
 +
-+void au_init_special_fop(struct inode *inode, umode_t mode, dev_t rdev)
++void au_fhsm_fin(struct super_block *sb)
 +{
-+	init_special_inode(inode, mode, rdev);
++	au_fhsm_notify(sb, /*val*/-1);
++}
 +
-+	switch (mode & S_IFMT) {
-+	case S_IFIFO:
-+		inode->i_fop = &au_sp_fop[AuSp_FIFO].fop;
-+		/*FALLTHROUGH*/
-+	case S_IFCHR:
-+	case S_IFBLK:
-+	case S_IFSOCK:
-+		break;
-+	default:
-+		AuDebugOn(1);
-+	}
++void au_fhsm_init(struct au_sbinfo *sbinfo)
++{
++	struct au_fhsm *fhsm;
++
++	fhsm = &sbinfo->si_fhsm;
++	spin_lock_init(&fhsm->fhsm_spin);
++	init_waitqueue_head(&fhsm->fhsm_wqh);
++	atomic_set(&fhsm->fhsm_readable, 0);
++	fhsm->fhsm_expire
++		= msecs_to_jiffies(AUFS_FHSM_CACHE_DEF_SEC * MSEC_PER_SEC);
++	fhsm->fhsm_bottom = -1;
 +}
 +
-+int au_special_file(umode_t mode)
++void au_fhsm_set(struct au_sbinfo *sbinfo, unsigned int sec)
 +{
-+	int ret;
++	sbinfo->si_fhsm.fhsm_expire
++		= msecs_to_jiffies(sec * MSEC_PER_SEC);
++}
 +
-+	ret = 0;
-+	switch (mode & S_IFMT) {
-+	case S_IFIFO:
-+#if 0
-+	case S_IFCHR:
-+	case S_IFBLK:
-+	case S_IFSOCK:
-+#endif
-+		ret = 1;
-+	}
++void au_fhsm_show(struct seq_file *seq, struct au_sbinfo *sbinfo)
++{
++	unsigned int u;
 +
-+	return ret;
++	if (!au_ftest_si(sbinfo, FHSM))
++		return;
++
++	u = jiffies_to_msecs(sbinfo->si_fhsm.fhsm_expire) / MSEC_PER_SEC;
++	if (u != AUFS_FHSM_CACHE_DEF_SEC)
++		seq_printf(seq, ",fhsm_sec=%u", u);
 +}
 --- a/fs/aufs/file.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/file.c	2014-06-17 18:23:40.787905015 +0100
-@@ -0,0 +1,725 @@
++++ b/fs/aufs/file.c	2014-09-08 00:38:33.514569904 +0100
+@@ -0,0 +1,833 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -11432,36 +11954,140 @@
 +	atomic_inc(&br->br_count);
 +	h_path.dentry = h_dentry;
 +	h_path.mnt = au_br_mnt(br);
-+	if (!au_special_file(h_inode->i_mode))
-+		h_file = vfsub_dentry_open(&h_path, flags);
-+	else {
-+		/* this block depends upon the configuration */
-+		di_read_unlock(dentry, AuLock_IR);
-+		fi_write_unlock(file);
-+		si_read_unlock(sb);
-+		h_file = vfsub_dentry_open(&h_path, flags);
-+		si_noflush_read_lock(sb);
-+		fi_write_lock(file);
-+		di_read_lock_child(dentry, AuLock_IR);
++	h_file = vfsub_dentry_open(&h_path, flags);
++	if (IS_ERR(h_file))
++		goto out_br;
++
++	if (exec_flag) {
++		err = deny_write_access(h_file);
++		if (unlikely(err)) {
++			fput(h_file);
++			h_file = ERR_PTR(err);
++			goto out_br;
++		}
++	}
++	fsnotify_open(h_file);
++	goto out; /* success */
++
++out_br:
++	atomic_dec(&br->br_count);
++out:
++	return h_file;
++}
++
++static int au_cmoo(struct dentry *dentry)
++{
++	int err, cmoo;
++	unsigned int udba;
++	struct path h_path;
++	struct au_pin pin;
++	struct au_cp_generic cpg = {
++		.dentry	= dentry,
++		.bdst	= -1,
++		.bsrc	= -1,
++		.len	= -1,
++		.pin	= &pin,
++		.flags	= AuCpup_DTIME | AuCpup_HOPEN
++	};
++	struct inode *inode, *delegated;
++	struct super_block *sb;
++	struct au_sbinfo *sbinfo;
++	struct au_fhsm *fhsm;
++	pid_t pid;
++	struct au_branch *br;
++	struct dentry *parent;
++	struct au_hinode *hdir;
++
++	DiMustWriteLock(dentry);
++	inode = dentry->d_inode;
++	IiMustWriteLock(inode);
++
++	err = 0;
++	if (IS_ROOT(dentry))
++		goto out;
++	cpg.bsrc = au_dbstart(dentry);
++	if (!cpg.bsrc)
++		goto out;
++
++	sb = dentry->d_sb;
++	sbinfo = au_sbi(sb);
++	fhsm = &sbinfo->si_fhsm;
++	pid = au_fhsm_pid(fhsm);
++	if (pid
++	    && (current->pid == pid
++		|| current->real_parent->pid == pid))
++		goto out;
++
++	br = au_sbr(sb, cpg.bsrc);
++	cmoo = au_br_cmoo(br->br_perm);
++	if (!cmoo)
++		goto out;
++	if (!S_ISREG(inode->i_mode))
++		cmoo &= AuBrAttr_COO_ALL;
++	if (!cmoo)
++		goto out;
++
++	parent = dget_parent(dentry);
++	di_write_lock_parent(parent);
++	err = au_wbr_do_copyup_bu(dentry, cpg.bsrc - 1);
++	cpg.bdst = err;
++	if (unlikely(err < 0)) {
++		err = 0;	/* there is no upper writable branch */
++		goto out_dgrade;
 +	}
-+	if (IS_ERR(h_file))
-+		goto out_br;
++	AuDbg("bsrc %d, bdst %d\n", cpg.bsrc, cpg.bdst);
 +
-+	if (exec_flag) {
-+		err = deny_write_access(h_file);
-+		if (unlikely(err)) {
-+			fput(h_file);
-+			h_file = ERR_PTR(err);
-+			goto out_br;
-+		}
++	/* do not respect the coo attrib for the target branch */
++	err = au_cpup_dirs(dentry, cpg.bdst);
++	if (unlikely(err))
++		goto out_dgrade;
++
++	di_downgrade_lock(parent, AuLock_IR);
++	udba = au_opt_udba(sb);
++	err = au_pin(&pin, dentry, cpg.bdst, udba,
++		     AuPin_DI_LOCKED | AuPin_MNT_WRITE);
++	if (unlikely(err))
++		goto out_parent;
++
++	err = au_sio_cpup_simple(&cpg);
++	au_unpin(&pin);
++	if (unlikely(err))
++		goto out_parent;
++	if (!(cmoo & AuBrWAttr_MOO))
++		goto out_parent; /* success */
++
++	err = au_pin(&pin, dentry, cpg.bsrc, udba,
++		     AuPin_DI_LOCKED | AuPin_MNT_WRITE);
++	if (unlikely(err))
++		goto out_parent;
++
++	h_path.mnt = au_br_mnt(br);
++	h_path.dentry = au_h_dptr(dentry, cpg.bsrc);
++	hdir = au_hi(parent->d_inode, cpg.bsrc);
++	delegated = NULL;
++	err = vfsub_unlink(hdir->hi_inode, &h_path, &delegated, /*force*/1);
++	au_unpin(&pin);
++	/* todo: keep h_dentry or not? */
++	if (unlikely(err == -EWOULDBLOCK)) {
++		pr_warn("cannot retry for NFSv4 delegation"
++			" for an internal unlink\n");
++		iput(delegated);
 +	}
-+	fsnotify_open(h_file);
-+	goto out; /* success */
++	if (unlikely(err)) {
++		pr_err("unlink %pd after coo failed (%d), ignored\n",
++		       dentry, err);
++		err = 0;
++	}
++	goto out_parent; /* success */
 +
-+out_br:
-+	atomic_dec(&br->br_count);
++out_dgrade:
++	di_downgrade_lock(parent, AuLock_IR);
++out_parent:
++	di_read_unlock(parent, AuLock_IR);
++	dput(parent);
 +out:
-+	return h_file;
++	AuTraceErr(err);
++	return err;
 +}
 +
 +int au_do_open(struct file *file, int (*open)(struct file *file, int flags),
@@ -11469,19 +12095,29 @@
 +{
 +	int err;
 +	struct dentry *dentry;
++	struct au_finfo *finfo;
 +
 +	err = au_finfo_init(file, fidir);
 +	if (unlikely(err))
 +		goto out;
 +
 +	dentry = file->f_dentry;
-+	di_read_lock_child(dentry, AuLock_IR);
-+	err = open(file, vfsub_file_flags(file));
++	di_write_lock_child(dentry);
++	err = au_cmoo(dentry);
++	di_downgrade_lock(dentry, AuLock_IR);
++	if (!err)
++		err = open(file, vfsub_file_flags(file));
 +	di_read_unlock(dentry, AuLock_IR);
 +
++	finfo = au_fi(file);
++	if (!err) {
++		finfo->fi_file = file;
++		au_sphl_add(&finfo->fi_hlist,
++			    &au_sbi(file->f_dentry->d_sb)->si_files);
++	}
 +	fi_write_unlock(file);
 +	if (unlikely(err)) {
-+		au_fi(file)->fi_hdir = NULL;
++		finfo->fi_hdir = NULL;
 +		au_finfo_fin(file);
 +	}
 +
@@ -11497,7 +12133,6 @@
 +	struct file *h_file, *h_file_tmp;
 +
 +	dentry = file->f_dentry;
-+	AuDebugOn(au_special_file(dentry->d_inode->i_mode));
 +	bstart = au_dbstart(dentry);
 +	h_file_tmp = NULL;
 +	if (au_fbstart(file) == bstart) {
@@ -11633,7 +12268,6 @@
 +
 +	sb = cpg.dentry->d_sb;
 +	inode = cpg.dentry->d_inode;
-+	AuDebugOn(au_special_file(inode->i_mode));
 +	cpg.bsrc = au_fbstart(file);
 +	err = au_test_ro(sb, cpg.bsrc, inode);
 +	if (!err && (au_hf_top(file)->f_mode & FMODE_WRITE)) {
@@ -11854,8 +12488,7 @@
 +			if (p->hf_file) {
 +				if (file_inode(p->hf_file))
 +					break;
-+				else
-+					au_hfput(p, file);
++				au_hfput(p, file);
 +			}
 +	} else {
 +		bend = au_br_index(sb, brid);
@@ -11872,8 +12505,7 @@
 +		if (p->hf_file) {
 +			if (file_inode(p->hf_file))
 +				break;
-+			else
-+				au_hfput(p, file);
++			au_hfput(p, file);
 +		}
 +	AuDebugOn(fidir->fd_bbot < finfo->fi_btop);
 +}
@@ -11941,7 +12573,6 @@
 +	err = 0;
 +	dentry = file->f_dentry;
 +	inode = dentry->d_inode;
-+	AuDebugOn(au_special_file(inode->i_mode));
 +	sigen = au_sigen(dentry->d_sb);
 +	fi_write_lock(file);
 +	figen = au_figen(file);
@@ -11990,8 +12621,7 @@
 +
 +/* it will never be called, but necessary to support O_DIRECT */
 +static ssize_t aufs_direct_IO(int rw, struct kiocb *iocb,
-+			      const struct iovec *iov, loff_t offset,
-+			      unsigned long nr_segs)
++			      struct iov_iter *iter, loff_t offset)
 +{ BUG(); return 0; }
 +
 +/*
@@ -12028,8 +12658,8 @@
 +static int aufs_launder_page(struct page *page)
 +{ AuUnsupport(); return 0; }
 +static int aufs_is_partially_uptodate(struct page *page,
-+				      read_descriptor_t *desc,
-+				      unsigned long from)
++				      unsigned long from,
++				      unsigned long count)
 +{ AuUnsupport(); return 0; }
 +static void aufs_is_dirty_writeback(struct page *page, bool *dirty,
 +				    bool *writeback)
@@ -12068,8 +12698,8 @@
 +#endif /* CONFIG_AUFS_DEBUG */
 +};
 --- a/fs/aufs/file.h	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/file.h	2014-01-20 03:24:33.512760970 +0000
-@@ -0,0 +1,312 @@
++++ b/fs/aufs/file.h	2014-07-15 14:04:48.728871625 +0100
+@@ -0,0 +1,289 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -12183,24 +12813,6 @@
 +int au_do_open_nondir(struct file *file, int flags);
 +int aufs_release_nondir(struct inode *inode __maybe_unused, struct file *file);
 +
-+#ifdef CONFIG_AUFS_SP_IATTR
-+/* f_op_sp.c */
-+struct au_finfo *au_fi_sp(struct file *file);
-+int au_special_file(umode_t mode);
-+void au_init_special_fop(struct inode *inode, umode_t mode, dev_t rdev);
-+#else
-+static inline struct au_finfo *au_fi_sp(struct file *file)
-+{
-+	return NULL;
-+}
-+AuStubInt0(au_special_file, umode_t mode)
-+static inline void au_init_special_fop(struct inode *inode, umode_t mode,
-+				       dev_t rdev)
-+{
-+	init_special_inode(inode, mode, rdev);
-+}
-+#endif
-+
 +/* finfo.c */
 +void au_hfput(struct au_hfile *hf, struct file *file);
 +void au_set_h_fptr(struct file *file, aufs_bindex_t bindex,
@@ -12227,12 +12839,7 @@
 +
 +static inline struct au_finfo *au_fi(struct file *file)
 +{
-+	struct au_finfo *finfo;
-+
-+	finfo = au_fi_sp(file);
-+	if (!finfo)
-+		finfo = file->private_data;
-+	return finfo;
++	return file->private_data;
 +}
 +
 +/* ---------------------------------------------------------------------- */
@@ -13014,8 +13621,8 @@
 +#endif /* __KERNEL__ */
 +#endif /* __AUFS_FSTYPE_H__ */
 --- a/fs/aufs/hfsnotify.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/hfsnotify.c	2014-04-08 03:07:56.519497471 +0100
-@@ -0,0 +1,281 @@
++++ b/fs/aufs/hfsnotify.c	2014-09-08 00:38:33.514569904 +0100
+@@ -0,0 +1,288 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -13051,7 +13658,7 @@
 +					     hn_mark);
 +	AuDbg("here\n");
 +	au_cache_free_hnotify(hn);
-+	smp_mb__before_atomic_dec();
++	smp_mb__before_atomic();
 +	if (atomic64_dec_and_test(&au_hfsn_ifree))
 +		wake_up(&au_hfsn_wq);
 +}
@@ -13078,10 +13685,12 @@
 +	 * by udba rename or rmdir, aufs assign a new inode to the known
 +	 * h_inode, so specify 1 to allow dups.
 +	 */
++	lockdep_off();
 +	err = fsnotify_add_mark(mark, br->br_hfsn->hfsn_group, hinode->hi_inode,
 +				 /*mnt*/NULL, /*allow_dups*/1);
 +	/* even if err */
 +	fsnotify_put_mark(mark);
++	lockdep_on();
 +
 +	return err;
 +}
@@ -13100,8 +13709,10 @@
 +	group = mark->group;
 +	fsnotify_get_group(group);
 +	spin_unlock(&mark->lock);
++	lockdep_off();
 +	fsnotify_destroy_mark(mark, group);
 +	fsnotify_put_group(group);
++	lockdep_on();
 +
 +	/* free hn by myself */
 +	return 0;
@@ -13228,8 +13839,11 @@
 +	struct au_br_hfsnotify *hfsn;
 +
 +	hfsn = br->br_hfsn;
-+	if (hfsn)
++	if (hfsn) {
++		lockdep_off();
 +		fsnotify_put_group(hfsn->hfsn_group);
++		lockdep_on();
++	}
 +}
 +
 +static int au_hfsn_init_br(struct au_branch *br, int perm)
@@ -13357,8 +13971,8 @@
 +	}
 +}
 --- a/fs/aufs/hnotify.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/hnotify.c	2014-06-17 18:23:40.787905015 +0100
-@@ -0,0 +1,711 @@
++++ b/fs/aufs/hnotify.c	2014-09-08 00:38:33.514569904 +0100
+@@ -0,0 +1,714 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -13588,7 +14202,7 @@
 +		spin_unlock(&inode->i_lock);
 +	} else {
 +		au_fset_si(au_sbi(inode->i_sb), FAILED_REFRESH_DIR);
-+		d = d_find_alias(inode);
++		d = d_find_any_alias(inode);
 +		if (!d) {
 +			au_iigen_dec(inode);
 +			goto out;
@@ -13678,6 +14292,7 @@
 +static int hn_job(struct hn_job_args *a)
 +{
 +	const unsigned int isdir = au_ftest_hnjob(a->flags, ISDIR);
++	int e;
 +
 +	/* reset xino */
 +	if (au_ftest_hnjob(a->flags, XINO0) && a->inode)
@@ -13695,11 +14310,11 @@
 +
 +	/* make the generation obsolete */
 +	if (au_ftest_hnjob(a->flags, GEN)) {
-+		int err = -1;
++		e = -1;
 +		if (a->inode)
-+			err = hn_gen_by_inode(a->h_name, a->h_nlen, a->inode,
++			e = hn_gen_by_inode(a->h_name, a->h_nlen, a->inode,
 +					      isdir);
-+		if (err && a->dentry)
++		if (e && a->dentry)
 +			hn_gen_by_name(a->dentry, isdir);
 +		/* ignore this error */
 +	}
@@ -13732,7 +14347,7 @@
 +	struct dentry *dentry, *d, *parent;
 +	struct qstr *dname;
 +
-+	parent = d_find_alias(dir);
++	parent = d_find_any_alias(dir);
 +	if (!parent)
 +		return NULL;
 +
@@ -13991,8 +14606,10 @@
 +		p[len] = 0;
 +	}
 +
++	/* NFS fires the event for silly-renamed one from kworker */
 +	f = 0;
-+	if (!dir->i_nlink)
++	if (!dir->i_nlink
++	    || (au_test_nfs(h_dir->i_sb) && (mask & FS_DELETE)))
 +		f = AuWkq_NEST;
 +	err = au_wkq_nowait(au_hn_bh, args, dir->i_sb, f);
 +	if (unlikely(err)) {
@@ -14071,8 +14688,8 @@
 +		au_hn_destroy_cache();
 +}
 --- a/fs/aufs/i_op.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/i_op.c	2014-06-17 18:23:40.787905015 +0100
-@@ -0,0 +1,1132 @@
++++ b/fs/aufs/i_op.c	2014-09-08 00:39:05.266571221 +0100
+@@ -0,0 +1,1142 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -14177,7 +14794,9 @@
 +		goto out;
 +#endif
 +
-+	if (!isdir || write_mask) {
++	if (!isdir
++	    || write_mask
++	    || au_opt_test(au_mntflags(sb), DIRPERM1)) {
 +		err = au_busy_or_stale();
 +		h_inode = au_h_iptr(inode, au_ibstart(inode));
 +		if (unlikely(!h_inode
@@ -14276,11 +14895,11 @@
 +
 +	if (npositive) {
 +		inode = au_new_inode(dentry, /*must_new*/0);
-+		ret = (void *)inode;
-+	}
-+	if (IS_ERR(inode)) {
-+		inode = NULL;
-+		goto out_unlock;
++		if (IS_ERR(inode)) {
++			ret = (void *)inode;
++			inode = NULL;
++			goto out_unlock;
++		}
 +	}
 +
 +	ret = d_splice_alias(inode, dentry);
@@ -14455,7 +15074,7 @@
 +		au_hn_imtx_unlock(p->hdir);
 +}
 +
-+static int au_pin_hdir_lock(struct au_pin *p)
++int au_pin_hdir_lock(struct au_pin *p)
 +{
 +	int err;
 +
@@ -14621,6 +15240,8 @@
 +	if (!err)
 +		goto out; /* success */
 +
++	au_unpin(p);
++
 +out_err:
 +	pr_err("err %d\n", err);
 +	err = au_busy_or_stale();
@@ -14966,7 +15587,7 @@
 +			struct dentry *dentry, struct kstat *st)
 +{
 +	int err;
-+	unsigned int mnt_flags;
++	unsigned int mnt_flags, sigen;
 +	aufs_bindex_t bindex;
 +	unsigned char udba_none, positive;
 +	struct super_block *sb, *h_sb;
@@ -14983,7 +15604,7 @@
 +
 +	/* support fstat(2) */
 +	if (!d_unlinked(dentry) && !udba_none) {
-+		unsigned int sigen = au_sigen(sb);
++		sigen = au_sigen(sb);
 +		err = au_digen_test(dentry, sigen);
 +		if (!err) {
 +			di_read_lock_child(dentry, AuLock_IR);
@@ -15157,9 +15778,15 @@
 +	h_inode = au_h_iptr(inode, au_ibstart(inode));
 +	err = vfsub_update_time(h_inode, ts, flags);
 +	lockdep_off();
++	if (!err)
++		au_cpup_attr_timesizes(inode);
 +	ii_write_unlock(inode);
 +	si_read_unlock(sb);
 +	lockdep_on();
++
++	if (!err && (flags & S_VERSION))
++		inode_inc_iversion(inode);
++
 +	return err;
 +}
 +
@@ -15206,8 +15833,8 @@
 +	.update_time	= aufs_update_time
 +};
 --- a/fs/aufs/i_op_add.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/i_op_add.c	2014-06-17 18:23:40.787905015 +0100
-@@ -0,0 +1,881 @@
++++ b/fs/aufs/i_op_add.c	2014-09-08 00:38:33.514569904 +0100
+@@ -0,0 +1,891 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -15243,17 +15870,19 @@
 +	int err, rerr;
 +	aufs_bindex_t bwh;
 +	struct path h_path;
++	struct super_block *sb;
 +	struct inode *inode, *h_dir;
 +	struct dentry *wh;
 +
 +	bwh = -1;
++	sb = dir->i_sb;
 +	if (wh_dentry) {
 +		h_dir = wh_dentry->d_parent->d_inode; /* dir inode is locked */
 +		IMustLock(h_dir);
 +		AuDebugOn(au_h_iptr(dir, bindex) != h_dir);
 +		bwh = au_dbwh(dentry);
 +		h_path.dentry = wh_dentry;
-+		h_path.mnt = au_sbr_mnt(dir->i_sb, bindex);
++		h_path.mnt = au_sbr_mnt(sb, bindex);
 +		err = au_wh_unlink_dentry(au_h_iptr(dir, bindex), &h_path,
 +					  dentry);
 +		if (unlikely(err))
@@ -15268,6 +15897,7 @@
 +		if (au_ibstart(dir) == au_dbstart(dentry))
 +			au_cpup_attr_timesizes(dir);
 +		dir->i_version++;
++		au_fhsm_wrote(sb, bindex, /*force*/0);
 +		return 0; /* success */
 +	}
 +
@@ -15440,7 +16070,7 @@
 +static int add_simple(struct inode *dir, struct dentry *dentry,
 +		      struct simple_arg *arg)
 +{
-+	int err;
++	int err, rerr;
 +	aufs_bindex_t bstart;
 +	unsigned char created;
 +	struct dentry *wh_dentry, *parent;
@@ -15502,7 +16132,6 @@
 +
 +	/* revert */
 +	if (unlikely(created && err && a->h_path.dentry->d_inode)) {
-+		int rerr;
 +		/* no delegation since it is just created */
 +		rerr = vfsub_unlink(h_dir, &a->h_path, /*delegated*/NULL,
 +				    /*force*/0);
@@ -15750,7 +16379,10 @@
 +			      dget(au_h_dptr(src_dentry, a->bsrc)));
 +		dget(a->h_path.dentry);
 +		au_set_h_dptr(dentry, a->bdst, NULL);
++		AuDbg("temporary d_inode...\n");
++		spin_lock(&dentry->d_lock);
 +		dentry->d_inode = src_dentry->d_inode; /* tmp */
++		spin_unlock(&dentry->d_lock);
 +		h_file = au_h_open_pre(dentry, a->bsrc, /*force_wr*/0);
 +		if (IS_ERR(h_file))
 +			err = PTR_ERR(h_file);
@@ -15772,7 +16404,10 @@
 +				au_set_h_dptr(dentry, a->bdst,
 +					      a->h_path.dentry);
 +		}
++		spin_lock(&dentry->d_lock);
 +		dentry->d_inode = NULL; /* restore */
++		spin_unlock(&dentry->d_lock);
++		AuDbg("temporary d_inode...done\n");
 +		au_set_h_dptr(dentry, a->bsrc, NULL);
 +		au_set_dbend(dentry, bend);
 +	} else {
@@ -15951,6 +16586,8 @@
 +	if (d_unhashed(a->h_path.dentry))
 +		/* some filesystem calls d_drop() */
 +		d_drop(dentry);
++	/* some filesystems consume an inode even hardlink */
++	au_fhsm_wrote(sb, a->bdst, /*force*/0);
 +	goto out_unpin; /* success */
 +
 +out_revert:
@@ -16090,8 +16727,8 @@
 +	return err;
 +}
 --- a/fs/aufs/i_op_del.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/i_op_del.c	2014-01-20 03:24:33.512760970 +0000
-@@ -0,0 +1,506 @@
++++ b/fs/aufs/i_op_del.c	2014-07-15 14:04:48.732871625 +0100
+@@ -0,0 +1,507 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -16220,11 +16857,12 @@
 +	 * let's try heavy test.
 +	 */
 +	err = -EACCES;
-+	if (unlikely(au_test_h_perm(h_parent->d_inode, MAY_EXEC | MAY_WRITE)))
++	if (unlikely(!au_opt_test(au_mntflags(dentry->d_sb), DIRPERM1)
++		     && au_test_h_perm(h_parent->d_inode,
++				       MAY_EXEC | MAY_WRITE)))
 +		goto out;
 +
-+	h_latest = au_sio_lkup_one(&dentry->d_name, h_parent,
-+				   au_sbr(dentry->d_sb, bindex));
++	h_latest = au_sio_lkup_one(&dentry->d_name, h_parent);
 +	err = -EIO;
 +	if (IS_ERR(h_latest))
 +		goto out;
@@ -16599,8 +17237,8 @@
 +	return err;
 +}
 --- a/fs/aufs/i_op_ren.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/i_op_ren.c	2014-01-20 03:24:33.512760970 +0000
-@@ -0,0 +1,1032 @@
++++ b/fs/aufs/i_op_ren.c	2014-09-08 00:38:33.514569904 +0100
+@@ -0,0 +1,1034 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -16885,7 +17523,8 @@
 +	au_hn_imtx_unlock(a->src_hinode);
 +	if (IS_ERR(diropq))
 +		err = PTR_ERR(diropq);
-+	dput(diropq);
++	else
++		dput(diropq);
 +
 +	return err;
 +}
@@ -16985,6 +17624,7 @@
 +	if (a->thargs)
 +		au_ren_del_whtmp(a); /* ignore this error */
 +
++	au_fhsm_wrote(a->src_dentry->d_sb, a->btgt, /*force*/0);
 +	err = 0;
 +	goto out_success;
 +
@@ -17634,7 +18274,7 @@
 +	return err;
 +}
 --- a/fs/aufs/iinfo.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/iinfo.c	2014-06-17 18:23:40.787905015 +0100
++++ b/fs/aufs/iinfo.c	2014-07-15 14:04:48.732871625 +0100
 @@ -0,0 +1,277 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
@@ -17914,8 +18554,8 @@
 +	AuRwDestroy(&iinfo->ii_rwsem);
 +}
 --- a/fs/aufs/inode.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/inode.c	2014-01-20 03:24:33.516760970 +0000
-@@ -0,0 +1,491 @@
++++ b/fs/aufs/inode.c	2014-07-15 14:04:48.732871625 +0100
+@@ -0,0 +1,492 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -18131,7 +18771,7 @@
 +	case S_IFSOCK:
 +		btail = au_dbtail(dentry);
 +		inode->i_op = &aufs_iop;
-+		au_init_special_fop(inode, mode, h_inode->i_rdev);
++		init_special_inode(inode, mode, h_inode->i_rdev);
 +		break;
 +	default:
 +		AuIOErr("Unknown file type 0%o\n", mode);
@@ -18372,6 +19012,7 @@
 +	       struct inode *inode)
 +{
 +	int err;
++	struct inode *hi;
 +
 +	err = au_br_rdonly(au_sbr(sb, bindex));
 +
@@ -18384,7 +19025,7 @@
 +		 * permission check is unnecessary since vfsub routine
 +		 * will be called later
 +		 */
-+		struct inode *hi = au_h_iptr(inode, bindex);
++		hi = au_h_iptr(inode, bindex);
 +		if (hi)
 +			err = IS_IMMUTABLE(hi) ? -EROFS : 0;
 +	}
@@ -18408,8 +19049,8 @@
 +	return au_test_h_perm(h_inode, mask);
 +}
 --- a/fs/aufs/inode.h	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/inode.h	2014-06-17 18:23:40.787905015 +0100
-@@ -0,0 +1,601 @@
++++ b/fs/aufs/inode.h	2014-09-08 00:38:33.514569904 +0100
+@@ -0,0 +1,602 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -18520,6 +19161,7 @@
 +};
 +
 +void au_pin_hdir_unlock(struct au_pin *p);
++int au_pin_hdir_lock(struct au_pin *p);
 +int au_pin_hdir_relock(struct au_pin *p);
 +void au_pin_hdir_set_owner(struct au_pin *p, struct task_struct *task);
 +void au_pin_hdir_acquire_nest(struct au_pin *p);
@@ -19012,8 +19654,8 @@
 +#endif /* __KERNEL__ */
 +#endif /* __AUFS_INODE_H__ */
 --- a/fs/aufs/ioctl.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/ioctl.c	2014-01-20 03:24:33.516760970 +0000
-@@ -0,0 +1,201 @@
++++ b/fs/aufs/ioctl.c	2014-09-08 00:38:33.514569904 +0100
+@@ -0,0 +1,219 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -19036,6 +19678,7 @@
 + * plink-management and readdir in userspace.
 + * assist the pathconf(3) wrapper library.
 + * move-down
++ * File-based Hierarchical Storage Management.
 + */
 +
 +#include <linux/compat.h>
@@ -19137,6 +19780,7 @@
 +long aufs_ioctl_dir(struct file *file, unsigned int cmd, unsigned long arg)
 +{
 +	long err;
++	struct dentry *dentry;
 +
 +	switch (cmd) {
 +	case AUFS_CTL_RDU:
@@ -19152,6 +19796,18 @@
 +		err = au_ibusy_ioctl(file, arg);
 +		break;
 +
++	case AUFS_CTL_BRINFO:
++		err = au_brinfo_ioctl(file, arg);
++		break;
++
++	case AUFS_CTL_FHSM_FD:
++		dentry = file->f_dentry;
++		if (IS_ROOT(dentry))
++			err = au_fhsm_fd(dentry->d_sb, arg);
++		else
++			err = -ENOTTY;
++		break;
++
 +	default:
 +		/* do not call the lower */
 +		AuDbg("0x%x\n", cmd);
@@ -19201,6 +19857,10 @@
 +		err = au_ibusy_compat_ioctl(file, arg);
 +		break;
 +
++	case AUFS_CTL_BRINFO:
++		err = au_brinfo_compat_ioctl(file, arg);
++		break;
++
 +	default:
 +		err = aufs_ioctl_dir(file, cmd, arg);
 +	}
@@ -19476,8 +20136,8 @@
 +ccflags-y += -DHFSPLUS_SUPER_MAGIC=0x482b
 +endif
 --- a/fs/aufs/module.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/module.c	2014-01-20 03:24:33.516760970 +0000
-@@ -0,0 +1,202 @@
++++ b/fs/aufs/module.c	2014-07-15 14:04:48.732871625 +0100
+@@ -0,0 +1,210 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -19589,6 +20249,11 @@
 +MODULE_PARM_DESC(brs, "use <sysfs>/fs/aufs/si_*/brN");
 +module_param_named(brs, sysaufs_brs, int, S_IRUGO);
 +
++/* this module parameter has no meaning when USER_NS is disabled */
++static bool au_userns;
++MODULE_PARM_DESC(allow_userns, "allow unprivileged to mount under userns");
++module_param_named(allow_userns, au_userns, bool, S_IRUGO);
++
 +/* ---------------------------------------------------------------------- */
 +
 +static char au_esc_chars[0x20 + 3]; /* 0x01-0x20, backslash, del, and NULL */
@@ -19639,9 +20304,12 @@
 +	err = au_cache_init();
 +	if (unlikely(err))
 +		goto out_sysrq;
++
++	aufs_fs_type.fs_flags |= au_userns ? FS_USERNS_MOUNT : 0;
 +	err = register_filesystem(&aufs_fs_type);
 +	if (unlikely(err))
 +		goto out_cache;
++
 +	/* since we define pr_fmt, call printk directly */
 +	printk(KERN_INFO AUFS_NAME " " AUFS_VERSION "\n");
 +	goto out; /* success */
@@ -19788,8 +20456,8 @@
 +#endif /* __KERNEL__ */
 +#endif /* __AUFS_MODULE_H__ */
 --- a/fs/aufs/mvdown.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/mvdown.c	2014-01-20 03:24:33.516760970 +0000
-@@ -0,0 +1,627 @@
++++ b/fs/aufs/mvdown.c	2014-09-08 00:38:33.514569904 +0100
+@@ -0,0 +1,694 @@
 +/*
 + * Copyright (C) 2011-2014 Junjiro R. Okajima
 + *
@@ -19819,6 +20487,7 @@
 +		struct dentry *h_parent;
 +		struct au_hinode *hdir;
 +		struct inode *h_dir, *h_inode;
++		struct au_pin pin;
 +	} info[AUFS_MVDOWN_NARRAY];
 +
 +	struct aufs_mvdown mvdown;
@@ -19827,32 +20496,69 @@
 +	struct super_block *sb;
 +	aufs_bindex_t bopq, bwh, bfound;
 +	unsigned char rename_lock;
-+	struct au_pin pin;
 +};
 +
 +#define mvd_errno		mvdown.au_errno
-+#define mvd_bsrc		mvdown.a[AUFS_MVDOWN_UPPER].bindex
-+#define mvd_src_brid		mvdown.a[AUFS_MVDOWN_UPPER].brid
-+#define mvd_bdst		mvdown.a[AUFS_MVDOWN_LOWER].bindex
-+#define mvd_dst_brid		mvdown.a[AUFS_MVDOWN_LOWER].brid
++#define mvd_bsrc		mvdown.stbr[AUFS_MVDOWN_UPPER].bindex
++#define mvd_src_brid		mvdown.stbr[AUFS_MVDOWN_UPPER].brid
++#define mvd_bdst		mvdown.stbr[AUFS_MVDOWN_LOWER].bindex
++#define mvd_dst_brid		mvdown.stbr[AUFS_MVDOWN_LOWER].brid
 +
 +#define mvd_h_src_sb		info[AUFS_MVDOWN_UPPER].h_sb
 +#define mvd_h_src_parent	info[AUFS_MVDOWN_UPPER].h_parent
 +#define mvd_hdir_src		info[AUFS_MVDOWN_UPPER].hdir
 +#define mvd_h_src_dir		info[AUFS_MVDOWN_UPPER].h_dir
 +#define mvd_h_src_inode		info[AUFS_MVDOWN_UPPER].h_inode
++#define mvd_pin_src		info[AUFS_MVDOWN_UPPER].pin
 +
 +#define mvd_h_dst_sb		info[AUFS_MVDOWN_LOWER].h_sb
 +#define mvd_h_dst_parent	info[AUFS_MVDOWN_LOWER].h_parent
 +#define mvd_hdir_dst		info[AUFS_MVDOWN_LOWER].hdir
 +#define mvd_h_dst_dir		info[AUFS_MVDOWN_LOWER].h_dir
 +#define mvd_h_dst_inode		info[AUFS_MVDOWN_LOWER].h_inode
++#define mvd_pin_dst		info[AUFS_MVDOWN_LOWER].pin
 +
 +#define AU_MVD_PR(flag, ...) do {			\
 +		if (flag)				\
 +			pr_err(__VA_ARGS__);		\
 +	} while (0)
 +
++static int find_lower_writable(struct au_mvd_args *a)
++{
++	struct super_block *sb;
++	aufs_bindex_t bindex, bend;
++	struct au_branch *br;
++
++	sb = a->sb;
++	bindex = a->mvd_bsrc;
++	bend = au_sbend(sb);
++	if (a->mvdown.flags & AUFS_MVDOWN_FHSM_LOWER)
++		for (bindex++; bindex <= bend; bindex++) {
++			br = au_sbr(sb, bindex);
++			if (au_br_fhsm(br->br_perm)
++			    && (!(au_br_sb(br)->s_flags & MS_RDONLY)))
++				return bindex;
++		}
++	else if (!(a->mvdown.flags & AUFS_MVDOWN_ROLOWER))
++		for (bindex++; bindex <= bend; bindex++) {
++			br = au_sbr(sb, bindex);
++			if (!au_br_rdonly(br))
++				return bindex;
++		}
++	else
++		for (bindex++; bindex <= bend; bindex++) {
++			br = au_sbr(sb, bindex);
++			if (!(au_br_sb(br)->s_flags & MS_RDONLY)) {
++				if (au_br_rdonly(br))
++					a->mvdown.flags
++						|= AUFS_MVDOWN_ROLOWER_R;
++				return bindex;
++			}
++		}
++
++	return -1;
++}
++
 +/* make the parent dir on bdst */
 +static int au_do_mkdir(const unsigned char dmsg, struct au_mvd_args *a)
 +{
@@ -19887,22 +20593,44 @@
 +
 +	a->mvd_h_src_sb = au_sbr_sb(a->sb, a->mvd_bsrc);
 +	a->mvd_h_dst_sb = au_sbr_sb(a->sb, a->mvd_bdst);
++	err = au_pin(&a->mvd_pin_dst, a->dentry, a->mvd_bdst,
++		     au_opt_udba(a->sb),
++		     AuPin_MNT_WRITE | AuPin_DI_LOCKED);
++	AuTraceErr(err);
++	if (unlikely(err)) {
++		AU_MVD_PR(dmsg, "pin_dst failed\n");
++		goto out;
++	}
++
 +	if (a->mvd_h_src_sb != a->mvd_h_dst_sb) {
 +		a->rename_lock = 0;
-+		err = au_pin(&a->pin, a->dentry, a->mvd_bdst,
-+			     au_opt_udba(a->sb),
-+			     AuPin_MNT_WRITE | AuPin_DI_LOCKED);
-+		if (!err) {
-+			a->mvd_h_src_dir = a->mvd_h_src_parent->d_inode;
-+			mutex_lock_nested(&a->mvd_h_src_dir->i_mutex,
-+					  AuLsc_I_PARENT3);
-+		} else
-+			AU_MVD_PR(dmsg, "pin failed\n");
-+		goto out;
++		au_pin_init(&a->mvd_pin_src, a->dentry, a->mvd_bsrc,
++			    AuLsc_DI_PARENT, AuLsc_I_PARENT3,
++			    au_opt_udba(a->sb),
++			    AuPin_MNT_WRITE | AuPin_DI_LOCKED);
++		err = au_do_pin(&a->mvd_pin_src);
++		AuTraceErr(err);
++		a->mvd_h_src_dir = a->mvd_h_src_parent->d_inode;
++		if (unlikely(err)) {
++			AU_MVD_PR(dmsg, "pin_src failed\n");
++			goto out_dst;
++		}
++		goto out; /* success */
 +	}
 +
-+	err = 0;
 +	a->rename_lock = 1;
++	au_pin_hdir_unlock(&a->mvd_pin_dst);
++	err = au_pin(&a->mvd_pin_src, a->dentry, a->mvd_bsrc,
++		     au_opt_udba(a->sb),
++		     AuPin_MNT_WRITE | AuPin_DI_LOCKED);
++	AuTraceErr(err);
++	a->mvd_h_src_dir = a->mvd_h_src_parent->d_inode;
++	if (unlikely(err)) {
++		AU_MVD_PR(dmsg, "pin_src failed\n");
++		au_pin_hdir_lock(&a->mvd_pin_dst);
++		goto out_dst;
++	}
++	au_pin_hdir_unlock(&a->mvd_pin_src);
 +	h_trap = vfsub_lock_rename(a->mvd_h_src_parent, a->mvd_hdir_src,
 +				   a->mvd_h_dst_parent, a->mvd_hdir_dst);
 +	if (h_trap) {
@@ -19911,7 +20639,20 @@
 +			err = (h_trap != a->mvd_h_dst_parent);
 +	}
 +	BUG_ON(err); /* it should never happen */
++	if (unlikely(a->mvd_h_src_dir != au_pinned_h_dir(&a->mvd_pin_src))) {
++		err = -EBUSY;
++		AuTraceErr(err);
++		vfsub_unlock_rename(a->mvd_h_src_parent, a->mvd_hdir_src,
++				    a->mvd_h_dst_parent, a->mvd_hdir_dst);
++		au_pin_hdir_lock(&a->mvd_pin_src);
++		au_unpin(&a->mvd_pin_src);
++		au_pin_hdir_lock(&a->mvd_pin_dst);
++		goto out_dst;
++	}
++	goto out; /* success */
 +
++out_dst:
++	au_unpin(&a->mvd_pin_dst);
 +out:
 +	AuTraceErr(err);
 +	return err;
@@ -19919,12 +20660,16 @@
 +
 +static void au_do_unlock(const unsigned char dmsg, struct au_mvd_args *a)
 +{
-+	if (!a->rename_lock) {
-+		mutex_unlock(&a->mvd_h_src_dir->i_mutex);
-+		au_unpin(&a->pin);
-+	} else
++	if (!a->rename_lock)
++		au_unpin(&a->mvd_pin_src);
++	else {
 +		vfsub_unlock_rename(a->mvd_h_src_parent, a->mvd_hdir_src,
 +				    a->mvd_h_dst_parent, a->mvd_hdir_dst);
++		au_pin_hdir_lock(&a->mvd_pin_src);
++		au_unpin(&a->mvd_pin_src);
++		au_pin_hdir_lock(&a->mvd_pin_dst);
++	}
++	au_unpin(&a->mvd_pin_dst);
 +}
 +
 +/* copy-down the file */
@@ -19936,7 +20681,7 @@
 +		.bdst	= a->mvd_bdst,
 +		.bsrc	= a->mvd_bsrc,
 +		.len	= -1,
-+		.pin	= &a->pin,
++		.pin	= &a->mvd_pin_dst,
 +		.flags	= AuCpup_DTIME | AuCpup_HOPEN
 +	};
 +
@@ -19995,8 +20740,6 @@
 +
 +/*
 + * unlink the topmost h_dentry
-+ * Note: the target file MAY be modified by UDBA between this mutex_unlock() and
-+ *	mutex_lock() in vfs_unlink(). in this case, such changes may be lost.
 + */
 +static int au_do_unlink(const unsigned char dmsg, struct au_mvd_args *a)
 +{
@@ -20020,6 +20763,26 @@
 +	return err;
 +}
 +
++/* Since mvdown succeeded, we ignore an error of this function */
++static void au_do_stfs(const unsigned char dmsg, struct au_mvd_args *a)
++{
++	int err;
++	struct au_branch *br;
++
++	a->mvdown.flags |= AUFS_MVDOWN_STFS_FAILED;
++	br = au_sbr(a->sb, a->mvd_bsrc);
++	err = au_br_stfs(br, &a->mvdown.stbr[AUFS_MVDOWN_UPPER].stfs);
++	if (!err) {
++		br = au_sbr(a->sb, a->mvd_bdst);
++		a->mvdown.stbr[AUFS_MVDOWN_LOWER].brid = br->br_id;
++		err = au_br_stfs(br, &a->mvdown.stbr[AUFS_MVDOWN_LOWER].stfs);
++	}
++	if (!err)
++		a->mvdown.flags &= ~AUFS_MVDOWN_STFS_FAILED;
++	else
++		AU_MVD_PR(dmsg, "statfs failed (%d), ignored\n", err);
++}
++
 +/*
 + * copy-down the file and unlink the bsrc file.
 + * - unlink the bdst whout if exist
@@ -20049,6 +20812,14 @@
 +	if (unlikely(err))
 +		goto out_unlock;
 +
++	AuDbg("%pd2, 0x%x, %d --> %d\n",
++	      a->dentry, a->mvdown.flags, a->mvd_bsrc, a->mvd_bdst);
++	if (find_lower_writable(a) < 0)
++		a->mvdown.flags |= AUFS_MVDOWN_BOTTOM;
++
++	if (a->mvdown.flags & AUFS_MVDOWN_STFS)
++		au_do_stfs(dmsg, a);
++
 +	/* maintain internal array */
 +	if (!(a->mvdown.flags & AUFS_MVDOWN_KUPPER)) {
 +		au_set_h_dptr(a->dentry, a->mvd_bsrc, NULL);
@@ -20070,36 +20841,6 @@
 +
 +/* ---------------------------------------------------------------------- */
 +
-+static int find_lower_writable(struct au_mvd_args *a)
-+{
-+	struct super_block *sb;
-+	aufs_bindex_t bindex, bend;
-+	struct au_branch *br;
-+
-+	sb = a->sb;
-+	bindex = a->mvd_bsrc;
-+	bend = au_sbend(sb);
-+	if (!(a->mvdown.flags & AUFS_MVDOWN_ROLOWER)) {
-+		for (bindex++; bindex <= bend; bindex++) {
-+			br = au_sbr(sb, bindex);
-+			if (!au_br_rdonly(br))
-+				return bindex;
-+		}
-+	} else {
-+		for (bindex++; bindex <= bend; bindex++) {
-+			br = au_sbr(sb, bindex);
-+			if (!(au_br_sb(br)->s_flags & MS_RDONLY)) {
-+				if (au_br_rdonly(br))
-+					a->mvdown.flags
-+						|= AUFS_MVDOWN_ROLOWER_R;
-+				return bindex;
-+			}
-+		}
-+	}
-+
-+	return -1;
-+}
-+
 +/* make sure the file is idle */
 +static int au_mvd_args_busy(const unsigned char dmsg, struct au_mvd_args *a)
 +{
@@ -20345,8 +21086,6 @@
 +	if (unlikely(!capable(CAP_SYS_ADMIN)))
 +		goto out;
 +
-+	WARN_ONCE(1, "move-down is still testing...\n");
-+
 +	err = -ENOMEM;
 +	args = kmalloc(sizeof(*args), GFP_NOFS);
 +	if (unlikely(!args))
@@ -20388,13 +21127,9 @@
 +	if (unlikely(err))
 +		goto out_parent;
 +
-+	AuDbgDentry(dentry);
-+	AuDbgInode(args->inode);
 +	err = au_do_mvdown(dmsg, args);
 +	if (unlikely(err))
 +		goto out_parent;
-+	AuDbgDentry(dentry);
-+	AuDbgInode(args->inode);
 +
 +	au_cpup_attr_timesizes(args->dir);
 +	au_cpup_attr_timesizes(args->inode);
@@ -20418,8 +21153,8 @@
 +	return err;
 +}
 --- a/fs/aufs/opts.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/opts.c	2014-03-13 00:59:36.876223577 +0000
-@@ -0,0 +1,1701 @@
++++ b/fs/aufs/opts.c	2014-09-08 00:38:33.518569904 +0100
+@@ -0,0 +1,1799 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -20467,9 +21202,11 @@
 +	Opt_diropq_a, Opt_diropq_w,
 +	Opt_warn_perm, Opt_nowarn_perm,
 +	Opt_wbr_copyup, Opt_wbr_create,
++	Opt_fhsm_sec,
 +	Opt_refrof, Opt_norefrof,
 +	Opt_verbose, Opt_noverbose,
 +	Opt_sum, Opt_nosum, Opt_wsum,
++	Opt_dirperm1, Opt_nodirperm1,
 +	Opt_tail, Opt_ignore, Opt_ignore_silent, Opt_err
 +};
 +
@@ -20523,6 +21260,12 @@
 +	{Opt_dio, "dio"},
 +	{Opt_nodio, "nodio"},
 +
++#ifdef CONFIG_AUFS_FHSM
++	{Opt_fhsm_sec, "fhsm_sec=%d"},
++#else
++	{Opt_ignore_silent, "fhsm_sec=%d"},
++#endif
++
 +	{Opt_diropq_a, "diropq=always"},
 +	{Opt_diropq_a, "diropq=a"},
 +	{Opt_diropq_w, "diropq=whiteouted"},
@@ -20532,9 +21275,7 @@
 +	{Opt_nowarn_perm, "nowarn_perm"},
 +
 +	/* keep them temporary */
-+	{Opt_ignore_silent, "coo=%s"},
 +	{Opt_ignore_silent, "nodlgt"},
-+	{Opt_ignore_silent, "nodirperm1"},
 +	{Opt_ignore_silent, "clean_plink"},
 +
 +#ifdef CONFIG_AUFS_SHWH
@@ -20542,6 +21283,9 @@
 +#endif
 +	{Opt_noshwh, "noshwh"},
 +
++	{Opt_dirperm1, "dirperm1"},
++	{Opt_nodirperm1, "nodirperm1"},
++
 +	{Opt_rendir, "rendir=%d"},
 +
 +	{Opt_refrof, "refrof"},
@@ -20587,17 +21331,37 @@
 +
 +/* ---------------------------------------------------------------------- */
 +
-+static const char *au_parser_pattern(int val, struct match_token *token)
++static const char *au_parser_pattern(int val, match_table_t tbl)
 +{
-+	while (token->pattern) {
-+		if (token->token == val)
-+			return token->pattern;
-+		token++;
++	struct match_token *p;
++
++	p = tbl;
++	while (p->pattern) {
++		if (p->token == val)
++			return p->pattern;
++		p++;
 +	}
 +	BUG();
 +	return "??";
 +}
 +
++static const char *au_optstr(int *val, match_table_t tbl)
++{
++	struct match_token *p;
++	int v;
++
++	v = *val;
++	p = tbl;
++	while (p->token) {
++		if ((v & p->token) == p->token) {
++			*val &= ~p->token;
++			return p->pattern;
++		}
++		p++;
++	}
++	return NULL;
++}
++
 +/* ---------------------------------------------------------------------- */
 +
 +static match_table_t brperm = {
@@ -20608,16 +21372,22 @@
 +};
 +
 +static match_table_t brattr = {
++	/* general */
++	{AuBrAttr_COO_REG, AUFS_BRATTR_COO_REG},
++	{AuBrAttr_COO_ALL, AUFS_BRATTR_COO_ALL},
 +	{AuBrAttr_UNPIN, AUFS_BRATTR_UNPIN},
++	{AuBrAttr_FHSM, AUFS_BRATTR_FHSM},
++
++	/* ro/rr branch */
 +	{AuBrRAttr_WH, AUFS_BRRATTR_WH},
++
++	/* rw branch */
++	{AuBrWAttr_MOO, AUFS_BRWATTR_MOO},
 +	{AuBrWAttr_NoLinkWH, AUFS_BRWATTR_NLWH},
++
 +	{0, NULL}
 +};
 +
-+#define AuBrStr_LONGEST	AUFS_BRPERM_RW \
-+	"+" AUFS_BRATTR_UNPIN \
-+	"+" AUFS_BRWATTR_NLWH
-+
 +static int br_attr_val(char *str, match_table_t table, substring_t args[])
 +{
 +	int attr, v;
@@ -20629,26 +21399,60 @@
 +		if (p)
 +			*p = 0;
 +		v = match_token(str, table, args);
-+		if (v)
++		if (v) {
++			if (v & AuBrAttr_CMOO_Mask)
++				attr &= ~AuBrAttr_CMOO_Mask;
 +			attr |= v;
-+		else {
++		} else {
 +			if (p)
 +				*p = '+';
 +			pr_warn("ignored branch attribute %s\n", str);
 +			break;
 +		}
-+		if (p)
-+			str = p + 1;
++		if (p)
++			str = p + 1;
++	} while (p);
++
++	return attr;
++}
++
++static int au_do_optstr_br_attr(au_br_perm_str_t *str, int perm)
++{
++	int sz;
++	const char *p;
++	char *q;
++
++	sz = 0;
++	q = str->a;
++	*q = 0;
++	p = au_optstr(&perm, brattr);
++	if (p) {
++		sz = strlen(p);
++		memcpy(q, p, sz + 1);
++		q += sz;
++	} else
++		goto out;
++
++	do {
++		p = au_optstr(&perm, brattr);
++		if (p) {
++			*q++ = '+';
++			sz = strlen(p);
++			memcpy(q, p, sz + 1);
++			q += sz;
++		}
 +	} while (p);
 +
-+	return attr;
++out:
++	return sz;
 +}
 +
 +static int noinline_for_stack br_perm_val(char *perm)
 +{
-+	int val;
-+	char *p, *q;
++	int val, bad, sz;
++	char *p;
 +	substring_t args[MAX_OPT_ARGS];
++	au_br_perm_str_t attr;
 +
 +	p = strchr(perm, '+');
 +	if (p)
@@ -20664,83 +21468,51 @@
 +	if (!p)
 +		goto out;
 +
-+	p++;
-+	while (1) {
-+		q = strchr(p, '+');
-+		if (q)
-+			*q = 0;
-+		val |= br_attr_val(p, brattr, args);
-+		if (q) {
-+			*q = '+';
-+			p = q + 1;
-+		} else
-+			break;
-+	}
++	val |= br_attr_val(p + 1, brattr, args);
++
++	bad = 0;
 +	switch (val & AuBrPerm_Mask) {
 +	case AuBrPerm_RO:
 +	case AuBrPerm_RR:
-+		if (unlikely(val & AuBrWAttr_NoLinkWH)) {
-+			pr_warn("ignored branch attribute %s\n",
-+				AUFS_BRWATTR_NLWH);
-+			val &= ~AuBrWAttr_NoLinkWH;
-+		}
++		bad = val & AuBrWAttr_Mask;
++		val &= ~AuBrWAttr_Mask;
 +		break;
 +	case AuBrPerm_RW:
-+		if (unlikely(val & AuBrRAttr_WH)) {
-+			pr_warn("ignored branch attribute %s\n",
-+				AUFS_BRRATTR_WH);
-+			val &= ~AuBrRAttr_WH;
-+		}
++		bad = val & AuBrRAttr_Mask;
++		val &= ~AuBrRAttr_Mask;
 +		break;
 +	}
++	if (unlikely(bad)) {
++		sz = au_do_optstr_br_attr(&attr, bad);
++		AuDebugOn(!sz);
++		pr_warn("ignored branch attribute %s\n", attr.a);
++	}
 +
 +out:
 +	return val;
 +}
 +
-+/* Caller should free the return value */
-+char *au_optstr_br_perm(int brperm)
++void au_optstr_br_perm(au_br_perm_str_t *str, int perm)
 +{
-+	char *p, a[sizeof(AuBrStr_LONGEST)];
++	au_br_perm_str_t attr;
++	const char *p;
++	char *q;
 +	int sz;
 +
-+#define SetPerm(str) do {			\
-+		sz = sizeof(str);		\
-+		memcpy(a, str, sz);		\
-+		p = a + sz - 1;			\
-+	} while (0)
-+
-+#define AppendAttr(flag, str) do {			\
-+		if (brperm & flag) {		\
-+			sz = sizeof(str);	\
-+			*p++ = '+';		\
-+			memcpy(p, str, sz);	\
-+			p += sz - 1;		\
-+		}				\
-+	} while (0)
-+
-+	switch (brperm & AuBrPerm_Mask) {
-+	case AuBrPerm_RO:
-+		SetPerm(AUFS_BRPERM_RO);
-+		break;
-+	case AuBrPerm_RR:
-+		SetPerm(AUFS_BRPERM_RR);
-+		break;
-+	case AuBrPerm_RW:
-+		SetPerm(AUFS_BRPERM_RW);
-+		break;
-+	default:
-+		AuDebugOn(1);
++	q = str->a;
++	p = au_optstr(&perm, brperm);
++	AuDebugOn(!p || !*p);
++	sz = strlen(p);
++	memcpy(q, p, sz + 1);
++	q += sz;
++
++	sz = au_do_optstr_br_attr(&attr, perm);
++	if (sz) {
++		*q++ = '+';
++		memcpy(q, attr.a, sz + 1);
 +	}
 +
-+	AppendAttr(AuBrAttr_UNPIN, AUFS_BRATTR_UNPIN);
-+	AppendAttr(AuBrRAttr_WH, AUFS_BRRATTR_WH);
-+	AppendAttr(AuBrWAttr_NoLinkWH, AUFS_BRWATTR_NLWH);
-+
-+	AuDebugOn(strlen(a) >= sizeof(a));
-+	return kstrdup(a, GFP_NOFS);
-+#undef SetPerm
-+#undef AppendAttr
++	AuDebugOn(strlen(str->a) >= sizeof(str->a));
 +}
 +
 +/* ---------------------------------------------------------------------- */
@@ -20766,7 +21538,7 @@
 +
 +const char *au_optstr_udba(int udba)
 +{
-+	return au_parser_pattern(udba, (void *)udbalevel);
++	return au_parser_pattern(udba, udbalevel);
 +}
 +
 +/* ---------------------------------------------------------------------- */
@@ -20888,7 +21660,7 @@
 +
 +const char *au_optstr_wbr_create(int wbr_create)
 +{
-+	return au_parser_pattern(wbr_create, (void *)au_wbr_create_policy);
++	return au_parser_pattern(wbr_create, au_wbr_create_policy);
 +}
 +
 +static match_table_t au_wbr_copyup_policy = {
@@ -20910,7 +21682,7 @@
 +
 +const char *au_optstr_wbr_copyup(int wbr_copyup)
 +{
-+	return au_parser_pattern(wbr_copyup, (void *)au_wbr_copyup_policy);
++	return au_parser_pattern(wbr_copyup, au_wbr_copyup_policy);
 +}
 +
 +/* ---------------------------------------------------------------------- */
@@ -21013,6 +21785,12 @@
 +		case Opt_noshwh:
 +			AuLabel(noshwh);
 +			break;
++		case Opt_dirperm1:
++			AuLabel(dirperm1);
++			break;
++		case Opt_nodirperm1:
++			AuLabel(nodirperm1);
++			break;
 +		case Opt_plink:
 +			AuLabel(plink);
 +			break;
@@ -21090,6 +21868,9 @@
 +			AuDbg("copyup %d, %s\n", opt->wbr_copyup,
 +				  au_optstr_wbr_copyup(opt->wbr_copyup));
 +			break;
++		case Opt_fhsm_sec:
++			AuDbg("fhsm_sec %u\n", opt->fhsm_second);
++			break;
 +		default:
 +			BUG();
 +		}
@@ -21516,6 +22297,8 @@
 +		case Opt_notrunc_xib:
 +		case Opt_shwh:
 +		case Opt_noshwh:
++		case Opt_dirperm1:
++		case Opt_nodirperm1:
 +		case Opt_plink:
 +		case Opt_noplink:
 +		case Opt_list_plink:
@@ -21566,6 +22349,20 @@
 +				pr_err("wrong value, %s\n", opt_str);
 +			break;
 +
++		case Opt_fhsm_sec:
++			if (unlikely(match_int(&a->args[0], &n)
++				     || n < 0)) {
++				pr_err("bad integer in %s\n", opt_str);
++				break;
++			}
++			if (sysaufs_brs) {
++				opt->fhsm_second = n;
++				opt->type = token;
++			} else
++				pr_warn("ignored %s\n", opt_str);
++			err = 0;
++			break;
++
 +		case Opt_ignore:
 +			pr_warn("ignored %s\n", opt_str);
 +			/*FALLTHROUGH*/
@@ -21682,6 +22479,10 @@
 +		au_fset_opts(opts->flags, REFRESH_DYAOP);
 +		break;
 +
++	case Opt_fhsm_sec:
++		au_fhsm_set(sbinfo, opt->fhsm_second);
++		break;
++
 +	case Opt_diropq_a:
 +		au_opt_set(sbinfo->si_mntflags, ALWAYS_DIROPQ);
 +		break;
@@ -21757,6 +22558,13 @@
 +		au_opt_clr(sbinfo->si_mntflags, SHWH);
 +		break;
 +
++	case Opt_dirperm1:
++		au_opt_set(sbinfo->si_mntflags, DIRPERM1);
++		break;
++	case Opt_nodirperm1:
++		au_opt_clr(sbinfo->si_mntflags, DIRPERM1);
++		break;
++
 +	case Opt_trunc_xino:
 +		au_opt_set(sbinfo->si_mntflags, TRUNC_XINO);
 +		break;
@@ -21888,7 +22696,7 @@
 +int au_opts_verify(struct super_block *sb, unsigned long sb_flags,
 +		   unsigned int pending)
 +{
-+	int err;
++	int err, fhsm;
 +	aufs_bindex_t bindex, bend;
 +	unsigned char do_plink, skip, do_free;
 +	struct au_branch *br;
@@ -21914,7 +22722,12 @@
 +	    && !au_opt_test(sbinfo->si_mntflags, XINO))
 +		pr_warn("udba=*notify requires xino\n");
 +
++	if (au_opt_test(sbinfo->si_mntflags, DIRPERM1))
++		pr_warn("dirperm1 breaks the protection"
++			" by the permission bits on the lower branch\n");
++
 +	err = 0;
++	fhsm = 0;
 +	root = sb->s_root;
 +	dir = root->d_inode;
 +	do_plink = !!au_opt_test(sbinfo->si_mntflags, PLINK);
@@ -21957,6 +22770,11 @@
 +		if (wbr)
 +			wbr_wh_read_unlock(wbr);
 +
++		if (au_br_fhsm(br->br_perm)) {
++			fhsm++;
++			AuDebugOn(!br->br_fhsm);
++		}
++
 +		if (skip)
 +			continue;
 +
@@ -21975,6 +22793,20 @@
 +		}
 +	}
 +
++	if (fhsm >= 2) {
++		au_fset_si(sbinfo, FHSM);
++		for (bindex = bend; bindex >= 0; bindex--) {
++			br = au_sbr(sb, bindex);
++			if (au_br_fhsm(br->br_perm)) {
++				au_fhsm_set_bottom(sb, bindex);
++				break;
++			}
++		}
++	} else {
++		au_fclr_si(sbinfo, FHSM);
++		au_fhsm_set_bottom(sb, -1);
++	}
++
 +	return err;
 +}
 +
@@ -21987,6 +22819,7 @@
 +	struct au_opt_xino *opt_xino, xino;
 +	struct au_sbinfo *sbinfo;
 +	struct au_branch *br;
++	struct inode *dir;
 +
 +	SiMustWriteLock(sb);
 +
@@ -22060,7 +22893,7 @@
 +		/* go on even if err */
 +	}
 +	if (au_opt_test(tmp, UDBA_HNOTIFY)) {
-+		struct inode *dir = sb->s_root->d_inode;
++		dir = sb->s_root->d_inode;
 +		au_hn_reset(dir, au_hi_flags(dir, /*isdir*/1) & ~AuHi_XINO);
 +	}
 +
@@ -22122,8 +22955,8 @@
 +	return au_mntflags(sb) & AuOptMask_UDBA;
 +}
 --- a/fs/aufs/opts.h	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/opts.h	2014-01-20 03:24:33.516760970 +0000
-@@ -0,0 +1,210 @@
++++ b/fs/aufs/opts.h	2014-09-08 00:38:33.518569904 +0100
+@@ -0,0 +1,213 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -22151,6 +22984,7 @@
 +#ifdef __KERNEL__
 +
 +#include <linux/path.h>
++#include "branch.h"
 +
 +struct file;
 +struct super_block;
@@ -22166,7 +23000,8 @@
 +#define AuOpt_UDBA_HNOTIFY	(1 << 4)
 +#define AuOpt_SHWH		(1 << 5)	/* show whiteout */
 +#define AuOpt_PLINK		(1 << 6)	/* pseudo-link */
-+#define AuOpt_DIRPERM1		(1 << 7)	/* unimplemented */
++#define AuOpt_DIRPERM1		(1 << 7)	/* ignore the lower dir's perm
++						   bits */
 +#define AuOpt_REFROF		(1 << 8)	/* unimplemented */
 +#define AuOpt_ALWAYS_DIROPQ	(1 << 9)	/* policy to creating diropq */
 +#define AuOpt_SUM		(1 << 10)	/* summation for statfs(2) */
@@ -22291,6 +23126,7 @@
 +		int			udba;
 +		struct au_opt_wbr_create wbr_create;
 +		int			wbr_copyup;
++		unsigned int		fhsm_second;
 +	};
 +};
 +
@@ -22316,7 +23152,7 @@
 +
 +/* ---------------------------------------------------------------------- */
 +
-+char *au_optstr_br_perm(int brperm);
++void au_optstr_br_perm(au_br_perm_str_t *str, int perm);
 +const char *au_optstr_udba(int udba);
 +const char *au_optstr_wbr_copyup(int wbr_copyup);
 +const char *au_optstr_wbr_create(int wbr_create);
@@ -23491,8 +24327,8 @@
 +}
 +#endif
 --- a/fs/aufs/rwsem.h	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/rwsem.h	2014-01-20 03:24:33.516760970 +0000
-@@ -0,0 +1,187 @@
++++ b/fs/aufs/rwsem.h	2014-07-15 14:04:48.736871625 +0100
+@@ -0,0 +1,191 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -23631,7 +24467,9 @@
 +/* why is not _nested version defined */
 +static inline int au_rw_read_trylock(struct au_rwsem *rw)
 +{
-+	int ret = down_read_trylock(&rw->rwsem);
++	int ret;
++
++	ret = down_read_trylock(&rw->rwsem);
 +	if (ret)
 +		AuDbgRcntInc(rw);
 +	return ret;
@@ -23639,7 +24477,9 @@
 +
 +static inline int au_rw_write_trylock(struct au_rwsem *rw)
 +{
-+	int ret = down_write_trylock(&rw->rwsem);
++	int ret;
++
++	ret = down_write_trylock(&rw->rwsem);
 +	if (ret)
 +		AuDbgWcntInc(rw);
 +	return ret;
@@ -23681,8 +24521,8 @@
 +#endif /* __KERNEL__ */
 +#endif /* __AUFS_RWSEM_H__ */
 --- a/fs/aufs/sbinfo.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/sbinfo.c	2014-01-20 03:24:33.516760970 +0000
-@@ -0,0 +1,351 @@
++++ b/fs/aufs/sbinfo.c	2014-09-08 00:38:33.518569904 +0100
+@@ -0,0 +1,353 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -23782,6 +24622,8 @@
 +	sbinfo->si_wbr_copyup_ops = au_wbr_copyup_ops + sbinfo->si_wbr_copyup;
 +	sbinfo->si_wbr_create_ops = au_wbr_create_ops + sbinfo->si_wbr_create;
 +
++	au_fhsm_init(sbinfo);
++
 +	sbinfo->si_mntflags = au_opts_plink(AuOpt_Def);
 +
 +	sbinfo->si_xino_jiffy = jiffies;
@@ -24149,8 +24991,8 @@
 +#endif /* __KERNEL__ */
 +#endif /* __AUFS_SPL_H__ */
 --- a/fs/aufs/super.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/super.c	2014-03-15 14:34:47.312348618 +0000
-@@ -0,0 +1,1001 @@
++++ b/fs/aufs/super.c	2014-09-08 00:38:33.518569904 +0100
+@@ -0,0 +1,1004 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -24249,7 +25091,7 @@
 +	struct path path;
 +	struct au_hdentry *hdp;
 +	struct au_branch *br;
-+	char *perm;
++	au_br_perm_str_t perm;
 +
 +	err = 0;
 +	bend = au_sbend(sb);
@@ -24260,14 +25102,10 @@
 +		path.dentry = hdp[bindex].hd_dentry;
 +		err = au_seq_path(seq, &path);
 +		if (err > 0) {
-+			perm = au_optstr_br_perm(br->br_perm);
-+			if (perm) {
-+				err = seq_printf(seq, "=%s", perm);
-+				kfree(perm);
-+				if (err == -1)
-+					err = -E2BIG;
-+			} else
-+				err = -ENOMEM;
++			au_optstr_br_perm(&perm, br->br_perm);
++			err = seq_printf(seq, "=%s", perm.a);
++			if (err == -1)
++				err = -E2BIG;
 +		}
 +		if (!err && bindex != bend)
 +			err = seq_putc(seq, ':');
@@ -24413,7 +25251,7 @@
 +	AuBool(SHWH, shwh);
 +	AuBool(PLINK, plink);
 +	AuBool(DIO, dio);
-+	/* AuBool(DIRPERM1, dirperm1); */
++	AuBool(DIRPERM1, dirperm1);
 +	/* AuBool(REFROF, refrof); */
 +
 +	v = sbinfo->si_wbr_create;
@@ -24436,6 +25274,8 @@
 +	AuUInt(RDBLK, rdblk, sbinfo->si_rdblk);
 +	AuUInt(RDHASH, rdhash, sbinfo->si_rdhash);
 +
++	au_fhsm_show(m, sbinfo);
++
 +	AuBool(SUM, sum);
 +	/* AuBool(SUM_W, wsum); */
 +	AuBool(WARN_PERM, warn_perm);
@@ -24637,7 +25477,7 @@
 +void *au_array_alloc(unsigned long long *hint, au_arraycb_t cb, void *arg)
 +{
 +	void *array;
-+	unsigned long long n;
++	unsigned long long n, sz;
 +
 +	array = NULL;
 +	n = 0;
@@ -24650,9 +25490,10 @@
 +		goto out;
 +	}
 +
-+	array = kmalloc(sizeof(array) * *hint, GFP_NOFS);
++	sz = sizeof(array) * *hint;
++	array = kzalloc(sz, GFP_NOFS);
 +	if (unlikely(!array))
-+		array = vmalloc(sizeof(array) * *hint);
++		array = vzalloc(sz);
 +	if (unlikely(!array)) {
 +		array = ERR_PTR(-ENOMEM);
 +		goto out;
@@ -24819,6 +25660,8 @@
 +	sigen = au_sigen(sb);
 +	for (ull = 0; ull < max; ull++) {
 +		inode = array[ull];
++		if (unlikely(!inode))
++			break;
 +		if (au_iigen(inode, NULL) != sigen) {
 +			ii_write_lock_child(inode);
 +			e = au_refresh_hinode_self(inode);
@@ -24952,6 +25795,7 @@
 +		au_dy_arefresh(do_dx);
 +	}
 +
++	au_fhsm_wrote_all(sb, /*force*/1); /* ?? */
 +	aufs_write_unlock(root);
 +
 +out_mtx:
@@ -25127,6 +25971,7 @@
 +	if (sbinfo) {
 +		au_sbilist_del(sb);
 +		aufs_write_lock(sb->s_root);
++		au_fhsm_fin(sb);
 +		if (sbinfo->si_wbr_create_ops->fin)
 +			sbinfo->si_wbr_create_ops->fin(sb);
 +		if (au_opt_test(sbinfo->si_mntflags, UDBA_HNOTIFY)) {
@@ -25153,8 +25998,8 @@
 +	.owner		= THIS_MODULE,
 +};
 --- a/fs/aufs/super.h	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/super.h	2014-01-20 03:24:33.516760970 +0000
-@@ -0,0 +1,571 @@
++++ b/fs/aufs/super.h	2014-09-08 00:38:33.518569904 +0100
+@@ -0,0 +1,644 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -25232,6 +26077,21 @@
 +	return ino % AuPlink_NHASH;
 +}
 +
++/* File-based Hierarchical Storage Management */
++struct au_fhsm {
++#ifdef CONFIG_AUFS_FHSM
++	/* allow only one process who can receive the notification */
++	spinlock_t		fhsm_spin;
++	pid_t			fhsm_pid;
++	wait_queue_head_t	fhsm_wqh;
++	atomic_t		fhsm_readable;
++
++	/* these are protected by si_rwsem */
++	unsigned long		fhsm_expire;
++	aufs_bindex_t		fhsm_bottom;
++#endif
++};
++
 +struct au_branch;
 +struct au_sbinfo {
 +	/* nowait tasks in the system-wide workqueue */
@@ -25281,6 +26141,9 @@
 +	/* most free space */
 +	struct au_wbr_mfs	si_wbr_mfs;
 +
++	/* File-based Hierarchical Storage Management */
++	struct au_fhsm		si_fhsm;
++
 +	/* mount flags */
 +	/* include/asm-ia64/siginfo.h defines a macro named si_flags */
 +	unsigned int		si_mntflags;
@@ -25364,6 +26227,14 @@
 + * if it is false, refreshing dirs at access time is unnecesary
 + */
 +#define AuSi_FAILED_REFRESH_DIR	1
++
++#define AuSi_FHSM		(1 << 1)	/* fhsm is active now */
++
++#ifndef CONFIG_AUFS_FHSM
++#undef AuSi_FHSM
++#define AuSi_FHSM		0
++#endif
++
 +static inline unsigned char au_do_ftest_si(struct au_sbinfo *sbi,
 +					   unsigned int flag)
 +{
@@ -25441,10 +26312,48 @@
 +extern struct au_wbr_create_operations au_wbr_create_ops[];
 +int au_cpdown_dirs(struct dentry *dentry, aufs_bindex_t bdst);
 +int au_wbr_nonopq(struct dentry *dentry, aufs_bindex_t bindex);
++int au_wbr_do_copyup_bu(struct dentry *dentry, aufs_bindex_t bstart);
 +
 +/* mvdown.c */
 +int au_mvdown(struct dentry *dentry, struct aufs_mvdown __user *arg);
 +
++#ifdef CONFIG_AUFS_FHSM
++/* fhsm.c */
++
++static inline pid_t au_fhsm_pid(struct au_fhsm *fhsm)
++{
++	pid_t pid;
++
++	spin_lock(&fhsm->fhsm_spin);
++	pid = fhsm->fhsm_pid;
++	spin_unlock(&fhsm->fhsm_spin);
++
++	return pid;
++}
++
++void au_fhsm_wrote(struct super_block *sb, aufs_bindex_t bindex, int force);
++void au_fhsm_wrote_all(struct super_block *sb, int force);
++int au_fhsm_fd(struct super_block *sb, int oflags);
++int au_fhsm_br_alloc(struct au_branch *br);
++void au_fhsm_set_bottom(struct super_block *sb, aufs_bindex_t bindex);
++void au_fhsm_fin(struct super_block *sb);
++void au_fhsm_init(struct au_sbinfo *sbinfo);
++void au_fhsm_set(struct au_sbinfo *sbinfo, unsigned int sec);
++void au_fhsm_show(struct seq_file *seq, struct au_sbinfo *sbinfo);
++#else
++AuStubVoid(au_fhsm_wrote, struct super_block *sb, aufs_bindex_t bindex,
++	   int force)
++AuStubVoid(au_fhsm_wrote_all, struct super_block *sb, int force)
++AuStub(int, au_fhsm_fd, return -EOPNOTSUPP, struct super_block *sb, int oflags)
++AuStub(pid_t, au_fhsm_pid, return 0, struct au_fhsm *fhsm)
++AuStubInt0(au_fhsm_br_alloc, struct au_branch *br)
++AuStubVoid(au_fhsm_set_bottom, struct super_block *sb, aufs_bindex_t bindex)
++AuStubVoid(au_fhsm_fin, struct super_block *sb)
++AuStubVoid(au_fhsm_init, struct au_sbinfo *sbinfo)
++AuStubVoid(au_fhsm_set, struct au_sbinfo *sbinfo, unsigned int sec)
++AuStubVoid(au_fhsm_show, struct seq_file *seq, struct au_sbinfo *sbinfo)
++#endif
++
 +/* ---------------------------------------------------------------------- */
 +
 +static inline struct au_sbinfo *au_sbi(struct super_block *sb)
@@ -25556,16 +26465,19 @@
 +
 +static inline int si_pid_test(struct super_block *sb)
 +{
-+	pid_t bit = si_pid_bit();
++	pid_t bit;
++
++	bit = si_pid_bit();
 +	if (bit < PID_MAX_DEFAULT)
 +		return test_bit(bit, au_sbi(sb)->au_si_pid.bitmap);
-+	else
-+		return si_pid_test_slow(sb);
++	return si_pid_test_slow(sb);
 +}
 +
 +static inline void si_pid_set(struct super_block *sb)
 +{
-+	pid_t bit = si_pid_bit();
++	pid_t bit;
++
++	bit = si_pid_bit();
 +	if (bit < PID_MAX_DEFAULT) {
 +		AuDebugOn(test_bit(bit, au_sbi(sb)->au_si_pid.bitmap));
 +		set_bit(bit, au_sbi(sb)->au_si_pid.bitmap);
@@ -25576,7 +26488,9 @@
 +
 +static inline void si_pid_clr(struct super_block *sb)
 +{
-+	pid_t bit = si_pid_bit();
++	pid_t bit;
++
++	bit = si_pid_bit();
 +	if (bit < PID_MAX_DEFAULT) {
 +		AuDebugOn(!test_bit(bit, au_sbi(sb)->au_si_pid.bitmap));
 +		clear_bit(bit, au_sbi(sb)->au_si_pid.bitmap);
@@ -25606,7 +26520,9 @@
 +
 +static inline int si_noflush_read_trylock(struct super_block *sb)
 +{
-+	int locked = __si_read_trylock(sb);
++	int locked;
++
++	locked = __si_read_trylock(sb);
 +	if (locked)
 +		si_pid_set(sb);
 +	return locked;
@@ -25620,7 +26536,9 @@
 +
 +static inline int si_noflush_write_trylock(struct super_block *sb)
 +{
-+	int locked = __si_write_trylock(sb);
++	int locked;
++
++	locked = __si_write_trylock(sb);
 +	if (locked)
 +		si_pid_set(sb);
 +	return locked;
@@ -25834,8 +26752,8 @@
 +	return err;
 +}
 --- a/fs/aufs/sysaufs.h	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/sysaufs.h	2014-01-20 03:24:33.516760970 +0000
-@@ -0,0 +1,103 @@
++++ b/fs/aufs/sysaufs.h	2014-09-08 00:38:33.518569904 +0100
+@@ -0,0 +1,107 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -25907,6 +26825,10 @@
 +int sysaufs_si_xi_path(struct seq_file *seq, struct super_block *sb);
 +ssize_t sysaufs_si_show(struct kobject *kobj, struct attribute *attr,
 +			 char *buf);
++long au_brinfo_ioctl(struct file *file, unsigned long arg);
++#ifdef CONFIG_COMPAT
++long au_brinfo_compat_ioctl(struct file *file, unsigned long arg);
++#endif
 +
 +void sysaufs_br_init(struct au_branch *br);
 +void sysaufs_brs_add(struct super_block *sb, aufs_bindex_t bindex);
@@ -25940,8 +26862,8 @@
 +#endif /* __KERNEL__ */
 +#endif /* __SYSAUFS_H__ */
 --- a/fs/aufs/sysfs.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/sysfs.c	2014-01-20 03:24:33.516760970 +0000
-@@ -0,0 +1,296 @@
++++ b/fs/aufs/sysfs.c	2014-09-08 00:38:33.518569904 +0100
+@@ -0,0 +1,372 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -25963,6 +26885,7 @@
 + * sysfs interface
 + */
 +
++#include <linux/compat.h>
 +#include <linux/seq_file.h>
 +#include "aufs.h"
 +
@@ -26027,7 +26950,7 @@
 +	struct path path;
 +	struct dentry *root;
 +	struct au_branch *br;
-+	char *perm;
++	au_br_perm_str_t perm;
 +
 +	AuDbg("b%d\n", bindex);
 +
@@ -26041,23 +26964,16 @@
 +		path.mnt = au_br_mnt(br);
 +		path.dentry = au_h_dptr(root, bindex);
 +		au_seq_path(seq, &path);
-+		di_read_unlock(root, !AuLock_IR);
-+		perm = au_optstr_br_perm(br->br_perm);
-+		if (perm) {
-+			err = seq_printf(seq, "=%s\n", perm);
-+			kfree(perm);
-+			if (err == -1)
-+				err = -E2BIG;
-+		} else
-+			err = -ENOMEM;
++		au_optstr_br_perm(&perm, br->br_perm);
++		err = seq_printf(seq, "=%s\n", perm.a);
 +		break;
 +	case AuBrSysfs_BRID:
 +		err = seq_printf(seq, "%d\n", br->br_id);
-+		di_read_unlock(root, !AuLock_IR);
-+		if (err == -1)
-+			err = -E2BIG;
 +		break;
 +	}
++	di_read_unlock(root, !AuLock_IR);
++	if (err == -1)
++		err = -E2BIG;
 +
 +	return err;
 +}
@@ -26166,6 +27082,88 @@
 +
 +/* ---------------------------------------------------------------------- */
 +
++static int au_brinfo(struct super_block *sb, union aufs_brinfo __user *arg)
++{
++	int err;
++	int16_t brid;
++	aufs_bindex_t bindex, bend;
++	size_t sz;
++	char *buf;
++	struct seq_file *seq;
++	struct au_branch *br;
++
++	si_read_lock(sb, AuLock_FLUSH);
++	bend = au_sbend(sb);
++	err = bend + 1;
++	if (!arg)
++		goto out;
++
++	err = -ENOMEM;
++	buf = (void *)__get_free_page(GFP_NOFS);
++	if (unlikely(!buf))
++		goto out;
++
++	seq = au_seq(buf, PAGE_SIZE);
++	err = PTR_ERR(seq);
++	if (IS_ERR(seq))
++		goto out_buf;
++
++	sz = sizeof(*arg) - offsetof(union aufs_brinfo, path);
++	for (bindex = 0; bindex <= bend; bindex++, arg++) {
++		err = !access_ok(VERIFY_WRITE, arg, sizeof(*arg));
++		if (unlikely(err))
++			break;
++
++		br = au_sbr(sb, bindex);
++		brid = br->br_id;
++		BUILD_BUG_ON(sizeof(brid) != sizeof(arg->id));
++		err = __put_user(brid, &arg->id);
++		if (unlikely(err))
++			break;
++
++		BUILD_BUG_ON(sizeof(br->br_perm) != sizeof(arg->perm));
++		err = __put_user(br->br_perm, &arg->perm);
++		if (unlikely(err))
++			break;
++
++		au_seq_path(seq, &br->br_path);
++		err = seq_putc(seq, '\0');
++		if (!err && seq->count <= sz) {
++			err = copy_to_user(arg->path, seq->buf, seq->count);
++			seq->count = 0;
++			if (unlikely(err))
++				break;
++		} else {
++			err = -E2BIG;
++			goto out_seq;
++		}
++	}
++	if (unlikely(err))
++		err = -EFAULT;
++
++out_seq:
++	kfree(seq);
++out_buf:
++	free_page((unsigned long)buf);
++out:
++	si_read_unlock(sb);
++	return err;
++}
++
++long au_brinfo_ioctl(struct file *file, unsigned long arg)
++{
++	return au_brinfo(file->f_dentry->d_sb, (void __user *)arg);
++}
++
++#ifdef CONFIG_COMPAT
++long au_brinfo_compat_ioctl(struct file *file, unsigned long arg)
++{
++	return au_brinfo(file->f_dentry->d_sb, compat_ptr(arg));
++}
++#endif
++
++/* ---------------------------------------------------------------------- */
++
 +void sysaufs_br_init(struct au_branch *br)
 +{
 +	int i;
@@ -26239,8 +27237,8 @@
 +	}
 +}
 --- a/fs/aufs/sysrq.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/sysrq.c	2014-01-20 03:24:33.516760970 +0000
-@@ -0,0 +1,154 @@
++++ b/fs/aufs/sysrq.c	2014-07-15 14:04:48.736871625 +0100
+@@ -0,0 +1,157 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -26318,6 +27316,7 @@
 +#if 1
 +	{
 +		struct inode *i;
++
 +		pr("isolated inode\n");
 +		spin_lock(&inode_sb_list_lock);
 +		list_for_each_entry(i, &sb->s_inodes, i_sb_list) {
@@ -26334,9 +27333,10 @@
 +	spin_lock(&files->spin);
 +	hlist_for_each_entry(finfo, &files->head, fi_hlist) {
 +		umode_t mode;
++
 +		file = finfo->fi_file;
 +		mode = file_inode(file)->i_mode;
-+		if (!special_file(mode) || au_special_file(mode))
++		if (!special_file(mode))
 +			au_dpri_file(file);
 +	}
 +	spin_unlock(&files->spin);
@@ -26391,13 +27391,14 @@
 +void au_sysrq_fin(void)
 +{
 +	int err;
++
 +	err = unregister_sysrq_key(*aufs_sysrq_key, &au_sysrq_op);
 +	if (unlikely(err))
 +		pr_err("err %d (ignored)\n", err);
 +}
 --- a/fs/aufs/vdir.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/vdir.c	2014-01-20 03:24:33.516760970 +0000
-@@ -0,0 +1,887 @@
++++ b/fs/aufs/vdir.c	2014-07-15 14:04:48.736871625 +0100
+@@ -0,0 +1,889 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -26476,8 +27477,10 @@
 +{
 +	struct hlist_head *head;
 +	unsigned int u;
++	size_t sz;
 +
-+	head = kmalloc(sizeof(*nhash->nh_head) * num_hash, gfp);
++	sz = sizeof(*nhash->nh_head) * num_hash;
++	head = kmalloc(sz, gfp);
 +	if (head) {
 +		nhash->nh_num = num_hash;
 +		nhash->nh_head = head;
@@ -27286,8 +28289,8 @@
 +	return 0;
 +}
 --- a/fs/aufs/vfsub.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/vfsub.c	2014-05-13 19:05:02.880347266 +0100
-@@ -0,0 +1,782 @@
++++ b/fs/aufs/vfsub.c	2014-09-08 00:38:33.518569904 +0100
+@@ -0,0 +1,796 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -27448,7 +28451,9 @@
 +	if (unlikely(err))
 +		goto out;
 +
++	lockdep_off();
 +	err = vfs_create(dir, path->dentry, mode, want_excl);
++	lockdep_on();
 +	if (!err) {
 +		struct path tmp = *path;
 +		int did;
@@ -27479,7 +28484,9 @@
 +	if (unlikely(err))
 +		goto out;
 +
++	lockdep_off();
 +	err = vfs_symlink(dir, path->dentry, symname);
++	lockdep_on();
 +	if (!err) {
 +		struct path tmp = *path;
 +		int did;
@@ -27510,7 +28517,9 @@
 +	if (unlikely(err))
 +		goto out;
 +
++	lockdep_off();
 +	err = vfs_mknod(dir, path->dentry, mode, dev);
++	lockdep_on();
 +	if (!err) {
 +		struct path tmp = *path;
 +		int did;
@@ -27595,14 +28604,14 @@
 +	d = path->dentry;
 +	path->dentry = d->d_parent;
 +	tmp.dentry = src_dentry->d_parent;
-+	err = security_path_rename(&tmp, src_dentry, path, d);
++	err = security_path_rename(&tmp, src_dentry, path, d, /*flags*/0);
 +	path->dentry = d;
 +	if (unlikely(err))
 +		goto out;
 +
 +	lockdep_off();
 +	err = vfs_rename(src_dir, src_dentry, dir, path->dentry,
-+			 delegated_inode);
++			 delegated_inode, /*flags*/0);
 +	lockdep_on();
 +	if (!err) {
 +		int did;
@@ -27636,7 +28645,9 @@
 +	if (unlikely(err))
 +		goto out;
 +
++	lockdep_off();
 +	err = vfs_mkdir(dir, path->dentry, mode);
++	lockdep_on();
 +	if (!err) {
 +		struct path tmp = *path;
 +		int did;
@@ -27882,9 +28893,11 @@
 +	int err, do_sio, wkq_err;
 +
 +	do_sio = au_test_h_perm_sio(dir, MAY_EXEC | MAY_WRITE);
-+	if (!do_sio)
++	if (!do_sio) {
++		lockdep_off();
 +		err = vfsub_mkdir(dir, path, mode);
-+	else {
++		lockdep_on();
++	} else {
 +		struct au_vfsub_mkdir_args args = {
 +			.errp	= &err,
 +			.dir	= dir,
@@ -27916,9 +28929,11 @@
 +	int err, do_sio, wkq_err;
 +
 +	do_sio = au_test_h_perm_sio(dir, MAY_EXEC | MAY_WRITE);
-+	if (!do_sio)
++	if (!do_sio) {
++		lockdep_off();
 +		err = vfsub_rmdir(dir, path);
-+	else {
++		lockdep_on();
++	} else {
 +		struct au_vfsub_rmdir_args args = {
 +			.errp	= &err,
 +			.dir	= dir,
@@ -27951,8 +28966,10 @@
 +
 +	*a->errp = -EPERM;
 +	if (!IS_IMMUTABLE(h_inode) && !IS_APPEND(h_inode)) {
++		lockdep_off();
 +		*a->errp = notify_change(a->path->dentry, a->ia,
 +					 a->delegated_inode);
++		lockdep_on();
 +		if (!*a->errp)
 +			vfsub_update_h_iattr(a->path, /*did*/NULL); /*ignore*/
 +	}
@@ -28071,8 +29088,8 @@
 +	return err;
 +}
 --- a/fs/aufs/vfsub.h	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/vfsub.h	2014-01-20 03:24:33.516760970 +0000
-@@ -0,0 +1,282 @@
++++ b/fs/aufs/vfsub.h	2014-07-15 14:04:48.736871625 +0100
+@@ -0,0 +1,284 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -28180,6 +29197,7 @@
 +static inline int vfsub_mnt_want_write(struct vfsmount *mnt)
 +{
 +	int err;
++
 +	lockdep_off();
 +	err = mnt_want_write(mnt);
 +	lockdep_on();
@@ -28292,6 +29310,7 @@
 +static inline long vfsub_truncate(struct path *path, loff_t length)
 +{
 +	long err;
++
 +	lockdep_off();
 +	err = vfs_truncate(path, length);
 +	lockdep_on();
@@ -28356,8 +29375,8 @@
 +#endif /* __KERNEL__ */
 +#endif /* __AUFS_VFSUB_H__ */
 --- a/fs/aufs/wbr_policy.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/wbr_policy.c	2014-01-20 03:24:33.520760970 +0000
-@@ -0,0 +1,756 @@
++++ b/fs/aufs/wbr_policy.c	2014-09-08 00:38:33.518569904 +0100
+@@ -0,0 +1,765 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -28525,6 +29544,7 @@
 +		au_set_ibend(inode, bdst);
 +	au_set_h_iptr(inode, bdst, au_igrab(h_inode),
 +		      au_hi_flags(inode, /*isdir*/1));
++	au_fhsm_wrote(dentry->d_sb, bdst, /*force*/0);
 +	goto out; /* success */
 +
 +	/* revert */
@@ -29036,12 +30056,10 @@
 +}
 +
 +/* bottom up */
-+static int au_wbr_copyup_bu(struct dentry *dentry)
++int au_wbr_do_copyup_bu(struct dentry *dentry, aufs_bindex_t bstart)
 +{
 +	int err;
-+	aufs_bindex_t bstart;
 +
-+	bstart = au_dbstart(dentry);
 +	err = au_wbr_bu(dentry->d_sb, bstart);
 +	AuDbg("b%d\n", err);
 +	if (err > bstart)
@@ -29051,6 +30069,16 @@
 +	return err;
 +}
 +
++static int au_wbr_copyup_bu(struct dentry *dentry)
++{
++	int err;
++	aufs_bindex_t bstart;
++
++	bstart = au_dbstart(dentry);
++	err = au_wbr_do_copyup_bu(dentry, bstart);
++	return err;
++}
++
 +/* ---------------------------------------------------------------------- */
 +
 +struct au_wbr_copyup_operations au_wbr_copyup_ops[] = {
@@ -29115,8 +30143,8 @@
 +	}
 +};
 --- a/fs/aufs/whout.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/whout.c	2014-01-20 03:24:33.520760970 +0000
-@@ -0,0 +1,1052 @@
++++ b/fs/aufs/whout.c	2014-09-08 00:38:33.518569904 +0100
+@@ -0,0 +1,1056 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -29182,8 +30210,7 @@
 + * test if the @wh_name exists under @h_parent.
 + * @try_sio specifies the necessary of super-io.
 + */
-+int au_wh_test(struct dentry *h_parent, struct qstr *wh_name,
-+	       struct au_branch *br, int try_sio)
++int au_wh_test(struct dentry *h_parent, struct qstr *wh_name, int try_sio)
 +{
 +	int err;
 +	struct dentry *wh_dentry;
@@ -29191,7 +30218,7 @@
 +	if (!try_sio)
 +		wh_dentry = vfsub_lkup_one(wh_name, h_parent);
 +	else
-+		wh_dentry = au_sio_lkup_one(wh_name, h_parent, br);
++		wh_dentry = au_sio_lkup_one(wh_name, h_parent);
 +	err = PTR_ERR(wh_dentry);
 +	if (IS_ERR(wh_dentry))
 +		goto out;
@@ -29217,13 +30244,13 @@
 +/*
 + * test if the @h_dentry sets opaque or not.
 + */
-+int au_diropq_test(struct dentry *h_dentry, struct au_branch *br)
++int au_diropq_test(struct dentry *h_dentry)
 +{
 +	int err;
 +	struct inode *h_dir;
 +
 +	h_dir = h_dentry->d_inode;
-+	err = au_wh_test(h_dentry, &diropq_name, br,
++	err = au_wh_test(h_dentry, &diropq_name,
 +			 au_test_h_perm_sio(h_dir, MAY_EXEC));
 +	return err;
 +}
@@ -29267,7 +30294,7 @@
 +	qs.name = name;
 +	for (i = 0; i < 3; i++) {
 +		sprintf(p, "%.*x", AUFS_WH_TMP_LEN, cnt++);
-+		dentry = au_sio_lkup_one(&qs, h_parent, br);
++		dentry = au_sio_lkup_one(&qs, h_parent);
 +		if (IS_ERR(dentry) || !dentry->d_inode)
 +			goto out_name;
 +		dput(dentry);
@@ -29710,6 +30737,8 @@
 +	wbr_wh_write_unlock(wbr);
 +	au_hn_imtx_unlock(hdir);
 +	di_read_unlock(a->sb->s_root, AuLock_IR);
++	if (!err)
++		au_fhsm_wrote(a->sb, bindex, /*force*/0);
 +
 +out:
 +	if (wbr)
@@ -29797,6 +30826,8 @@
 +
 +	/* return this error in this context */
 +	err = vfsub_create(h_dir, &h_path, WH_MASK, /*want_excl*/true);
++	if (!err)
++		au_fhsm_wrote(sb, bindex, /*force*/0);
 +
 +out:
 +	wbr_wh_read_unlock(wbr);
@@ -29921,9 +30952,10 @@
 +	wh_dentry = au_wh_lkup(h_parent, &dentry->d_name, au_sbr(sb, bindex));
 +	if (!IS_ERR(wh_dentry) && !wh_dentry->d_inode) {
 +		err = link_or_create_wh(sb, bindex, wh_dentry);
-+		if (!err)
++		if (!err) {
 +			au_set_dbwh(dentry, bindex);
-+		else {
++			au_fhsm_wrote(sb, bindex, /*force*/0);
++		} else {
 +			dput(wh_dentry);
 +			wh_dentry = ERR_PTR(err);
 +		}
@@ -30170,8 +31202,8 @@
 +	}
 +}
 --- a/fs/aufs/whout.h	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/whout.h	2014-01-20 03:24:33.520760970 +0000
-@@ -0,0 +1,86 @@
++++ b/fs/aufs/whout.h	2014-07-15 14:04:48.736871625 +0100
+@@ -0,0 +1,85 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -30203,9 +31235,8 @@
 +/* whout.c */
 +int au_wh_name_alloc(struct qstr *wh, const struct qstr *name);
 +struct au_branch;
-+int au_wh_test(struct dentry *h_parent, struct qstr *wh_name,
-+	       struct au_branch *br, int try_sio);
-+int au_diropq_test(struct dentry *h_dentry, struct au_branch *br);
++int au_wh_test(struct dentry *h_parent, struct qstr *wh_name, int try_sio);
++int au_diropq_test(struct dentry *h_dentry);
 +struct dentry *au_whtmp_lkup(struct dentry *h_parent, struct au_branch *br,
 +			     struct qstr *prefix);
 +int au_whtmp_ren(struct dentry *h_dentry, struct au_branch *br);
@@ -30259,8 +31290,8 @@
 +#endif /* __KERNEL__ */
 +#endif /* __AUFS_WHOUT_H__ */
 --- a/fs/aufs/wkq.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/wkq.c	2014-05-13 19:05:02.880347266 +0100
-@@ -0,0 +1,212 @@
++++ b/fs/aufs/wkq.c	2014-07-15 14:04:40.008871417 +0100
+@@ -0,0 +1,213 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -30366,7 +31397,8 @@
 +{
 +	if (au_ftest_wkq(wkinfo->flags, NEST)) {
 +		if (au_wkq_test()) {
-+			AuWarn1("wkq from wkq, due to a dead dir by UDBA?\n");
++			AuWarn1("wkq from wkq, unless silly-rename on NFS,"
++				" due to a dead dir by UDBA?\n");
 +			AuDebugOn(au_ftest_wkq(wkinfo->flags, WAIT));
 +		}
 +	} else
@@ -30568,8 +31600,8 @@
 +#endif /* __KERNEL__ */
 +#endif /* __AUFS_WKQ_H__ */
 --- a/fs/aufs/xino.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/xino.c	2014-06-17 18:23:40.791905016 +0100
-@@ -0,0 +1,1312 @@
++++ b/fs/aufs/xino.c	2014-07-15 14:04:48.736871625 +0100
+@@ -0,0 +1,1316 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -31570,6 +32602,8 @@
 +		return fop->read;
 +	if (fop->aio_read)
 +		return do_sync_read;
++	if (fop->read_iter)
++		return new_sync_read;
 +	return ERR_PTR(-ENOSYS);
 +}
 +
@@ -31581,6 +32615,8 @@
 +		return fop->write;
 +	if (fop->aio_write)
 +		return do_sync_write;
++	if (fop->write_iter)
++		return new_sync_write;
 +	return ERR_PTR(-ENOSYS);
 +}
 +
@@ -31883,8 +32919,8 @@
 +	return err;
 +}
 --- a/include/uapi/linux/aufs_type.h	1970-01-01 01:00:00.000000000 +0100
-+++ b/include/uapi/linux/aufs_type.h	2014-06-17 18:23:40.791905016 +0100
-@@ -0,0 +1,281 @@
++++ b/include/uapi/linux/aufs_type.h	2014-09-08 00:39:05.266571221 +0100
+@@ -0,0 +1,380 @@
 +/*
 + * Copyright (C) 2005-2014 Junjiro R. Okajima
 + *
@@ -31926,7 +32962,7 @@
 +
 +#include <linux/limits.h>
 +
-+#define AUFS_VERSION	"3.14-20140616"
++#define AUFS_VERSION	"3.16-20140908"
 +
 +/* todo? move this to linux-2.6.19/include/magic.h */
 +#define AUFS_SUPER_MAGIC	('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
@@ -31980,6 +33016,7 @@
 +#define AUFS_WKQ_NAME		AUFS_NAME "d"
 +#define AUFS_MFS_DEF_SEC	30 /* seconds */
 +#define AUFS_MFS_MAX_SEC	3600 /* seconds */
++#define AUFS_FHSM_CACHE_DEF_SEC	30 /* seconds */
 +#define AUFS_PLINK_WARN		50 /* number of plinks in a single bucket */
 +
 +/* pseudo-link maintenace under /proc */
@@ -32003,9 +33040,78 @@
 +#define AUFS_BRPERM_RW		"rw"
 +#define AUFS_BRPERM_RO		"ro"
 +#define AUFS_BRPERM_RR		"rr"
++#define AUFS_BRATTR_COO_REG	"coo_reg"
++#define AUFS_BRATTR_COO_ALL	"coo_all"
++#define AUFS_BRATTR_FHSM	"fhsm"
++#define AUFS_BRATTR_UNPIN	"unpin"
 +#define AUFS_BRRATTR_WH		"wh"
 +#define AUFS_BRWATTR_NLWH	"nolwh"
-+#define AUFS_BRATTR_UNPIN	"unpin"
++#define AUFS_BRWATTR_MOO	"moo"
++
++#define AuBrPerm_RW		1		/* writable, hardlinkable wh */
++#define AuBrPerm_RO		(1 << 1)	/* readonly */
++#define AuBrPerm_RR		(1 << 2)	/* natively readonly */
++#define AuBrPerm_Mask		(AuBrPerm_RW | AuBrPerm_RO | AuBrPerm_RR)
++
++#define AuBrAttr_COO_REG	(1 << 3)	/* copy-up on open */
++#define AuBrAttr_COO_ALL	(1 << 4)
++#define AuBrAttr_COO_Mask	(AuBrAttr_COO_REG | AuBrAttr_COO_ALL)
++
++#define AuBrAttr_FHSM		(1 << 5)	/* file-based hsm */
++#define AuBrAttr_UNPIN		(1 << 6)	/* rename-able top dir of
++						   branch */
++
++#define AuBrRAttr_WH		(1 << 7)	/* whiteout-able */
++#define AuBrRAttr_Mask		AuBrRAttr_WH
++
++#define AuBrWAttr_NoLinkWH	(1 << 8)	/* un-hardlinkable whiteouts */
++#define AuBrWAttr_MOO		(1 << 9)	/* move-up on open */
++#define AuBrWAttr_Mask		(AuBrWAttr_NoLinkWH | AuBrWAttr_MOO)
++
++#define AuBrAttr_CMOO_Mask	(AuBrAttr_COO_Mask | AuBrWAttr_MOO)
++
++#ifdef __KERNEL__
++#ifndef CONFIG_AUFS_FHSM
++#undef AuBrAttr_FHSM
++#define AuBrAttr_FHSM		0
++#endif
++#endif
++
++/* the longest combination */
++#define AuBrPermStrSz	sizeof(AUFS_BRPERM_RW		\
++			       "+" AUFS_BRATTR_COO_REG	\
++			       "+" AUFS_BRATTR_FHSM	\
++			       "+" AUFS_BRATTR_UNPIN	\
++			       "+" AUFS_BRWATTR_NLWH)
++
++typedef struct {
++	char a[AuBrPermStrSz];
++} au_br_perm_str_t;
++
++static inline int au_br_writable(int brperm)
++{
++	return brperm & AuBrPerm_RW;
++}
++
++static inline int au_br_whable(int brperm)
++{
++	return brperm & (AuBrPerm_RW | AuBrRAttr_WH);
++}
++
++static inline int au_br_wh_linkable(int brperm)
++{
++	return !(brperm & AuBrWAttr_NoLinkWH);
++}
++
++static inline int au_br_cmoo(int brperm)
++{
++	return brperm & AuBrAttr_CMOO_Mask;
++}
++
++static inline int au_br_fhsm(int brperm)
++{
++	return brperm & AuBrAttr_FHSM;
++}
 +
 +/* ---------------------------------------------------------------------- */
 +
@@ -32015,14 +33121,11 @@
 +	AuCtl_RDU,
 +	AuCtl_RDU_INO,
 +
-+	/* pathconf wrapper */
-+	AuCtl_WBR_FD,
-+
-+	/* busy inode */
-+	AuCtl_IBUSY,
-+
-+	/* move-down */
-+	AuCtl_MVDOWN
++	AuCtl_WBR_FD,	/* pathconf wrapper */
++	AuCtl_IBUSY,	/* busy inode */
++	AuCtl_MVDOWN,	/* move-down */
++	AuCtl_BR,	/* info about branches */
++	AuCtl_FHSM_FD	/* connection for fhsm */
 +};
 +
 +/* borrowed from linux/include/linux/kernel.h */
@@ -32136,22 +33239,52 @@
 +#define AUFS_MVDOWN_ROUPPER_R	(1 << 6)	/* did on upper RO */
 +#define AUFS_MVDOWN_BRID_UPPER	(1 << 7)	/* upper brid */
 +#define AUFS_MVDOWN_BRID_LOWER	(1 << 8)	/* lower brid */
-+/* will be added more */
++#define AUFS_MVDOWN_FHSM_LOWER	(1 << 9)	/* find fhsm attr for lower */
++#define AUFS_MVDOWN_STFS	(1 << 10)	/* req. stfs */
++#define AUFS_MVDOWN_STFS_FAILED	(1 << 11)	/* output: stfs is unusable */
++#define AUFS_MVDOWN_BOTTOM	(1 << 12)	/* output: no more lowers */
 +
++/* index for move-down */
 +enum {
 +	AUFS_MVDOWN_UPPER,
 +	AUFS_MVDOWN_LOWER,
 +	AUFS_MVDOWN_NARRAY
 +};
 +
++/*
++ * additional info of move-down
++ * number of free blocks and inodes.
++ * subset of struct kstatfs, but smaller and always 64bit.
++ */
++struct aufs_stfs {
++	uint64_t	f_blocks;
++	uint64_t	f_bavail;
++	uint64_t	f_files;
++	uint64_t	f_ffree;
++};
++
++struct aufs_stbr {
++	int16_t			brid;	/* optional input */
++	int16_t			bindex;	/* output */
++	struct aufs_stfs	stfs;	/* output when AUFS_MVDOWN_STFS set */
++} __aligned(8);
++
 +struct aufs_mvdown {
-+	uint32_t	flags;
++	uint32_t		flags;			/* input/output */
++	struct aufs_stbr	stbr[AUFS_MVDOWN_NARRAY]; /* input/output */
++	int8_t			au_errno;		/* output */
++} __aligned(8);
++
++/* ---------------------------------------------------------------------- */
++
++union aufs_brinfo {
++	/* PATH_MAX may differ between kernel-space and user-space */
++	char	_spacer[4096];
 +	struct {
-+		int16_t		bindex;
-+		int16_t		brid;
-+	} a[AUFS_MVDOWN_NARRAY];
-+	int8_t		au_errno;
-+	/* will be added more */
++		int16_t	id;
++		int	perm;
++		char	path[0];
++	};
 +} __aligned(8);
 +
 +/* ---------------------------------------------------------------------- */
@@ -32164,5 +33297,7 @@
 +#define AUFS_CTL_IBUSY		_IOWR(AuCtlType, AuCtl_IBUSY, struct aufs_ibusy)
 +#define AUFS_CTL_MVDOWN		_IOWR(AuCtlType, AuCtl_MVDOWN, \
 +				      struct aufs_mvdown)
++#define AUFS_CTL_BRINFO		_IOW(AuCtlType, AuCtl_BR, union aufs_brinfo)
++#define AUFS_CTL_FHSM_FD	_IOW(AuCtlType, AuCtl_FHSM_FD, int)
 +
 +#endif /* __AUFS_TYPE_H__ */

Modified: dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-base.patch
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-base.patch	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-base.patch	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,15 +1,40 @@
 From: J. R. Okajima <hooanon05 at yahoo.co.jp>
-Date: Tue Apr 1 11:01:55 2014 +0900
-Subject: aufs3.14 base patch
-Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/d201c504500b2091b88aa648e5163589e29b6822/tree/
+Date: Sat Aug 23 03:27:11 2014 +0900
+Subject: aufs3.16 base patch
+Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/888949daf96bf7e2b857dc38e22029513f94d4ae/tree/
 Bug-Debian: https://bugs.debian.org/541828
 
 Patch headers added by debian/patches/features/all/aufs3/gen-patch
 
-aufs3.14 base patch
+aufs3.16 base patch
 
+diff --git a/MAINTAINERS b/MAINTAINERS
+index c2066f4..f07a989 100644
+--- a/MAINTAINERS
++++ b/MAINTAINERS
+@@ -1698,6 +1698,20 @@ F:	include/linux/audit.h
+ F:	include/uapi/linux/audit.h
+ F:	kernel/audit*
+ 
++AUFS (advanced multi layered unification filesystem) FILESYSTEM
++M:	"J. R. Okajima" <hooanon05g at gmail.com>
++L:	linux-unionfs at vger.kernel.org
++L:	aufs-users at lists.sourceforge.net (members only)
++W:	http://aufs.sourceforge.net
++T:	git://git.code.sf.net/p/aufs/aufs3-linux
++T:	git://github.com/sfjro/aufs3-linux.git
++S:	Supported
++F:	Documentation/filesystems/aufs/
++F:	Documentation/ABI/testing/debugfs-aufs
++F:	Documentation/ABI/testing/sysfs-aufs
++F:	fs/aufs/
++F:	include/uapi/linux/aufs_type.h
++
+ AUXILIARY DISPLAY DRIVERS
+ M:	Miguel Ojeda Sandonis <miguel.ojeda.sandonis at gmail.com>
+ W:	http://miguelojeda.es/auxdisplay.htm
 diff --git a/drivers/block/loop.c b/drivers/block/loop.c
-index 66e8c3b..ec278ac 100644
+index 6cb1beb..30efd68 100644
 --- a/drivers/block/loop.c
 +++ b/drivers/block/loop.c
 @@ -692,6 +692,24 @@ static inline int is_loop_device(struct file *file)
@@ -38,10 +63,10 @@
  
  static ssize_t loop_attr_show(struct device *dev, char *page,
 diff --git a/fs/inode.c b/fs/inode.c
-index 4bcdad3..bc83168 100644
+index 6eecb7f..b225c0f 100644
 --- a/fs/inode.c
 +++ b/fs/inode.c
-@@ -1497,7 +1497,7 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
+@@ -1496,7 +1496,7 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
   * This does the actual work of updating an inodes time or version.  Must have
   * had called mnt_want_write() before calling this.
   */
@@ -51,10 +76,10 @@
  	if (inode->i_op->update_time)
  		return inode->i_op->update_time(inode, time, flags);
 diff --git a/fs/splice.c b/fs/splice.c
-index 12028fa..f26cbaf 100644
+index f5cb9ba..9ba380c 100644
 --- a/fs/splice.c
 +++ b/fs/splice.c
-@@ -1111,8 +1111,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
+@@ -1114,8 +1114,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
  /*
   * Attempt to initiate a splice from pipe to file.
   */
@@ -65,7 +90,7 @@
  {
  	ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
  				loff_t *, size_t, unsigned int);
-@@ -1128,9 +1128,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -1131,9 +1131,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
  /*
   * Attempt to initiate a splice from a file to a pipe.
   */
@@ -79,10 +104,10 @@
  	ssize_t (*splice_read)(struct file *, loff_t *,
  			       struct pipe_inode_info *, size_t, unsigned int);
 diff --git a/include/linux/fs.h b/include/linux/fs.h
-index 23b2a35..f3f635c 100644
+index e11d60c..2f32b35 100644
 --- a/include/linux/fs.h
 +++ b/include/linux/fs.h
-@@ -2669,6 +2669,7 @@ extern int inode_change_ok(const struct inode *, struct iattr *);
+@@ -2618,6 +2618,7 @@ extern int inode_change_ok(const struct inode *, struct iattr *);
  extern int inode_newsize_ok(const struct inode *, loff_t offset);
  extern void setattr_copy(struct inode *inode, const struct iattr *attr);
  
@@ -91,10 +116,10 @@
  
  extern int generic_show_options(struct seq_file *m, struct dentry *root);
 diff --git a/include/linux/splice.h b/include/linux/splice.h
-index 0e43906..304169e 100644
+index da2751d..2e0fca6 100644
 --- a/include/linux/splice.h
 +++ b/include/linux/splice.h
-@@ -93,4 +93,10 @@ extern void splice_shrink_spd(struct splice_pipe_desc *);
+@@ -83,4 +83,10 @@ extern void splice_shrink_spd(struct splice_pipe_desc *);
  extern void spd_release_page(struct splice_pipe_desc *, unsigned int);
  
  extern const struct pipe_buf_operations page_cache_pipe_buf_ops;

Modified: dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-kbuild.patch
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-kbuild.patch	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-kbuild.patch	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,18 +1,18 @@
 From: J. R. Okajima <hooanon05 at yahoo.co.jp>
-Date: Tue Apr 1 11:01:55 2014 +0900
-Subject: aufs3.14 kbuild patch
-Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/d201c504500b2091b88aa648e5163589e29b6822/tree/
+Date: Thu Aug 7 21:42:20 2014 +0900
+Subject: aufs3.16 kbuild patch
+Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/888949daf96bf7e2b857dc38e22029513f94d4ae/tree/
 Bug-Debian: https://bugs.debian.org/541828
 
 Patch headers added by debian/patches/features/all/aufs3/gen-patch
 
-aufs3.14 kbuild patch
+aufs3.16 kbuild patch
 
 diff --git a/fs/Kconfig b/fs/Kconfig
-index 7385e54..d5c769c 100644
+index 312393f..78632ed 100644
 --- a/fs/Kconfig
 +++ b/fs/Kconfig
-@@ -208,6 +208,7 @@ source "fs/ufs/Kconfig"
+@@ -209,6 +209,7 @@ source "fs/ufs/Kconfig"
  source "fs/exofs/Kconfig"
  source "fs/f2fs/Kconfig"
  source "fs/efivarfs/Kconfig"
@@ -21,7 +21,7 @@
  endif # MISC_FILESYSTEMS
  
 diff --git a/fs/Makefile b/fs/Makefile
-index 47ac07b..0c6a294 100644
+index 4030cbf..5bd169a 100644
 --- a/fs/Makefile
 +++ b/fs/Makefile
 @@ -125,3 +125,4 @@ obj-y				+= exofs/ # Multiple modules
@@ -30,7 +30,7 @@
  obj-$(CONFIG_EFIVAR_FS)		+= efivarfs/
 +obj-$(CONFIG_AUFS_FS)           += aufs/
 diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
-index 3ce25b5..9faebdc 100644
+index 24e9033..fe9a8d4 100644
 --- a/include/uapi/linux/Kbuild
 +++ b/include/uapi/linux/Kbuild
 @@ -56,6 +56,7 @@ header-y += atmppp.h

Modified: dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-mmap.patch
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-mmap.patch	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-mmap.patch	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,18 +1,18 @@
 From: J. R. Okajima <hooanon05 at yahoo.co.jp>
-Date: Sun Jun 15 16:10:12 2014 +0900
-Subject: aufs3.14 mmap patch
-Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/d201c504500b2091b88aa648e5163589e29b6822/tree/
+Date: Thu Aug 7 21:42:20 2014 +0900
+Subject: aufs3.16 mmap patch
+Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/888949daf96bf7e2b857dc38e22029513f94d4ae/tree/
 Bug-Debian: https://bugs.debian.org/541828
 
 Patch headers added by debian/patches/features/all/aufs3/gen-patch
 
-aufs3.14 mmap patch
+aufs3.16 mmap patch
 
 diff --git a/fs/buffer.c b/fs/buffer.c
-index 27265a8..75427a6 100644
+index eba6e4f..31f0b2d 100644
 --- a/fs/buffer.c
 +++ b/fs/buffer.c
-@@ -2448,7 +2448,7 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
+@@ -2460,7 +2460,7 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
  	 * Update file times before taking page lock. We may end up failing the
  	 * fault so this update may be superfluous but who really cares...
  	 */
@@ -22,165 +22,100 @@
  	ret = __block_page_mkwrite(vma, vmf, get_block);
  	sb_end_pagefault(sb);
 diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
-index d4a3574..e44a744 100644
+index d4a3574..1397181 100644
 --- a/fs/proc/nommu.c
 +++ b/fs/proc/nommu.c
-@@ -45,7 +45,9 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
+@@ -45,7 +45,10 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
  	file = region->vm_file;
  
  	if (file) {
 -		struct inode *inode = file_inode(region->vm_file);
 +		struct inode *inode;
++
 +		file = vmr_pr_or_file(region);
 +		inode = file_inode(file);
  		dev = inode->i_sb->s_dev;
  		ino = inode->i_ino;
  	}
 diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
-index fb52b54..1aca72e 100644
+index cfa63ee..bf4919e 100644
 --- a/fs/proc/task_mmu.c
 +++ b/fs/proc/task_mmu.c
-@@ -264,7 +264,9 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
+@@ -265,7 +265,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
  	const char *name = NULL;
  
  	if (file) {
 -		struct inode *inode = file_inode(vma->vm_file);
 +		struct inode *inode;
++
 +		file = vma_pr_or_file(vma);
 +		inode = file_inode(file);
  		dev = inode->i_sb->s_dev;
  		ino = inode->i_ino;
  		pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
-@@ -1407,6 +1409,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
- 	seq_printf(m, "%08lx %s", vma->vm_start, buffer);
- 
- 	if (file) {
-+		file = vma_pr_or_file(vma);
- 		seq_printf(m, " file=");
- 		seq_path(m, &file->f_path, "\n\t= ");
- 	} else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) {
+@@ -1390,7 +1393,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
+ 	struct proc_maps_private *proc_priv = &numa_priv->proc_maps;
+ 	struct vm_area_struct *vma = v;
+ 	struct numa_maps *md = &numa_priv->md;
+-	struct file *file = vma->vm_file;
++	struct file *file = vma_pr_or_file(vma);
+ 	struct task_struct *task = proc_priv->task;
+ 	struct mm_struct *mm = vma->vm_mm;
+ 	struct mm_walk walk = {};
 diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
-index 678455d..ad0ce45 100644
+index 678455d..0ef7ef4 100644
 --- a/fs/proc/task_nommu.c
 +++ b/fs/proc/task_nommu.c
-@@ -141,7 +141,9 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
+@@ -141,7 +141,10 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
  	file = vma->vm_file;
  
  	if (file) {
 -		struct inode *inode = file_inode(vma->vm_file);
 +		struct inode *inode;
++
 +		file = vma_pr_or_file(file);
 +		inode = file_inode(file);
  		dev = inode->i_sb->s_dev;
  		ino = inode->i_ino;
  		pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
 diff --git a/include/linux/mm.h b/include/linux/mm.h
-index c1b7414..02036e0 100644
+index e03dd29..dd32624 100644
 --- a/include/linux/mm.h
 +++ b/include/linux/mm.h
-@@ -18,6 +18,9 @@
- #include <linux/pfn.h>
- #include <linux/bit_spinlock.h>
- #include <linux/shrinker.h>
-+#include <linux/dcache.h>
-+#include <linux/file.h>
-+#include <linux/fs.h>
- 
- struct mempolicy;
- struct anon_vma;
-@@ -1152,6 +1155,87 @@ static inline int fixup_user_fault(struct task_struct *tsk,
+@@ -1184,6 +1184,28 @@ static inline int fixup_user_fault(struct task_struct *tsk,
  }
  #endif
  
-+/*
-+ * Mainly for aufs which mmap(2) diffrent file and wants to print different path
-+ * in /proc/PID/maps.
-+ */
-+/* #define AUFS_DEBUG_MMAP */
-+static inline void aufs_trace(struct file *f, struct file *pr,
-+			      const char func[], int line, const char func2[])
-+{
-+#ifdef AUFS_DEBUG_MMAP
-+	if (pr)
-+		pr_info("%s:%d: %s, %p\n", func, line, func2,
-+			f ? (char *)f->f_dentry->d_name.name : "(null)");
-+#endif
-+}
-+
-+static inline struct file *vmr_do_pr_or_file(struct vm_region *region,
-+					     const char func[], int line)
-+{
-+	struct file *f = region->vm_file, *pr = region->vm_prfile;
-+	aufs_trace(f, pr, func, line, __func__);
-+	return (f && pr) ? pr : f;
-+}
-+
-+static inline void vmr_do_fput(struct vm_region *region,
-+			       const char func[], int line)
-+{
-+	struct file *f = region->vm_file, *pr = region->vm_prfile;
-+	aufs_trace(f, pr, func, line, __func__);
-+	fput(f);
-+	if (f && pr)
-+		fput(pr);
-+}
++#ifdef CONFIG_MMU
++extern void vma_do_file_update_time(struct vm_area_struct *, const char[], int);
++extern struct file *vma_do_pr_or_file(struct vm_area_struct *, const char[],
++				      int);
++extern void vma_do_get_file(struct vm_area_struct *, const char[], int);
++extern void vma_do_fput(struct vm_area_struct *, const char[], int);
 +
-+static inline void vma_do_file_update_time(struct vm_area_struct *vma,
-+					   const char func[], int line)
-+{
-+	struct file *f = vma->vm_file, *pr = vma->vm_prfile;
-+	aufs_trace(f, pr, func, line, __func__);
-+	file_update_time(f);
-+	if (f && pr)
-+		file_update_time(pr);
-+}
-+
-+static inline struct file *vma_do_pr_or_file(struct vm_area_struct *vma,
-+					     const char func[], int line)
-+{
-+	struct file *f = vma->vm_file, *pr = vma->vm_prfile;
-+	aufs_trace(f, pr, func, line, __func__);
-+	return (f && pr) ? pr : f;
-+}
-+
-+static inline void vma_do_get_file(struct vm_area_struct *vma,
-+				   const char func[], int line)
-+{
-+	struct file *f = vma->vm_file, *pr = vma->vm_prfile;
-+	aufs_trace(f, pr, func, line, __func__);
-+	get_file(f);
-+	if (f && pr)
-+		get_file(pr);
-+}
-+
-+static inline void vma_do_fput(struct vm_area_struct *vma,
-+			       const char func[], int line)
-+{
-+	struct file *f = vma->vm_file, *pr = vma->vm_prfile;
-+	aufs_trace(f, pr, func, line, __func__);
-+	fput(f);
-+	if (f && pr)
-+		fput(pr);
-+}
-+
-+#define vmr_pr_or_file(region)		vmr_do_pr_or_file(region, __func__, \
-+							  __LINE__)
-+#define vmr_fput(region)		vmr_do_fput(region, __func__, __LINE__)
 +#define vma_file_update_time(vma)	vma_do_file_update_time(vma, __func__, \
 +								__LINE__)
 +#define vma_pr_or_file(vma)		vma_do_pr_or_file(vma, __func__, \
 +							  __LINE__)
 +#define vma_get_file(vma)		vma_do_get_file(vma, __func__, __LINE__)
 +#define vma_fput(vma)			vma_do_fput(vma, __func__, __LINE__)
++#else
++extern struct file *vmr_do_pr_or_file(struct vm_region *, const char[], int);
++extern void vmr_do_fput(struct vm_region *, const char[], int);
++
++#define vmr_pr_or_file(region)		vmr_do_pr_or_file(region, __func__, \
++							  __LINE__)
++#define vmr_fput(region)		vmr_do_fput(region, __func__, __LINE__)
++#endif /* CONFIG_MMU */
 +
  extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
  extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
  		void *buf, int len, int write);
 diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
-index 290901a..c21588b 100644
+index 96c5750..a087ecd 100644
 --- a/include/linux/mm_types.h
 +++ b/include/linux/mm_types.h
-@@ -231,6 +231,7 @@ struct vm_region {
+@@ -232,6 +232,7 @@ struct vm_region {
  	unsigned long	vm_top;		/* region allocated to here */
  	unsigned long	vm_pgoff;	/* the offset in vm_file corresponding to vm_start */
  	struct file	*vm_file;	/* the backing file or NULL */
@@ -188,7 +123,7 @@
  
  	int		vm_usage;	/* region usage count (access under nommu_region_sem) */
  	bool		vm_icache_flushed : 1; /* true if the icache has been flushed for
-@@ -299,6 +300,7 @@ struct vm_area_struct {
+@@ -300,6 +301,7 @@ struct vm_area_struct {
  	unsigned long vm_pgoff;		/* Offset (within vm_file) in PAGE_SIZE
  					   units, *not* PAGE_CACHE_SIZE */
  	struct file * vm_file;		/* File we map to (can be NULL). */
@@ -197,10 +132,10 @@
  
  #ifndef CONFIG_MMU
 diff --git a/kernel/fork.c b/kernel/fork.c
-index a17621c..40d9f6a 100644
+index 6a13c46..714302c 100644
 --- a/kernel/fork.c
 +++ b/kernel/fork.c
-@@ -412,7 +412,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
+@@ -416,7 +416,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
  			struct inode *inode = file_inode(file);
  			struct address_space *mapping = file->f_mapping;
  
@@ -209,11 +144,24 @@
  			if (tmp->vm_flags & VM_DENYWRITE)
  				atomic_dec(&inode->i_writecount);
  			mutex_lock(&mapping->i_mmap_mutex);
+diff --git a/mm/Makefile b/mm/Makefile
+index 4064f3e..0003fdf 100644
+--- a/mm/Makefile
++++ b/mm/Makefile
+@@ -18,7 +18,7 @@ obj-y			:= filemap.o mempool.o oom_kill.o fadvise.o \
+ 			   mm_init.o mmu_context.o percpu.o slab_common.o \
+ 			   compaction.o balloon_compaction.o vmacache.o \
+ 			   interval_tree.o list_lru.o workingset.o \
+-			   iov_iter.o $(mmu-y)
++			   iov_iter.o prfile.o $(mmu-y)
+ 
+ obj-y += init-mm.o
+ 
 diff --git a/mm/filemap.c b/mm/filemap.c
-index 7a13f6a..f1805df 100644
+index 900edfa..f4dda0c 100644
 --- a/mm/filemap.c
 +++ b/mm/filemap.c
-@@ -1733,7 +1733,7 @@ int filemap_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
+@@ -2040,7 +2040,7 @@ int filemap_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
  	int ret = VM_FAULT_LOCKED;
  
  	sb_start_pagefault(inode->i_sb);
@@ -223,10 +171,10 @@
  	if (page->mapping != inode->i_mapping) {
  		unlock_page(page);
 diff --git a/mm/fremap.c b/mm/fremap.c
-index 34feba6..8d6c451 100644
+index 72b8fa3..a00bbf0 100644
 --- a/mm/fremap.c
 +++ b/mm/fremap.c
-@@ -223,16 +223,27 @@ get_write_lock:
+@@ -224,16 +224,28 @@ get_write_lock:
  		 */
  		if (mapping_cap_account_dirty(mapping)) {
  			unsigned long addr;
@@ -247,6 +195,7 @@
  				BUG_ON(addr != start);
 +				if (prfile) {
 +					struct vm_area_struct *new_vma;
++
 +					new_vma = find_vma(mm, addr);
 +					if (!new_vma->vm_prfile)
 +						new_vma->vm_prfile = prfile;
@@ -257,7 +206,7 @@
  			}
  			goto out_freed;
 diff --git a/mm/madvise.c b/mm/madvise.c
-index 539eeb9..5e700b1 100644
+index a402f8f..134e15d 100644
 --- a/mm/madvise.c
 +++ b/mm/madvise.c
 @@ -327,12 +327,12 @@ static long madvise_remove(struct vm_area_struct *vma,
@@ -276,11 +225,11 @@
  	return error;
  }
 diff --git a/mm/memory.c b/mm/memory.c
-index 22dfa61..81813d9 100644
+index 8b44f76..69a72bf 100644
 --- a/mm/memory.c
 +++ b/mm/memory.c
-@@ -2755,7 +2755,7 @@ reuse:
- 			set_page_dirty_balance(dirty_page, page_mkwrite);
+@@ -2161,7 +2161,7 @@ reuse:
+ 			set_page_dirty_balance(dirty_page);
  			/* file_update_time outside page_lock */
  			if (vma->vm_file)
 -				file_update_time(vma->vm_file);
@@ -288,20 +237,11 @@
  		}
  		put_page(dirty_page);
  		if (page_mkwrite) {
-@@ -3467,7 +3467,7 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
- 
- 		/* file_update_time outside page_lock */
- 		if (vma->vm_file && !page_mkwrite)
--			file_update_time(vma->vm_file);
-+			vma_file_update_time(vma);
- 	} else {
- 		unlock_page(vmf.page);
- 		if (anon)
 diff --git a/mm/mmap.c b/mm/mmap.c
-index 20ff0c3..f743033 100644
+index 129b847..869d1d7 100644
 --- a/mm/mmap.c
 +++ b/mm/mmap.c
-@@ -249,7 +249,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
+@@ -253,7 +253,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
  	if (vma->vm_ops && vma->vm_ops->close)
  		vma->vm_ops->close(vma);
  	if (vma->vm_file)
@@ -310,7 +250,7 @@
  	mpol_put(vma_policy(vma));
  	kmem_cache_free(vm_area_cachep, vma);
  	return next;
-@@ -859,7 +859,7 @@ again:			remove_next = 1 + (end > next->vm_end);
+@@ -863,7 +863,7 @@ again:			remove_next = 1 + (end > next->vm_end);
  	if (remove_next) {
  		if (file) {
  			uprobe_munmap(next, next->vm_start, next->vm_end);
@@ -319,7 +259,7 @@
  		}
  		if (next->anon_vma)
  			anon_vma_merge(vma, next);
-@@ -1639,8 +1639,8 @@ out:
+@@ -1643,8 +1643,8 @@ out:
  unmap_and_free_vma:
  	if (vm_flags & VM_DENYWRITE)
  		allow_write_access(file);
@@ -329,7 +269,7 @@
  
  	/* Undo any partial mapping done by a device driver. */
  	unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end);
-@@ -2429,7 +2429,7 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
+@@ -2434,7 +2434,7 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
  		goto out_free_mpol;
  
  	if (new->vm_file)
@@ -338,7 +278,7 @@
  
  	if (new->vm_ops && new->vm_ops->open)
  		new->vm_ops->open(new);
-@@ -2448,7 +2448,7 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
+@@ -2453,7 +2453,7 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
  	if (new->vm_ops && new->vm_ops->close)
  		new->vm_ops->close(new);
  	if (new->vm_file)
@@ -347,7 +287,7 @@
  	unlink_anon_vmas(new);
   out_free_mpol:
  	mpol_put(vma_policy(new));
-@@ -2837,7 +2837,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
+@@ -2842,7 +2842,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
  			if (anon_vma_clone(new_vma, vma))
  				goto out_free_mempol;
  			if (new_vma->vm_file)
@@ -357,27 +297,30 @@
  				new_vma->vm_ops->open(new_vma);
  			vma_link(mm, new_vma, prev, rb_link, rb_parent);
 diff --git a/mm/msync.c b/mm/msync.c
-index 632df45..02d770e 100644
+index 992a167..ce1915b 100644
 --- a/mm/msync.c
 +++ b/mm/msync.c
-@@ -80,10 +80,10 @@ SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags)
+@@ -84,13 +84,13 @@ SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags)
  		start = vma->vm_end;
  		if ((flags & MS_SYNC) && file &&
  				(vma->vm_flags & VM_SHARED)) {
 -			get_file(file);
 +			vma_get_file(vma);
  			up_read(&mm->mmap_sem);
- 			error = vfs_fsync(file, 0);
+ 			if (vma->vm_flags & VM_NONLINEAR)
+ 				error = vfs_fsync(file, 1);
+ 			else
+ 				error = vfs_fsync_range(file, fstart, fend, 1);
 -			fput(file);
 +			vma_fput(vma);
  			if (error || start >= end)
  				goto out;
  			down_read(&mm->mmap_sem);
 diff --git a/mm/nommu.c b/mm/nommu.c
-index 8740213..ea7e336 100644
+index 4a852f6..b369644 100644
 --- a/mm/nommu.c
 +++ b/mm/nommu.c
-@@ -653,7 +653,7 @@ static void __put_nommu_region(struct vm_region *region)
+@@ -658,7 +658,7 @@ static void __put_nommu_region(struct vm_region *region)
  		up_write(&nommu_region_sem);
  
  		if (region->vm_file)
@@ -386,7 +329,7 @@
  
  		/* IO memory and memory shared directly out of the pagecache
  		 * from ramfs/tmpfs mustn't be released here */
-@@ -811,7 +811,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
+@@ -823,7 +823,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
  	if (vma->vm_ops && vma->vm_ops->close)
  		vma->vm_ops->close(vma);
  	if (vma->vm_file)
@@ -395,7 +338,7 @@
  	put_nommu_region(vma->vm_region);
  	kmem_cache_free(vm_area_cachep, vma);
  }
-@@ -1377,7 +1377,7 @@ unsigned long do_mmap_pgoff(struct file *file,
+@@ -1385,7 +1385,7 @@ unsigned long do_mmap_pgoff(struct file *file,
  					goto error_just_free;
  				}
  			}
@@ -404,7 +347,7 @@
  			kmem_cache_free(vm_region_jar, region);
  			region = pregion;
  			result = start;
-@@ -1453,10 +1453,10 @@ error_just_free:
+@@ -1461,10 +1461,10 @@ error_just_free:
  	up_write(&nommu_region_sem);
  error:
  	if (region->vm_file)
@@ -417,3 +360,95 @@
  	kmem_cache_free(vm_area_cachep, vma);
  	kleave(" = %d", ret);
  	return ret;
+diff --git a/mm/prfile.c b/mm/prfile.c
+new file mode 100644
+index 0000000..fc708d2
+--- /dev/null
++++ b/mm/prfile.c
+@@ -0,0 +1,86 @@
++/*
++ * Mainly for aufs which mmap(2) diffrent file and wants to print different path
++ * in /proc/PID/maps.
++ * Call these functions via macros defined in linux/mm.h.
++ *
++ * See Documentation/filesystems/aufs/design/06mmap.txt
++ *
++ * Copyright (c) 2014 Junjro R. Okajima
++ * Copyright (c) 2014 Ian Campbell
++ */
++
++#include <linux/mm.h>
++#include <linux/file.h>
++#include <linux/fs.h>
++
++/* #define PRFILE_TRACE */
++static inline void prfile_trace(struct file *f, struct file *pr,
++			      const char func[], int line, const char func2[])
++{
++#ifdef PRFILE_TRACE
++	if (pr)
++		pr_info("%s:%d: %s, %p\n", func, line, func2,
++			f ? (char *)f->f_dentry->d_name.name : "(null)");
++#endif
++}
++
++#ifdef CONFIG_MMU
++void vma_do_file_update_time(struct vm_area_struct *vma, const char func[],
++			     int line)
++{
++	struct file *f = vma->vm_file, *pr = vma->vm_prfile;
++
++	prfile_trace(f, pr, func, line, __func__);
++	file_update_time(f);
++	if (f && pr)
++		file_update_time(pr);
++}
++
++struct file *vma_do_pr_or_file(struct vm_area_struct *vma, const char func[],
++			       int line)
++{
++	struct file *f = vma->vm_file, *pr = vma->vm_prfile;
++
++	prfile_trace(f, pr, func, line, __func__);
++	return (f && pr) ? pr : f;
++}
++
++void vma_do_get_file(struct vm_area_struct *vma, const char func[], int line)
++{
++	struct file *f = vma->vm_file, *pr = vma->vm_prfile;
++
++	prfile_trace(f, pr, func, line, __func__);
++	get_file(f);
++	if (f && pr)
++		get_file(pr);
++}
++
++void vma_do_fput(struct vm_area_struct *vma, const char func[], int line)
++{
++	struct file *f = vma->vm_file, *pr = vma->vm_prfile;
++
++	prfile_trace(f, pr, func, line, __func__);
++	fput(f);
++	if (f && pr)
++		fput(pr);
++}
++#else
++struct file *vmr_do_pr_or_file(struct vm_region *region, const char func[],
++			       int line)
++{
++	struct file *f = region->vm_file, *pr = region->vm_prfile;
++
++	prfile_trace(f, pr, func, line, __func__);
++	return (f && pr) ? pr : f;
++}
++
++void vmr_do_fput(struct vm_region *region, const char func[], int line)
++{
++	struct file *f = region->vm_file, *pr = region->vm_prfile;
++
++	prfile_trace(f, pr, func, line, __func__);
++	fput(f);
++	if (f && pr)
++		fput(pr);
++}
++#endif /* CONFIG_MMU */

Modified: dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-standalone.patch
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-standalone.patch	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/features/all/aufs3/aufs3-standalone.patch	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,15 +1,15 @@
 From: J. R. Okajima <hooanon05 at yahoo.co.jp>
-Date: Tue Apr 1 11:01:55 2014 +0900
-Subject: aufs3.14 standalone patch
-Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/d201c504500b2091b88aa648e5163589e29b6822/tree/
+Date: Thu Aug 7 21:42:20 2014 +0900
+Subject: aufs3.16 standalone patch
+Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/888949daf96bf7e2b857dc38e22029513f94d4ae/tree/
 Bug-Debian: https://bugs.debian.org/541828
 
 Patch headers added by debian/patches/features/all/aufs3/gen-patch
 
-aufs3.14 standalone patch
+aufs3.16 standalone patch
 
 diff --git a/fs/inode.c b/fs/inode.c
-index bc83168..6dd1207 100644
+index b225c0f..73259c8 100644
 --- a/fs/inode.c
 +++ b/fs/inode.c
 @@ -57,6 +57,7 @@ static struct hlist_head *inode_hashtable __read_mostly;
@@ -20,7 +20,7 @@
  
  /*
   * Empty aops. Can be used for the cases where the user does not
-@@ -1513,6 +1514,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
+@@ -1512,6 +1513,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
  	mark_inode_dirty_sync(inode);
  	return 0;
  }
@@ -29,10 +29,10 @@
  /**
   *	touch_atime	-	update the access time
 diff --git a/fs/namespace.c b/fs/namespace.c
-index 2ffc5a2..785a51f 100644
+index 182bc41..c88e101 100644
 --- a/fs/namespace.c
 +++ b/fs/namespace.c
-@@ -455,6 +455,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
+@@ -453,6 +453,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
  	mnt_dec_writers(real_mount(mnt));
  	preempt_enable();
  }
@@ -40,7 +40,7 @@
  
  /**
   * mnt_drop_write - give up write access to a mount
-@@ -1555,6 +1556,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
+@@ -1564,6 +1565,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
  	}
  	return 0;
  }
@@ -85,7 +85,7 @@
  int fsnotify_fasync(int fd, struct file *file, int on)
  {
 diff --git a/fs/notify/mark.c b/fs/notify/mark.c
-index 923fe4a..176b435 100644
+index d90deaa..60b4239 100644
 --- a/fs/notify/mark.c
 +++ b/fs/notify/mark.c
 @@ -109,6 +109,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
@@ -121,7 +121,7 @@
  static int fsnotify_mark_destroy(void *ignored)
  {
 diff --git a/fs/open.c b/fs/open.c
-index b9ed8b2..3ea66972 100644
+index d6fd3ac..5e99d8b 100644
 --- a/fs/open.c
 +++ b/fs/open.c
 @@ -62,6 +62,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
@@ -132,11 +132,19 @@
  
  long vfs_truncate(struct path *path, loff_t length)
  {
+@@ -298,6 +299,7 @@ int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
+ 	sb_end_write(inode->i_sb);
+ 	return ret;
+ }
++EXPORT_SYMBOL_GPL(do_fallocate);
+ 
+ SYSCALL_DEFINE4(fallocate, int, fd, int, mode, loff_t, offset, loff_t, len)
+ {
 diff --git a/fs/splice.c b/fs/splice.c
-index f26cbaf..ac02366 100644
+index 9ba380c..3419932 100644
 --- a/fs/splice.c
 +++ b/fs/splice.c
-@@ -1124,6 +1124,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -1127,6 +1127,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
  
  	return splice_write(pipe, out, ppos, len, flags);
  }
@@ -144,7 +152,7 @@
  
  /*
   * Attempt to initiate a splice from a file to a pipe.
-@@ -1150,6 +1151,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
+@@ -1153,6 +1154,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
  
  	return splice_read(in, ppos, pipe, len, flags);
  }
@@ -169,7 +177,7 @@
  }
 +EXPORT_SYMBOL_GPL(cap_mmap_file);
 diff --git a/security/device_cgroup.c b/security/device_cgroup.c
-index d3b6d2c..5076912 100644
+index d9d69e6..3f6f471 100644
 --- a/security/device_cgroup.c
 +++ b/security/device_cgroup.c
 @@ -7,6 +7,7 @@
@@ -180,7 +188,7 @@
  #include <linux/list.h>
  #include <linux/uaccess.h>
  #include <linux/seq_file.h>
-@@ -744,6 +745,7 @@ int __devcgroup_inode_permission(struct inode *inode, int mask)
+@@ -849,6 +850,7 @@ int __devcgroup_inode_permission(struct inode *inode, int mask)
  	return __devcgroup_check_permission(type, imajor(inode), iminor(inode),
  			access);
  }
@@ -189,7 +197,7 @@
  int devcgroup_inode_mknod(int mode, dev_t dev)
  {
 diff --git a/security/security.c b/security/security.c
-index 919cad9..f9e9e17 100644
+index 31614e9..b223a66 100644
 --- a/security/security.c
 +++ b/security/security.c
 @@ -407,6 +407,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
@@ -215,8 +223,8 @@
 +EXPORT_SYMBOL_GPL(security_path_link);
  
  int security_path_rename(struct path *old_dir, struct dentry *old_dentry,
- 			 struct path *new_dir, struct dentry *new_dentry)
-@@ -449,6 +452,7 @@ int security_path_truncate(struct path *path)
+ 			 struct path *new_dir, struct dentry *new_dentry,
+@@ -458,6 +461,7 @@ int security_path_truncate(struct path *path)
  		return 0;
  	return security_ops->path_truncate(path);
  }
@@ -224,7 +232,7 @@
  
  int security_path_chmod(struct path *path, umode_t mode)
  {
-@@ -456,6 +460,7 @@ int security_path_chmod(struct path *path, umode_t mode)
+@@ -465,6 +469,7 @@ int security_path_chmod(struct path *path, umode_t mode)
  		return 0;
  	return security_ops->path_chmod(path, mode);
  }
@@ -232,7 +240,7 @@
  
  int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
  {
-@@ -463,6 +468,7 @@ int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
+@@ -472,6 +477,7 @@ int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
  		return 0;
  	return security_ops->path_chown(path, uid, gid);
  }
@@ -240,7 +248,7 @@
  
  int security_path_chroot(struct path *path)
  {
-@@ -539,6 +545,7 @@ int security_inode_readlink(struct dentry *dentry)
+@@ -557,6 +563,7 @@ int security_inode_readlink(struct dentry *dentry)
  		return 0;
  	return security_ops->inode_readlink(dentry);
  }
@@ -248,7 +256,7 @@
  
  int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd)
  {
-@@ -553,6 +560,7 @@ int security_inode_permission(struct inode *inode, int mask)
+@@ -571,6 +578,7 @@ int security_inode_permission(struct inode *inode, int mask)
  		return 0;
  	return security_ops->inode_permission(inode, mask);
  }
@@ -256,7 +264,7 @@
  
  int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
  {
-@@ -675,6 +683,7 @@ int security_file_permission(struct file *file, int mask)
+@@ -693,6 +701,7 @@ int security_file_permission(struct file *file, int mask)
  
  	return fsnotify_perm(file, mask);
  }
@@ -264,7 +272,7 @@
  
  int security_file_alloc(struct file *file)
  {
-@@ -735,6 +744,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
+@@ -753,6 +762,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
  		return ret;
  	return ima_file_mmap(file, prot);
  }

Modified: dists/wheezy-backports/linux/debian/patches/features/all/cgroups-Allow-memory-cgroup-support-to-be-included-b.patch
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/features/all/cgroups-Allow-memory-cgroup-support-to-be-included-b.patch	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/features/all/cgroups-Allow-memory-cgroup-support-to-be-included-b.patch	Sun Sep 21 14:23:16 2014	(r21886)
@@ -19,7 +19,7 @@
 
 --- a/Documentation/kernel-parameters.txt
 +++ b/Documentation/kernel-parameters.txt
-@@ -532,8 +532,8 @@ bytes respectively. Such letter suffixes
+@@ -569,8 +569,8 @@ bytes respectively. Such letter suffixes
  	ccw_timeout_log [S390]
  			See Documentation/s390/CommonIO for details.
  
@@ -32,9 +32,9 @@
  			  a single hierarchy
 --- a/init/Kconfig
 +++ b/init/Kconfig
-@@ -940,6 +940,14 @@ config MEMCG
- 	  This config option also selects MM_OWNER config option, which
- 	  could in turn add some fork/exit overhead.
+@@ -960,6 +960,14 @@ config MEMCG
+ 	  disable memory resource controller and you can avoid overheads.
+ 	  (and lose benefits of memory resource controller)
  
 +config MEMCG_DISABLED
 +	bool "Memory Resource Controller disabled by default"
@@ -49,7 +49,7 @@
  	depends on MEMCG && SWAP
 --- a/kernel/cgroup.c
 +++ b/kernel/cgroup.c
-@@ -5222,7 +5222,7 @@ static void cgroup_release_agent(struct
+@@ -5182,7 +5182,7 @@ static void cgroup_release_agent(struct
  	mutex_unlock(&cgroup_mutex);
  }
  
@@ -58,9 +58,9 @@
  {
  	struct cgroup_subsys *ss;
  	char *token;
-@@ -5238,17 +5238,29 @@ static int __init cgroup_disable(char *s
- 		 */
- 		for_each_builtin_subsys(ss, i) {
+@@ -5194,17 +5194,29 @@ static int __init cgroup_disable(char *s
+ 
+ 		for_each_subsys(ss, i) {
  			if (!strcmp(token, ss->name)) {
 -				ss->disabled = 1;
 -				printk(KERN_INFO "Disabling %s control group"
@@ -89,17 +89,17 @@
 +__setup("cgroup_enable=", cgroup_enable);
 +
  /**
-  * css_from_dir - get corresponding css from the dentry of a cgroup dir
+  * css_tryget_online_from_dir - get corresponding css from a cgroup dentry
   * @dentry: directory dentry of interest
 --- a/mm/memcontrol.c
 +++ b/mm/memcontrol.c
-@@ -7266,6 +7266,9 @@ static void mem_cgroup_bind(struct cgrou
+@@ -7015,6 +7015,9 @@ static void mem_cgroup_bind(struct cgrou
+ }
  
- struct cgroup_subsys mem_cgroup_subsys = {
- 	.name = "memory",
+ struct cgroup_subsys memory_cgrp_subsys = {
 +#ifdef CONFIG_MEMCG_DISABLED
 +	.disabled = 1,
 +#endif
- 	.subsys_id = mem_cgroup_subsys_id,
  	.css_alloc = mem_cgroup_css_alloc,
  	.css_online = mem_cgroup_css_online,
+ 	.css_offline = mem_cgroup_css_offline,

Copied: dists/wheezy-backports/linux/debian/patches/features/all/sfc-Add-40G-link-capability-decoding.patch (from r21884, dists/sid/linux/debian/patches/features/all/sfc-Add-40G-link-capability-decoding.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/all/sfc-Add-40G-link-capability-decoding.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21884, dists/sid/linux/debian/patches/features/all/sfc-Add-40G-link-capability-decoding.patch)
@@ -0,0 +1,56 @@
+From ac331e948346f2706cd82b2d259800621b9db04f Mon Sep 17 00:00:00 2001
+From: Edward Cree <ecree at solarflare.com>
+Date: Mon, 14 Jul 2014 08:39:07 +0100
+Subject: [PATCH 2/2] sfc: Add 40G link capability decoding
+
+Needed to select 40G mode on a 10G/40G capable card.
+
+Signed-off-by: Shradha Shah <sshah at solarflare.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/ethernet/sfc/mcdi_port.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/drivers/net/ethernet/sfc/mcdi_port.c b/drivers/net/ethernet/sfc/mcdi_port.c
+index e5fc4e1..fb19b70 100644
+--- a/drivers/net/ethernet/sfc/mcdi_port.c
++++ b/drivers/net/ethernet/sfc/mcdi_port.c
+@@ -183,6 +183,8 @@ static u32 mcdi_to_ethtool_cap(u32 media, u32 cap)
+ 			result |= SUPPORTED_1000baseKX_Full;
+ 		if (cap & (1 << MC_CMD_PHY_CAP_10000FDX_LBN))
+ 			result |= SUPPORTED_10000baseKX4_Full;
++		if (cap & (1 << MC_CMD_PHY_CAP_40000FDX_LBN))
++			result |= SUPPORTED_40000baseKR4_Full;
+ 		break;
+ 
+ 	case MC_CMD_MEDIA_XFP:
+@@ -190,6 +192,12 @@ static u32 mcdi_to_ethtool_cap(u32 media, u32 cap)
+ 		result |= SUPPORTED_FIBRE;
+ 		break;
+ 
++	case MC_CMD_MEDIA_QSFP_PLUS:
++		result |= SUPPORTED_FIBRE;
++		if (cap & (1 << MC_CMD_PHY_CAP_40000FDX_LBN))
++			result |= SUPPORTED_40000baseCR4_Full;
++		break;
++
+ 	case MC_CMD_MEDIA_BASE_T:
+ 		result |= SUPPORTED_TP;
+ 		if (cap & (1 << MC_CMD_PHY_CAP_10HDX_LBN))
+@@ -237,6 +245,8 @@ static u32 ethtool_to_mcdi_cap(u32 cap)
+ 		result |= (1 << MC_CMD_PHY_CAP_1000FDX_LBN);
+ 	if (cap & (SUPPORTED_10000baseT_Full | SUPPORTED_10000baseKX4_Full))
+ 		result |= (1 << MC_CMD_PHY_CAP_10000FDX_LBN);
++	if (cap & (SUPPORTED_40000baseCR4_Full | SUPPORTED_40000baseKR4_Full))
++		result |= (1 << MC_CMD_PHY_CAP_40000FDX_LBN);
+ 	if (cap & SUPPORTED_Pause)
+ 		result |= (1 << MC_CMD_PHY_CAP_PAUSE_LBN);
+ 	if (cap & SUPPORTED_Asym_Pause)
+@@ -285,6 +295,7 @@ static u32 mcdi_to_ethtool_media(u32 media)
+ 
+ 	case MC_CMD_MEDIA_XFP:
+ 	case MC_CMD_MEDIA_SFP_PLUS:
++	case MC_CMD_MEDIA_QSFP_PLUS:
+ 		return PORT_FIBRE;
+ 
+ 	case MC_CMD_MEDIA_BASE_T:

Copied: dists/wheezy-backports/linux/debian/patches/features/all/sfc-Adding-PCI-ID-for-Solarflare-7000-series-40G-net.patch (from r21884, dists/sid/linux/debian/patches/features/all/sfc-Adding-PCI-ID-for-Solarflare-7000-series-40G-net.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/all/sfc-Adding-PCI-ID-for-Solarflare-7000-series-40G-net.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21884, dists/sid/linux/debian/patches/features/all/sfc-Adding-PCI-ID-for-Solarflare-7000-series-40G-net.patch)
@@ -0,0 +1,25 @@
+From 3b06a00e65fbb5c526371143beaaa2221d39d577 Mon Sep 17 00:00:00 2001
+From: Mateusz Wrzesinski <mwrzesinski at solarflare.com>
+Date: Mon, 14 Jul 2014 08:38:49 +0100
+Subject: [PATCH 1/2] sfc: Adding PCI ID for Solarflare 7000 series 40G network
+ adapter.
+
+Signed-off-by: Shradha Shah <sshah at solarflare.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/ethernet/sfc/efx.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
+index 1e27404..2d86224 100644
+--- a/drivers/net/ethernet/sfc/efx.c
++++ b/drivers/net/ethernet/sfc/efx.c
+@@ -2607,6 +2607,8 @@ static DEFINE_PCI_DEVICE_TABLE(efx_pci_table) = {
+ 	 .driver_data = (unsigned long) &siena_a0_nic_type},
+ 	{PCI_DEVICE(PCI_VENDOR_ID_SOLARFLARE, 0x0903),  /* SFC9120 PF */
+ 	 .driver_data = (unsigned long) &efx_hunt_a0_nic_type},
++	{PCI_DEVICE(PCI_VENDOR_ID_SOLARFLARE, 0x0923),  /* SFC9140 PF */
++	 .driver_data = (unsigned long) &efx_hunt_a0_nic_type},
+ 	{0}			/* end of list */
+ };
+ 

Copied: dists/wheezy-backports/linux/debian/patches/features/all/virtio-scsi-Implement-change_queue_depth-for-virtscs.patch (from r21784, dists/trunk/linux/debian/patches/features/all/virtio-scsi-Implement-change_queue_depth-for-virtscs.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/all/virtio-scsi-Implement-change_queue_depth-for-virtscs.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/all/virtio-scsi-Implement-change_queue_depth-for-virtscs.patch)
@@ -0,0 +1,83 @@
+From: Venkatesh Srinivas <venkateshs at google.com>
+Date: Sun, 6 Jul 2014 16:39:27 +0200
+Subject: virtio-scsi: Implement change_queue_depth for virtscsi targets
+Origin: https://git.kernel.org/linus/761f1193f299873236dbc21277864d70cb7ba8a3
+
+change_queue_depth allows changing per-target queue depth via sysfs.
+
+It also allows the SCSI midlayer to ramp down the number of concurrent
+inflight requests in response to a SCSI BUSY status response and allows
+the midlayer to ramp the count back up to the device maximum when the
+BUSY condition has resolved.
+
+Signed-off-by: Venkatesh Srinivas <venkateshs at google.com>
+Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
+Signed-off-by: Christoph Hellwig <hch at lst.de>
+[bwh: Backported to 3.16: adjust context]
+---
+ drivers/scsi/virtio_scsi.c | 33 +++++++++++++++++++++++++++++++++
+ 1 file changed, 33 insertions(+)
+
+--- a/drivers/scsi/virtio_scsi.c
++++ b/drivers/scsi/virtio_scsi.c
+@@ -27,6 +27,7 @@
+ #include <scsi/scsi_host.h>
+ #include <scsi/scsi_device.h>
+ #include <scsi/scsi_cmnd.h>
++#include <scsi/scsi_tcq.h>
+ 
+ #define VIRTIO_SCSI_MEMPOOL_SZ 64
+ #define VIRTIO_SCSI_EVENT_LEN 8
+@@ -641,6 +642,36 @@ static int virtscsi_device_reset(struct
+ 	return virtscsi_tmf(vscsi, cmd);
+ }
+ 
++/**
++ * virtscsi_change_queue_depth() - Change a virtscsi target's queue depth
++ * @sdev:	Virtscsi target whose queue depth to change
++ * @qdepth:	New queue depth
++ * @reason:	Reason for the queue depth change.
++ */
++static int virtscsi_change_queue_depth(struct scsi_device *sdev,
++				       int qdepth,
++				       int reason)
++{
++	struct Scsi_Host *shost = sdev->host;
++	int max_depth = shost->cmd_per_lun;
++
++	switch (reason) {
++	case SCSI_QDEPTH_QFULL: /* Drop qdepth in response to BUSY state */
++		scsi_track_queue_full(sdev, qdepth);
++		break;
++	case SCSI_QDEPTH_RAMP_UP: /* Raise qdepth after BUSY state resolved */
++	case SCSI_QDEPTH_DEFAULT: /* Manual change via sysfs */
++		scsi_adjust_queue_depth(sdev,
++					scsi_get_tag_type(sdev),
++					min(max_depth, qdepth));
++		break;
++	default:
++		return -EOPNOTSUPP;
++	}
++
++	return sdev->queue_depth;
++}
++
+ static int virtscsi_abort(struct scsi_cmnd *sc)
+ {
+ 	struct virtio_scsi *vscsi = shost_priv(sc->device->host);
+@@ -693,6 +724,7 @@ static struct scsi_host_template virtscs
+ 	.this_id = -1,
+ 	.cmd_size = sizeof(struct virtio_scsi_cmd),
+ 	.queuecommand = virtscsi_queuecommand_single,
++	.change_queue_depth = virtscsi_change_queue_depth,
+ 	.eh_abort_handler = virtscsi_abort,
+ 	.eh_device_reset_handler = virtscsi_device_reset,
+ 
+@@ -710,6 +742,7 @@ static struct scsi_host_template virtscs
+ 	.this_id = -1,
+ 	.cmd_size = sizeof(struct virtio_scsi_cmd),
+ 	.queuecommand = virtscsi_queuecommand_multi,
++	.change_queue_depth = virtscsi_change_queue_depth,
+ 	.eh_abort_handler = virtscsi_abort,
+ 	.eh_device_reset_handler = virtscsi_device_reset,
+ 

Copied: dists/wheezy-backports/linux/debian/patches/features/arm/deb-pkg-add-automatic-support-for-armhf-architecture.patch (from r21884, dists/sid/linux/debian/patches/features/arm/deb-pkg-add-automatic-support-for-armhf-architecture.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/arm/deb-pkg-add-automatic-support-for-armhf-architecture.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21884, dists/sid/linux/debian/patches/features/arm/deb-pkg-add-automatic-support-for-armhf-architecture.patch)
@@ -0,0 +1,44 @@
+Subject: deb-pkg: Add automatic support for armhf architecture
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Mon, 09 Jun 2014 01:21:34 +0100
+Forwarded: http://mid.gmane.org/1402273294.23860.59.camel@deadeye.wl.decadent.org.uk
+
+The Debian armhf architecture uses the ARM EABI hard-float variant,
+whereas armel uses the soft-float variant.  Although the kernel
+doesn't use FP itself, CONFIG_VFP must be enabled to support
+hard-float userland and will probably be disabled when supporting a
+soft-float userland.  So set the architecture to armhf by default when
+CONFIG_AEABI and CONFIG_VFP are both enabled.
+
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+v2: rebased
+
+After discussion with Hector, we agreed this would be a worthwhile
+change.  Hector may later improve this by using gcc specs.
+
+Ben.
+
+ scripts/package/builddeb | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+--- a/scripts/package/builddeb
++++ b/scripts/package/builddeb
+@@ -45,7 +45,16 @@ create_package() {
+ 	arm64)
+ 		debarch=arm64 ;;
+ 	arm*)
+-		debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el || true) ;;
++		if grep -q CONFIG_AEABI=y $KCONFIG_CONFIG; then
++		    if grep -q CONFIG_VFP=y $KCONFIG_CONFIG; then
++			debarch=armhf
++		    else
++			debarch=armel
++		    fi
++		else
++		    debarch=arm
++		fi
++		;;
+ 	*)
+ 		echo "" >&2
+ 		echo "** ** **  WARNING  ** ** **" >&2

Copied: dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Add-Loongson-3B-support.patch (from r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Add-Loongson-3B-support.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Add-Loongson-3B-support.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Add-Loongson-3B-support.patch)
@@ -0,0 +1,725 @@
+From: Huacai Chen <chenhc at lemote.com>
+Date: Thu, 26 Jun 2014 11:41:30 +0800
+Subject: [6/8] MIPS: Add Loongson-3B support
+Origin: https://git.kernel.org/linus/e7841be50fe2b8751a51a068b8cdcdcb6611e354
+
+Loongson-3B is a 8-cores processor. In general it looks like there are
+two Loongson-3A integrated in one chip: 8 cores are separated into two
+groups (two NUMA node), each node has its own local memory.
+
+Of course there are some differences between one Loongson-3B and two
+Loongson-3A. E.g., the base addresses of IPI registers of each node are
+not the same; Loongson-3A use ChipConfig register to enable/disable
+clock, but Loongson-3B use FreqControl register instead.
+
+There are two revision of Loongson-3B, the first revision is called as
+Loongson-3B1000, whose frequency is 1GHz and has a PRid 0x6306, the
+second revision is called as Loongson-3B1500, whose frequency is 1.5GHz
+and has a PRid 0x6307. Both revisions has a bug that clock cannot be
+disabled at runtime, but this will be fixed in future.
+
+Signed-off-by: Huacai Chen <chenhc at lemote.com>
+Cc: John Crispin <john at phrozen.org>
+Cc: Steven J. Hill <Steven.Hill at imgtec.com>
+Cc: Aurelien Jarno <aurelien at aurel32.net>
+Cc: linux-mips at linux-mips.org
+Cc: Fuxin Zhang <zhangfx at lemote.com>
+Cc: Zhangjin Wu <wuzhangjin at gmail.com>
+Patchwork: https://patchwork.linux-mips.org/patch/7188/
+Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
+---
+ arch/mips/include/asm/cpu.h                      |    2 +
+ arch/mips/include/asm/mach-loongson/boot_param.h |    1 +
+ arch/mips/include/asm/mach-loongson/loongson.h   |    4 +
+ arch/mips/kernel/cpu-probe.c                     |    6 +
+ arch/mips/loongson/common/env.c                  |   31 +-
+ arch/mips/loongson/loongson-3/irq.c              |   26 +-
+ arch/mips/loongson/loongson-3/smp.c              |  387 ++++++++++++++++------
+ arch/mips/loongson/loongson-3/smp.h              |   37 ++-
+ 8 files changed, 372 insertions(+), 122 deletions(-)
+
+diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h
+index 129d087..abf7e00 100644
+--- a/arch/mips/include/asm/cpu.h
++++ b/arch/mips/include/asm/cpu.h
+@@ -233,6 +233,8 @@
+ #define PRID_REV_LOONGSON2E	0x0002
+ #define PRID_REV_LOONGSON2F	0x0003
+ #define PRID_REV_LOONGSON3A	0x0005
++#define PRID_REV_LOONGSON3B_R1	0x0006
++#define PRID_REV_LOONGSON3B_R2	0x0007
+ 
+ /*
+  * Older processors used to encode processor version and revision in two
+diff --git a/arch/mips/include/asm/mach-loongson/boot_param.h b/arch/mips/include/asm/mach-loongson/boot_param.h
+index 8b06c96..3388fc5 100644
+--- a/arch/mips/include/asm/mach-loongson/boot_param.h
++++ b/arch/mips/include/asm/mach-loongson/boot_param.h
+@@ -163,4 +163,5 @@ struct loongson_system_configuration {
+ 
+ extern struct efi_memory_map_loongson *loongson_memmap;
+ extern struct loongson_system_configuration loongson_sysconf;
++extern int cpuhotplug_workaround;
+ #endif
+diff --git a/arch/mips/include/asm/mach-loongson/loongson.h b/arch/mips/include/asm/mach-loongson/loongson.h
+index a1c76ca..92bf76c 100644
+--- a/arch/mips/include/asm/mach-loongson/loongson.h
++++ b/arch/mips/include/asm/mach-loongson/loongson.h
+@@ -255,6 +255,10 @@ static inline void do_perfcnt_IRQ(void)
+ extern u64 loongson_chipcfg[MAX_PACKAGES];
+ #define LOONGSON_CHIPCFG(id) (*(volatile u32 *)(loongson_chipcfg[id]))
+ 
++/* Freq Control register of each physical cpu package, PRid >= Loongson-3B */
++extern u64 loongson_freqctrl[MAX_PACKAGES];
++#define LOONGSON_FREQCTRL(id) (*(volatile u32 *)(loongson_freqctrl[id]))
++
+ /* pcimap */
+ 
+ #define LOONGSON_PCIMAP_PCIMAP_LO0	0x0000003f
+diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
+index d74f957..2d2e287 100644
+--- a/arch/mips/kernel/cpu-probe.c
++++ b/arch/mips/kernel/cpu-probe.c
+@@ -740,6 +740,12 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
+ 			__cpu_name[cpu] = "ICT Loongson-3";
+ 			set_elf_platform(cpu, "loongson3a");
+ 			break;
++		case PRID_REV_LOONGSON3B_R1:
++		case PRID_REV_LOONGSON3B_R2:
++			c->cputype = CPU_LOONGSON3;
++			__cpu_name[cpu] = "ICT Loongson-3";
++			set_elf_platform(cpu, "loongson3b");
++			break;
+ 		}
+ 
+ 		set_isa(c, MIPS_CPU_ISA_III);
+diff --git a/arch/mips/loongson/common/env.c b/arch/mips/loongson/common/env.c
+index 33a13b9..f152285 100644
+--- a/arch/mips/loongson/common/env.c
++++ b/arch/mips/loongson/common/env.c
+@@ -28,6 +28,10 @@ struct efi_memory_map_loongson *loongson_memmap;
+ struct loongson_system_configuration loongson_sysconf;
+ 
+ u64 loongson_chipcfg[MAX_PACKAGES] = {0xffffffffbfc00180};
++u64 loongson_freqctrl[MAX_PACKAGES];
++
++unsigned long long smp_group[4];
++int cpuhotplug_workaround = 0;
+ 
+ #define parse_even_earlier(res, option, p)				\
+ do {									\
+@@ -82,10 +86,32 @@ void __init prom_init_env(void)
+ 	if (ecpu->cputype == Loongson_3A) {
+ 		loongson_sysconf.cores_per_node = 4;
+ 		loongson_sysconf.cores_per_package = 4;
++		smp_group[0] = 0x900000003ff01000;
++		smp_group[1] = 0x900010003ff01000;
++		smp_group[2] = 0x900020003ff01000;
++		smp_group[3] = 0x900030003ff01000;
+ 		loongson_chipcfg[0] = 0x900000001fe00180;
+ 		loongson_chipcfg[1] = 0x900010001fe00180;
+ 		loongson_chipcfg[2] = 0x900020001fe00180;
+ 		loongson_chipcfg[3] = 0x900030001fe00180;
++		loongson_sysconf.ht_control_base = 0x90000EFDFB000000;
++	} else if (ecpu->cputype == Loongson_3B) {
++		loongson_sysconf.cores_per_node = 4; /* One chip has 2 nodes */
++		loongson_sysconf.cores_per_package = 8;
++		smp_group[0] = 0x900000003ff01000;
++		smp_group[1] = 0x900010003ff05000;
++		smp_group[2] = 0x900020003ff09000;
++		smp_group[3] = 0x900030003ff0d000;
++		loongson_chipcfg[0] = 0x900000001fe00180;
++		loongson_chipcfg[1] = 0x900020001fe00180;
++		loongson_chipcfg[2] = 0x900040001fe00180;
++		loongson_chipcfg[3] = 0x900060001fe00180;
++		loongson_freqctrl[0] = 0x900000001fe001d0;
++		loongson_freqctrl[1] = 0x900020001fe001d0;
++		loongson_freqctrl[2] = 0x900040001fe001d0;
++		loongson_freqctrl[3] = 0x900060001fe001d0;
++		loongson_sysconf.ht_control_base = 0x90001EFDFB000000;
++		cpuhotplug_workaround = 1;
+ 	} else {
+ 		loongson_sysconf.cores_per_node = 1;
+ 		loongson_sysconf.cores_per_package = 1;
+@@ -111,7 +137,6 @@ void __init prom_init_env(void)
+ 	loongson_sysconf.poweroff_addr = boot_p->reset_system.Shutdown;
+ 	loongson_sysconf.suspend_addr = boot_p->reset_system.DoSuspend;
+ 
+-	loongson_sysconf.ht_control_base = 0x90000EFDFB000000;
+ 	loongson_sysconf.vgabios_addr = boot_p->efi.smbios.vga_bios;
+ 	pr_debug("Shutdown Addr: %llx, Restart Addr: %llx, VBIOS Addr: %llx\n",
+ 		loongson_sysconf.poweroff_addr, loongson_sysconf.restart_addr,
+@@ -129,6 +154,10 @@ void __init prom_init_env(void)
+ 		case PRID_REV_LOONGSON3A:
+ 			cpu_clock_freq = 900000000;
+ 			break;
++		case PRID_REV_LOONGSON3B_R1:
++		case PRID_REV_LOONGSON3B_R2:
++			cpu_clock_freq = 1000000000;
++			break;
+ 		default:
+ 			cpu_clock_freq = 100000000;
+ 			break;
+diff --git a/arch/mips/loongson/loongson-3/irq.c b/arch/mips/loongson/loongson-3/irq.c
+index f240828..ca1c62a 100644
+--- a/arch/mips/loongson/loongson-3/irq.c
++++ b/arch/mips/loongson/loongson-3/irq.c
+@@ -7,6 +7,8 @@
+ #include <asm/i8259.h>
+ #include <asm/mipsregs.h>
+ 
++#include "smp.h"
++
+ unsigned int ht_irq[] = {1, 3, 4, 5, 6, 7, 8, 12, 14, 15};
+ 
+ static void ht_irqdispatch(void)
+@@ -53,9 +55,15 @@ static inline void mask_loongson_irq(struct irq_data *d)
+ 	/* Workaround: UART IRQ may deliver to any core */
+ 	if (d->irq == LOONGSON_UART_IRQ) {
+ 		int cpu = smp_processor_id();
+-
+-		LOONGSON_INT_ROUTER_INTENCLR = 1 << 10;
+-		LOONGSON_INT_ROUTER_LPC = 0x10 + (1<<cpu);
++		int node_id = cpu / loongson_sysconf.cores_per_node;
++		int core_id = cpu % loongson_sysconf.cores_per_node;
++		u64 intenclr_addr = smp_group[node_id] |
++			(u64)(&LOONGSON_INT_ROUTER_INTENCLR);
++		u64 introuter_lpc_addr = smp_group[node_id] |
++			(u64)(&LOONGSON_INT_ROUTER_LPC);
++
++		*(volatile u32 *)intenclr_addr = 1 << 10;
++		*(volatile u8 *)introuter_lpc_addr = 0x10 + (1<<core_id);
+ 	}
+ }
+ 
+@@ -64,9 +72,15 @@ static inline void unmask_loongson_irq(struct irq_data *d)
+ 	/* Workaround: UART IRQ may deliver to any core */
+ 	if (d->irq == LOONGSON_UART_IRQ) {
+ 		int cpu = smp_processor_id();
+-
+-		LOONGSON_INT_ROUTER_INTENSET = 1 << 10;
+-		LOONGSON_INT_ROUTER_LPC = 0x10 + (1<<cpu);
++		int node_id = cpu / loongson_sysconf.cores_per_node;
++		int core_id = cpu % loongson_sysconf.cores_per_node;
++		u64 intenset_addr = smp_group[node_id] |
++			(u64)(&LOONGSON_INT_ROUTER_INTENSET);
++		u64 introuter_lpc_addr = smp_group[node_id] |
++			(u64)(&LOONGSON_INT_ROUTER_LPC);
++
++		*(volatile u32 *)intenset_addr = 1 << 10;
++		*(volatile u8 *)introuter_lpc_addr = 0x10 + (1<<core_id);
+ 	}
+ 
+ 	set_c0_status(0x100 << (d->irq - MIPS_CPU_IRQ_BASE));
+diff --git a/arch/mips/loongson/loongson-3/smp.c b/arch/mips/loongson/loongson-3/smp.c
+index ed0e2d0..74e827b 100644
+--- a/arch/mips/loongson/loongson-3/smp.c
++++ b/arch/mips/loongson/loongson-3/smp.c
+@@ -31,6 +31,12 @@
+ DEFINE_PER_CPU(int, cpu_state);
+ DEFINE_PER_CPU(uint32_t, core0_c0count);
+ 
++static void *ipi_set0_regs[16];
++static void *ipi_clear0_regs[16];
++static void *ipi_status0_regs[16];
++static void *ipi_en0_regs[16];
++static void *ipi_mailbox_buf[16];
++
+ /* read a 32bit value from ipi register */
+ #define loongson3_ipi_read32(addr) readl(addr)
+ /* read a 64bit value from ipi register */
+@@ -48,100 +54,185 @@ DEFINE_PER_CPU(uint32_t, core0_c0count);
+ 		__wbflush();			\
+ 	} while (0)
+ 
+-static void *ipi_set0_regs[] = {
+-	(void *)(SMP_CORE_GROUP0_BASE + SMP_CORE0_OFFSET + SET0),
+-	(void *)(SMP_CORE_GROUP0_BASE + SMP_CORE1_OFFSET + SET0),
+-	(void *)(SMP_CORE_GROUP0_BASE + SMP_CORE2_OFFSET + SET0),
+-	(void *)(SMP_CORE_GROUP0_BASE + SMP_CORE3_OFFSET + SET0),
+-	(void *)(SMP_CORE_GROUP1_BASE + SMP_CORE0_OFFSET + SET0),
+-	(void *)(SMP_CORE_GROUP1_BASE + SMP_CORE1_OFFSET + SET0),
+-	(void *)(SMP_CORE_GROUP1_BASE + SMP_CORE2_OFFSET + SET0),
+-	(void *)(SMP_CORE_GROUP1_BASE + SMP_CORE3_OFFSET + SET0),
+-	(void *)(SMP_CORE_GROUP2_BASE + SMP_CORE0_OFFSET + SET0),
+-	(void *)(SMP_CORE_GROUP2_BASE + SMP_CORE1_OFFSET + SET0),
+-	(void *)(SMP_CORE_GROUP2_BASE + SMP_CORE2_OFFSET + SET0),
+-	(void *)(SMP_CORE_GROUP2_BASE + SMP_CORE3_OFFSET + SET0),
+-	(void *)(SMP_CORE_GROUP3_BASE + SMP_CORE0_OFFSET + SET0),
+-	(void *)(SMP_CORE_GROUP3_BASE + SMP_CORE1_OFFSET + SET0),
+-	(void *)(SMP_CORE_GROUP3_BASE + SMP_CORE2_OFFSET + SET0),
+-	(void *)(SMP_CORE_GROUP3_BASE + SMP_CORE3_OFFSET + SET0),
+-};
++static void ipi_set0_regs_init(void)
++{
++	ipi_set0_regs[0] = (void *)
++		(SMP_CORE_GROUP0_BASE + SMP_CORE0_OFFSET + SET0);
++	ipi_set0_regs[1] = (void *)
++		(SMP_CORE_GROUP0_BASE + SMP_CORE1_OFFSET + SET0);
++	ipi_set0_regs[2] = (void *)
++		(SMP_CORE_GROUP0_BASE + SMP_CORE2_OFFSET + SET0);
++	ipi_set0_regs[3] = (void *)
++		(SMP_CORE_GROUP0_BASE + SMP_CORE3_OFFSET + SET0);
++	ipi_set0_regs[4] = (void *)
++		(SMP_CORE_GROUP1_BASE + SMP_CORE0_OFFSET + SET0);
++	ipi_set0_regs[5] = (void *)
++		(SMP_CORE_GROUP1_BASE + SMP_CORE1_OFFSET + SET0);
++	ipi_set0_regs[6] = (void *)
++		(SMP_CORE_GROUP1_BASE + SMP_CORE2_OFFSET + SET0);
++	ipi_set0_regs[7] = (void *)
++		(SMP_CORE_GROUP1_BASE + SMP_CORE3_OFFSET + SET0);
++	ipi_set0_regs[8] = (void *)
++		(SMP_CORE_GROUP2_BASE + SMP_CORE0_OFFSET + SET0);
++	ipi_set0_regs[9] = (void *)
++		(SMP_CORE_GROUP2_BASE + SMP_CORE1_OFFSET + SET0);
++	ipi_set0_regs[10] = (void *)
++		(SMP_CORE_GROUP2_BASE + SMP_CORE2_OFFSET + SET0);
++	ipi_set0_regs[11] = (void *)
++		(SMP_CORE_GROUP2_BASE + SMP_CORE3_OFFSET + SET0);
++	ipi_set0_regs[12] = (void *)
++		(SMP_CORE_GROUP3_BASE + SMP_CORE0_OFFSET + SET0);
++	ipi_set0_regs[13] = (void *)
++		(SMP_CORE_GROUP3_BASE + SMP_CORE1_OFFSET + SET0);
++	ipi_set0_regs[14] = (void *)
++		(SMP_CORE_GROUP3_BASE + SMP_CORE2_OFFSET + SET0);
++	ipi_set0_regs[15] = (void *)
++		(SMP_CORE_GROUP3_BASE + SMP_CORE3_OFFSET + SET0);
++}
+ 
+-static void *ipi_clear0_regs[] = {
+-	(void *)(SMP_CORE_GROUP0_BASE + SMP_CORE0_OFFSET + CLEAR0),
+-	(void *)(SMP_CORE_GROUP0_BASE + SMP_CORE1_OFFSET + CLEAR0),
+-	(void *)(SMP_CORE_GROUP0_BASE + SMP_CORE2_OFFSET + CLEAR0),
+-	(void *)(SMP_CORE_GROUP0_BASE + SMP_CORE3_OFFSET + CLEAR0),
+-	(void *)(SMP_CORE_GROUP1_BASE + SMP_CORE0_OFFSET + CLEAR0),
+-	(void *)(SMP_CORE_GROUP1_BASE + SMP_CORE1_OFFSET + CLEAR0),
+-	(void *)(SMP_CORE_GROUP1_BASE + SMP_CORE2_OFFSET + CLEAR0),
+-	(void *)(SMP_CORE_GROUP1_BASE + SMP_CORE3_OFFSET + CLEAR0),
+-	(void *)(SMP_CORE_GROUP2_BASE + SMP_CORE0_OFFSET + CLEAR0),
+-	(void *)(SMP_CORE_GROUP2_BASE + SMP_CORE1_OFFSET + CLEAR0),
+-	(void *)(SMP_CORE_GROUP2_BASE + SMP_CORE2_OFFSET + CLEAR0),
+-	(void *)(SMP_CORE_GROUP2_BASE + SMP_CORE3_OFFSET + CLEAR0),
+-	(void *)(SMP_CORE_GROUP3_BASE + SMP_CORE0_OFFSET + CLEAR0),
+-	(void *)(SMP_CORE_GROUP3_BASE + SMP_CORE1_OFFSET + CLEAR0),
+-	(void *)(SMP_CORE_GROUP3_BASE + SMP_CORE2_OFFSET + CLEAR0),
+-	(void *)(SMP_CORE_GROUP3_BASE + SMP_CORE3_OFFSET + CLEAR0),
+-};
++static void ipi_clear0_regs_init(void)
++{
++	ipi_clear0_regs[0] = (void *)
++		(SMP_CORE_GROUP0_BASE + SMP_CORE0_OFFSET + CLEAR0);
++	ipi_clear0_regs[1] = (void *)
++		(SMP_CORE_GROUP0_BASE + SMP_CORE1_OFFSET + CLEAR0);
++	ipi_clear0_regs[2] = (void *)
++		(SMP_CORE_GROUP0_BASE + SMP_CORE2_OFFSET + CLEAR0);
++	ipi_clear0_regs[3] = (void *)
++		(SMP_CORE_GROUP0_BASE + SMP_CORE3_OFFSET + CLEAR0);
++	ipi_clear0_regs[4] = (void *)
++		(SMP_CORE_GROUP1_BASE + SMP_CORE0_OFFSET + CLEAR0);
++	ipi_clear0_regs[5] = (void *)
++		(SMP_CORE_GROUP1_BASE + SMP_CORE1_OFFSET + CLEAR0);
++	ipi_clear0_regs[6] = (void *)
++		(SMP_CORE_GROUP1_BASE + SMP_CORE2_OFFSET + CLEAR0);
++	ipi_clear0_regs[7] = (void *)
++		(SMP_CORE_GROUP1_BASE + SMP_CORE3_OFFSET + CLEAR0);
++	ipi_clear0_regs[8] = (void *)
++		(SMP_CORE_GROUP2_BASE + SMP_CORE0_OFFSET + CLEAR0);
++	ipi_clear0_regs[9] = (void *)
++		(SMP_CORE_GROUP2_BASE + SMP_CORE1_OFFSET + CLEAR0);
++	ipi_clear0_regs[10] = (void *)
++		(SMP_CORE_GROUP2_BASE + SMP_CORE2_OFFSET + CLEAR0);
++	ipi_clear0_regs[11] = (void *)
++		(SMP_CORE_GROUP2_BASE + SMP_CORE3_OFFSET + CLEAR0);
++	ipi_clear0_regs[12] = (void *)
++		(SMP_CORE_GROUP3_BASE + SMP_CORE0_OFFSET + CLEAR0);
++	ipi_clear0_regs[13] = (void *)
++		(SMP_CORE_GROUP3_BASE + SMP_CORE1_OFFSET + CLEAR0);
++	ipi_clear0_regs[14] = (void *)
++		(SMP_CORE_GROUP3_BASE + SMP_CORE2_OFFSET + CLEAR0);
++	ipi_clear0_regs[15] = (void *)
++		(SMP_CORE_GROUP3_BASE + SMP_CORE3_OFFSET + CLEAR0);
++}
+ 
+-static void *ipi_status0_regs[] = {
+-	(void *)(SMP_CORE_GROUP0_BASE + SMP_CORE0_OFFSET + STATUS0),
+-	(void *)(SMP_CORE_GROUP0_BASE + SMP_CORE1_OFFSET + STATUS0),
+-	(void *)(SMP_CORE_GROUP0_BASE + SMP_CORE2_OFFSET + STATUS0),
+-	(void *)(SMP_CORE_GROUP0_BASE + SMP_CORE3_OFFSET + STATUS0),
+-	(void *)(SMP_CORE_GROUP1_BASE + SMP_CORE0_OFFSET + STATUS0),
+-	(void *)(SMP_CORE_GROUP1_BASE + SMP_CORE1_OFFSET + STATUS0),
+-	(void *)(SMP_CORE_GROUP1_BASE + SMP_CORE2_OFFSET + STATUS0),
+-	(void *)(SMP_CORE_GROUP1_BASE + SMP_CORE3_OFFSET + STATUS0),
+-	(void *)(SMP_CORE_GROUP2_BASE + SMP_CORE0_OFFSET + STATUS0),
+-	(void *)(SMP_CORE_GROUP2_BASE + SMP_CORE1_OFFSET + STATUS0),
+-	(void *)(SMP_CORE_GROUP2_BASE + SMP_CORE2_OFFSET + STATUS0),
+-	(void *)(SMP_CORE_GROUP2_BASE + SMP_CORE3_OFFSET + STATUS0),
+-	(void *)(SMP_CORE_GROUP3_BASE + SMP_CORE0_OFFSET + STATUS0),
+-	(void *)(SMP_CORE_GROUP3_BASE + SMP_CORE1_OFFSET + STATUS0),
+-	(void *)(SMP_CORE_GROUP3_BASE + SMP_CORE2_OFFSET + STATUS0),
+-	(void *)(SMP_CORE_GROUP3_BASE + SMP_CORE3_OFFSET + STATUS0),
+-};
++static void ipi_status0_regs_init(void)
++{
++	ipi_status0_regs[0] = (void *)
++		(SMP_CORE_GROUP0_BASE + SMP_CORE0_OFFSET + STATUS0);
++	ipi_status0_regs[1] = (void *)
++		(SMP_CORE_GROUP0_BASE + SMP_CORE1_OFFSET + STATUS0);
++	ipi_status0_regs[2] = (void *)
++		(SMP_CORE_GROUP0_BASE + SMP_CORE2_OFFSET + STATUS0);
++	ipi_status0_regs[3] = (void *)
++		(SMP_CORE_GROUP0_BASE + SMP_CORE3_OFFSET + STATUS0);
++	ipi_status0_regs[4] = (void *)
++		(SMP_CORE_GROUP1_BASE + SMP_CORE0_OFFSET + STATUS0);
++	ipi_status0_regs[5] = (void *)
++		(SMP_CORE_GROUP1_BASE + SMP_CORE1_OFFSET + STATUS0);
++	ipi_status0_regs[6] = (void *)
++		(SMP_CORE_GROUP1_BASE + SMP_CORE2_OFFSET + STATUS0);
++	ipi_status0_regs[7] = (void *)
++		(SMP_CORE_GROUP1_BASE + SMP_CORE3_OFFSET + STATUS0);
++	ipi_status0_regs[8] = (void *)
++		(SMP_CORE_GROUP2_BASE + SMP_CORE0_OFFSET + STATUS0);
++	ipi_status0_regs[9] = (void *)
++		(SMP_CORE_GROUP2_BASE + SMP_CORE1_OFFSET + STATUS0);
++	ipi_status0_regs[10] = (void *)
++		(SMP_CORE_GROUP2_BASE + SMP_CORE2_OFFSET + STATUS0);
++	ipi_status0_regs[11] = (void *)
++		(SMP_CORE_GROUP2_BASE + SMP_CORE3_OFFSET + STATUS0);
++	ipi_status0_regs[12] = (void *)
++		(SMP_CORE_GROUP3_BASE + SMP_CORE0_OFFSET + STATUS0);
++	ipi_status0_regs[13] = (void *)
++		(SMP_CORE_GROUP3_BASE + SMP_CORE1_OFFSET + STATUS0);
++	ipi_status0_regs[14] = (void *)
++		(SMP_CORE_GROUP3_BASE + SMP_CORE2_OFFSET + STATUS0);
++	ipi_status0_regs[15] = (void *)
++		(SMP_CORE_GROUP3_BASE + SMP_CORE3_OFFSET + STATUS0);
++}
+ 
+-static void *ipi_en0_regs[] = {
+-	(void *)(SMP_CORE_GROUP0_BASE + SMP_CORE0_OFFSET + EN0),
+-	(void *)(SMP_CORE_GROUP0_BASE + SMP_CORE1_OFFSET + EN0),
+-	(void *)(SMP_CORE_GROUP0_BASE + SMP_CORE2_OFFSET + EN0),
+-	(void *)(SMP_CORE_GROUP0_BASE + SMP_CORE3_OFFSET + EN0),
+-	(void *)(SMP_CORE_GROUP1_BASE + SMP_CORE0_OFFSET + EN0),
+-	(void *)(SMP_CORE_GROUP1_BASE + SMP_CORE1_OFFSET + EN0),
+-	(void *)(SMP_CORE_GROUP1_BASE + SMP_CORE2_OFFSET + EN0),
+-	(void *)(SMP_CORE_GROUP1_BASE + SMP_CORE3_OFFSET + EN0),
+-	(void *)(SMP_CORE_GROUP2_BASE + SMP_CORE0_OFFSET + EN0),
+-	(void *)(SMP_CORE_GROUP2_BASE + SMP_CORE1_OFFSET + EN0),
+-	(void *)(SMP_CORE_GROUP2_BASE + SMP_CORE2_OFFSET + EN0),
+-	(void *)(SMP_CORE_GROUP2_BASE + SMP_CORE3_OFFSET + EN0),
+-	(void *)(SMP_CORE_GROUP3_BASE + SMP_CORE0_OFFSET + EN0),
+-	(void *)(SMP_CORE_GROUP3_BASE + SMP_CORE1_OFFSET + EN0),
+-	(void *)(SMP_CORE_GROUP3_BASE + SMP_CORE2_OFFSET + EN0),
+-	(void *)(SMP_CORE_GROUP3_BASE + SMP_CORE3_OFFSET + EN0),
+-};
++static void ipi_en0_regs_init(void)
++{
++	ipi_en0_regs[0] = (void *)
++		(SMP_CORE_GROUP0_BASE + SMP_CORE0_OFFSET + EN0);
++	ipi_en0_regs[1] = (void *)
++		(SMP_CORE_GROUP0_BASE + SMP_CORE1_OFFSET + EN0);
++	ipi_en0_regs[2] = (void *)
++		(SMP_CORE_GROUP0_BASE + SMP_CORE2_OFFSET + EN0);
++	ipi_en0_regs[3] = (void *)
++		(SMP_CORE_GROUP0_BASE + SMP_CORE3_OFFSET + EN0);
++	ipi_en0_regs[4] = (void *)
++		(SMP_CORE_GROUP1_BASE + SMP_CORE0_OFFSET + EN0);
++	ipi_en0_regs[5] = (void *)
++		(SMP_CORE_GROUP1_BASE + SMP_CORE1_OFFSET + EN0);
++	ipi_en0_regs[6] = (void *)
++		(SMP_CORE_GROUP1_BASE + SMP_CORE2_OFFSET + EN0);
++	ipi_en0_regs[7] = (void *)
++		(SMP_CORE_GROUP1_BASE + SMP_CORE3_OFFSET + EN0);
++	ipi_en0_regs[8] = (void *)
++		(SMP_CORE_GROUP2_BASE + SMP_CORE0_OFFSET + EN0);
++	ipi_en0_regs[9] = (void *)
++		(SMP_CORE_GROUP2_BASE + SMP_CORE1_OFFSET + EN0);
++	ipi_en0_regs[10] = (void *)
++		(SMP_CORE_GROUP2_BASE + SMP_CORE2_OFFSET + EN0);
++	ipi_en0_regs[11] = (void *)
++		(SMP_CORE_GROUP2_BASE + SMP_CORE3_OFFSET + EN0);
++	ipi_en0_regs[12] = (void *)
++		(SMP_CORE_GROUP3_BASE + SMP_CORE0_OFFSET + EN0);
++	ipi_en0_regs[13] = (void *)
++		(SMP_CORE_GROUP3_BASE + SMP_CORE1_OFFSET + EN0);
++	ipi_en0_regs[14] = (void *)
++		(SMP_CORE_GROUP3_BASE + SMP_CORE2_OFFSET + EN0);
++	ipi_en0_regs[15] = (void *)
++		(SMP_CORE_GROUP3_BASE + SMP_CORE3_OFFSET + EN0);
++}
+ 
+-static void *ipi_mailbox_buf[] = {
+-	(void *)(SMP_CORE_GROUP0_BASE + SMP_CORE0_OFFSET + BUF),
+-	(void *)(SMP_CORE_GROUP0_BASE + SMP_CORE1_OFFSET + BUF),
+-	(void *)(SMP_CORE_GROUP0_BASE + SMP_CORE2_OFFSET + BUF),
+-	(void *)(SMP_CORE_GROUP0_BASE + SMP_CORE3_OFFSET + BUF),
+-	(void *)(SMP_CORE_GROUP1_BASE + SMP_CORE0_OFFSET + BUF),
+-	(void *)(SMP_CORE_GROUP1_BASE + SMP_CORE1_OFFSET + BUF),
+-	(void *)(SMP_CORE_GROUP1_BASE + SMP_CORE2_OFFSET + BUF),
+-	(void *)(SMP_CORE_GROUP1_BASE + SMP_CORE3_OFFSET + BUF),
+-	(void *)(SMP_CORE_GROUP2_BASE + SMP_CORE0_OFFSET + BUF),
+-	(void *)(SMP_CORE_GROUP2_BASE + SMP_CORE1_OFFSET + BUF),
+-	(void *)(SMP_CORE_GROUP2_BASE + SMP_CORE2_OFFSET + BUF),
+-	(void *)(SMP_CORE_GROUP2_BASE + SMP_CORE3_OFFSET + BUF),
+-	(void *)(SMP_CORE_GROUP3_BASE + SMP_CORE0_OFFSET + BUF),
+-	(void *)(SMP_CORE_GROUP3_BASE + SMP_CORE1_OFFSET + BUF),
+-	(void *)(SMP_CORE_GROUP3_BASE + SMP_CORE2_OFFSET + BUF),
+-	(void *)(SMP_CORE_GROUP3_BASE + SMP_CORE3_OFFSET + BUF),
+-};
++static void ipi_mailbox_buf_init(void)
++{
++	ipi_mailbox_buf[0] = (void *)
++		(SMP_CORE_GROUP0_BASE + SMP_CORE0_OFFSET + BUF);
++	ipi_mailbox_buf[1] = (void *)
++		(SMP_CORE_GROUP0_BASE + SMP_CORE1_OFFSET + BUF);
++	ipi_mailbox_buf[2] = (void *)
++		(SMP_CORE_GROUP0_BASE + SMP_CORE2_OFFSET + BUF);
++	ipi_mailbox_buf[3] = (void *)
++		(SMP_CORE_GROUP0_BASE + SMP_CORE3_OFFSET + BUF);
++	ipi_mailbox_buf[4] = (void *)
++		(SMP_CORE_GROUP1_BASE + SMP_CORE0_OFFSET + BUF);
++	ipi_mailbox_buf[5] = (void *)
++		(SMP_CORE_GROUP1_BASE + SMP_CORE1_OFFSET + BUF);
++	ipi_mailbox_buf[6] = (void *)
++		(SMP_CORE_GROUP1_BASE + SMP_CORE2_OFFSET + BUF);
++	ipi_mailbox_buf[7] = (void *)
++		(SMP_CORE_GROUP1_BASE + SMP_CORE3_OFFSET + BUF);
++	ipi_mailbox_buf[8] = (void *)
++		(SMP_CORE_GROUP2_BASE + SMP_CORE0_OFFSET + BUF);
++	ipi_mailbox_buf[9] = (void *)
++		(SMP_CORE_GROUP2_BASE + SMP_CORE1_OFFSET + BUF);
++	ipi_mailbox_buf[10] = (void *)
++		(SMP_CORE_GROUP2_BASE + SMP_CORE2_OFFSET + BUF);
++	ipi_mailbox_buf[11] = (void *)
++		(SMP_CORE_GROUP2_BASE + SMP_CORE3_OFFSET + BUF);
++	ipi_mailbox_buf[12] = (void *)
++		(SMP_CORE_GROUP3_BASE + SMP_CORE0_OFFSET + BUF);
++	ipi_mailbox_buf[13] = (void *)
++		(SMP_CORE_GROUP3_BASE + SMP_CORE1_OFFSET + BUF);
++	ipi_mailbox_buf[14] = (void *)
++		(SMP_CORE_GROUP3_BASE + SMP_CORE2_OFFSET + BUF);
++	ipi_mailbox_buf[15] = (void *)
++		(SMP_CORE_GROUP3_BASE + SMP_CORE3_OFFSET + BUF);
++}
+ 
+ /*
+  * Simple enough, just poke the appropriate ipi register
+@@ -248,6 +339,11 @@ static void __init loongson3_smp_setup(void)
+ 		__cpu_number_map[i] = ++num;
+ 		__cpu_logical_map[num] = i;
+ 	}
++	ipi_set0_regs_init();
++	ipi_clear0_regs_init();
++	ipi_status0_regs_init();
++	ipi_en0_regs_init();
++	ipi_mailbox_buf_init();
+ 	pr_info("Detected %i available secondary CPU(s)\n", num);
+ }
+ 
+@@ -315,7 +411,7 @@ static void loongson3_cpu_die(unsigned int cpu)
+  * flush all L1 entries at first. Then, another core (usually Core 0) can
+  * safely disable the clock of the target core. loongson3_play_dead() is
+  * called via CKSEG1 (uncached and unmmaped) */
+-static void loongson3_play_dead(int *state_addr)
++static void loongson3a_play_dead(int *state_addr)
+ {
+ 	register int val;
+ 	register long cpuid, core, node, count;
+@@ -377,6 +473,70 @@ static void loongson3_play_dead(int *state_addr)
+ 		: "a1");
+ }
+ 
++static void loongson3b_play_dead(int *state_addr)
++{
++	register int val;
++	register long cpuid, core, node, count;
++	register void *addr, *base, *initfunc;
++
++	__asm__ __volatile__(
++		"   .set push                     \n"
++		"   .set noreorder                \n"
++		"   li %[addr], 0x80000000        \n" /* KSEG0 */
++		"1: cache 0, 0(%[addr])           \n" /* flush L1 ICache */
++		"   cache 0, 1(%[addr])           \n"
++		"   cache 0, 2(%[addr])           \n"
++		"   cache 0, 3(%[addr])           \n"
++		"   cache 1, 0(%[addr])           \n" /* flush L1 DCache */
++		"   cache 1, 1(%[addr])           \n"
++		"   cache 1, 2(%[addr])           \n"
++		"   cache 1, 3(%[addr])           \n"
++		"   addiu %[sets], %[sets], -1    \n"
++		"   bnez  %[sets], 1b             \n"
++		"   addiu %[addr], %[addr], 0x20  \n"
++		"   li    %[val], 0x7             \n" /* *state_addr = CPU_DEAD; */
++		"   sw    %[val], (%[state_addr]) \n"
++		"   sync                          \n"
++		"   cache 21, (%[state_addr])     \n" /* flush entry of *state_addr */
++		"   .set pop                      \n"
++		: [addr] "=&r" (addr), [val] "=&r" (val)
++		: [state_addr] "r" (state_addr),
++		  [sets] "r" (cpu_data[smp_processor_id()].dcache.sets));
++
++	__asm__ __volatile__(
++		"   .set push                         \n"
++		"   .set noreorder                    \n"
++		"   .set mips64                       \n"
++		"   mfc0  %[cpuid], $15, 1            \n"
++		"   andi  %[cpuid], 0x3ff             \n"
++		"   dli   %[base], 0x900000003ff01000 \n"
++		"   andi  %[core], %[cpuid], 0x3      \n"
++		"   sll   %[core], 8                  \n" /* get core id */
++		"   or    %[base], %[base], %[core]   \n"
++		"   andi  %[node], %[cpuid], 0xc      \n"
++		"   dsll  %[node], 42                 \n" /* get node id */
++		"   or    %[base], %[base], %[node]   \n"
++		"   dsrl  %[node], 30                 \n" /* 15:14 */
++		"   or    %[base], %[base], %[node]   \n"
++		"1: li    %[count], 0x100             \n" /* wait for init loop */
++		"2: bnez  %[count], 2b                \n" /* limit mailbox access */
++		"   addiu %[count], -1                \n"
++		"   ld    %[initfunc], 0x20(%[base])  \n" /* get PC via mailbox */
++		"   beqz  %[initfunc], 1b             \n"
++		"   nop                               \n"
++		"   ld    $sp, 0x28(%[base])          \n" /* get SP via mailbox */
++		"   ld    $gp, 0x30(%[base])          \n" /* get GP via mailbox */
++		"   ld    $a1, 0x38(%[base])          \n"
++		"   jr    %[initfunc]                 \n" /* jump to initial PC */
++		"   nop                               \n"
++		"   .set pop                          \n"
++		: [core] "=&r" (core), [node] "=&r" (node),
++		  [base] "=&r" (base), [cpuid] "=&r" (cpuid),
++		  [count] "=&r" (count), [initfunc] "=&r" (initfunc)
++		: /* No Input */
++		: "a1");
++}
++
+ void play_dead(void)
+ {
+ 	int *state_addr;
+@@ -384,31 +544,64 @@ void play_dead(void)
+ 	void (*play_dead_at_ckseg1)(int *);
+ 
+ 	idle_task_exit();
+-	play_dead_at_ckseg1 =
+-		(void *)CKSEG1ADDR((unsigned long)loongson3_play_dead);
++	switch (loongson_sysconf.cputype) {
++	case Loongson_3A:
++	default:
++		play_dead_at_ckseg1 =
++			(void *)CKSEG1ADDR((unsigned long)loongson3a_play_dead);
++		break;
++	case Loongson_3B:
++		play_dead_at_ckseg1 =
++			(void *)CKSEG1ADDR((unsigned long)loongson3b_play_dead);
++		break;
++	}
+ 	state_addr = &per_cpu(cpu_state, cpu);
+ 	mb();
+ 	play_dead_at_ckseg1(state_addr);
+ }
+ 
++void loongson3_disable_clock(int cpu)
++{
++	uint64_t core_id = cpu_data[cpu].core;
++	uint64_t package_id = cpu_data[cpu].package;
++
++	if (loongson_sysconf.cputype == Loongson_3A) {
++		LOONGSON_CHIPCFG(package_id) &= ~(1 << (12 + core_id));
++	} else if (loongson_sysconf.cputype == Loongson_3B) {
++		if (!cpuhotplug_workaround)
++			LOONGSON_FREQCTRL(package_id) &= ~(1 << (core_id * 4 + 3));
++	}
++}
++
++void loongson3_enable_clock(int cpu)
++{
++	uint64_t core_id = cpu_data[cpu].core;
++	uint64_t package_id = cpu_data[cpu].package;
++
++	if (loongson_sysconf.cputype == Loongson_3A) {
++		LOONGSON_CHIPCFG(package_id) |= 1 << (12 + core_id);
++	} else if (loongson_sysconf.cputype == Loongson_3B) {
++		if (!cpuhotplug_workaround)
++			LOONGSON_FREQCTRL(package_id) |= 1 << (core_id * 4 + 3);
++	}
++}
++
+ #define CPU_POST_DEAD_FROZEN	(CPU_POST_DEAD | CPU_TASKS_FROZEN)
+ static int loongson3_cpu_callback(struct notifier_block *nfb,
+ 	unsigned long action, void *hcpu)
+ {
+ 	unsigned int cpu = (unsigned long)hcpu;
+-	uint64_t core_id = cpu_data[cpu].core;
+-	uint64_t package_id = cpu_data[cpu].package;
+ 
+ 	switch (action) {
+ 	case CPU_POST_DEAD:
+ 	case CPU_POST_DEAD_FROZEN:
+ 		pr_info("Disable clock for CPU#%d\n", cpu);
+-		LOONGSON_CHIPCFG(package_id) &= ~(1 << (12 + core_id));
++		loongson3_disable_clock(cpu);
+ 		break;
+ 	case CPU_UP_PREPARE:
+ 	case CPU_UP_PREPARE_FROZEN:
+ 		pr_info("Enable clock for CPU#%d\n", cpu);
+-		LOONGSON_CHIPCFG(package_id) |= 1 << (12 + core_id);
++		loongson3_enable_clock(cpu);
+ 		break;
+ 	}
+ 
+diff --git a/arch/mips/loongson/loongson-3/smp.h b/arch/mips/loongson/loongson-3/smp.h
+index 3453e8c..d98ff65 100644
+--- a/arch/mips/loongson/loongson-3/smp.h
++++ b/arch/mips/loongson/loongson-3/smp.h
+@@ -1,29 +1,30 @@
+ #ifndef __LOONGSON_SMP_H_
+ #define __LOONGSON_SMP_H_
+ 
+-/* for Loongson-3A smp support */
++/* for Loongson-3 smp support */
++extern unsigned long long smp_group[4];
+ 
+ /* 4 groups(nodes) in maximum in numa case */
+-#define  SMP_CORE_GROUP0_BASE    0x900000003ff01000
+-#define  SMP_CORE_GROUP1_BASE    0x900010003ff01000
+-#define  SMP_CORE_GROUP2_BASE    0x900020003ff01000
+-#define  SMP_CORE_GROUP3_BASE    0x900030003ff01000
++#define SMP_CORE_GROUP0_BASE	(smp_group[0])
++#define SMP_CORE_GROUP1_BASE	(smp_group[1])
++#define SMP_CORE_GROUP2_BASE	(smp_group[2])
++#define SMP_CORE_GROUP3_BASE	(smp_group[3])
+ 
+ /* 4 cores in each group(node) */
+-#define  SMP_CORE0_OFFSET  0x000
+-#define  SMP_CORE1_OFFSET  0x100
+-#define  SMP_CORE2_OFFSET  0x200
+-#define  SMP_CORE3_OFFSET  0x300
++#define SMP_CORE0_OFFSET  0x000
++#define SMP_CORE1_OFFSET  0x100
++#define SMP_CORE2_OFFSET  0x200
++#define SMP_CORE3_OFFSET  0x300
+ 
+ /* ipi registers offsets */
+-#define  STATUS0  0x00
+-#define  EN0      0x04
+-#define  SET0     0x08
+-#define  CLEAR0   0x0c
+-#define  STATUS1  0x10
+-#define  MASK1    0x14
+-#define  SET1     0x18
+-#define  CLEAR1   0x1c
+-#define  BUF      0x20
++#define STATUS0  0x00
++#define EN0      0x04
++#define SET0     0x08
++#define CLEAR0   0x0c
++#define STATUS1  0x10
++#define MASK1    0x14
++#define SET1     0x18
++#define CLEAR1   0x1c
++#define BUF      0x20
+ 
+ #endif
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Add-NUMA-support-for-Loongson-3.patch (from r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Add-NUMA-support-for-Loongson-3.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Add-NUMA-support-for-Loongson-3.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Add-NUMA-support-for-Loongson-3.patch)
@@ -0,0 +1,651 @@
+From: Huacai Chen <chenhc at lemote.com>
+Date: Thu, 26 Jun 2014 11:41:28 +0800
+Subject: [4/8] MIPS: Add NUMA support for Loongson-3
+Origin: https://git.kernel.org/linus/c46173183657bbdbe0d54a981c28807581648422
+
+Multiple Loongson-3A chips can be interconnected with HT0-bus. This is
+a CC-NUMA system that every chip (node) has its own local memory and
+cache coherency is maintained by hardware. The 64-bit physical memory
+address format is as follows:
+
+0x-0000-YZZZ-ZZZZ-ZZZZ
+
+The high 16 bits should be 0, which means the real physical address
+supported by Loongson-3 is 48-bit. The "Y" bits is the base address of
+each node, which can be also considered as the node-id. The "Z" bits is
+the address offset within a node, which means every node has a 44 bits
+address space.
+
+Macros XPHYSADDR and MAX_PHYSMEM_BITS are modified unconditionally,
+because many other MIPS CPUs have also extended their address spaces.
+
+Signed-off-by: Huacai Chen <chenhc at lemote.com>
+Cc: John Crispin <john at phrozen.org>
+Cc: Steven J. Hill <Steven.Hill at imgtec.com>
+Cc: Aurelien Jarno <aurelien at aurel32.net>
+Cc: linux-mips at linux-mips.org
+Cc: Fuxin Zhang <zhangfx at lemote.com>
+Cc: Zhangjin Wu <wuzhangjin at gmail.com>
+Patchwork: https://patchwork.linux-mips.org/patch/7187/
+Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
+---
+ arch/mips/include/asm/addrspace.h                  |    2 +-
+ arch/mips/include/asm/mach-loongson/boot_param.h   |    3 +
+ .../include/asm/mach-loongson/kernel-entry-init.h  |   52 ++++
+ arch/mips/include/asm/mach-loongson/mmzone.h       |   53 ++++
+ arch/mips/include/asm/mach-loongson/topology.h     |   23 ++
+ arch/mips/include/asm/sparsemem.h                  |    2 +-
+ arch/mips/kernel/setup.c                           |    2 +-
+ arch/mips/loongson/Kconfig                         |    1 +
+ arch/mips/loongson/common/env.c                    |    7 +
+ arch/mips/loongson/common/init.c                   |    4 +
+ arch/mips/loongson/loongson-3/Makefile             |    2 +
+ arch/mips/loongson/loongson-3/numa.c               |  291 ++++++++++++++++++++
+ arch/mips/loongson/loongson-3/smp.c                |    8 +-
+ 13 files changed, 445 insertions(+), 5 deletions(-)
+ create mode 100644 arch/mips/include/asm/mach-loongson/kernel-entry-init.h
+ create mode 100644 arch/mips/include/asm/mach-loongson/mmzone.h
+ create mode 100644 arch/mips/include/asm/mach-loongson/topology.h
+ create mode 100644 arch/mips/loongson/loongson-3/numa.c
+
+diff --git a/arch/mips/include/asm/addrspace.h b/arch/mips/include/asm/addrspace.h
+index 3f74545..3b0e51d 100644
+--- a/arch/mips/include/asm/addrspace.h
++++ b/arch/mips/include/asm/addrspace.h
+@@ -52,7 +52,7 @@
+  */
+ #define CPHYSADDR(a)		((_ACAST32_(a)) & 0x1fffffff)
+ #define XPHYSADDR(a)		((_ACAST64_(a)) &			\
+-				 _CONST64_(0x000000ffffffffff))
++				 _CONST64_(0x0000ffffffffffff))
+ 
+ #ifdef CONFIG_64BIT
+ 
+diff --git a/arch/mips/include/asm/mach-loongson/boot_param.h b/arch/mips/include/asm/mach-loongson/boot_param.h
+index 829a7ec..8b06c96 100644
+--- a/arch/mips/include/asm/mach-loongson/boot_param.h
++++ b/arch/mips/include/asm/mach-loongson/boot_param.h
+@@ -146,6 +146,9 @@ struct boot_params {
+ 
+ struct loongson_system_configuration {
+ 	u32 nr_cpus;
++	u32 nr_nodes;
++	int cores_per_node;
++	int cores_per_package;
+ 	enum loongson_cpu_type cputype;
+ 	u64 ht_control_base;
+ 	u64 pci_mem_start_addr;
+diff --git a/arch/mips/include/asm/mach-loongson/kernel-entry-init.h b/arch/mips/include/asm/mach-loongson/kernel-entry-init.h
+new file mode 100644
+index 0000000..df5fca8
+--- /dev/null
++++ b/arch/mips/include/asm/mach-loongson/kernel-entry-init.h
+@@ -0,0 +1,52 @@
++/*
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License.  See the file "COPYING" in the main directory of this archive
++ * for more details.
++ *
++ * Copyright (C) 2005 Embedded Alley Solutions, Inc
++ * Copyright (C) 2005 Ralf Baechle (ralf at linux-mips.org)
++ * Copyright (C) 2009 Jiajie Chen (chenjiajie at cse.buaa.edu.cn)
++ * Copyright (C) 2012 Huacai Chen (chenhc at lemote.com)
++ */
++#ifndef __ASM_MACH_LOONGSON_KERNEL_ENTRY_H
++#define __ASM_MACH_LOONGSON_KERNEL_ENTRY_H
++
++/*
++ * Override macros used in arch/mips/kernel/head.S.
++ */
++	.macro	kernel_entry_setup
++#ifdef CONFIG_CPU_LOONGSON3
++	.set	push
++	.set	mips64
++	/* Set LPA on LOONGSON3 config3 */
++	mfc0	t0, $16, 3
++	or	t0, (0x1 << 7)
++	mtc0	t0, $16, 3
++	/* Set ELPA on LOONGSON3 pagegrain */
++	li	t0, (0x1 << 29)
++	mtc0	t0, $5, 1
++	_ehb
++	.set	pop
++#endif
++	.endm
++
++/*
++ * Do SMP slave processor setup.
++ */
++	.macro	smp_slave_setup
++#ifdef CONFIG_CPU_LOONGSON3
++	.set	push
++	.set	mips64
++	/* Set LPA on LOONGSON3 config3 */
++	mfc0	t0, $16, 3
++	or	t0, (0x1 << 7)
++	mtc0	t0, $16, 3
++	/* Set ELPA on LOONGSON3 pagegrain */
++	li	t0, (0x1 << 29)
++	mtc0	t0, $5, 1
++	_ehb
++	.set	pop
++#endif
++	.endm
++
++#endif /* __ASM_MACH_LOONGSON_KERNEL_ENTRY_H */
+diff --git a/arch/mips/include/asm/mach-loongson/mmzone.h b/arch/mips/include/asm/mach-loongson/mmzone.h
+new file mode 100644
+index 0000000..37c08a2
+--- /dev/null
++++ b/arch/mips/include/asm/mach-loongson/mmzone.h
+@@ -0,0 +1,53 @@
++/*
++ * Copyright (C) 2010 Loongson Inc. & Lemote Inc. &
++ *                    Insititute of Computing Technology
++ * Author:  Xiang Gao, gaoxiang at ict.ac.cn
++ *          Huacai Chen, chenhc at lemote.com
++ *          Xiaofu Meng, Shuangshuang Zhang
++ *
++ * This program is free software; you can redistribute  it and/or modify it
++ * under  the terms of  the GNU General  Public License as published by the
++ * Free Software Foundation;  either version 2 of the  License, or (at your
++ * option) any later version.
++ */
++#ifndef _ASM_MACH_MMZONE_H
++#define _ASM_MACH_MMZONE_H
++
++#include <boot_param.h>
++#define NODE_ADDRSPACE_SHIFT 44
++#define NODE0_ADDRSPACE_OFFSET 0x000000000000UL
++#define NODE1_ADDRSPACE_OFFSET 0x100000000000UL
++#define NODE2_ADDRSPACE_OFFSET 0x200000000000UL
++#define NODE3_ADDRSPACE_OFFSET 0x300000000000UL
++
++#define pa_to_nid(addr)  (((addr) & 0xf00000000000) >> NODE_ADDRSPACE_SHIFT)
++
++#define LEVELS_PER_SLICE 128
++
++struct slice_data {
++	unsigned long irq_enable_mask[2];
++	int level_to_irq[LEVELS_PER_SLICE];
++};
++
++struct hub_data {
++	cpumask_t	h_cpus;
++	unsigned long slice_map;
++	unsigned long irq_alloc_mask[2];
++	struct slice_data slice[2];
++};
++
++struct node_data {
++	struct pglist_data pglist;
++	struct hub_data hub;
++	cpumask_t cpumask;
++};
++
++extern struct node_data *__node_data[];
++
++#define NODE_DATA(n)		(&__node_data[(n)]->pglist)
++#define hub_data(n)		(&__node_data[(n)]->hub)
++
++extern void setup_zero_pages(void);
++extern void __init prom_init_numa_memory(void);
++
++#endif /* _ASM_MACH_MMZONE_H */
+diff --git a/arch/mips/include/asm/mach-loongson/topology.h b/arch/mips/include/asm/mach-loongson/topology.h
+new file mode 100644
+index 0000000..5598ba7
+--- /dev/null
++++ b/arch/mips/include/asm/mach-loongson/topology.h
+@@ -0,0 +1,23 @@
++#ifndef _ASM_MACH_TOPOLOGY_H
++#define _ASM_MACH_TOPOLOGY_H
++
++#ifdef CONFIG_NUMA
++
++#define cpu_to_node(cpu)	((cpu) >> 2)
++#define parent_node(node)	(node)
++#define cpumask_of_node(node)	(&__node_data[(node)]->cpumask)
++
++struct pci_bus;
++extern int pcibus_to_node(struct pci_bus *);
++
++#define cpumask_of_pcibus(bus)	(cpu_online_mask)
++
++extern unsigned char __node_distances[MAX_NUMNODES][MAX_NUMNODES];
++
++#define node_distance(from, to)	(__node_distances[(from)][(to)])
++
++#endif
++
++#include <asm-generic/topology.h>
++
++#endif /* _ASM_MACH_TOPOLOGY_H */
+diff --git a/arch/mips/include/asm/sparsemem.h b/arch/mips/include/asm/sparsemem.h
+index d2da53c..b1071c1 100644
+--- a/arch/mips/include/asm/sparsemem.h
++++ b/arch/mips/include/asm/sparsemem.h
+@@ -11,7 +11,7 @@
+ #else
+ # define SECTION_SIZE_BITS	28
+ #endif
+-#define MAX_PHYSMEM_BITS	35
++#define MAX_PHYSMEM_BITS	48
+ 
+ #endif /* CONFIG_SPARSEMEM */
+ #endif /* _MIPS_SPARSEMEM_H */
+diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
+index 2f01201..7c1fe2b 100644
+--- a/arch/mips/kernel/setup.c
++++ b/arch/mips/kernel/setup.c
+@@ -282,7 +282,7 @@ static unsigned long __init init_initrd(void)
+  * Initialize the bootmem allocator. It also setup initrd related data
+  * if needed.
+  */
+-#ifdef CONFIG_SGI_IP27
++#if defined(CONFIG_SGI_IP27) || (defined(CONFIG_CPU_LOONGSON3) && defined(CONFIG_NUMA))
+ 
+ static void __init bootmem_init(void)
+ {
+diff --git a/arch/mips/loongson/Kconfig b/arch/mips/loongson/Kconfig
+index e6a86cc..a14a50d 100644
+--- a/arch/mips/loongson/Kconfig
++++ b/arch/mips/loongson/Kconfig
+@@ -79,6 +79,7 @@ config LEMOTE_MACH3A
+ 	select SYS_HAS_EARLY_PRINTK
+ 	select SYS_SUPPORTS_SMP
+ 	select SYS_SUPPORTS_HOTPLUG_CPU
++	select SYS_SUPPORTS_NUMA
+ 	select SYS_SUPPORTS_64BIT_KERNEL
+ 	select SYS_SUPPORTS_HIGHMEM
+ 	select SYS_SUPPORTS_LITTLE_ENDIAN
+diff --git a/arch/mips/loongson/common/env.c b/arch/mips/loongson/common/env.c
+index dc59241..33a13b9 100644
+--- a/arch/mips/loongson/common/env.c
++++ b/arch/mips/loongson/common/env.c
+@@ -80,17 +80,24 @@ void __init prom_init_env(void)
+ 	cpu_clock_freq = ecpu->cpu_clock_freq;
+ 	loongson_sysconf.cputype = ecpu->cputype;
+ 	if (ecpu->cputype == Loongson_3A) {
++		loongson_sysconf.cores_per_node = 4;
++		loongson_sysconf.cores_per_package = 4;
+ 		loongson_chipcfg[0] = 0x900000001fe00180;
+ 		loongson_chipcfg[1] = 0x900010001fe00180;
+ 		loongson_chipcfg[2] = 0x900020001fe00180;
+ 		loongson_chipcfg[3] = 0x900030001fe00180;
+ 	} else {
++		loongson_sysconf.cores_per_node = 1;
++		loongson_sysconf.cores_per_package = 1;
+ 		loongson_chipcfg[0] = 0x900000001fe00180;
+ 	}
+ 
+ 	loongson_sysconf.nr_cpus = ecpu->nr_cpus;
+ 	if (ecpu->nr_cpus > NR_CPUS || ecpu->nr_cpus == 0)
+ 		loongson_sysconf.nr_cpus = NR_CPUS;
++	loongson_sysconf.nr_nodes = (loongson_sysconf.nr_cpus +
++		loongson_sysconf.cores_per_node - 1) /
++		loongson_sysconf.cores_per_node;
+ 
+ 	loongson_sysconf.pci_mem_start_addr = eirq_source->pci_mem_start_addr;
+ 	loongson_sysconf.pci_mem_end_addr = eirq_source->pci_mem_end_addr;
+diff --git a/arch/mips/loongson/common/init.c b/arch/mips/loongson/common/init.c
+index f37fe54..f6af3ab 100644
+--- a/arch/mips/loongson/common/init.c
++++ b/arch/mips/loongson/common/init.c
+@@ -30,7 +30,11 @@ void __init prom_init(void)
+ 	set_io_port_base((unsigned long)
+ 		ioremap(LOONGSON_PCIIO_BASE, LOONGSON_PCIIO_SIZE));
+ 
++#ifdef CONFIG_NUMA
++	prom_init_numa_memory();
++#else
+ 	prom_init_memory();
++#endif
+ 
+ 	/*init the uart base address */
+ 	prom_init_uart_base();
+diff --git a/arch/mips/loongson/loongson-3/Makefile b/arch/mips/loongson/loongson-3/Makefile
+index 70152b2..471b0f2a 100644
+--- a/arch/mips/loongson/loongson-3/Makefile
++++ b/arch/mips/loongson/loongson-3/Makefile
+@@ -4,3 +4,5 @@
+ obj-y			+= irq.o
+ 
+ obj-$(CONFIG_SMP)	+= smp.o
++
++obj-$(CONFIG_NUMA)	+= numa.o
+diff --git a/arch/mips/loongson/loongson-3/numa.c b/arch/mips/loongson/loongson-3/numa.c
+new file mode 100644
+index 0000000..ca025a6
+--- /dev/null
++++ b/arch/mips/loongson/loongson-3/numa.c
+@@ -0,0 +1,291 @@
++/*
++ * Copyright (C) 2010 Loongson Inc. & Lemote Inc. &
++ *                    Insititute of Computing Technology
++ * Author:  Xiang Gao, gaoxiang at ict.ac.cn
++ *          Huacai Chen, chenhc at lemote.com
++ *          Xiaofu Meng, Shuangshuang Zhang
++ *
++ * This program is free software; you can redistribute  it and/or modify it
++ * under  the terms of  the GNU General  Public License as published by the
++ * Free Software Foundation;  either version 2 of the  License, or (at your
++ * option) any later version.
++ */
++#include <linux/init.h>
++#include <linux/kernel.h>
++#include <linux/mm.h>
++#include <linux/mmzone.h>
++#include <linux/module.h>
++#include <linux/nodemask.h>
++#include <linux/swap.h>
++#include <linux/memblock.h>
++#include <linux/bootmem.h>
++#include <linux/pfn.h>
++#include <linux/highmem.h>
++#include <asm/page.h>
++#include <asm/pgalloc.h>
++#include <asm/sections.h>
++#include <linux/bootmem.h>
++#include <linux/init.h>
++#include <linux/irq.h>
++#include <asm/bootinfo.h>
++#include <asm/mc146818-time.h>
++#include <asm/time.h>
++#include <asm/wbflush.h>
++#include <boot_param.h>
++
++static struct node_data prealloc__node_data[MAX_NUMNODES];
++unsigned char __node_distances[MAX_NUMNODES][MAX_NUMNODES];
++struct node_data *__node_data[MAX_NUMNODES];
++EXPORT_SYMBOL(__node_data);
++
++static void enable_lpa(void)
++{
++	unsigned long value;
++
++	value = __read_32bit_c0_register($16, 3);
++	value |= 0x00000080;
++	__write_32bit_c0_register($16, 3, value);
++	value = __read_32bit_c0_register($16, 3);
++	pr_info("CP0_Config3: CP0 16.3 (0x%lx)\n", value);
++
++	value = __read_32bit_c0_register($5, 1);
++	value |= 0x20000000;
++	__write_32bit_c0_register($5, 1, value);
++	value = __read_32bit_c0_register($5, 1);
++	pr_info("CP0_PageGrain: CP0 5.1 (0x%lx)\n", value);
++}
++
++static void cpu_node_probe(void)
++{
++	int i;
++
++	nodes_clear(node_possible_map);
++	nodes_clear(node_online_map);
++	for (i = 0; i < loongson_sysconf.nr_nodes; i++) {
++		node_set_state(num_online_nodes(), N_POSSIBLE);
++		node_set_online(num_online_nodes());
++	}
++
++	pr_info("NUMA: Discovered %d cpus on %d nodes\n",
++		loongson_sysconf.nr_cpus, num_online_nodes());
++}
++
++static int __init compute_node_distance(int row, int col)
++{
++	int package_row = row * loongson_sysconf.cores_per_node /
++				loongson_sysconf.cores_per_package;
++	int package_col = col * loongson_sysconf.cores_per_node /
++				loongson_sysconf.cores_per_package;
++
++	if (col == row)
++		return 0;
++	else if (package_row == package_col)
++		return 40;
++	else
++		return 100;
++}
++
++static void __init init_topology_matrix(void)
++{
++	int row, col;
++
++	for (row = 0; row < MAX_NUMNODES; row++)
++		for (col = 0; col < MAX_NUMNODES; col++)
++			__node_distances[row][col] = -1;
++
++	for_each_online_node(row) {
++		for_each_online_node(col) {
++			__node_distances[row][col] =
++				compute_node_distance(row, col);
++		}
++	}
++}
++
++static unsigned long nid_to_addroffset(unsigned int nid)
++{
++	unsigned long result;
++	switch (nid) {
++	case 0:
++	default:
++		result = NODE0_ADDRSPACE_OFFSET;
++		break;
++	case 1:
++		result = NODE1_ADDRSPACE_OFFSET;
++		break;
++	case 2:
++		result = NODE2_ADDRSPACE_OFFSET;
++		break;
++	case 3:
++		result = NODE3_ADDRSPACE_OFFSET;
++		break;
++	}
++	return result;
++}
++
++static void __init szmem(unsigned int node)
++{
++	u32 i, mem_type;
++	static unsigned long num_physpages = 0;
++	u64 node_id, node_psize, start_pfn, end_pfn, mem_start, mem_size;
++
++	/* Parse memory information and activate */
++	for (i = 0; i < loongson_memmap->nr_map; i++) {
++		node_id = loongson_memmap->map[i].node_id;
++		if (node_id != node)
++			continue;
++
++		mem_type = loongson_memmap->map[i].mem_type;
++		mem_size = loongson_memmap->map[i].mem_size;
++		mem_start = loongson_memmap->map[i].mem_start;
++
++		switch (mem_type) {
++		case SYSTEM_RAM_LOW:
++			start_pfn = ((node_id << 44) + mem_start) >> PAGE_SHIFT;
++			node_psize = (mem_size << 20) >> PAGE_SHIFT;
++			end_pfn  = start_pfn + node_psize;
++			num_physpages += node_psize;
++			pr_info("Node%d: mem_type:%d, mem_start:0x%llx, mem_size:0x%llx MB\n",
++				(u32)node_id, mem_type, mem_start, mem_size);
++			pr_info("       start_pfn:0x%llx, end_pfn:0x%llx, num_physpages:0x%lx\n",
++				start_pfn, end_pfn, num_physpages);
++			add_memory_region((node_id << 44) + mem_start,
++				(u64)mem_size << 20, BOOT_MEM_RAM);
++			memblock_add_node(PFN_PHYS(start_pfn),
++				PFN_PHYS(end_pfn - start_pfn), node);
++			break;
++		case SYSTEM_RAM_HIGH:
++			start_pfn = ((node_id << 44) + mem_start) >> PAGE_SHIFT;
++			node_psize = (mem_size << 20) >> PAGE_SHIFT;
++			end_pfn  = start_pfn + node_psize;
++			num_physpages += node_psize;
++			pr_info("Node%d: mem_type:%d, mem_start:0x%llx, mem_size:0x%llx MB\n",
++				(u32)node_id, mem_type, mem_start, mem_size);
++			pr_info("       start_pfn:0x%llx, end_pfn:0x%llx, num_physpages:0x%lx\n",
++				start_pfn, end_pfn, num_physpages);
++			add_memory_region((node_id << 44) + mem_start,
++				(u64)mem_size << 20, BOOT_MEM_RAM);
++			memblock_add_node(PFN_PHYS(start_pfn),
++				PFN_PHYS(end_pfn - start_pfn), node);
++			break;
++		case MEM_RESERVED:
++			pr_info("Node%d: mem_type:%d, mem_start:0x%llx, mem_size:0x%llx MB\n",
++				(u32)node_id, mem_type, mem_start, mem_size);
++			add_memory_region((node_id << 44) + mem_start,
++				(u64)mem_size << 20, BOOT_MEM_RESERVED);
++			memblock_reserve(((node_id << 44) + mem_start),
++				mem_size << 20);
++			break;
++		}
++	}
++}
++
++static void __init node_mem_init(unsigned int node)
++{
++	unsigned long bootmap_size;
++	unsigned long node_addrspace_offset;
++	unsigned long start_pfn, end_pfn, freepfn;
++
++	node_addrspace_offset = nid_to_addroffset(node);
++	pr_info("Node%d's addrspace_offset is 0x%lx\n",
++			node, node_addrspace_offset);
++
++	get_pfn_range_for_nid(node, &start_pfn, &end_pfn);
++	freepfn = start_pfn;
++	if (node == 0)
++		freepfn = PFN_UP(__pa_symbol(&_end)); /* kernel end address */
++	pr_info("Node%d: start_pfn=0x%lx, end_pfn=0x%lx, freepfn=0x%lx\n",
++		node, start_pfn, end_pfn, freepfn);
++
++	__node_data[node] = prealloc__node_data + node;
++
++	NODE_DATA(node)->bdata = &bootmem_node_data[node];
++	NODE_DATA(node)->node_start_pfn = start_pfn;
++	NODE_DATA(node)->node_spanned_pages = end_pfn - start_pfn;
++
++	bootmap_size = init_bootmem_node(NODE_DATA(node), freepfn,
++					start_pfn, end_pfn);
++	free_bootmem_with_active_regions(node, end_pfn);
++	if (node == 0) /* used by finalize_initrd() */
++		max_low_pfn = end_pfn;
++
++	/* This is reserved for the kernel and bdata->node_bootmem_map */
++	reserve_bootmem_node(NODE_DATA(node), start_pfn << PAGE_SHIFT,
++		((freepfn - start_pfn) << PAGE_SHIFT) + bootmap_size,
++		BOOTMEM_DEFAULT);
++
++	if (node == 0 && node_end_pfn(0) >= (0xffffffff >> PAGE_SHIFT)) {
++		/* Reserve 0xff800000~0xffffffff for RS780E integrated GPU */
++		reserve_bootmem_node(NODE_DATA(node),
++				(node_addrspace_offset | 0xff800000),
++				8 << 20, BOOTMEM_DEFAULT);
++	}
++
++	sparse_memory_present_with_active_regions(node);
++}
++
++static __init void prom_meminit(void)
++{
++	unsigned int node, cpu;
++
++	cpu_node_probe();
++	init_topology_matrix();
++
++	for (node = 0; node < loongson_sysconf.nr_nodes; node++) {
++		if (node_online(node)) {
++			szmem(node);
++			node_mem_init(node);
++			cpus_clear(__node_data[(node)]->cpumask);
++		}
++	}
++	for (cpu = 0; cpu < loongson_sysconf.nr_cpus; cpu++) {
++		node = cpu / loongson_sysconf.cores_per_node;
++		if (node >= num_online_nodes())
++			node = 0;
++		pr_info("NUMA: set cpumask cpu %d on node %d\n", cpu, node);
++		cpu_set(cpu, __node_data[(node)]->cpumask);
++	}
++}
++
++void __init paging_init(void)
++{
++	unsigned node;
++	unsigned long zones_size[MAX_NR_ZONES] = {0, };
++
++	pagetable_init();
++
++	for_each_online_node(node) {
++		unsigned long  start_pfn, end_pfn;
++
++		get_pfn_range_for_nid(node, &start_pfn, &end_pfn);
++
++		if (end_pfn > max_low_pfn)
++			max_low_pfn = end_pfn;
++	}
++#ifdef CONFIG_ZONE_DMA32
++	zones_size[ZONE_DMA32] = MAX_DMA32_PFN;
++#endif
++	zones_size[ZONE_NORMAL] = max_low_pfn;
++	free_area_init_nodes(zones_size);
++}
++
++void __init mem_init(void)
++{
++	high_memory = (void *) __va(get_num_physpages() << PAGE_SHIFT);
++	free_all_bootmem();
++	setup_zero_pages();	/* This comes from node 0 */
++	mem_init_print_info(NULL);
++}
++
++/* All PCI device belongs to logical Node-0 */
++int pcibus_to_node(struct pci_bus *bus)
++{
++	return 0;
++}
++EXPORT_SYMBOL(pcibus_to_node);
++
++void __init prom_init_numa_memory(void)
++{
++	enable_lpa();
++	prom_meminit();
++}
++EXPORT_SYMBOL(prom_init_numa_memory);
+diff --git a/arch/mips/loongson/loongson-3/smp.c b/arch/mips/loongson/loongson-3/smp.c
+index 3c320e7..ed0e2d0 100644
+--- a/arch/mips/loongson/loongson-3/smp.c
++++ b/arch/mips/loongson/loongson-3/smp.c
+@@ -203,6 +203,8 @@ static void loongson3_init_secondary(void)
+ 	for (i = 0; i < loongson_sysconf.nr_cpus; i++)
+ 		loongson3_ipi_write32(0xffffffff, ipi_en0_regs[i]);
+ 
++	cpu_data[cpu].package = cpu / loongson_sysconf.cores_per_package;
++	cpu_data[cpu].core = cpu % loongson_sysconf.cores_per_package;
+ 	per_cpu(cpu_state, cpu) = CPU_ONLINE;
+ 
+ 	i = 0;
+@@ -394,17 +396,19 @@ static int loongson3_cpu_callback(struct notifier_block *nfb,
+ 	unsigned long action, void *hcpu)
+ {
+ 	unsigned int cpu = (unsigned long)hcpu;
++	uint64_t core_id = cpu_data[cpu].core;
++	uint64_t package_id = cpu_data[cpu].package;
+ 
+ 	switch (action) {
+ 	case CPU_POST_DEAD:
+ 	case CPU_POST_DEAD_FROZEN:
+ 		pr_info("Disable clock for CPU#%d\n", cpu);
+-		LOONGSON_CHIPCFG(0) &= ~(1 << (12 + cpu));
++		LOONGSON_CHIPCFG(package_id) &= ~(1 << (12 + core_id));
+ 		break;
+ 	case CPU_UP_PREPARE:
+ 	case CPU_UP_PREPARE_FROZEN:
+ 		pr_info("Enable clock for CPU#%d\n", cpu);
+-		LOONGSON_CHIPCFG(0) |= 1 << (12 + cpu);
++		LOONGSON_CHIPCFG(package_id) |= 1 << (12 + core_id);
+ 		break;
+ 	}
+ 
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Add-numa-api-support.patch (from r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Add-numa-api-support.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Add-numa-api-support.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Add-numa-api-support.patch)
@@ -0,0 +1,119 @@
+From: Huacai Chen <chenhc at lemote.com>
+Date: Thu, 26 Jun 2014 11:41:29 +0800
+Subject: [5/8] MIPS: Add numa api support
+Origin: https://git.kernel.org/linus/1ff1ad6bc2c63f219cbc00dcdd35dcf36a7d6fe4
+
+Enable sys_mbind()/sys_get_mempolicy()/sys_set_mempolicy() for O32, N32,
+and N64 ABIs. By the way, O32/N32 should use the compat version of
+sys_migrate_pages()/sys_move_pages(), so fix that.
+
+Signed-off-by: Huacai Chen <chenhc at lemote.com>
+Cc: John Crispin <john at phrozen.org>
+Cc: Steven J. Hill <Steven.Hill at imgtec.com>
+Cc: Aurelien Jarno <aurelien at aurel32.net>
+Cc: linux-mips at linux-mips.org
+Cc: Fuxin Zhang <zhangfx at lemote.com>
+Cc: Zhangjin Wu <wuzhangjin at gmail.com>
+Patchwork: https://patchwork.linux-mips.org/patch/7186/
+Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
+---
+ arch/mips/kernel/scall32-o32.S |    4 ++--
+ arch/mips/kernel/scall64-64.S  |    4 ++--
+ arch/mips/kernel/scall64-n32.S |   10 +++++-----
+ arch/mips/kernel/scall64-o32.S |    8 ++++----
+ 4 files changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
+index 3245474..6bfdc82 100644
+--- a/arch/mips/kernel/scall32-o32.S
++++ b/arch/mips/kernel/scall32-o32.S
+@@ -495,8 +495,8 @@ EXPORT(sys_call_table)
+ 	PTR	sys_tgkill
+ 	PTR	sys_utimes
+ 	PTR	sys_mbind
+-	PTR	sys_ni_syscall			/* sys_get_mempolicy */
+-	PTR	sys_ni_syscall			/* 4270 sys_set_mempolicy */
++	PTR	sys_get_mempolicy
++	PTR	sys_set_mempolicy		/* 4270 */
+ 	PTR	sys_mq_open
+ 	PTR	sys_mq_unlink
+ 	PTR	sys_mq_timedsend
+diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S
+index be2fedd..0952139 100644
+--- a/arch/mips/kernel/scall64-64.S
++++ b/arch/mips/kernel/scall64-64.S
+@@ -347,8 +347,8 @@ EXPORT(sys_call_table)
+ 	PTR	sys_tgkill			/* 5225 */
+ 	PTR	sys_utimes
+ 	PTR	sys_mbind
+-	PTR	sys_ni_syscall			/* sys_get_mempolicy */
+-	PTR	sys_ni_syscall			/* sys_set_mempolicy */
++	PTR	sys_get_mempolicy
++	PTR	sys_set_mempolicy
+ 	PTR	sys_mq_open			/* 5230 */
+ 	PTR	sys_mq_unlink
+ 	PTR	sys_mq_timedsend
+diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
+index c1dbcda..7641c87 100644
+--- a/arch/mips/kernel/scall64-n32.S
++++ b/arch/mips/kernel/scall64-n32.S
+@@ -339,9 +339,9 @@ EXPORT(sysn32_call_table)
+ 	PTR	compat_sys_clock_nanosleep
+ 	PTR	sys_tgkill
+ 	PTR	compat_sys_utimes		/* 6230 */
+-	PTR	sys_ni_syscall			/* sys_mbind */
+-	PTR	sys_ni_syscall			/* sys_get_mempolicy */
+-	PTR	sys_ni_syscall			/* sys_set_mempolicy */
++	PTR	compat_sys_mbind
++	PTR	compat_sys_get_mempolicy
++	PTR	compat_sys_set_mempolicy
+ 	PTR	compat_sys_mq_open
+ 	PTR	sys_mq_unlink			/* 6235 */
+ 	PTR	compat_sys_mq_timedsend
+@@ -358,7 +358,7 @@ EXPORT(sysn32_call_table)
+ 	PTR	sys_inotify_init
+ 	PTR	sys_inotify_add_watch
+ 	PTR	sys_inotify_rm_watch
+-	PTR	sys_migrate_pages		/* 6250 */
++	PTR	compat_sys_migrate_pages	/* 6250 */
+ 	PTR	sys_openat
+ 	PTR	sys_mkdirat
+ 	PTR	sys_mknodat
+@@ -379,7 +379,7 @@ EXPORT(sysn32_call_table)
+ 	PTR	sys_sync_file_range
+ 	PTR	sys_tee
+ 	PTR	compat_sys_vmsplice		/* 6270 */
+-	PTR	sys_move_pages
++	PTR	compat_sys_move_pages
+ 	PTR	compat_sys_set_robust_list
+ 	PTR	compat_sys_get_robust_list
+ 	PTR	compat_sys_kexec_load
+diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
+index f1343cc..18cfa11 100644
+--- a/arch/mips/kernel/scall64-o32.S
++++ b/arch/mips/kernel/scall64-o32.S
+@@ -473,9 +473,9 @@ EXPORT(sys32_call_table)
+ 	PTR	compat_sys_clock_nanosleep	/* 4265 */
+ 	PTR	sys_tgkill
+ 	PTR	compat_sys_utimes
+-	PTR	sys_ni_syscall			/* sys_mbind */
+-	PTR	sys_ni_syscall			/* sys_get_mempolicy */
+-	PTR	sys_ni_syscall			/* 4270 sys_set_mempolicy */
++	PTR	compat_sys_mbind
++	PTR	compat_sys_get_mempolicy
++	PTR	compat_sys_set_mempolicy	/* 4270 */
+ 	PTR	compat_sys_mq_open
+ 	PTR	sys_mq_unlink
+ 	PTR	compat_sys_mq_timedsend
+@@ -492,7 +492,7 @@ EXPORT(sys32_call_table)
+ 	PTR	sys_inotify_init
+ 	PTR	sys_inotify_add_watch		/* 4285 */
+ 	PTR	sys_inotify_rm_watch
+-	PTR	sys_migrate_pages
++	PTR	compat_sys_migrate_pages
+ 	PTR	compat_sys_openat
+ 	PTR	sys_mkdirat
+ 	PTR	sys_mknodat			/* 4290 */
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Loongson-3-Enable-the-COP2-usage.patch (from r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Loongson-3-Enable-the-COP2-usage.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Loongson-3-Enable-the-COP2-usage.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Loongson-3-Enable-the-COP2-usage.patch)
@@ -0,0 +1,132 @@
+From: Huacai Chen <chenhc at lemote.com>
+Date: Thu, 26 Jun 2014 11:41:31 +0800
+Subject: [7/8] MIPS: Loongson-3: Enable the COP2 usage
+Origin: https://git.kernel.org/linus/ef2f826c8f2ff1e4215968042139604633581a13
+
+Loongson-3 has some specific instructions (MMI/SIMD) in coprocessor 2.
+COP2 isn't independent because it share COP1 (FPU)'s registers. This
+patch enable the COP2 usage so user-space programs can use the MMI/SIMD
+instructions. When COP2 exception happens, we enable both COP1 (FPU)
+and COP2, only in this way the fp context can be saved and restored
+correctly.
+
+Signed-off-by: Huacai Chen <chenhc at lemote.com>
+Cc: John Crispin <john at phrozen.org>
+Cc: Steven J. Hill <Steven.Hill at imgtec.com>
+Cc: Aurelien Jarno <aurelien at aurel32.net>
+Cc: linux-mips at linux-mips.org
+Cc: Fuxin Zhang <zhangfx at lemote.com>
+Cc: Zhangjin Wu <wuzhangjin at gmail.com>
+Patchwork: https://patchwork.linux-mips.org/patch/7189/
+Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
+---
+ arch/mips/include/asm/cop2.h            |    8 ++++
+ arch/mips/loongson/loongson-3/Makefile  |    2 +-
+ arch/mips/loongson/loongson-3/cop2-ex.c |   63 +++++++++++++++++++++++++++++++
+ 3 files changed, 72 insertions(+), 1 deletion(-)
+ create mode 100644 arch/mips/loongson/loongson-3/cop2-ex.c
+
+diff --git a/arch/mips/include/asm/cop2.h b/arch/mips/include/asm/cop2.h
+index c1516cc..d035298 100644
+--- a/arch/mips/include/asm/cop2.h
++++ b/arch/mips/include/asm/cop2.h
+@@ -32,6 +32,14 @@ extern void nlm_cop2_restore(struct nlm_cop2_state *);
+ #define cop2_present		1
+ #define cop2_lazy_restore	0
+ 
++#elif defined(CONFIG_CPU_LOONGSON3)
++
++#define cop2_save(r)
++#define cop2_restore(r)
++
++#define cop2_present		1
++#define cop2_lazy_restore	1
++
+ #else
+ 
+ #define cop2_present		0
+diff --git a/arch/mips/loongson/loongson-3/Makefile b/arch/mips/loongson/loongson-3/Makefile
+index 471b0f2a..b4df775 100644
+--- a/arch/mips/loongson/loongson-3/Makefile
++++ b/arch/mips/loongson/loongson-3/Makefile
+@@ -1,7 +1,7 @@
+ #
+ # Makefile for Loongson-3 family machines
+ #
+-obj-y			+= irq.o
++obj-y			+= irq.o cop2-ex.o
+ 
+ obj-$(CONFIG_SMP)	+= smp.o
+ 
+diff --git a/arch/mips/loongson/loongson-3/cop2-ex.c b/arch/mips/loongson/loongson-3/cop2-ex.c
+new file mode 100644
+index 0000000..9182e8d
+--- /dev/null
++++ b/arch/mips/loongson/loongson-3/cop2-ex.c
+@@ -0,0 +1,63 @@
++/*
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License.  See the file "COPYING" in the main directory of this archive
++ * for more details.
++ *
++ * Copyright (C) 2014 Lemote Corporation.
++ *   written by Huacai Chen <chenhc at lemote.com>
++ *
++ * based on arch/mips/cavium-octeon/cpu.c
++ * Copyright (C) 2009 Wind River Systems,
++ *   written by Ralf Baechle <ralf at linux-mips.org>
++ */
++#include <linux/init.h>
++#include <linux/sched.h>
++#include <linux/notifier.h>
++
++#include <asm/fpu.h>
++#include <asm/cop2.h>
++#include <asm/current.h>
++#include <asm/mipsregs.h>
++
++static int loongson_cu2_call(struct notifier_block *nfb, unsigned long action,
++	void *data)
++{
++	int fpu_enabled;
++	int fr = !test_thread_flag(TIF_32BIT_FPREGS);
++
++	switch (action) {
++	case CU2_EXCEPTION:
++		preempt_disable();
++		fpu_enabled = read_c0_status() & ST0_CU1;
++		if (!fr)
++			set_c0_status(ST0_CU1 | ST0_CU2);
++		else
++			set_c0_status(ST0_CU1 | ST0_CU2 | ST0_FR);
++		enable_fpu_hazard();
++		KSTK_STATUS(current) |= (ST0_CU1 | ST0_CU2);
++		if (fr)
++			KSTK_STATUS(current) |= ST0_FR;
++		else
++			KSTK_STATUS(current) &= ~ST0_FR;
++		/* If FPU is enabled, we needn't init or restore fp */
++		if(!fpu_enabled) {
++			set_thread_flag(TIF_USEDFPU);
++			if (!used_math()) {
++				_init_fpu();
++				set_used_math();
++			} else
++				_restore_fp(current);
++		}
++		preempt_enable();
++
++		return NOTIFY_STOP;	/* Don't call default notifier */
++	}
++
++	return NOTIFY_OK;		/* Let default notifier send signals */
++}
++
++static int __init loongson_cu2_setup(void)
++{
++	return cu2_notifier(loongson_cu2_call, 0);
++}
++early_initcall(loongson_cu2_setup);
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Loongson-Modify-ChipConfig-register-definition.patch (from r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Loongson-Modify-ChipConfig-register-definition.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Loongson-Modify-ChipConfig-register-definition.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Loongson-Modify-ChipConfig-register-definition.patch)
@@ -0,0 +1,174 @@
+From: Huacai Chen <chenhc at lemote.com>
+Date: Thu, 26 Jun 2014 11:41:27 +0800
+Subject: [3/8] MIPS: Loongson: Modify ChipConfig register definition
+Origin: https://git.kernel.org/linus/140e39c1e3d29f50e161f55cca60f60b80408c2a
+
+This patch is prepared for Multi-chip interconnection. Since each chip
+has a ChipConfig register, LOONGSON_CHIPCFG should be an array.
+
+Signed-off-by: Huacai Chen <chenhc at lemote.com>
+Cc: John Crispin <john at phrozen.org>
+Cc: Steven J. Hill <Steven.Hill at imgtec.com>
+Cc: Aurelien Jarno <aurelien at aurel32.net>
+Cc: linux-mips at linux-mips.org
+Cc: Fuxin Zhang <zhangfx at lemote.com>
+Cc: Zhangjin Wu <wuzhangjin at gmail.com>
+Patchwork: https://patchwork.linux-mips.org/patch/7185/
+Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
+---
+ arch/mips/include/asm/mach-loongson/loongson.h |    7 +++++--
+ arch/mips/loongson/common/env.c                |   11 +++++++++++
+ arch/mips/loongson/common/pm.c                 |    8 ++++----
+ arch/mips/loongson/lemote-2f/clock.c           |    4 ++--
+ arch/mips/loongson/lemote-2f/reset.c           |    2 +-
+ arch/mips/loongson/loongson-3/smp.c            |    4 ++--
+ drivers/cpufreq/loongson2_cpufreq.c            |    6 +++---
+ 7 files changed, 28 insertions(+), 14 deletions(-)
+
+diff --git a/arch/mips/include/asm/mach-loongson/loongson.h b/arch/mips/include/asm/mach-loongson/loongson.h
+index f3fd1eb..a1c76ca 100644
+--- a/arch/mips/include/asm/mach-loongson/loongson.h
++++ b/arch/mips/include/asm/mach-loongson/loongson.h
+@@ -249,8 +249,11 @@ static inline void do_perfcnt_IRQ(void)
+ #define LOONGSON_PXARB_CFG		LOONGSON_REG(LOONGSON_REGBASE + 0x68)
+ #define LOONGSON_PXARB_STATUS		LOONGSON_REG(LOONGSON_REGBASE + 0x6c)
+ 
+-/* Chip Config */
+-#define LOONGSON_CHIPCFG0		LOONGSON_REG(LOONGSON_REGBASE + 0x80)
++#define MAX_PACKAGES 4
++
++/* Chip Config registor of each physical cpu package, PRid >= Loongson-2F */
++extern u64 loongson_chipcfg[MAX_PACKAGES];
++#define LOONGSON_CHIPCFG(id) (*(volatile u32 *)(loongson_chipcfg[id]))
+ 
+ /* pcimap */
+ 
+diff --git a/arch/mips/loongson/common/env.c b/arch/mips/loongson/common/env.c
+index 0c543ea..dc59241 100644
+--- a/arch/mips/loongson/common/env.c
++++ b/arch/mips/loongson/common/env.c
+@@ -27,6 +27,8 @@ EXPORT_SYMBOL(cpu_clock_freq);
+ struct efi_memory_map_loongson *loongson_memmap;
+ struct loongson_system_configuration loongson_sysconf;
+ 
++u64 loongson_chipcfg[MAX_PACKAGES] = {0xffffffffbfc00180};
++
+ #define parse_even_earlier(res, option, p)				\
+ do {									\
+ 	unsigned int tmp __maybe_unused;				\
+@@ -77,6 +79,15 @@ void __init prom_init_env(void)
+ 
+ 	cpu_clock_freq = ecpu->cpu_clock_freq;
+ 	loongson_sysconf.cputype = ecpu->cputype;
++	if (ecpu->cputype == Loongson_3A) {
++		loongson_chipcfg[0] = 0x900000001fe00180;
++		loongson_chipcfg[1] = 0x900010001fe00180;
++		loongson_chipcfg[2] = 0x900020001fe00180;
++		loongson_chipcfg[3] = 0x900030001fe00180;
++	} else {
++		loongson_chipcfg[0] = 0x900000001fe00180;
++	}
++
+ 	loongson_sysconf.nr_cpus = ecpu->nr_cpus;
+ 	if (ecpu->nr_cpus > NR_CPUS || ecpu->nr_cpus == 0)
+ 		loongson_sysconf.nr_cpus = NR_CPUS;
+diff --git a/arch/mips/loongson/common/pm.c b/arch/mips/loongson/common/pm.c
+index f55e07a..a6b67cc 100644
+--- a/arch/mips/loongson/common/pm.c
++++ b/arch/mips/loongson/common/pm.c
+@@ -79,7 +79,7 @@ int __weak wakeup_loongson(void)
+ static void wait_for_wakeup_events(void)
+ {
+ 	while (!wakeup_loongson())
+-		LOONGSON_CHIPCFG0 &= ~0x7;
++		LOONGSON_CHIPCFG(0) &= ~0x7;
+ }
+ 
+ /*
+@@ -102,15 +102,15 @@ static void loongson_suspend_enter(void)
+ 
+ 	stop_perf_counters();
+ 
+-	cached_cpu_freq = LOONGSON_CHIPCFG0;
++	cached_cpu_freq = LOONGSON_CHIPCFG(0);
+ 
+ 	/* Put CPU into wait mode */
+-	LOONGSON_CHIPCFG0 &= ~0x7;
++	LOONGSON_CHIPCFG(0) &= ~0x7;
+ 
+ 	/* wait for the given events to wakeup cpu from wait mode */
+ 	wait_for_wakeup_events();
+ 
+-	LOONGSON_CHIPCFG0 = cached_cpu_freq;
++	LOONGSON_CHIPCFG(0) = cached_cpu_freq;
+ 	mmiowb();
+ }
+ 
+diff --git a/arch/mips/loongson/lemote-2f/clock.c b/arch/mips/loongson/lemote-2f/clock.c
+index 1eed38e..a217061 100644
+--- a/arch/mips/loongson/lemote-2f/clock.c
++++ b/arch/mips/loongson/lemote-2f/clock.c
+@@ -114,9 +114,9 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
+ 
+ 	clk->rate = rate;
+ 
+-	regval = LOONGSON_CHIPCFG0;
++	regval = LOONGSON_CHIPCFG(0);
+ 	regval = (regval & ~0x7) | (pos->driver_data - 1);
+-	LOONGSON_CHIPCFG0 = regval;
++	LOONGSON_CHIPCFG(0) = regval;
+ 
+ 	return ret;
+ }
+diff --git a/arch/mips/loongson/lemote-2f/reset.c b/arch/mips/loongson/lemote-2f/reset.c
+index 90962a3..79ac694 100644
+--- a/arch/mips/loongson/lemote-2f/reset.c
++++ b/arch/mips/loongson/lemote-2f/reset.c
+@@ -28,7 +28,7 @@ static void reset_cpu(void)
+ 	 * reset cpu to full speed, this is needed when enabling cpu frequency
+ 	 * scalling
+ 	 */
+-	LOONGSON_CHIPCFG0 |= 0x7;
++	LOONGSON_CHIPCFG(0) |= 0x7;
+ }
+ 
+ /* reset support for fuloong2f */
+diff --git a/arch/mips/loongson/loongson-3/smp.c b/arch/mips/loongson/loongson-3/smp.c
+index 1e88940..3c320e7 100644
+--- a/arch/mips/loongson/loongson-3/smp.c
++++ b/arch/mips/loongson/loongson-3/smp.c
+@@ -399,12 +399,12 @@ static int loongson3_cpu_callback(struct notifier_block *nfb,
+ 	case CPU_POST_DEAD:
+ 	case CPU_POST_DEAD_FROZEN:
+ 		pr_info("Disable clock for CPU#%d\n", cpu);
+-		LOONGSON_CHIPCFG0 &= ~(1 << (12 + cpu));
++		LOONGSON_CHIPCFG(0) &= ~(1 << (12 + cpu));
+ 		break;
+ 	case CPU_UP_PREPARE:
+ 	case CPU_UP_PREPARE_FROZEN:
+ 		pr_info("Enable clock for CPU#%d\n", cpu);
+-		LOONGSON_CHIPCFG0 |= 1 << (12 + cpu);
++		LOONGSON_CHIPCFG(0) |= 1 << (12 + cpu);
+ 		break;
+ 	}
+ 
+diff --git a/drivers/cpufreq/loongson2_cpufreq.c b/drivers/cpufreq/loongson2_cpufreq.c
+index d4add86..9fa1772 100644
+--- a/drivers/cpufreq/loongson2_cpufreq.c
++++ b/drivers/cpufreq/loongson2_cpufreq.c
+@@ -148,9 +148,9 @@ static void loongson2_cpu_wait(void)
+ 	u32 cpu_freq;
+ 
+ 	spin_lock_irqsave(&loongson2_wait_lock, flags);
+-	cpu_freq = LOONGSON_CHIPCFG0;
+-	LOONGSON_CHIPCFG0 &= ~0x7;	/* Put CPU into wait mode */
+-	LOONGSON_CHIPCFG0 = cpu_freq;	/* Restore CPU state */
++	cpu_freq = LOONGSON_CHIPCFG(0);
++	LOONGSON_CHIPCFG(0) &= ~0x7;	/* Put CPU into wait mode */
++	LOONGSON_CHIPCFG(0) = cpu_freq;	/* Restore CPU state */
+ 	spin_unlock_irqrestore(&loongson2_wait_lock, flags);
+ 	local_irq_enable();
+ }
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Loongson-Rename-CONFIG_LEMOTE_MACH3A-to-CONFIG_.patch (from r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Loongson-Rename-CONFIG_LEMOTE_MACH3A-to-CONFIG_.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Loongson-Rename-CONFIG_LEMOTE_MACH3A-to-CONFIG_.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Loongson-Rename-CONFIG_LEMOTE_MACH3A-to-CONFIG_.patch)
@@ -0,0 +1,108 @@
+From: Huacai Chen <chenhc at lemote.com>
+Date: Thu, 26 Jun 2014 11:41:32 +0800
+Subject: [8/8] MIPS: Loongson: Rename CONFIG_LEMOTE_MACH3A to
+ CONFIG_LOONGSON_MACH3X
+Origin: https://git.kernel.org/linus/5a21e0ba3e8996353e6892ccc54b0aab541d9722
+
+Since this CONFIG option will be used for both Loongson-3A/3B machines,
+and not all Loongson-3 machines are produced by Lemote, we rename
+CONFIG_LEMOTE_MACH3A to CONFIG_LOONGSON_MACH3X.
+
+Signed-off-by: Huacai Chen <chenhc at lemote.com>
+Cc: John Crispin <john at phrozen.org>
+Cc: Steven J. Hill <Steven.Hill at imgtec.com>
+Cc: Aurelien Jarno <aurelien at aurel32.net>
+Cc: linux-mips at linux-mips.org
+Cc: Fuxin Zhang <zhangfx at lemote.com>
+Cc: Zhangjin Wu <wuzhangjin at gmail.com>
+Patchwork: https://patchwork.linux-mips.org/patch/7190/
+Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
+---
+ arch/mips/configs/loongson3_defconfig         |    2 +-
+ arch/mips/include/asm/mach-loongson/machine.h |    4 ++--
+ arch/mips/loongson/Kconfig                    |    8 ++++----
+ arch/mips/loongson/Platform                   |    2 +-
+ arch/mips/pci/Makefile                        |    2 +-
+ 5 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/arch/mips/configs/loongson3_defconfig b/arch/mips/configs/loongson3_defconfig
+index ea1761f..130e31b 100644
+--- a/arch/mips/configs/loongson3_defconfig
++++ b/arch/mips/configs/loongson3_defconfig
+@@ -1,6 +1,6 @@
+ CONFIG_MACH_LOONGSON=y
+ CONFIG_SWIOTLB=y
+-CONFIG_LEMOTE_MACH3A=y
++CONFIG_LOONGSON_MACH3X=y
+ CONFIG_CPU_LOONGSON3=y
+ CONFIG_64BIT=y
+ CONFIG_PAGE_SIZE_16KB=y
+diff --git a/arch/mips/include/asm/mach-loongson/machine.h b/arch/mips/include/asm/mach-loongson/machine.h
+index 1b1f592..228e3784 100644
+--- a/arch/mips/include/asm/mach-loongson/machine.h
++++ b/arch/mips/include/asm/mach-loongson/machine.h
+@@ -24,10 +24,10 @@
+ 
+ #endif
+ 
+-#ifdef CONFIG_LEMOTE_MACH3A
++#ifdef CONFIG_LOONGSON_MACH3X
+ 
+ #define LOONGSON_MACHTYPE MACH_LEMOTE_A1101
+ 
+-#endif /* CONFIG_LEMOTE_MACH3A */
++#endif /* CONFIG_LOONGSON_MACH3X */
+ 
+ #endif /* __ASM_MACH_LOONGSON_MACHINE_H */
+diff --git a/arch/mips/loongson/Kconfig b/arch/mips/loongson/Kconfig
+index a14a50d..1b91fc6 100644
+--- a/arch/mips/loongson/Kconfig
++++ b/arch/mips/loongson/Kconfig
+@@ -60,8 +60,8 @@ config LEMOTE_MACH2F
+ 	  These family machines include fuloong2f mini PC, yeeloong2f notebook,
+ 	  LingLoong allinone PC and so forth.
+ 
+-config LEMOTE_MACH3A
+-	bool "Lemote Loongson 3A family machines"
++config LOONGSON_MACH3X
++	bool "Generic Loongson 3 family machines"
+ 	select ARCH_SPARSEMEM_ENABLE
+ 	select GENERIC_ISA_DMA_SUPPORT_BROKEN
+ 	select BOOT_ELF32
+@@ -87,8 +87,8 @@ config LEMOTE_MACH3A
+ 	select ZONE_DMA32
+ 	select LEFI_FIRMWARE_INTERFACE
+ 	help
+-		Lemote Loongson 3A family machines utilize the 3A revision of
+-		Loongson processor and RS780/SBX00 chipset.
++		Generic Loongson 3 family machines utilize the 3A/3B revision
++		of Loongson processor and RS780/SBX00 chipset.
+ endchoice
+ 
+ config CS5536
+diff --git a/arch/mips/loongson/Platform b/arch/mips/loongson/Platform
+index 6205372..0ac20eb 100644
+--- a/arch/mips/loongson/Platform
++++ b/arch/mips/loongson/Platform
+@@ -30,4 +30,4 @@ platform-$(CONFIG_MACH_LOONGSON) += loongson/
+ cflags-$(CONFIG_MACH_LOONGSON) += -I$(srctree)/arch/mips/include/asm/mach-loongson -mno-branch-likely
+ load-$(CONFIG_LEMOTE_FULOONG2E) += 0xffffffff80100000
+ load-$(CONFIG_LEMOTE_MACH2F) += 0xffffffff80200000
+-load-$(CONFIG_CPU_LOONGSON3) += 0xffffffff80200000
++load-$(CONFIG_LOONGSON_MACH3X) += 0xffffffff80200000
+diff --git a/arch/mips/pci/Makefile b/arch/mips/pci/Makefile
+index ff8a553..6523d55 100644
+--- a/arch/mips/pci/Makefile
++++ b/arch/mips/pci/Makefile
+@@ -29,7 +29,7 @@ obj-$(CONFIG_LASAT)		+= pci-lasat.o
+ obj-$(CONFIG_MIPS_COBALT)	+= fixup-cobalt.o
+ obj-$(CONFIG_LEMOTE_FULOONG2E)	+= fixup-fuloong2e.o ops-loongson2.o
+ obj-$(CONFIG_LEMOTE_MACH2F)	+= fixup-lemote2f.o ops-loongson2.o
+-obj-$(CONFIG_LEMOTE_MACH3A)	+= fixup-loongson3.o ops-loongson3.o
++obj-$(CONFIG_LOONGSON_MACH3X)	+= fixup-loongson3.o ops-loongson3.o
+ obj-$(CONFIG_MIPS_MALTA)	+= fixup-malta.o pci-malta.o
+ obj-$(CONFIG_PMC_MSP7120_GW)	+= fixup-pmcmsp.o ops-pmcmsp.o
+ obj-$(CONFIG_PMC_MSP7120_EVAL)	+= fixup-pmcmsp.o ops-pmcmsp.o
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Support-CPU-topology-files-in-sysfs.patch (from r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Support-CPU-topology-files-in-sysfs.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Support-CPU-topology-files-in-sysfs.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Support-CPU-topology-files-in-sysfs.patch)
@@ -0,0 +1,145 @@
+From: Huacai Chen <chenhc at lemote.com>
+Date: Thu, 26 Jun 2014 11:41:26 +0800
+Subject: [2/8] MIPS: Support CPU topology files in sysfs
+Origin: https://git.kernel.org/linus/bda4584cd943d7bb6cf677a8d694700c1984cf3e
+
+This patch is prepared for Loongson's NUMA support, it offer meaningful
+sysfs files such as physical_package_id, core_id, core_siblings and
+thread_siblings in /sys/devices/system/cpu/cpu?/topology.
+
+Signed-off-by: Huacai Chen <chenhc at lemote.com>
+Reviewed-by: Andreas Herrmann <andreas.herrmann at caviumnetworks.com>
+Cc: John Crispin <john at phrozen.org>
+Cc: Steven J. Hill <Steven.Hill at imgtec.com>
+Cc: Aurelien Jarno <aurelien at aurel32.net>
+Cc: linux-mips at linux-mips.org
+Cc: Fuxin Zhang <zhangfx at lemote.com>
+Cc: Zhangjin Wu <wuzhangjin at gmail.com>
+Patchwork: https://patchwork.linux-mips.org/patch/7184/
+Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
+---
+ arch/mips/include/asm/cpu-info.h |    1 +
+ arch/mips/include/asm/smp.h      |    6 ++++++
+ arch/mips/kernel/proc.c          |    1 +
+ arch/mips/kernel/smp.c           |   26 +++++++++++++++++++++++++-
+ 4 files changed, 33 insertions(+), 1 deletion(-)
+
+diff --git a/arch/mips/include/asm/cpu-info.h b/arch/mips/include/asm/cpu-info.h
+index a28e3de..6690d7a 100644
+--- a/arch/mips/include/asm/cpu-info.h
++++ b/arch/mips/include/asm/cpu-info.h
+@@ -61,6 +61,7 @@ struct cpuinfo_mips {
+ 	struct cache_desc	scache; /* Secondary cache */
+ 	struct cache_desc	tcache; /* Tertiary/split secondary cache */
+ 	int			srsets; /* Shadow register sets */
++	int			package;/* physical package number */
+ 	int			core;	/* physical core number */
+ #ifdef CONFIG_64BIT
+ 	int			vmbits; /* Virtual memory size in bits */
+diff --git a/arch/mips/include/asm/smp.h b/arch/mips/include/asm/smp.h
+index b037334..1e0f20a 100644
+--- a/arch/mips/include/asm/smp.h
++++ b/arch/mips/include/asm/smp.h
+@@ -22,6 +22,7 @@
+ 
+ extern int smp_num_siblings;
+ extern cpumask_t cpu_sibling_map[];
++extern cpumask_t cpu_core_map[];
+ 
+ #define raw_smp_processor_id() (current_thread_info()->cpu)
+ 
+@@ -36,6 +37,11 @@ extern int __cpu_logical_map[NR_CPUS];
+ 
+ #define NO_PROC_ID	(-1)
+ 
++#define topology_physical_package_id(cpu)	(cpu_data[cpu].package)
++#define topology_core_id(cpu)			(cpu_data[cpu].core)
++#define topology_core_cpumask(cpu)		(&cpu_core_map[cpu])
++#define topology_thread_cpumask(cpu)		(&cpu_sibling_map[cpu])
++
+ #define SMP_RESCHEDULE_YOURSELF 0x1	/* XXX braindead */
+ #define SMP_CALL_FUNCTION	0x2
+ /* Octeon - Tell another core to flush its icache */
+diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c
+index 037a44d..62c4439 100644
+--- a/arch/mips/kernel/proc.c
++++ b/arch/mips/kernel/proc.c
+@@ -123,6 +123,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
+ 		      cpu_data[n].srsets);
+ 	seq_printf(m, "kscratch registers\t: %d\n",
+ 		      hweight8(cpu_data[n].kscratch_mask));
++	seq_printf(m, "package\t\t\t: %d\n", cpu_data[n].package);
+ 	seq_printf(m, "core\t\t\t: %d\n", cpu_data[n].core);
+ 
+ 	sprintf(fmt, "VCE%%c exceptions\t\t: %s\n",
+diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
+index 9bad52e..c94c4e9 100644
+--- a/arch/mips/kernel/smp.c
++++ b/arch/mips/kernel/smp.c
+@@ -59,9 +59,16 @@ EXPORT_SYMBOL(smp_num_siblings);
+ cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly;
+ EXPORT_SYMBOL(cpu_sibling_map);
+ 
++/* representing the core map of multi-core chips of each logical CPU */
++cpumask_t cpu_core_map[NR_CPUS] __read_mostly;
++EXPORT_SYMBOL(cpu_core_map);
++
+ /* representing cpus for which sibling maps can be computed */
+ static cpumask_t cpu_sibling_setup_map;
+ 
++/* representing cpus for which core maps can be computed */
++static cpumask_t cpu_core_setup_map;
++
+ cpumask_t cpu_coherent_mask;
+ 
+ static inline void set_cpu_sibling_map(int cpu)
+@@ -72,7 +79,8 @@ static inline void set_cpu_sibling_map(int cpu)
+ 
+ 	if (smp_num_siblings > 1) {
+ 		for_each_cpu_mask(i, cpu_sibling_setup_map) {
+-			if (cpu_data[cpu].core == cpu_data[i].core) {
++			if (cpu_data[cpu].package == cpu_data[i].package &&
++				    cpu_data[cpu].core == cpu_data[i].core) {
+ 				cpu_set(i, cpu_sibling_map[cpu]);
+ 				cpu_set(cpu, cpu_sibling_map[i]);
+ 			}
+@@ -81,6 +89,20 @@ static inline void set_cpu_sibling_map(int cpu)
+ 		cpu_set(cpu, cpu_sibling_map[cpu]);
+ }
+ 
++static inline void set_cpu_core_map(int cpu)
++{
++	int i;
++
++	cpu_set(cpu, cpu_core_setup_map);
++
++	for_each_cpu_mask(i, cpu_core_setup_map) {
++		if (cpu_data[cpu].package == cpu_data[i].package) {
++			cpu_set(i, cpu_core_map[cpu]);
++			cpu_set(cpu, cpu_core_map[i]);
++		}
++	}
++}
++
+ struct plat_smp_ops *mp_ops;
+ EXPORT_SYMBOL(mp_ops);
+ 
+@@ -122,6 +144,7 @@ asmlinkage void start_secondary(void)
+ 	set_cpu_online(cpu, true);
+ 
+ 	set_cpu_sibling_map(cpu);
++	set_cpu_core_map(cpu);
+ 
+ 	cpu_set(cpu, cpu_callin_map);
+ 
+@@ -175,6 +198,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
+ 	current_thread_info()->cpu = 0;
+ 	mp_ops->prepare_cpus(max_cpus);
+ 	set_cpu_sibling_map(0);
++	set_cpu_core_map(0);
+ #ifndef CONFIG_HOTPLUG_CPU
+ 	init_cpu_present(cpu_possible_mask);
+ #endif
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Support-hard-limit-of-cpu-count-nr_cpu_ids.patch (from r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Support-hard-limit-of-cpu-count-nr_cpu_ids.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/mips/MIPS-Support-hard-limit-of-cpu-count-nr_cpu_ids.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/mips/MIPS-Support-hard-limit-of-cpu-count-nr_cpu_ids.patch)
@@ -0,0 +1,65 @@
+From: Huacai Chen <chenhc at lemote.com>
+Date: Thu, 26 Jun 2014 11:41:25 +0800
+Subject: [1/8] MIPS: Support hard limit of cpu count (nr_cpu_ids)
+Origin: https://git.kernel.org/linus/0f3f506b275517250ee0169ec075d5382967f5f6
+
+On MIPS currently, only the soft limit of cpu count (maxcpus) has its
+effect, this patch enable the hard limit (nr_cpus) as well. Processor
+cores which greater than maxcpus and less than nr_cpus can be taken up
+via cpu hotplug. The code is borrowed from X86.
+
+Signed-off-by: Huacai Chen <chenhc at lemote.com>
+Reviewed-by: Andreas Herrmann <andreas.herrmann at caviumnetworks.com>
+Cc: John Crispin <john at phrozen.org>
+Cc: Steven J. Hill <Steven.Hill at imgtec.com>
+Cc: Aurelien Jarno <aurelien at aurel32.net>
+Cc: linux-mips at linux-mips.org
+Cc: Fuxin Zhang <zhangfx at lemote.com>
+Cc: Zhangjin Wu <wuzhangjin at gmail.com>
+Patchwork: https://patchwork.linux-mips.org/patch/7183/
+Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
+---
+ arch/mips/kernel/setup.c |   20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
+index a842154..2f01201 100644
+--- a/arch/mips/kernel/setup.c
++++ b/arch/mips/kernel/setup.c
+@@ -729,6 +729,25 @@ static void __init resource_init(void)
+ 	}
+ }
+ 
++#ifdef CONFIG_SMP
++static void __init prefill_possible_map(void)
++{
++	int i, possible = num_possible_cpus();
++
++	if (possible > nr_cpu_ids)
++		possible = nr_cpu_ids;
++
++	for (i = 0; i < possible; i++)
++		set_cpu_possible(i, true);
++	for (; i < NR_CPUS; i++)
++		set_cpu_possible(i, false);
++
++	nr_cpu_ids = possible;
++}
++#else
++static inline void prefill_possible_map(void) {}
++#endif
++
+ void __init setup_arch(char **cmdline_p)
+ {
+ 	cpu_probe();
+@@ -752,6 +771,7 @@ void __init setup_arch(char **cmdline_p)
+ 
+ 	resource_init();
+ 	plat_smp_setup();
++	prefill_possible_map();
+ 
+ 	cpu_cache_init();
+ }
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Allow-KVM_CHECK_EXTENSION-on-the-vm-fd.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-Allow-KVM_CHECK_EXTENSION-on-the-vm-fd.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Allow-KVM_CHECK_EXTENSION-on-the-vm-fd.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-Allow-KVM_CHECK_EXTENSION-on-the-vm-fd.patch)
@@ -0,0 +1,144 @@
+From: Alexander Graf <agraf at suse.de>
+Date: Mon, 14 Jul 2014 18:33:08 +0200
+Subject: KVM: Allow KVM_CHECK_EXTENSION on the vm fd
+Origin: https://git.kernel.org/linus/92b591a4c46b103ebd3fc0d03a084e1efd331253
+
+The KVM_CHECK_EXTENSION is only available on the kvm fd today. Unfortunately
+on PPC some of the capabilities change depending on the way a VM was created.
+
+So instead we need a way to expose capabilities as VM ioctl, so that we can
+see which VM type we're using (HV or PR). To enable this, add the
+KVM_CHECK_EXTENSION ioctl to our vm ioctl portfolio.
+
+Signed-off-by: Alexander Graf <agraf at suse.de>
+Acked-by: Paolo Bonzini <pbonzini at redhat.com>
+---
+ Documentation/virtual/kvm/api.txt |    7 +++--
+ include/uapi/linux/kvm.h          |    1 +
+ virt/kvm/kvm_main.c               |   58 ++++++++++++++++++++-----------------
+ 3 files changed, 37 insertions(+), 29 deletions(-)
+
+diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
+index 884f819..8898caf 100644
+--- a/Documentation/virtual/kvm/api.txt
++++ b/Documentation/virtual/kvm/api.txt
+@@ -148,9 +148,9 @@ of banks, as set via the KVM_X86_SETUP_MCE ioctl.
+ 
+ 4.4 KVM_CHECK_EXTENSION
+ 
+-Capability: basic
++Capability: basic, KVM_CAP_CHECK_EXTENSION_VM for vm ioctl
+ Architectures: all
+-Type: system ioctl
++Type: system ioctl, vm ioctl
+ Parameters: extension identifier (KVM_CAP_*)
+ Returns: 0 if unsupported; 1 (or some other positive integer) if supported
+ 
+@@ -160,6 +160,9 @@ receives an integer that describes the extension availability.
+ Generally 0 means no and 1 means yes, but some extensions may report
+ additional information in the integer return value.
+ 
++Based on their initialization different VMs may have different capabilities.
++It is thus encouraged to use the vm ioctl to query for capabilities (available
++with KVM_CAP_CHECK_EXTENSION_VM on the vm fd)
+ 
+ 4.5 KVM_GET_VCPU_MMAP_SIZE
+ 
+diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
+index 0418b74..51776ca 100644
+--- a/include/uapi/linux/kvm.h
++++ b/include/uapi/linux/kvm.h
+@@ -759,6 +759,7 @@ struct kvm_ppc_smmu_info {
+ #define KVM_CAP_ARM_PSCI_0_2 102
+ #define KVM_CAP_PPC_FIXUP_HCALL 103
+ #define KVM_CAP_PPC_ENABLE_HCALL 104
++#define KVM_CAP_CHECK_EXTENSION_VM 105
+ 
+ #ifdef KVM_CAP_IRQ_ROUTING
+ 
+diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
+index e28f3ca..1b95cc9 100644
+--- a/virt/kvm/kvm_main.c
++++ b/virt/kvm/kvm_main.c
+@@ -2324,6 +2324,34 @@ static int kvm_ioctl_create_device(struct kvm *kvm,
+ 	return 0;
+ }
+ 
++static long kvm_vm_ioctl_check_extension_generic(struct kvm *kvm, long arg)
++{
++	switch (arg) {
++	case KVM_CAP_USER_MEMORY:
++	case KVM_CAP_DESTROY_MEMORY_REGION_WORKS:
++	case KVM_CAP_JOIN_MEMORY_REGIONS_WORKS:
++#ifdef CONFIG_KVM_APIC_ARCHITECTURE
++	case KVM_CAP_SET_BOOT_CPU_ID:
++#endif
++	case KVM_CAP_INTERNAL_ERROR_DATA:
++#ifdef CONFIG_HAVE_KVM_MSI
++	case KVM_CAP_SIGNAL_MSI:
++#endif
++#ifdef CONFIG_HAVE_KVM_IRQ_ROUTING
++	case KVM_CAP_IRQFD_RESAMPLE:
++#endif
++	case KVM_CAP_CHECK_EXTENSION_VM:
++		return 1;
++#ifdef CONFIG_HAVE_KVM_IRQ_ROUTING
++	case KVM_CAP_IRQ_ROUTING:
++		return KVM_MAX_IRQ_ROUTES;
++#endif
++	default:
++		break;
++	}
++	return kvm_vm_ioctl_check_extension(kvm, arg);
++}
++
+ static long kvm_vm_ioctl(struct file *filp,
+ 			   unsigned int ioctl, unsigned long arg)
+ {
+@@ -2487,6 +2515,9 @@ static long kvm_vm_ioctl(struct file *filp,
+ 		r = 0;
+ 		break;
+ 	}
++	case KVM_CHECK_EXTENSION:
++		r = kvm_vm_ioctl_check_extension_generic(kvm, arg);
++		break;
+ 	default:
+ 		r = kvm_arch_vm_ioctl(filp, ioctl, arg);
+ 		if (r == -ENOTTY)
+@@ -2571,33 +2602,6 @@ static int kvm_dev_ioctl_create_vm(unsigned long type)
+ 	return r;
+ }
+ 
+-static long kvm_vm_ioctl_check_extension_generic(struct kvm *kvm, long arg)
+-{
+-	switch (arg) {
+-	case KVM_CAP_USER_MEMORY:
+-	case KVM_CAP_DESTROY_MEMORY_REGION_WORKS:
+-	case KVM_CAP_JOIN_MEMORY_REGIONS_WORKS:
+-#ifdef CONFIG_KVM_APIC_ARCHITECTURE
+-	case KVM_CAP_SET_BOOT_CPU_ID:
+-#endif
+-	case KVM_CAP_INTERNAL_ERROR_DATA:
+-#ifdef CONFIG_HAVE_KVM_MSI
+-	case KVM_CAP_SIGNAL_MSI:
+-#endif
+-#ifdef CONFIG_HAVE_KVM_IRQ_ROUTING
+-	case KVM_CAP_IRQFD_RESAMPLE:
+-#endif
+-		return 1;
+-#ifdef CONFIG_HAVE_KVM_IRQ_ROUTING
+-	case KVM_CAP_IRQ_ROUTING:
+-		return KVM_MAX_IRQ_ROUTES;
+-#endif
+-	default:
+-		break;
+-	}
+-	return kvm_vm_ioctl_check_extension(kvm, arg);
+-}
+-
+ static long kvm_dev_ioctl(struct file *filp,
+ 			  unsigned int ioctl, unsigned long arg)
+ {
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Don-t-keep-reference-to-irq-routing-table-in-irq.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-Don-t-keep-reference-to-irq-routing-table-in-irq.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Don-t-keep-reference-to-irq-routing-table-in-irq.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-Don-t-keep-reference-to-irq-routing-table-in-irq.patch)
@@ -0,0 +1,134 @@
+From: Paul Mackerras <paulus at samba.org>
+Date: Mon, 30 Jun 2014 20:51:09 +1000
+Subject: KVM: Don't keep reference to irq routing table in
+ irqfd struct
+Origin: https://git.kernel.org/linus/56f89f3629ffd1a21d38c3d0bea23deac0e284ce
+
+This makes the irqfd code keep a copy of the irq routing table entry
+for each irqfd, rather than a reference to the copy in the actual
+irq routing table maintained in kvm/virt/irqchip.c.  This will enable
+us to change the routing table structure in future, or even not have a
+routing table at all on some platforms.
+
+The synchronization that was previously achieved using srcu_dereference
+on the read side is now achieved using a seqcount_t structure.  That
+ensures that we don't get a halfway-updated copy of the structure if
+we read it while another thread is updating it.
+
+We still use srcu_read_lock/unlock around the read side so that when
+changing the routing table we can be sure that after calling
+synchronize_srcu, nothing will be using the old routing.
+
+Signed-off-by: Paul Mackerras <paulus at samba.org>
+Tested-by: Eric Auger <eric.auger at linaro.org>
+Tested-by: Cornelia Huck <cornelia.huck at de.ibm.com>
+Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
+---
+ virt/kvm/eventfd.c |   41 +++++++++++++++++++++++++----------------
+ 1 file changed, 25 insertions(+), 16 deletions(-)
+
+diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
+index 20c3af7..bae593a 100644
+--- a/virt/kvm/eventfd.c
++++ b/virt/kvm/eventfd.c
+@@ -33,6 +33,7 @@
+ #include <linux/kernel.h>
+ #include <linux/srcu.h>
+ #include <linux/slab.h>
++#include <linux/seqlock.h>
+ 
+ #include "iodev.h"
+ 
+@@ -75,7 +76,8 @@ struct _irqfd {
+ 	struct kvm *kvm;
+ 	wait_queue_t wait;
+ 	/* Update side is protected by irqfds.lock */
+-	struct kvm_kernel_irq_routing_entry __rcu *irq_entry;
++	struct kvm_kernel_irq_routing_entry irq_entry;
++	seqcount_t irq_entry_sc;
+ 	/* Used for level IRQ fast-path */
+ 	int gsi;
+ 	struct work_struct inject;
+@@ -223,16 +225,20 @@ irqfd_wakeup(wait_queue_t *wait, unsigned mode, int sync, void *key)
+ {
+ 	struct _irqfd *irqfd = container_of(wait, struct _irqfd, wait);
+ 	unsigned long flags = (unsigned long)key;
+-	struct kvm_kernel_irq_routing_entry *irq;
++	struct kvm_kernel_irq_routing_entry irq;
+ 	struct kvm *kvm = irqfd->kvm;
++	unsigned seq;
+ 	int idx;
+ 
+ 	if (flags & POLLIN) {
+ 		idx = srcu_read_lock(&kvm->irq_srcu);
+-		irq = srcu_dereference(irqfd->irq_entry, &kvm->irq_srcu);
++		do {
++			seq = read_seqcount_begin(&irqfd->irq_entry_sc);
++			irq = irqfd->irq_entry;
++		} while (read_seqcount_retry(&irqfd->irq_entry_sc, seq));
+ 		/* An event has been signaled, inject an interrupt */
+-		if (irq)
+-			kvm_set_msi(irq, kvm, KVM_USERSPACE_IRQ_SOURCE_ID, 1,
++		if (irq.type == KVM_IRQ_ROUTING_MSI)
++			kvm_set_msi(&irq, kvm, KVM_USERSPACE_IRQ_SOURCE_ID, 1,
+ 					false);
+ 		else
+ 			schedule_work(&irqfd->inject);
+@@ -277,18 +283,20 @@ static void irqfd_update(struct kvm *kvm, struct _irqfd *irqfd,
+ {
+ 	struct kvm_kernel_irq_routing_entry *e;
+ 
+-	if (irqfd->gsi >= irq_rt->nr_rt_entries) {
+-		rcu_assign_pointer(irqfd->irq_entry, NULL);
+-		return;
+-	}
++	write_seqcount_begin(&irqfd->irq_entry_sc);
++
++	irqfd->irq_entry.type = 0;
++	if (irqfd->gsi >= irq_rt->nr_rt_entries)
++		goto out;
+ 
+ 	hlist_for_each_entry(e, &irq_rt->map[irqfd->gsi], link) {
+ 		/* Only fast-path MSI. */
+ 		if (e->type == KVM_IRQ_ROUTING_MSI)
+-			rcu_assign_pointer(irqfd->irq_entry, e);
+-		else
+-			rcu_assign_pointer(irqfd->irq_entry, NULL);
++			irqfd->irq_entry = *e;
+ 	}
++
++ out:
++	write_seqcount_end(&irqfd->irq_entry_sc);
+ }
+ 
+ static int
+@@ -310,6 +318,7 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args)
+ 	INIT_LIST_HEAD(&irqfd->list);
+ 	INIT_WORK(&irqfd->inject, irqfd_inject);
+ 	INIT_WORK(&irqfd->shutdown, irqfd_shutdown);
++	seqcount_init(&irqfd->irq_entry_sc);
+ 
+ 	f = fdget(args->fd);
+ 	if (!f.file) {
+@@ -466,14 +475,14 @@ kvm_irqfd_deassign(struct kvm *kvm, struct kvm_irqfd *args)
+ 	list_for_each_entry_safe(irqfd, tmp, &kvm->irqfds.items, list) {
+ 		if (irqfd->eventfd == eventfd && irqfd->gsi == args->gsi) {
+ 			/*
+-			 * This rcu_assign_pointer is needed for when
++			 * This clearing of irq_entry.type is needed for when
+ 			 * another thread calls kvm_irq_routing_update before
+ 			 * we flush workqueue below (we synchronize with
+ 			 * kvm_irq_routing_update using irqfds.lock).
+-			 * It is paired with synchronize_srcu done by caller
+-			 * of that function.
+ 			 */
+-			rcu_assign_pointer(irqfd->irq_entry, NULL);
++			write_seqcount_begin(&irqfd->irq_entry_sc);
++			irqfd->irq_entry.type = 0;
++			write_seqcount_end(&irqfd->irq_entry_sc);
+ 			irqfd_deactivate(irqfd);
+ 		}
+ 	}
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Give-IRQFD-its-own-separate-enabling-Kconfig-opt.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-Give-IRQFD-its-own-separate-enabling-Kconfig-opt.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Give-IRQFD-its-own-separate-enabling-Kconfig-opt.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-Give-IRQFD-its-own-separate-enabling-Kconfig-opt.patch)
@@ -0,0 +1,174 @@
+From: Paul Mackerras <paulus at samba.org>
+Date: Mon, 30 Jun 2014 20:51:13 +1000
+Subject: KVM: Give IRQFD its own separate enabling Kconfig
+ option
+Origin: https://git.kernel.org/linus/297e21053a52f060944e9f0de4c64fad9bcd72fc
+
+Currently, the IRQFD code is conditional on CONFIG_HAVE_KVM_IRQ_ROUTING.
+So that we can have the IRQFD code compiled in without having the
+IRQ routing code, this creates a new CONFIG_HAVE_KVM_IRQFD, makes
+the IRQFD code conditional on it instead of CONFIG_HAVE_KVM_IRQ_ROUTING,
+and makes all the platforms that currently select HAVE_KVM_IRQ_ROUTING
+also select HAVE_KVM_IRQFD.
+
+Signed-off-by: Paul Mackerras <paulus at samba.org>
+Tested-by: Eric Auger <eric.auger at linaro.org>
+Tested-by: Cornelia Huck <cornelia.huck at de.ibm.com>
+Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
+---
+ arch/ia64/kvm/Kconfig    |    1 +
+ arch/powerpc/kvm/Kconfig |    1 +
+ arch/s390/kvm/Kconfig    |    1 +
+ arch/x86/kvm/Kconfig     |    1 +
+ include/linux/kvm_host.h |    8 ++++----
+ virt/kvm/Kconfig         |    3 +++
+ virt/kvm/eventfd.c       |    6 +++---
+ virt/kvm/kvm_main.c      |    2 +-
+ 8 files changed, 15 insertions(+), 8 deletions(-)
+
+diff --git a/arch/ia64/kvm/Kconfig b/arch/ia64/kvm/Kconfig
+index 990b864..3d50ea9 100644
+--- a/arch/ia64/kvm/Kconfig
++++ b/arch/ia64/kvm/Kconfig
+@@ -25,6 +25,7 @@ config KVM
+ 	select PREEMPT_NOTIFIERS
+ 	select ANON_INODES
+ 	select HAVE_KVM_IRQCHIP
++	select HAVE_KVM_IRQFD
+ 	select HAVE_KVM_IRQ_ROUTING
+ 	select KVM_APIC_ARCHITECTURE
+ 	select KVM_MMIO
+diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig
+index 8f104a6..d4741db 100644
+--- a/arch/powerpc/kvm/Kconfig
++++ b/arch/powerpc/kvm/Kconfig
+@@ -158,6 +158,7 @@ config KVM_MPIC
+ 	bool "KVM in-kernel MPIC emulation"
+ 	depends on KVM && E500
+ 	select HAVE_KVM_IRQCHIP
++	select HAVE_KVM_IRQFD
+ 	select HAVE_KVM_IRQ_ROUTING
+ 	select HAVE_KVM_MSI
+ 	help
+diff --git a/arch/s390/kvm/Kconfig b/arch/s390/kvm/Kconfig
+index 10d529a..646db9c 100644
+--- a/arch/s390/kvm/Kconfig
++++ b/arch/s390/kvm/Kconfig
+@@ -26,6 +26,7 @@ config KVM
+ 	select KVM_ASYNC_PF
+ 	select KVM_ASYNC_PF_SYNC
+ 	select HAVE_KVM_IRQCHIP
++	select HAVE_KVM_IRQFD
+ 	select HAVE_KVM_IRQ_ROUTING
+ 	---help---
+ 	  Support hosting paravirtualized guest machines using the SIE
+diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig
+index 287e4c8..f9d16ff 100644
+--- a/arch/x86/kvm/Kconfig
++++ b/arch/x86/kvm/Kconfig
+@@ -27,6 +27,7 @@ config KVM
+ 	select MMU_NOTIFIER
+ 	select ANON_INODES
+ 	select HAVE_KVM_IRQCHIP
++	select HAVE_KVM_IRQFD
+ 	select HAVE_KVM_IRQ_ROUTING
+ 	select HAVE_KVM_EVENTFD
+ 	select KVM_APIC_ARCHITECTURE
+diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
+index ddd33e1..8593d2e 100644
+--- a/include/linux/kvm_host.h
++++ b/include/linux/kvm_host.h
+@@ -437,7 +437,7 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vcpu);
+ int __must_check vcpu_load(struct kvm_vcpu *vcpu);
+ void vcpu_put(struct kvm_vcpu *vcpu);
+ 
+-#ifdef CONFIG_HAVE_KVM_IRQ_ROUTING
++#ifdef CONFIG_HAVE_KVM_IRQFD
+ int kvm_irqfd_init(void);
+ void kvm_irqfd_exit(void);
+ #else
+@@ -932,20 +932,20 @@ int kvm_set_routing_entry(struct kvm_kernel_irq_routing_entry *e,
+ 			  const struct kvm_irq_routing_entry *ue);
+ void kvm_free_irq_routing(struct kvm *kvm);
+ 
+-int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi);
+-
+ #else
+ 
+ static inline void kvm_free_irq_routing(struct kvm *kvm) {}
+ 
+ #endif
+ 
++int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi);
++
+ #ifdef CONFIG_HAVE_KVM_EVENTFD
+ 
+ void kvm_eventfd_init(struct kvm *kvm);
+ int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args);
+ 
+-#ifdef CONFIG_HAVE_KVM_IRQCHIP
++#ifdef CONFIG_HAVE_KVM_IRQFD
+ int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args);
+ void kvm_irqfd_release(struct kvm *kvm);
+ void kvm_irq_routing_update(struct kvm *);
+diff --git a/virt/kvm/Kconfig b/virt/kvm/Kconfig
+index 13f2d19..fc0c5e6 100644
+--- a/virt/kvm/Kconfig
++++ b/virt/kvm/Kconfig
+@@ -6,6 +6,9 @@ config HAVE_KVM
+ config HAVE_KVM_IRQCHIP
+        bool
+ 
++config HAVE_KVM_IRQFD
++       bool
++
+ config HAVE_KVM_IRQ_ROUTING
+        bool
+ 
+diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
+index 99957df..f5f6154 100644
+--- a/virt/kvm/eventfd.c
++++ b/virt/kvm/eventfd.c
+@@ -39,7 +39,7 @@
+ #include "irq.h"
+ #include "iodev.h"
+ 
+-#ifdef CONFIG_HAVE_KVM_IRQ_ROUTING
++#ifdef CONFIG_HAVE_KVM_IRQFD
+ /*
+  * --------------------------------------------------------------------
+  * irqfd: Allows an fd to be used to inject an interrupt to the guest
+@@ -450,7 +450,7 @@ out:
+ void
+ kvm_eventfd_init(struct kvm *kvm)
+ {
+-#ifdef CONFIG_HAVE_KVM_IRQ_ROUTING
++#ifdef CONFIG_HAVE_KVM_IRQFD
+ 	spin_lock_init(&kvm->irqfds.lock);
+ 	INIT_LIST_HEAD(&kvm->irqfds.items);
+ 	INIT_LIST_HEAD(&kvm->irqfds.resampler_list);
+@@ -459,7 +459,7 @@ kvm_eventfd_init(struct kvm *kvm)
+ 	INIT_LIST_HEAD(&kvm->ioeventfds);
+ }
+ 
+-#ifdef CONFIG_HAVE_KVM_IRQ_ROUTING
++#ifdef CONFIG_HAVE_KVM_IRQFD
+ /*
+  * shutdown any irqfd's that match fd+gsi
+  */
+diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
+index 1b95cc9..a69a623 100644
+--- a/virt/kvm/kvm_main.c
++++ b/virt/kvm/kvm_main.c
+@@ -2337,7 +2337,7 @@ static long kvm_vm_ioctl_check_extension_generic(struct kvm *kvm, long arg)
+ #ifdef CONFIG_HAVE_KVM_MSI
+ 	case KVM_CAP_SIGNAL_MSI:
+ #endif
+-#ifdef CONFIG_HAVE_KVM_IRQ_ROUTING
++#ifdef CONFIG_HAVE_KVM_IRQFD
+ 	case KVM_CAP_IRQFD_RESAMPLE:
+ #endif
+ 	case KVM_CAP_CHECK_EXTENSION_VM:
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Move-all-accesses-to-kvm-irq_routing-into-irqchi.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-Move-all-accesses-to-kvm-irq_routing-into-irqchi.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Move-all-accesses-to-kvm-irq_routing-into-irqchi.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-Move-all-accesses-to-kvm-irq_routing-into-irqchi.patch)
@@ -0,0 +1,317 @@
+From: Paul Mackerras <paulus at samba.org>
+Date: Mon, 30 Jun 2014 20:51:11 +1000
+Subject: KVM: Move all accesses to kvm::irq_routing into
+ irqchip.c
+Origin: https://git.kernel.org/linus/9957c86d659a4d5a2bed25ccbd3bfc9c3f25e658
+
+Now that struct _irqfd does not keep a reference to storage pointed
+to by the irq_routing field of struct kvm, we can move the statement
+that updates it out from under the irqfds.lock and put it in
+kvm_set_irq_routing() instead.  That means we then have to take a
+srcu_read_lock on kvm->irq_srcu around the irqfd_update call in
+kvm_irqfd_assign(), since holding the kvm->irqfds.lock no longer
+ensures that that the routing can't change.
+
+Combined with changing kvm_irq_map_gsi() and kvm_irq_map_chip_pin()
+to take a struct kvm * argument instead of the pointer to the routing
+table, this allows us to to move all references to kvm->irq_routing
+into irqchip.c.  That in turn allows us to move the definition of the
+kvm_irq_routing_table struct into irqchip.c as well.
+
+Signed-off-by: Paul Mackerras <paulus at samba.org>
+Tested-by: Eric Auger <eric.auger at linaro.org>
+Tested-by: Cornelia Huck <cornelia.huck at de.ibm.com>
+Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
+---
+ include/linux/kvm_host.h |   35 +++++++----------------------------
+ virt/kvm/eventfd.c       |   22 +++++++++-------------
+ virt/kvm/irq_comm.c      |    6 ++----
+ virt/kvm/irqchip.c       |   39 +++++++++++++++++++++++++--------------
+ 4 files changed, 43 insertions(+), 59 deletions(-)
+
+diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
+index 4956149..ddd33e1 100644
+--- a/include/linux/kvm_host.h
++++ b/include/linux/kvm_host.h
+@@ -325,24 +325,7 @@ struct kvm_kernel_irq_routing_entry {
+ 	struct hlist_node link;
+ };
+ 
+-#ifdef CONFIG_HAVE_KVM_IRQ_ROUTING
+-
+-struct kvm_irq_routing_table {
+-	int chip[KVM_NR_IRQCHIPS][KVM_IRQCHIP_NUM_PINS];
+-	struct kvm_kernel_irq_routing_entry *rt_entries;
+-	u32 nr_rt_entries;
+-	/*
+-	 * Array indexed by gsi. Each entry contains list of irq chips
+-	 * the gsi is connected to.
+-	 */
+-	struct hlist_head map[0];
+-};
+-
+-#else
+-
+-struct kvm_irq_routing_table {};
+-
+-#endif
++struct kvm_irq_routing_table;
+ 
+ #ifndef KVM_PRIVATE_MEM_SLOTS
+ #define KVM_PRIVATE_MEM_SLOTS 0
+@@ -401,8 +384,7 @@ struct kvm {
+ 	struct mutex irq_lock;
+ #ifdef CONFIG_HAVE_KVM_IRQCHIP
+ 	/*
+-	 * Update side is protected by irq_lock and,
+-	 * if configured, irqfds.lock.
++	 * Update side is protected by irq_lock.
+ 	 */
+ 	struct kvm_irq_routing_table __rcu *irq_routing;
+ 	struct hlist_head mask_notifier_list;
+@@ -752,10 +734,9 @@ void kvm_unregister_irq_mask_notifier(struct kvm *kvm, int irq,
+ void kvm_fire_mask_notifiers(struct kvm *kvm, unsigned irqchip, unsigned pin,
+ 			     bool mask);
+ 
+-int kvm_irq_map_gsi(struct kvm_kernel_irq_routing_entry *entries,
+-		    struct kvm_irq_routing_table *irq_rt, int gsi);
+-int kvm_irq_map_chip_pin(struct kvm_irq_routing_table *irq_rt,
+-			 unsigned irqchip, unsigned pin);
++int kvm_irq_map_gsi(struct kvm *kvm,
++		    struct kvm_kernel_irq_routing_entry *entries, int gsi);
++int kvm_irq_map_chip_pin(struct kvm *kvm, unsigned irqchip, unsigned pin);
+ 
+ int kvm_set_irq(struct kvm *kvm, int irq_source_id, u32 irq, int level,
+ 		bool line_status);
+@@ -967,7 +948,7 @@ int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args);
+ #ifdef CONFIG_HAVE_KVM_IRQCHIP
+ int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args);
+ void kvm_irqfd_release(struct kvm *kvm);
+-void kvm_irq_routing_update(struct kvm *, struct kvm_irq_routing_table *);
++void kvm_irq_routing_update(struct kvm *);
+ #else
+ static inline int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args)
+ {
+@@ -989,10 +970,8 @@ static inline int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args)
+ static inline void kvm_irqfd_release(struct kvm *kvm) {}
+ 
+ #ifdef CONFIG_HAVE_KVM_IRQCHIP
+-static inline void kvm_irq_routing_update(struct kvm *kvm,
+-					  struct kvm_irq_routing_table *irq_rt)
++static inline void kvm_irq_routing_update(struct kvm *kvm)
+ {
+-	rcu_assign_pointer(kvm->irq_routing, irq_rt);
+ }
+ #endif
+ 
+diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
+index 15fa948..f0075ff 100644
+--- a/virt/kvm/eventfd.c
++++ b/virt/kvm/eventfd.c
+@@ -278,14 +278,13 @@ irqfd_ptable_queue_proc(struct file *file, wait_queue_head_t *wqh,
+ }
+ 
+ /* Must be called under irqfds.lock */
+-static void irqfd_update(struct kvm *kvm, struct _irqfd *irqfd,
+-			 struct kvm_irq_routing_table *irq_rt)
++static void irqfd_update(struct kvm *kvm, struct _irqfd *irqfd)
+ {
+ 	struct kvm_kernel_irq_routing_entry *e;
+ 	struct kvm_kernel_irq_routing_entry entries[KVM_NR_IRQCHIPS];
+ 	int i, n_entries;
+ 
+-	n_entries = kvm_irq_map_gsi(entries, irq_rt, irqfd->gsi);
++	n_entries = kvm_irq_map_gsi(kvm, entries, irqfd->gsi);
+ 
+ 	write_seqcount_begin(&irqfd->irq_entry_sc);
+ 
+@@ -304,12 +303,12 @@ static void irqfd_update(struct kvm *kvm, struct _irqfd *irqfd,
+ static int
+ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args)
+ {
+-	struct kvm_irq_routing_table *irq_rt;
+ 	struct _irqfd *irqfd, *tmp;
+ 	struct fd f;
+ 	struct eventfd_ctx *eventfd = NULL, *resamplefd = NULL;
+ 	int ret;
+ 	unsigned int events;
++	int idx;
+ 
+ 	irqfd = kzalloc(sizeof(*irqfd), GFP_KERNEL);
+ 	if (!irqfd)
+@@ -403,9 +402,9 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args)
+ 		goto fail;
+ 	}
+ 
+-	irq_rt = rcu_dereference_protected(kvm->irq_routing,
+-					   lockdep_is_held(&kvm->irqfds.lock));
+-	irqfd_update(kvm, irqfd, irq_rt);
++	idx = srcu_read_lock(&kvm->irq_srcu);
++	irqfd_update(kvm, irqfd);
++	srcu_read_unlock(&kvm->irq_srcu, idx);
+ 
+ 	list_add_tail(&irqfd->list, &kvm->irqfds.items);
+ 
+@@ -539,20 +538,17 @@ kvm_irqfd_release(struct kvm *kvm)
+ }
+ 
+ /*
+- * Change irq_routing and irqfd.
++ * Take note of a change in irq routing.
+  * Caller must invoke synchronize_srcu(&kvm->irq_srcu) afterwards.
+  */
+-void kvm_irq_routing_update(struct kvm *kvm,
+-			    struct kvm_irq_routing_table *irq_rt)
++void kvm_irq_routing_update(struct kvm *kvm)
+ {
+ 	struct _irqfd *irqfd;
+ 
+ 	spin_lock_irq(&kvm->irqfds.lock);
+ 
+-	rcu_assign_pointer(kvm->irq_routing, irq_rt);
+-
+ 	list_for_each_entry(irqfd, &kvm->irqfds.items, list)
+-		irqfd_update(kvm, irqfd, irq_rt);
++		irqfd_update(kvm, irqfd);
+ 
+ 	spin_unlock_irq(&kvm->irqfds.lock);
+ }
+diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c
+index 1758445..963b899 100644
+--- a/virt/kvm/irq_comm.c
++++ b/virt/kvm/irq_comm.c
+@@ -163,7 +163,6 @@ int kvm_set_irq_inatomic(struct kvm *kvm, int irq_source_id, u32 irq, int level)
+ 	struct kvm_kernel_irq_routing_entry entries[KVM_NR_IRQCHIPS];
+ 	struct kvm_kernel_irq_routing_entry *e;
+ 	int ret = -EINVAL;
+-	struct kvm_irq_routing_table *irq_rt;
+ 	int idx;
+ 
+ 	trace_kvm_set_irq(irq, level, irq_source_id);
+@@ -177,8 +176,7 @@ int kvm_set_irq_inatomic(struct kvm *kvm, int irq_source_id, u32 irq, int level)
+ 	 * which is limited to 1:1 GSI mapping.
+ 	 */
+ 	idx = srcu_read_lock(&kvm->irq_srcu);
+-	irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
+-	if (kvm_irq_map_gsi(entries, irq_rt, irq) > 0) {
++	if (kvm_irq_map_gsi(kvm, entries, irq) > 0) {
+ 		e = &entries[0];
+ 		if (likely(e->type == KVM_IRQ_ROUTING_MSI))
+ 			ret = kvm_set_msi_inatomic(e, kvm);
+@@ -264,7 +262,7 @@ void kvm_fire_mask_notifiers(struct kvm *kvm, unsigned irqchip, unsigned pin,
+ 	int idx, gsi;
+ 
+ 	idx = srcu_read_lock(&kvm->irq_srcu);
+-	gsi = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu)->chip[irqchip][pin];
++	gsi = kvm_irq_map_chip_pin(kvm, irqchip, pin);
+ 	if (gsi != -1)
+ 		hlist_for_each_entry_rcu(kimn, &kvm->mask_notifier_list, link)
+ 			if (kimn->irq == gsi)
+diff --git a/virt/kvm/irqchip.c b/virt/kvm/irqchip.c
+index f4648dd..04faac5 100644
+--- a/virt/kvm/irqchip.c
++++ b/virt/kvm/irqchip.c
+@@ -31,12 +31,26 @@
+ #include <trace/events/kvm.h>
+ #include "irq.h"
+ 
+-int kvm_irq_map_gsi(struct kvm_kernel_irq_routing_entry *entries,
+-		    struct kvm_irq_routing_table *irq_rt, int gsi)
++struct kvm_irq_routing_table {
++	int chip[KVM_NR_IRQCHIPS][KVM_IRQCHIP_NUM_PINS];
++	struct kvm_kernel_irq_routing_entry *rt_entries;
++	u32 nr_rt_entries;
++	/*
++	 * Array indexed by gsi. Each entry contains list of irq chips
++	 * the gsi is connected to.
++	 */
++	struct hlist_head map[0];
++};
++
++int kvm_irq_map_gsi(struct kvm *kvm,
++		    struct kvm_kernel_irq_routing_entry *entries, int gsi)
+ {
++	struct kvm_irq_routing_table *irq_rt;
+ 	struct kvm_kernel_irq_routing_entry *e;
+ 	int n = 0;
+ 
++	irq_rt = srcu_dereference_check(kvm->irq_routing, &kvm->irq_srcu,
++					lockdep_is_held(&kvm->irq_lock));
+ 	if (gsi < irq_rt->nr_rt_entries) {
+ 		hlist_for_each_entry(e, &irq_rt->map[gsi], link) {
+ 			entries[n] = *e;
+@@ -47,21 +61,21 @@ int kvm_irq_map_gsi(struct kvm_kernel_irq_routing_entry *entries,
+ 	return n;
+ }
+ 
+-int kvm_irq_map_chip_pin(struct kvm_irq_routing_table *irq_rt,
+-			 unsigned irqchip, unsigned pin)
++int kvm_irq_map_chip_pin(struct kvm *kvm, unsigned irqchip, unsigned pin)
+ {
++	struct kvm_irq_routing_table *irq_rt;
++
++	irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
+ 	return irq_rt->chip[irqchip][pin];
+ }
+ 
+ bool kvm_irq_has_notifier(struct kvm *kvm, unsigned irqchip, unsigned pin)
+ {
+-	struct kvm_irq_routing_table *irq_rt;
+ 	struct kvm_irq_ack_notifier *kian;
+ 	int gsi, idx;
+ 
+ 	idx = srcu_read_lock(&kvm->irq_srcu);
+-	irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
+-	gsi = kvm_irq_map_chip_pin(irq_rt, irqchip, pin);
++	gsi = kvm_irq_map_chip_pin(kvm, irqchip, pin);
+ 	if (gsi != -1)
+ 		hlist_for_each_entry_rcu(kian, &kvm->irq_ack_notifier_list,
+ 					 link)
+@@ -78,15 +92,13 @@ EXPORT_SYMBOL_GPL(kvm_irq_has_notifier);
+ 
+ void kvm_notify_acked_irq(struct kvm *kvm, unsigned irqchip, unsigned pin)
+ {
+-	struct kvm_irq_routing_table *irq_rt;
+ 	struct kvm_irq_ack_notifier *kian;
+ 	int gsi, idx;
+ 
+ 	trace_kvm_ack_irq(irqchip, pin);
+ 
+ 	idx = srcu_read_lock(&kvm->irq_srcu);
+-	irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
+-	gsi = kvm_irq_map_chip_pin(irq_rt, irqchip, pin);
++	gsi = kvm_irq_map_chip_pin(kvm, irqchip, pin);
+ 	if (gsi != -1)
+ 		hlist_for_each_entry_rcu(kian, &kvm->irq_ack_notifier_list,
+ 					 link)
+@@ -143,7 +155,6 @@ int kvm_set_irq(struct kvm *kvm, int irq_source_id, u32 irq, int level,
+ {
+ 	struct kvm_kernel_irq_routing_entry irq_set[KVM_NR_IRQCHIPS];
+ 	int ret = -1, i, idx;
+-	struct kvm_irq_routing_table *irq_rt;
+ 
+ 	trace_kvm_set_irq(irq, level, irq_source_id);
+ 
+@@ -152,8 +163,7 @@ int kvm_set_irq(struct kvm *kvm, int irq_source_id, u32 irq, int level,
+ 	 * writes to the unused one.
+ 	 */
+ 	idx = srcu_read_lock(&kvm->irq_srcu);
+-	irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
+-	i = kvm_irq_map_gsi(irq_set, irq_rt, irq);
++	i = kvm_irq_map_gsi(kvm, irq_set, irq);
+ 	srcu_read_unlock(&kvm->irq_srcu, idx);
+ 
+ 	while(i--) {
+@@ -250,7 +260,8 @@ int kvm_set_irq_routing(struct kvm *kvm,
+ 
+ 	mutex_lock(&kvm->irq_lock);
+ 	old = kvm->irq_routing;
+-	kvm_irq_routing_update(kvm, new);
++	rcu_assign_pointer(kvm->irq_routing, new);
++	kvm_irq_routing_update(kvm);
+ 	mutex_unlock(&kvm->irq_lock);
+ 
+ 	synchronize_srcu_expedited(&kvm->irq_srcu);
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Move-irq-notifier-implementation-into-eventfd.c.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-Move-irq-notifier-implementation-into-eventfd.c.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Move-irq-notifier-implementation-into-eventfd.c.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-Move-irq-notifier-implementation-into-eventfd.c.patch)
@@ -0,0 +1,177 @@
+From: Paul Mackerras <paulus at samba.org>
+Date: Mon, 30 Jun 2014 20:51:12 +1000
+Subject: KVM: Move irq notifier implementation into eventfd.c
+Origin: https://git.kernel.org/linus/e4d57e1ee1ab59f0cef0272800ac6c52e0ec814a
+
+This moves the functions kvm_irq_has_notifier(), kvm_notify_acked_irq(),
+kvm_register_irq_ack_notifier() and kvm_unregister_irq_ack_notifier()
+from irqchip.c to eventfd.c.  The reason for doing this is that those
+functions are used in connection with IRQFDs, which are implemented in
+eventfd.c.  In future we will want to use IRQFDs on platforms that
+don't implement the GSI routing implemented in irqchip.c, so we won't
+be compiling in irqchip.c, but we still need the irq notifiers.  The
+implementation is unchanged.
+
+Signed-off-by: Paul Mackerras <paulus at samba.org>
+Tested-by: Eric Auger <eric.auger at linaro.org>
+Tested-by: Cornelia Huck <cornelia.huck at de.ibm.com>
+Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
+---
+ virt/kvm/eventfd.c |   63 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ virt/kvm/irqchip.c |   61 --------------------------------------------------
+ 2 files changed, 63 insertions(+), 61 deletions(-)
+
+diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
+index f0075ff..99957df 100644
+--- a/virt/kvm/eventfd.c
++++ b/virt/kvm/eventfd.c
+@@ -34,7 +34,9 @@
+ #include <linux/srcu.h>
+ #include <linux/slab.h>
+ #include <linux/seqlock.h>
++#include <trace/events/kvm.h>
+ 
++#include "irq.h"
+ #include "iodev.h"
+ 
+ #ifdef CONFIG_HAVE_KVM_IRQ_ROUTING
+@@ -865,3 +867,64 @@ kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args)
+ 
+ 	return kvm_assign_ioeventfd(kvm, args);
+ }
++
++bool kvm_irq_has_notifier(struct kvm *kvm, unsigned irqchip, unsigned pin)
++{
++	struct kvm_irq_ack_notifier *kian;
++	int gsi, idx;
++
++	idx = srcu_read_lock(&kvm->irq_srcu);
++	gsi = kvm_irq_map_chip_pin(kvm, irqchip, pin);
++	if (gsi != -1)
++		hlist_for_each_entry_rcu(kian, &kvm->irq_ack_notifier_list,
++					 link)
++			if (kian->gsi == gsi) {
++				srcu_read_unlock(&kvm->irq_srcu, idx);
++				return true;
++			}
++
++	srcu_read_unlock(&kvm->irq_srcu, idx);
++
++	return false;
++}
++EXPORT_SYMBOL_GPL(kvm_irq_has_notifier);
++
++void kvm_notify_acked_irq(struct kvm *kvm, unsigned irqchip, unsigned pin)
++{
++	struct kvm_irq_ack_notifier *kian;
++	int gsi, idx;
++
++	trace_kvm_ack_irq(irqchip, pin);
++
++	idx = srcu_read_lock(&kvm->irq_srcu);
++	gsi = kvm_irq_map_chip_pin(kvm, irqchip, pin);
++	if (gsi != -1)
++		hlist_for_each_entry_rcu(kian, &kvm->irq_ack_notifier_list,
++					 link)
++			if (kian->gsi == gsi)
++				kian->irq_acked(kian);
++	srcu_read_unlock(&kvm->irq_srcu, idx);
++}
++
++void kvm_register_irq_ack_notifier(struct kvm *kvm,
++				   struct kvm_irq_ack_notifier *kian)
++{
++	mutex_lock(&kvm->irq_lock);
++	hlist_add_head_rcu(&kian->link, &kvm->irq_ack_notifier_list);
++	mutex_unlock(&kvm->irq_lock);
++#ifdef __KVM_HAVE_IOAPIC
++	kvm_vcpu_request_scan_ioapic(kvm);
++#endif
++}
++
++void kvm_unregister_irq_ack_notifier(struct kvm *kvm,
++				    struct kvm_irq_ack_notifier *kian)
++{
++	mutex_lock(&kvm->irq_lock);
++	hlist_del_init_rcu(&kian->link);
++	mutex_unlock(&kvm->irq_lock);
++	synchronize_srcu(&kvm->irq_srcu);
++#ifdef __KVM_HAVE_IOAPIC
++	kvm_vcpu_request_scan_ioapic(kvm);
++#endif
++}
+diff --git a/virt/kvm/irqchip.c b/virt/kvm/irqchip.c
+index 04faac5..7f256f3 100644
+--- a/virt/kvm/irqchip.c
++++ b/virt/kvm/irqchip.c
+@@ -69,67 +69,6 @@ int kvm_irq_map_chip_pin(struct kvm *kvm, unsigned irqchip, unsigned pin)
+ 	return irq_rt->chip[irqchip][pin];
+ }
+ 
+-bool kvm_irq_has_notifier(struct kvm *kvm, unsigned irqchip, unsigned pin)
+-{
+-	struct kvm_irq_ack_notifier *kian;
+-	int gsi, idx;
+-
+-	idx = srcu_read_lock(&kvm->irq_srcu);
+-	gsi = kvm_irq_map_chip_pin(kvm, irqchip, pin);
+-	if (gsi != -1)
+-		hlist_for_each_entry_rcu(kian, &kvm->irq_ack_notifier_list,
+-					 link)
+-			if (kian->gsi == gsi) {
+-				srcu_read_unlock(&kvm->irq_srcu, idx);
+-				return true;
+-			}
+-
+-	srcu_read_unlock(&kvm->irq_srcu, idx);
+-
+-	return false;
+-}
+-EXPORT_SYMBOL_GPL(kvm_irq_has_notifier);
+-
+-void kvm_notify_acked_irq(struct kvm *kvm, unsigned irqchip, unsigned pin)
+-{
+-	struct kvm_irq_ack_notifier *kian;
+-	int gsi, idx;
+-
+-	trace_kvm_ack_irq(irqchip, pin);
+-
+-	idx = srcu_read_lock(&kvm->irq_srcu);
+-	gsi = kvm_irq_map_chip_pin(kvm, irqchip, pin);
+-	if (gsi != -1)
+-		hlist_for_each_entry_rcu(kian, &kvm->irq_ack_notifier_list,
+-					 link)
+-			if (kian->gsi == gsi)
+-				kian->irq_acked(kian);
+-	srcu_read_unlock(&kvm->irq_srcu, idx);
+-}
+-
+-void kvm_register_irq_ack_notifier(struct kvm *kvm,
+-				   struct kvm_irq_ack_notifier *kian)
+-{
+-	mutex_lock(&kvm->irq_lock);
+-	hlist_add_head_rcu(&kian->link, &kvm->irq_ack_notifier_list);
+-	mutex_unlock(&kvm->irq_lock);
+-#ifdef __KVM_HAVE_IOAPIC
+-	kvm_vcpu_request_scan_ioapic(kvm);
+-#endif
+-}
+-
+-void kvm_unregister_irq_ack_notifier(struct kvm *kvm,
+-				    struct kvm_irq_ack_notifier *kian)
+-{
+-	mutex_lock(&kvm->irq_lock);
+-	hlist_del_init_rcu(&kian->link);
+-	mutex_unlock(&kvm->irq_lock);
+-	synchronize_srcu(&kvm->irq_srcu);
+-#ifdef __KVM_HAVE_IOAPIC
+-	kvm_vcpu_request_scan_ioapic(kvm);
+-#endif
+-}
+-
+ int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi)
+ {
+ 	struct kvm_kernel_irq_routing_entry route;
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Move-more-code-under-CONFIG_HAVE_KVM_IRQFD.patch (from r21884, dists/sid/linux/debian/patches/features/powerpc/KVM-Move-more-code-under-CONFIG_HAVE_KVM_IRQFD.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Move-more-code-under-CONFIG_HAVE_KVM_IRQFD.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21884, dists/sid/linux/debian/patches/features/powerpc/KVM-Move-more-code-under-CONFIG_HAVE_KVM_IRQFD.patch)
@@ -0,0 +1,231 @@
+From: Paolo Bonzini <pbonzini at redhat.com>
+Date: Wed, 6 Aug 2014 14:24:45 +0200
+Subject: KVM: Move more code under CONFIG_HAVE_KVM_IRQFD
+Origin: https://git.kernel.org/linus/c77dcacb397519b6ade8f08201a4a90a7f4f751e
+
+Commits e4d57e1ee1ab (KVM: Move irq notifier implementation into
+eventfd.c, 2014-06-30) included the irq notifier code unconditionally
+in eventfd.c, while it was under CONFIG_HAVE_KVM_IRQCHIP before.
+
+Similarly, commit 297e21053a52 (KVM: Give IRQFD its own separate enabling
+Kconfig option, 2014-06-30) moved code from CONFIG_HAVE_IRQ_ROUTING
+to CONFIG_HAVE_KVM_IRQFD but forgot to move the pieces that used to be
+under CONFIG_HAVE_KVM_IRQCHIP.
+
+Together, this broke compilation without CONFIG_KVM_XICS.  Fix by adding
+or changing the #ifdefs so that they point at CONFIG_HAVE_KVM_IRQFD.
+
+Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
+---
+ include/linux/kvm_host.h   |   2 +
+ include/trace/events/kvm.h |   8 +--
+ virt/kvm/eventfd.c         | 122 ++++++++++++++++++++++-----------------------
+ virt/kvm/kvm_main.c        |   2 +
+ 4 files changed, 69 insertions(+), 65 deletions(-)
+
+diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
+index 8593d2e..a4c33b3 100644
+--- a/include/linux/kvm_host.h
++++ b/include/linux/kvm_host.h
+@@ -388,6 +388,8 @@ struct kvm {
+ 	 */
+ 	struct kvm_irq_routing_table __rcu *irq_routing;
+ 	struct hlist_head mask_notifier_list;
++#endif
++#ifdef CONFIG_HAVE_KVM_IRQFD
+ 	struct hlist_head irq_ack_notifier_list;
+ #endif
+ 
+diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
+index 131a0bd..908925a 100644
+--- a/include/trace/events/kvm.h
++++ b/include/trace/events/kvm.h
+@@ -37,7 +37,7 @@ TRACE_EVENT(kvm_userspace_exit,
+ 		  __entry->errno < 0 ? -__entry->errno : __entry->reason)
+ );
+ 
+-#if defined(CONFIG_HAVE_KVM_IRQCHIP)
++#if defined(CONFIG_HAVE_KVM_IRQFD)
+ TRACE_EVENT(kvm_set_irq,
+ 	TP_PROTO(unsigned int gsi, int level, int irq_source_id),
+ 	TP_ARGS(gsi, level, irq_source_id),
+@@ -57,7 +57,7 @@ TRACE_EVENT(kvm_set_irq,
+ 	TP_printk("gsi %u level %d source %d",
+ 		  __entry->gsi, __entry->level, __entry->irq_source_id)
+ );
+-#endif
++#endif /* defined(CONFIG_HAVE_KVM_IRQFD) */
+ 
+ #if defined(__KVM_HAVE_IOAPIC)
+ #define kvm_deliver_mode		\
+@@ -124,7 +124,7 @@ TRACE_EVENT(kvm_msi_set_irq,
+ 
+ #endif /* defined(__KVM_HAVE_IOAPIC) */
+ 
+-#if defined(CONFIG_HAVE_KVM_IRQCHIP)
++#if defined(CONFIG_HAVE_KVM_IRQFD)
+ 
+ TRACE_EVENT(kvm_ack_irq,
+ 	TP_PROTO(unsigned int irqchip, unsigned int pin),
+@@ -149,7 +149,7 @@ TRACE_EVENT(kvm_ack_irq,
+ #endif
+ );
+ 
+-#endif /* defined(CONFIG_HAVE_KVM_IRQCHIP) */
++#endif /* defined(CONFIG_HAVE_KVM_IRQFD) */
+ 
+ 
+ 
+diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
+index f5f6154..3c5981c 100644
+--- a/virt/kvm/eventfd.c
++++ b/virt/kvm/eventfd.c
+@@ -445,6 +445,67 @@ out:
+ 	kfree(irqfd);
+ 	return ret;
+ }
++
++bool kvm_irq_has_notifier(struct kvm *kvm, unsigned irqchip, unsigned pin)
++{
++	struct kvm_irq_ack_notifier *kian;
++	int gsi, idx;
++
++	idx = srcu_read_lock(&kvm->irq_srcu);
++	gsi = kvm_irq_map_chip_pin(kvm, irqchip, pin);
++	if (gsi != -1)
++		hlist_for_each_entry_rcu(kian, &kvm->irq_ack_notifier_list,
++					 link)
++			if (kian->gsi == gsi) {
++				srcu_read_unlock(&kvm->irq_srcu, idx);
++				return true;
++			}
++
++	srcu_read_unlock(&kvm->irq_srcu, idx);
++
++	return false;
++}
++EXPORT_SYMBOL_GPL(kvm_irq_has_notifier);
++
++void kvm_notify_acked_irq(struct kvm *kvm, unsigned irqchip, unsigned pin)
++{
++	struct kvm_irq_ack_notifier *kian;
++	int gsi, idx;
++
++	trace_kvm_ack_irq(irqchip, pin);
++
++	idx = srcu_read_lock(&kvm->irq_srcu);
++	gsi = kvm_irq_map_chip_pin(kvm, irqchip, pin);
++	if (gsi != -1)
++		hlist_for_each_entry_rcu(kian, &kvm->irq_ack_notifier_list,
++					 link)
++			if (kian->gsi == gsi)
++				kian->irq_acked(kian);
++	srcu_read_unlock(&kvm->irq_srcu, idx);
++}
++
++void kvm_register_irq_ack_notifier(struct kvm *kvm,
++				   struct kvm_irq_ack_notifier *kian)
++{
++	mutex_lock(&kvm->irq_lock);
++	hlist_add_head_rcu(&kian->link, &kvm->irq_ack_notifier_list);
++	mutex_unlock(&kvm->irq_lock);
++#ifdef __KVM_HAVE_IOAPIC
++	kvm_vcpu_request_scan_ioapic(kvm);
++#endif
++}
++
++void kvm_unregister_irq_ack_notifier(struct kvm *kvm,
++				    struct kvm_irq_ack_notifier *kian)
++{
++	mutex_lock(&kvm->irq_lock);
++	hlist_del_init_rcu(&kian->link);
++	mutex_unlock(&kvm->irq_lock);
++	synchronize_srcu(&kvm->irq_srcu);
++#ifdef __KVM_HAVE_IOAPIC
++	kvm_vcpu_request_scan_ioapic(kvm);
++#endif
++}
+ #endif
+ 
+ void
+@@ -867,64 +928,3 @@ kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args)
+ 
+ 	return kvm_assign_ioeventfd(kvm, args);
+ }
+-
+-bool kvm_irq_has_notifier(struct kvm *kvm, unsigned irqchip, unsigned pin)
+-{
+-	struct kvm_irq_ack_notifier *kian;
+-	int gsi, idx;
+-
+-	idx = srcu_read_lock(&kvm->irq_srcu);
+-	gsi = kvm_irq_map_chip_pin(kvm, irqchip, pin);
+-	if (gsi != -1)
+-		hlist_for_each_entry_rcu(kian, &kvm->irq_ack_notifier_list,
+-					 link)
+-			if (kian->gsi == gsi) {
+-				srcu_read_unlock(&kvm->irq_srcu, idx);
+-				return true;
+-			}
+-
+-	srcu_read_unlock(&kvm->irq_srcu, idx);
+-
+-	return false;
+-}
+-EXPORT_SYMBOL_GPL(kvm_irq_has_notifier);
+-
+-void kvm_notify_acked_irq(struct kvm *kvm, unsigned irqchip, unsigned pin)
+-{
+-	struct kvm_irq_ack_notifier *kian;
+-	int gsi, idx;
+-
+-	trace_kvm_ack_irq(irqchip, pin);
+-
+-	idx = srcu_read_lock(&kvm->irq_srcu);
+-	gsi = kvm_irq_map_chip_pin(kvm, irqchip, pin);
+-	if (gsi != -1)
+-		hlist_for_each_entry_rcu(kian, &kvm->irq_ack_notifier_list,
+-					 link)
+-			if (kian->gsi == gsi)
+-				kian->irq_acked(kian);
+-	srcu_read_unlock(&kvm->irq_srcu, idx);
+-}
+-
+-void kvm_register_irq_ack_notifier(struct kvm *kvm,
+-				   struct kvm_irq_ack_notifier *kian)
+-{
+-	mutex_lock(&kvm->irq_lock);
+-	hlist_add_head_rcu(&kian->link, &kvm->irq_ack_notifier_list);
+-	mutex_unlock(&kvm->irq_lock);
+-#ifdef __KVM_HAVE_IOAPIC
+-	kvm_vcpu_request_scan_ioapic(kvm);
+-#endif
+-}
+-
+-void kvm_unregister_irq_ack_notifier(struct kvm *kvm,
+-				    struct kvm_irq_ack_notifier *kian)
+-{
+-	mutex_lock(&kvm->irq_lock);
+-	hlist_del_init_rcu(&kian->link);
+-	mutex_unlock(&kvm->irq_lock);
+-	synchronize_srcu(&kvm->irq_srcu);
+-#ifdef __KVM_HAVE_IOAPIC
+-	kvm_vcpu_request_scan_ioapic(kvm);
+-#endif
+-}
+diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
+index a69a623..33712fb 100644
+--- a/virt/kvm/kvm_main.c
++++ b/virt/kvm/kvm_main.c
+@@ -465,6 +465,8 @@ static struct kvm *kvm_create_vm(unsigned long type)
+ 
+ #ifdef CONFIG_HAVE_KVM_IRQCHIP
+ 	INIT_HLIST_HEAD(&kvm->mask_notifier_list);
++#endif
++#ifdef CONFIG_HAVE_KVM_IRQFD
+ 	INIT_HLIST_HEAD(&kvm->irq_ack_notifier_list);
+ #endif
+ 
+-- 
+2.0.0
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-Controls-for-in-kernel-sPAPR-hypercal.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-Controls-for-in-kernel-sPAPR-hypercal.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-Controls-for-in-kernel-sPAPR-hypercal.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-Controls-for-in-kernel-sPAPR-hypercal.patch)
@@ -0,0 +1,422 @@
+From: Paul Mackerras <paulus at samba.org>
+Date: Mon, 2 Jun 2014 11:02:59 +1000
+Subject: KVM: PPC: Book3S: Controls for in-kernel sPAPR
+ hypercall handling
+Origin: https://git.kernel.org/linus/699a0ea0823d32030b0666b28ff8633960f7ffa7
+
+This provides a way for userspace controls which sPAPR hcalls get
+handled in the kernel.  Each hcall can be individually enabled or
+disabled for in-kernel handling, except for H_RTAS.  The exception
+for H_RTAS is because userspace can already control whether
+individual RTAS functions are handled in-kernel or not via the
+KVM_PPC_RTAS_DEFINE_TOKEN ioctl, and because the numeric value for
+H_RTAS is out of the normal sequence of hcall numbers.
+
+Hcalls are enabled or disabled using the KVM_ENABLE_CAP ioctl for the
+KVM_CAP_PPC_ENABLE_HCALL capability on the file descriptor for the VM.
+The args field of the struct kvm_enable_cap specifies the hcall number
+in args[0] and the enable/disable flag in args[1]; 0 means disable
+in-kernel handling (so that the hcall will always cause an exit to
+userspace) and 1 means enable.  Enabling or disabling in-kernel
+handling of an hcall is effective across the whole VM.
+
+The ability for KVM_ENABLE_CAP to be used on a VM file descriptor
+on PowerPC is new, added by this commit.  The KVM_CAP_ENABLE_CAP_VM
+capability advertises that this ability exists.
+
+When a VM is created, an initial set of hcalls are enabled for
+in-kernel handling.  The set that is enabled is the set that have
+an in-kernel implementation at this point.  Any new hcall
+implementations from this point onwards should not be added to the
+default set without a good reason.
+
+No distinction is made between real-mode and virtual-mode hcall
+implementations; the one setting controls them both.
+
+Signed-off-by: Paul Mackerras <paulus at samba.org>
+Signed-off-by: Alexander Graf <agraf at suse.de>
+---
+ Documentation/virtual/kvm/api.txt       |   41 +++++++++++++++++++++++--
+ arch/powerpc/include/asm/kvm_book3s.h   |    1 +
+ arch/powerpc/include/asm/kvm_host.h     |    2 ++
+ arch/powerpc/kernel/asm-offsets.c       |    1 +
+ arch/powerpc/kvm/book3s_hv.c            |   51 +++++++++++++++++++++++++++++++
+ arch/powerpc/kvm/book3s_hv_rmhandlers.S |   11 +++++++
+ arch/powerpc/kvm/book3s_pr.c            |    5 +++
+ arch/powerpc/kvm/book3s_pr_papr.c       |   37 ++++++++++++++++++++++
+ arch/powerpc/kvm/powerpc.c              |   45 +++++++++++++++++++++++++++
+ include/uapi/linux/kvm.h                |    1 +
+ 10 files changed, 193 insertions(+), 2 deletions(-)
+
+diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
+index 0fe3649..5c54d19 100644
+--- a/Documentation/virtual/kvm/api.txt
++++ b/Documentation/virtual/kvm/api.txt
+@@ -2863,8 +2863,8 @@ The fields in each entry are defined as follows:
+          this function/index combination
+ 
+ 
+-6. Capabilities that can be enabled
+------------------------------------
++6. Capabilities that can be enabled on vCPUs
++--------------------------------------------
+ 
+ There are certain capabilities that change the behavior of the virtual CPU when
+ enabled. To enable them, please see section 4.37. Below you can find a list of
+@@ -3002,3 +3002,40 @@ Parameters: args[0] is the XICS device fd
+             args[1] is the XICS CPU number (server ID) for this vcpu
+ 
+ This capability connects the vcpu to an in-kernel XICS device.
++
++
++7. Capabilities that can be enabled on VMs
++------------------------------------------
++
++There are certain capabilities that change the behavior of the virtual
++machine when enabled. To enable them, please see section 4.37. Below
++you can find a list of capabilities and what their effect on the VM
++is when enabling them.
++
++The following information is provided along with the description:
++
++  Architectures: which instruction set architectures provide this ioctl.
++      x86 includes both i386 and x86_64.
++
++  Parameters: what parameters are accepted by the capability.
++
++  Returns: the return value.  General error numbers (EBADF, ENOMEM, EINVAL)
++      are not detailed, but errors with specific meanings are.
++
++
++7.1 KVM_CAP_PPC_ENABLE_HCALL
++
++Architectures: ppc
++Parameters: args[0] is the sPAPR hcall number
++	    args[1] is 0 to disable, 1 to enable in-kernel handling
++
++This capability controls whether individual sPAPR hypercalls (hcalls)
++get handled by the kernel or not.  Enabling or disabling in-kernel
++handling of an hcall is effective across the VM.  On creation, an
++initial set of hcalls are enabled for in-kernel handling, which
++consists of those hcalls for which in-kernel handlers were implemented
++before this capability was implemented.  If disabled, the kernel will
++not to attempt to handle the hcall, but will always exit to userspace
++to handle it.  Note that it may not make sense to enable some and
++disable others of a group of related hcalls, but KVM does not prevent
++userspace from doing that.
+diff --git a/arch/powerpc/include/asm/kvm_book3s.h b/arch/powerpc/include/asm/kvm_book3s.h
+index a20cc0b..052ab2a 100644
+--- a/arch/powerpc/include/asm/kvm_book3s.h
++++ b/arch/powerpc/include/asm/kvm_book3s.h
+@@ -187,6 +187,7 @@ extern void kvmppc_hv_entry_trampoline(void);
+ extern u32 kvmppc_alignment_dsisr(struct kvm_vcpu *vcpu, unsigned int inst);
+ extern ulong kvmppc_alignment_dar(struct kvm_vcpu *vcpu, unsigned int inst);
+ extern int kvmppc_h_pr(struct kvm_vcpu *vcpu, unsigned long cmd);
++extern void kvmppc_pr_init_default_hcalls(struct kvm *kvm);
+ extern void kvmppc_copy_to_svcpu(struct kvmppc_book3s_shadow_vcpu *svcpu,
+ 				 struct kvm_vcpu *vcpu);
+ extern void kvmppc_copy_from_svcpu(struct kvm_vcpu *vcpu,
+diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h
+index f9ae696..62b2cee 100644
+--- a/arch/powerpc/include/asm/kvm_host.h
++++ b/arch/powerpc/include/asm/kvm_host.h
+@@ -34,6 +34,7 @@
+ #include <asm/processor.h>
+ #include <asm/page.h>
+ #include <asm/cacheflush.h>
++#include <asm/hvcall.h>
+ 
+ #define KVM_MAX_VCPUS		NR_CPUS
+ #define KVM_MAX_VCORES		NR_CPUS
+@@ -263,6 +264,7 @@ struct kvm_arch {
+ #ifdef CONFIG_PPC_BOOK3S_64
+ 	struct list_head spapr_tce_tables;
+ 	struct list_head rtas_tokens;
++	DECLARE_BITMAP(enabled_hcalls, MAX_HCALL_OPCODE/4 + 1);
+ #endif
+ #ifdef CONFIG_KVM_MPIC
+ 	struct openpic *mpic;
+diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
+index f5995a9..17ffcb4 100644
+--- a/arch/powerpc/kernel/asm-offsets.c
++++ b/arch/powerpc/kernel/asm-offsets.c
+@@ -493,6 +493,7 @@ int main(void)
+ 	DEFINE(KVM_HOST_SDR1, offsetof(struct kvm, arch.host_sdr1));
+ 	DEFINE(KVM_TLBIE_LOCK, offsetof(struct kvm, arch.tlbie_lock));
+ 	DEFINE(KVM_NEED_FLUSH, offsetof(struct kvm, arch.need_tlb_flush.bits));
++	DEFINE(KVM_ENABLED_HCALLS, offsetof(struct kvm, arch.enabled_hcalls));
+ 	DEFINE(KVM_LPCR, offsetof(struct kvm, arch.lpcr));
+ 	DEFINE(KVM_RMOR, offsetof(struct kvm, arch.rmor));
+ 	DEFINE(KVM_VRMA_SLB_V, offsetof(struct kvm, arch.vrma_slb_v));
+diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
+index 1562acf..cf445d2 100644
+--- a/arch/powerpc/kvm/book3s_hv.c
++++ b/arch/powerpc/kvm/book3s_hv.c
+@@ -67,6 +67,8 @@
+ /* Used as a "null" value for timebase values */
+ #define TB_NIL	(~(u64)0)
+ 
++static DECLARE_BITMAP(default_enabled_hcalls, MAX_HCALL_OPCODE/4 + 1);
++
+ static void kvmppc_end_cede(struct kvm_vcpu *vcpu);
+ static int kvmppc_hv_setup_htab_rma(struct kvm_vcpu *vcpu);
+ 
+@@ -562,6 +564,10 @@ int kvmppc_pseries_do_hcall(struct kvm_vcpu *vcpu)
+ 	struct kvm_vcpu *tvcpu;
+ 	int idx, rc;
+ 
++	if (req <= MAX_HCALL_OPCODE &&
++	    !test_bit(req/4, vcpu->kvm->arch.enabled_hcalls))
++		return RESUME_HOST;
++
+ 	switch (req) {
+ 	case H_ENTER:
+ 		idx = srcu_read_lock(&vcpu->kvm->srcu);
+@@ -2269,6 +2275,10 @@ static int kvmppc_core_init_vm_hv(struct kvm *kvm)
+ 	 */
+ 	cpumask_setall(&kvm->arch.need_tlb_flush);
+ 
++	/* Start out with the default set of hcalls enabled */
++	memcpy(kvm->arch.enabled_hcalls, default_enabled_hcalls,
++	       sizeof(kvm->arch.enabled_hcalls));
++
+ 	kvm->arch.rma = NULL;
+ 
+ 	kvm->arch.host_sdr1 = mfspr(SPRN_SDR1);
+@@ -2407,6 +2417,45 @@ static long kvm_arch_vm_ioctl_hv(struct file *filp,
+ 	return r;
+ }
+ 
++/*
++ * List of hcall numbers to enable by default.
++ * For compatibility with old userspace, we enable by default
++ * all hcalls that were implemented before the hcall-enabling
++ * facility was added.  Note this list should not include H_RTAS.
++ */
++static unsigned int default_hcall_list[] = {
++	H_REMOVE,
++	H_ENTER,
++	H_READ,
++	H_PROTECT,
++	H_BULK_REMOVE,
++	H_GET_TCE,
++	H_PUT_TCE,
++	H_SET_DABR,
++	H_SET_XDABR,
++	H_CEDE,
++	H_PROD,
++	H_CONFER,
++	H_REGISTER_VPA,
++#ifdef CONFIG_KVM_XICS
++	H_EOI,
++	H_CPPR,
++	H_IPI,
++	H_IPOLL,
++	H_XIRR,
++	H_XIRR_X,
++#endif
++	0
++};
++
++static void init_default_hcalls(void)
++{
++	int i;
++
++	for (i = 0; default_hcall_list[i]; ++i)
++		__set_bit(default_hcall_list[i] / 4, default_enabled_hcalls);
++}
++
+ static struct kvmppc_ops kvm_ops_hv = {
+ 	.get_sregs = kvm_arch_vcpu_ioctl_get_sregs_hv,
+ 	.set_sregs = kvm_arch_vcpu_ioctl_set_sregs_hv,
+@@ -2454,6 +2503,8 @@ static int kvmppc_book3s_init_hv(void)
+ 	kvm_ops_hv.owner = THIS_MODULE;
+ 	kvmppc_hv_ops = &kvm_ops_hv;
+ 
++	init_default_hcalls();
++
+ 	r = kvmppc_mmu_hv_init();
+ 	return r;
+ }
+diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+index 64ac56f..33aaade 100644
+--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
++++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+@@ -1909,6 +1909,17 @@ hcall_try_real_mode:
+ 	clrrdi	r3,r3,2
+ 	cmpldi	r3,hcall_real_table_end - hcall_real_table
+ 	bge	guest_exit_cont
++	/* See if this hcall is enabled for in-kernel handling */
++	ld	r4, VCPU_KVM(r9)
++	srdi	r0, r3, 8	/* r0 = (r3 / 4) >> 6 */
++	sldi	r0, r0, 3	/* index into kvm->arch.enabled_hcalls[] */
++	add	r4, r4, r0
++	ld	r0, KVM_ENABLED_HCALLS(r4)
++	rlwinm	r4, r3, 32-2, 0x3f	/* r4 = (r3 / 4) & 0x3f */
++	srd	r0, r0, r4
++	andi.	r0, r0, 1
++	beq	guest_exit_cont
++	/* Get pointer to handler, if any, and call it */
+ 	LOAD_REG_ADDR(r4, hcall_real_table)
+ 	lwax	r3,r3,r4
+ 	cmpwi	r3,0
+diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c
+index 3b82e86..123ac7d 100644
+--- a/arch/powerpc/kvm/book3s_pr.c
++++ b/arch/powerpc/kvm/book3s_pr.c
+@@ -1597,6 +1597,11 @@ static int kvmppc_core_init_vm_pr(struct kvm *kvm)
+ {
+ 	mutex_init(&kvm->arch.hpt_mutex);
+ 
++#ifdef CONFIG_PPC_BOOK3S_64
++	/* Start out with the default set of hcalls enabled */
++	kvmppc_pr_init_default_hcalls(kvm);
++#endif
++
+ 	if (firmware_has_feature(FW_FEATURE_SET_MODE)) {
+ 		spin_lock(&kvm_global_user_count_lock);
+ 		if (++kvm_global_user_count == 1)
+diff --git a/arch/powerpc/kvm/book3s_pr_papr.c b/arch/powerpc/kvm/book3s_pr_papr.c
+index f7c25c6..eacaa6e 100644
+--- a/arch/powerpc/kvm/book3s_pr_papr.c
++++ b/arch/powerpc/kvm/book3s_pr_papr.c
+@@ -267,6 +267,10 @@ static int kvmppc_h_pr_xics_hcall(struct kvm_vcpu *vcpu, u32 cmd)
+ 
+ int kvmppc_h_pr(struct kvm_vcpu *vcpu, unsigned long cmd)
+ {
++	if (cmd <= MAX_HCALL_OPCODE &&
++	    !test_bit(cmd/4, vcpu->kvm->arch.enabled_hcalls))
++		return EMULATE_FAIL;
++
+ 	switch (cmd) {
+ 	case H_ENTER:
+ 		return kvmppc_h_pr_enter(vcpu);
+@@ -304,3 +308,36 @@ int kvmppc_h_pr(struct kvm_vcpu *vcpu, unsigned long cmd)
+ 
+ 	return EMULATE_FAIL;
+ }
++
++
++/*
++ * List of hcall numbers to enable by default.
++ * For compatibility with old userspace, we enable by default
++ * all hcalls that were implemented before the hcall-enabling
++ * facility was added.  Note this list should not include H_RTAS.
++ */
++static unsigned int default_hcall_list[] = {
++	H_ENTER,
++	H_REMOVE,
++	H_PROTECT,
++	H_BULK_REMOVE,
++	H_PUT_TCE,
++	H_CEDE,
++#ifdef CONFIG_KVM_XICS
++	H_XIRR,
++	H_CPPR,
++	H_EOI,
++	H_IPI,
++	H_IPOLL,
++	H_XIRR_X,
++#endif
++	0
++};
++
++void kvmppc_pr_init_default_hcalls(struct kvm *kvm)
++{
++	int i;
++
++	for (i = 0; default_hcall_list[i]; ++i)
++		__set_bit(default_hcall_list[i] / 4, kvm->arch.enabled_hcalls);
++}
+diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
+index 61c738a..3222a4d 100644
+--- a/arch/powerpc/kvm/powerpc.c
++++ b/arch/powerpc/kvm/powerpc.c
+@@ -387,6 +387,7 @@ int kvm_dev_ioctl_check_extension(long ext)
+ 	case KVM_CAP_PPC_UNSET_IRQ:
+ 	case KVM_CAP_PPC_IRQ_LEVEL:
+ 	case KVM_CAP_ENABLE_CAP:
++	case KVM_CAP_ENABLE_CAP_VM:
+ 	case KVM_CAP_ONE_REG:
+ 	case KVM_CAP_IOEVENTFD:
+ 	case KVM_CAP_DEVICE_CTRL:
+@@ -417,6 +418,7 @@ int kvm_dev_ioctl_check_extension(long ext)
+ 	case KVM_CAP_PPC_ALLOC_HTAB:
+ 	case KVM_CAP_PPC_RTAS:
+ 	case KVM_CAP_PPC_FIXUP_HCALL:
++	case KVM_CAP_PPC_ENABLE_HCALL:
+ #ifdef CONFIG_KVM_XICS
+ 	case KVM_CAP_IRQ_XICS:
+ #endif
+@@ -1099,6 +1101,40 @@ int kvm_vm_ioctl_irq_line(struct kvm *kvm, struct kvm_irq_level *irq_event,
+ 	return 0;
+ }
+ 
++
++static int kvm_vm_ioctl_enable_cap(struct kvm *kvm,
++				   struct kvm_enable_cap *cap)
++{
++	int r;
++
++	if (cap->flags)
++		return -EINVAL;
++
++	switch (cap->cap) {
++#ifdef CONFIG_KVM_BOOK3S_64_HANDLER
++	case KVM_CAP_PPC_ENABLE_HCALL: {
++		unsigned long hcall = cap->args[0];
++
++		r = -EINVAL;
++		if (hcall > MAX_HCALL_OPCODE || (hcall & 3) ||
++		    cap->args[1] > 1)
++			break;
++		if (cap->args[1])
++			set_bit(hcall / 4, kvm->arch.enabled_hcalls);
++		else
++			clear_bit(hcall / 4, kvm->arch.enabled_hcalls);
++		r = 0;
++		break;
++	}
++#endif
++	default:
++		r = -EINVAL;
++		break;
++	}
++
++	return r;
++}
++
+ long kvm_arch_vm_ioctl(struct file *filp,
+                        unsigned int ioctl, unsigned long arg)
+ {
+@@ -1118,6 +1154,15 @@ long kvm_arch_vm_ioctl(struct file *filp,
+ 
+ 		break;
+ 	}
++	case KVM_ENABLE_CAP:
++	{
++		struct kvm_enable_cap cap;
++		r = -EFAULT;
++		if (copy_from_user(&cap, argp, sizeof(cap)))
++			goto out;
++		r = kvm_vm_ioctl_enable_cap(kvm, &cap);
++		break;
++	}
+ #ifdef CONFIG_PPC_BOOK3S_64
+ 	case KVM_CREATE_SPAPR_TCE: {
+ 		struct kvm_create_spapr_tce create_tce;
+diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
+index e11d8f1..0418b74 100644
+--- a/include/uapi/linux/kvm.h
++++ b/include/uapi/linux/kvm.h
+@@ -758,6 +758,7 @@ struct kvm_ppc_smmu_info {
+ #define KVM_CAP_VM_ATTRIBUTES 101
+ #define KVM_CAP_ARM_PSCI_0_2 102
+ #define KVM_CAP_PPC_FIXUP_HCALL 103
++#define KVM_CAP_PPC_ENABLE_HCALL 104
+ 
+ #ifdef KVM_CAP_IRQ_ROUTING
+ 
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Access-XICS-in-BE.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Access-XICS-in-BE.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Access-XICS-in-BE.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Access-XICS-in-BE.patch)
@@ -0,0 +1,59 @@
+From: Alexander Graf <agraf at suse.de>
+Date: Wed, 11 Jun 2014 10:37:52 +0200
+Subject: KVM: PPC: Book3S HV: Access XICS in BE
+Origin: https://git.kernel.org/linus/76d072fb05f646eb180f161bbe06ab185af52f38
+
+On the exit path from the guest we check what type of interrupt we received
+if we received one. This means we're doing hardware access to the XICS interrupt
+controller.
+
+However, when running on a little endian system, this access is byte reversed.
+
+So let's make sure to swizzle the bytes back again and virtually make XICS
+accesses big endian.
+
+Signed-off-by: Alexander Graf <agraf at suse.de>
+---
+ arch/powerpc/kvm/book3s_hv_rmhandlers.S |   18 ++++++++++++++----
+ 1 file changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+index bf5270e..364ca0c 100644
+--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
++++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+@@ -2350,7 +2350,18 @@ kvmppc_read_intr:
+ 	cmpdi	r6, 0
+ 	beq-	1f
+ 	lwzcix	r0, r6, r7
+-	rlwinm.	r3, r0, 0, 0xffffff
++	/*
++	 * Save XIRR for later. Since we get in in reverse endian on LE
++	 * systems, save it byte reversed and fetch it back in host endian.
++	 */
++	li	r3, HSTATE_SAVED_XIRR
++	STWX_BE	r0, r3, r13
++#ifdef __LITTLE_ENDIAN__
++	lwz	r3, HSTATE_SAVED_XIRR(r13)
++#else
++	mr	r3, r0
++#endif
++	rlwinm.	r3, r3, 0, 0xffffff
+ 	sync
+ 	beq	1f			/* if nothing pending in the ICP */
+ 
+@@ -2382,10 +2393,9 @@ kvmppc_read_intr:
+ 	li	r3, -1
+ 1:	blr
+ 
+-42:	/* It's not an IPI and it's for the host, stash it in the PACA
+-	 * before exit, it will be picked up by the host ICP driver
++42:	/* It's not an IPI and it's for the host. We saved a copy of XIRR in
++	 * the PACA earlier, it will be picked up by the host ICP driver
+ 	 */
+-	stw	r0, HSTATE_SAVED_XIRR(r13)
+ 	li	r3, 1
+ 	b	1b
+ 
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Access-guest-VPA-in-BE.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Access-guest-VPA-in-BE.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Access-guest-VPA-in-BE.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Access-guest-VPA-in-BE.patch)
@@ -0,0 +1,103 @@
+From: Alexander Graf <agraf at suse.de>
+Date: Wed, 11 Jun 2014 10:34:19 +0200
+Subject: KVM: PPC: Book3S HV: Access guest VPA in BE
+Origin: https://git.kernel.org/linus/02407552256111479fbfd23a3e01218b399aaa35
+
+There are a few shared data structures between the host and the guest. Most
+of them get registered through the VPA interface.
+
+These data structures are defined to always be in big endian byte order, so
+let's make sure we always access them in big endian.
+
+Signed-off-by: Alexander Graf <agraf at suse.de>
+---
+ arch/powerpc/kvm/book3s_hv.c     |   22 +++++++++++-----------
+ arch/powerpc/kvm/book3s_hv_ras.c |    6 +++---
+ 2 files changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
+index 7db9df2..f1281c4 100644
+--- a/arch/powerpc/kvm/book3s_hv.c
++++ b/arch/powerpc/kvm/book3s_hv.c
+@@ -272,7 +272,7 @@ struct kvm_vcpu *kvmppc_find_vcpu(struct kvm *kvm, int id)
+ static void init_vpa(struct kvm_vcpu *vcpu, struct lppaca *vpa)
+ {
+ 	vpa->__old_status |= LPPACA_OLD_SHARED_PROC;
+-	vpa->yield_count = 1;
++	vpa->yield_count = cpu_to_be32(1);
+ }
+ 
+ static int set_vpa(struct kvm_vcpu *vcpu, struct kvmppc_vpa *v,
+@@ -295,8 +295,8 @@ static int set_vpa(struct kvm_vcpu *vcpu, struct kvmppc_vpa *v,
+ struct reg_vpa {
+ 	u32 dummy;
+ 	union {
+-		u16 hword;
+-		u32 word;
++		__be16 hword;
++		__be32 word;
+ 	} length;
+ };
+ 
+@@ -335,9 +335,9 @@ static unsigned long do_h_register_vpa(struct kvm_vcpu *vcpu,
+ 		if (va == NULL)
+ 			return H_PARAMETER;
+ 		if (subfunc == H_VPA_REG_VPA)
+-			len = ((struct reg_vpa *)va)->length.hword;
++			len = be16_to_cpu(((struct reg_vpa *)va)->length.hword);
+ 		else
+-			len = ((struct reg_vpa *)va)->length.word;
++			len = be32_to_cpu(((struct reg_vpa *)va)->length.word);
+ 		kvmppc_unpin_guest_page(kvm, va, vpa, false);
+ 
+ 		/* Check length */
+@@ -542,18 +542,18 @@ static void kvmppc_create_dtl_entry(struct kvm_vcpu *vcpu,
+ 		return;
+ 	memset(dt, 0, sizeof(struct dtl_entry));
+ 	dt->dispatch_reason = 7;
+-	dt->processor_id = vc->pcpu + vcpu->arch.ptid;
+-	dt->timebase = now + vc->tb_offset;
+-	dt->enqueue_to_dispatch_time = stolen;
+-	dt->srr0 = kvmppc_get_pc(vcpu);
+-	dt->srr1 = vcpu->arch.shregs.msr;
++	dt->processor_id = cpu_to_be16(vc->pcpu + vcpu->arch.ptid);
++	dt->timebase = cpu_to_be64(now + vc->tb_offset);
++	dt->enqueue_to_dispatch_time = cpu_to_be32(stolen);
++	dt->srr0 = cpu_to_be64(kvmppc_get_pc(vcpu));
++	dt->srr1 = cpu_to_be64(vcpu->arch.shregs.msr);
+ 	++dt;
+ 	if (dt == vcpu->arch.dtl.pinned_end)
+ 		dt = vcpu->arch.dtl.pinned_addr;
+ 	vcpu->arch.dtl_ptr = dt;
+ 	/* order writing *dt vs. writing vpa->dtl_idx */
+ 	smp_wmb();
+-	vpa->dtl_idx = ++vcpu->arch.dtl_index;
++	vpa->dtl_idx = cpu_to_be64(++vcpu->arch.dtl_index);
+ 	vcpu->arch.dtl.dirty = true;
+ }
+ 
+diff --git a/arch/powerpc/kvm/book3s_hv_ras.c b/arch/powerpc/kvm/book3s_hv_ras.c
+index 3a5c568..d562c8e 100644
+--- a/arch/powerpc/kvm/book3s_hv_ras.c
++++ b/arch/powerpc/kvm/book3s_hv_ras.c
+@@ -45,14 +45,14 @@ static void reload_slb(struct kvm_vcpu *vcpu)
+ 		return;
+ 
+ 	/* Sanity check */
+-	n = min_t(u32, slb->persistent, SLB_MIN_SIZE);
++	n = min_t(u32, be32_to_cpu(slb->persistent), SLB_MIN_SIZE);
+ 	if ((void *) &slb->save_area[n] > vcpu->arch.slb_shadow.pinned_end)
+ 		return;
+ 
+ 	/* Load up the SLB from that */
+ 	for (i = 0; i < n; ++i) {
+-		unsigned long rb = slb->save_area[i].esid;
+-		unsigned long rs = slb->save_area[i].vsid;
++		unsigned long rb = be64_to_cpu(slb->save_area[i].esid);
++		unsigned long rs = be64_to_cpu(slb->save_area[i].vsid);
+ 
+ 		rb = (rb & ~0xFFFul) | i;	/* insert entry number */
+ 		asm volatile("slbmte %0,%1" : : "r" (rs), "r" (rb));
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Access-host-lppaca-and-shadow-slb-.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Access-host-lppaca-and-shadow-slb-.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Access-host-lppaca-and-shadow-slb-.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Access-host-lppaca-and-shadow-slb-.patch)
@@ -0,0 +1,74 @@
+From: Alexander Graf <agraf at suse.de>
+Date: Wed, 11 Jun 2014 10:36:17 +0200
+Subject: KVM: PPC: Book3S HV: Access host lppaca and shadow slb
+ in BE
+Origin: https://git.kernel.org/linus/0865a583a4881975cc4b621f4886c02f01600302
+
+Some data structures are always stored in big endian. Among those are the LPPACA
+fields as well as the shadow slb. These structures might be shared with a
+hypervisor.
+
+So whenever we access those fields, make sure we do so in big endian byte order.
+
+Signed-off-by: Alexander Graf <agraf at suse.de>
+---
+ arch/powerpc/kvm/book3s_hv_rmhandlers.S |   20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+index e66c1e38..bf5270e 100644
+--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
++++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+@@ -32,10 +32,6 @@
+ 
+ #define VCPU_GPRS_TM(reg) (((reg) * ULONG_SIZE) + VCPU_GPR_TM)
+ 
+-#ifdef __LITTLE_ENDIAN__
+-#error Need to fix lppaca and SLB shadow accesses in little endian mode
+-#endif
+-
+ /* Values in HSTATE_NAPPING(r13) */
+ #define NAPPING_CEDE	1
+ #define NAPPING_NOVCPU	2
+@@ -595,9 +591,10 @@ kvmppc_got_guest:
+ 	ld	r3, VCPU_VPA(r4)
+ 	cmpdi	r3, 0
+ 	beq	25f
+-	lwz	r5, LPPACA_YIELDCOUNT(r3)
++	li	r6, LPPACA_YIELDCOUNT
++	LWZX_BE	r5, r3, r6
+ 	addi	r5, r5, 1
+-	stw	r5, LPPACA_YIELDCOUNT(r3)
++	STWX_BE	r5, r3, r6
+ 	li	r6, 1
+ 	stb	r6, VCPU_VPA_DIRTY(r4)
+ 25:
+@@ -1442,9 +1439,10 @@ END_FTR_SECTION_IFCLR(CPU_FTR_TM)
+ 	ld	r8, VCPU_VPA(r9)	/* do they have a VPA? */
+ 	cmpdi	r8, 0
+ 	beq	25f
+-	lwz	r3, LPPACA_YIELDCOUNT(r8)
++	li	r4, LPPACA_YIELDCOUNT
++	LWZX_BE	r3, r8, r4
+ 	addi	r3, r3, 1
+-	stw	r3, LPPACA_YIELDCOUNT(r8)
++	STWX_BE	r3, r8, r4
+ 	li	r3, 1
+ 	stb	r3, VCPU_VPA_DIRTY(r9)
+ 25:
+@@ -1757,8 +1755,10 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
+ 33:	ld	r8,PACA_SLBSHADOWPTR(r13)
+ 
+ 	.rept	SLB_NUM_BOLTED
+-	ld	r5,SLBSHADOW_SAVEAREA(r8)
+-	ld	r6,SLBSHADOW_SAVEAREA+8(r8)
++	li	r3, SLBSHADOW_SAVEAREA
++	LDX_BE	r5, r8, r3
++	addi	r3, r3, 8
++	LDX_BE	r6, r8, r3
+ 	andis.	r7,r5,SLB_ESID_V at h
+ 	beq	1f
+ 	slbmte	r6,r5
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Enable-for-little-endian-hosts.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Enable-for-little-endian-hosts.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Enable-for-little-endian-hosts.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Enable-for-little-endian-hosts.patch)
@@ -0,0 +1,28 @@
+From: Alexander Graf <agraf at suse.de>
+Date: Wed, 11 Jun 2014 10:39:38 +0200
+Subject: KVM: PPC: Book3S HV: Enable for little endian hosts
+Origin: https://git.kernel.org/linus/6947f948f06128409b94306afaca5ece873ee5a2
+
+Now that we've fixed all the issues that HV KVM code had on little endian
+hosts, we can enable it in the kernel configuration for users to play with.
+
+Signed-off-by: Alexander Graf <agraf at suse.de>
+---
+ arch/powerpc/kvm/Kconfig |    1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig
+index d6a53b9..8aeeda1 100644
+--- a/arch/powerpc/kvm/Kconfig
++++ b/arch/powerpc/kvm/Kconfig
+@@ -75,7 +75,6 @@ config KVM_BOOK3S_64
+ config KVM_BOOK3S_64_HV
+ 	tristate "KVM support for POWER7 and PPC970 using hypervisor mode in host"
+ 	depends on KVM_BOOK3S_64
+-	depends on !CPU_LITTLE_ENDIAN
+ 	select KVM_BOOK3S_HV_POSSIBLE
+ 	select MMU_NOTIFIER
+ 	select CMA
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Fix-ABIv2-indirect-branch-issue.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Fix-ABIv2-indirect-branch-issue.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Fix-ABIv2-indirect-branch-issue.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Fix-ABIv2-indirect-branch-issue.patch)
@@ -0,0 +1,32 @@
+From: Anton Blanchard <anton at samba.org>
+Date: Thu, 12 Jun 2014 18:16:10 +1000
+Subject: KVM: PPC: Book3S HV: Fix ABIv2 indirect branch issue
+Origin: https://git.kernel.org/linus/05a308c722822b0fbcc706b54be70f9bb9d52539
+
+To establish addressability quickly, ABIv2 requires the target
+address of the function being called to be in r12.
+
+Signed-off-by: Anton Blanchard <anton at samba.org>
+Signed-off-by: Alexander Graf <agraf at suse.de>
+---
+ arch/powerpc/kvm/book3s_hv_rmhandlers.S |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+index 868347e..da1cac5 100644
+--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
++++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+@@ -1913,8 +1913,8 @@ hcall_try_real_mode:
+ 	lwax	r3,r3,r4
+ 	cmpwi	r3,0
+ 	beq	guest_exit_cont
+-	add	r3,r3,r4
+-	mtctr	r3
++	add	r12,r3,r4
++	mtctr	r12
+ 	mr	r3,r9		/* get vcpu pointer */
+ 	ld	r4,VCPU_GPR(R4)(r9)
+ 	bctrl
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Fix-ABIv2-on-LE.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Fix-ABIv2-on-LE.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Fix-ABIv2-on-LE.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Fix-ABIv2-on-LE.patch)
@@ -0,0 +1,74 @@
+From: Alexander Graf <agraf at suse.de>
+Date: Mon, 16 Jun 2014 14:41:15 +0200
+Subject: KVM: PPC: Book3S HV: Fix ABIv2 on LE
+Origin: https://git.kernel.org/linus/9bf163f86d0dc2f9070d9b1b8c27cedcf8eec816
+
+For code that doesn't live in modules we can just branch to the real function
+names, giving us compatibility with ABIv1 and ABIv2.
+
+Do this for the compiled-in code of HV KVM.
+
+Signed-off-by: Alexander Graf <agraf at suse.de>
+---
+ arch/powerpc/kvm/book3s_hv_rmhandlers.S |   16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+index 364ca0c..855521e 100644
+--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
++++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+@@ -668,9 +668,9 @@ END_FTR_SECTION_IFCLR(CPU_FTR_TM)
+ 
+ 	mr	r31, r4
+ 	addi	r3, r31, VCPU_FPRS_TM
+-	bl	.load_fp_state
++	bl	load_fp_state
+ 	addi	r3, r31, VCPU_VRS_TM
+-	bl	.load_vr_state
++	bl	load_vr_state
+ 	mr	r4, r31
+ 	lwz	r7, VCPU_VRSAVE_TM(r4)
+ 	mtspr	SPRN_VRSAVE, r7
+@@ -1414,9 +1414,9 @@ END_FTR_SECTION_IFCLR(CPU_FTR_TM)
+ 
+ 	/* Save FP/VSX. */
+ 	addi	r3, r9, VCPU_FPRS_TM
+-	bl	.store_fp_state
++	bl	store_fp_state
+ 	addi	r3, r9, VCPU_VRS_TM
+-	bl	.store_vr_state
++	bl	store_vr_state
+ 	mfspr	r6, SPRN_VRSAVE
+ 	stw	r6, VCPU_VRSAVE_TM(r9)
+ 1:
+@@ -2430,11 +2430,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_VSX)
+ 	mtmsrd	r8
+ 	isync
+ 	addi	r3,r3,VCPU_FPRS
+-	bl	.store_fp_state
++	bl	store_fp_state
+ #ifdef CONFIG_ALTIVEC
+ BEGIN_FTR_SECTION
+ 	addi	r3,r31,VCPU_VRS
+-	bl	.store_vr_state
++	bl	store_vr_state
+ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
+ #endif
+ 	mfspr	r6,SPRN_VRSAVE
+@@ -2466,11 +2466,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_VSX)
+ 	mtmsrd	r8
+ 	isync
+ 	addi	r3,r4,VCPU_FPRS
+-	bl	.load_fp_state
++	bl	load_fp_state
+ #ifdef CONFIG_ALTIVEC
+ BEGIN_FTR_SECTION
+ 	addi	r3,r31,VCPU_VRS
+-	bl	.load_vr_state
++	bl	load_vr_state
+ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
+ #endif
+ 	lwz	r7,VCPU_VRSAVE(r31)
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Make-HTAB-code-LE-host-aware.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Make-HTAB-code-LE-host-aware.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Make-HTAB-code-LE-host-aware.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-HV-Make-HTAB-code-LE-host-aware.patch)
@@ -0,0 +1,881 @@
+From: Alexander Graf <agraf at suse.de>
+Date: Wed, 11 Jun 2014 10:16:06 +0200
+Subject: KVM: PPC: Book3S HV: Make HTAB code LE host aware
+Origin: https://git.kernel.org/linus/6f22bd3265fb542acb2697026b953ec07298242d
+
+When running on an LE host all data structures are kept in little endian
+byte order. However, the HTAB still needs to be maintained in big endian.
+
+So every time we access any HTAB we need to make sure we do so in the right
+byte order. Fix up all accesses to manually byte swap.
+
+Signed-off-by: Alexander Graf <agraf at suse.de>
+---
+ arch/powerpc/include/asm/kvm_book3s.h    |    4 
+ arch/powerpc/include/asm/kvm_book3s_64.h |   15 ++-
+ arch/powerpc/kvm/book3s_64_mmu_hv.c      |  128 ++++++++++++++-------------
+ arch/powerpc/kvm/book3s_hv_rm_mmu.c      |  146 +++++++++++++++++--------------
+ 4 files changed, 164 insertions(+), 129 deletions(-)
+
+--- a/arch/powerpc/include/asm/kvm_book3s.h
++++ b/arch/powerpc/include/asm/kvm_book3s.h
+@@ -163,9 +163,9 @@
+ 			bool *writable);
+ extern void kvmppc_add_revmap_chain(struct kvm *kvm, struct revmap_entry *rev,
+ 			unsigned long *rmap, long pte_index, int realmode);
+-extern void kvmppc_invalidate_hpte(struct kvm *kvm, unsigned long *hptep,
++extern void kvmppc_invalidate_hpte(struct kvm *kvm, __be64 *hptep,
+ 			unsigned long pte_index);
+-void kvmppc_clear_ref_hpte(struct kvm *kvm, unsigned long *hptep,
++void kvmppc_clear_ref_hpte(struct kvm *kvm, __be64 *hptep,
+ 			unsigned long pte_index);
+ extern void *kvmppc_pin_guest_page(struct kvm *kvm, unsigned long addr,
+ 			unsigned long *nb_ret);
+--- a/arch/powerpc/include/asm/kvm_book3s_64.h
++++ b/arch/powerpc/include/asm/kvm_book3s_64.h
+@@ -59,20 +59,29 @@
+ /* These bits are reserved in the guest view of the HPTE */
+ #define HPTE_GR_RESERVED	HPTE_GR_MODIFIED
+ 
+-static inline long try_lock_hpte(unsigned long *hpte, unsigned long bits)
++static inline long try_lock_hpte(__be64 *hpte, unsigned long bits)
+ {
+ 	unsigned long tmp, old;
++	__be64 be_lockbit, be_bits;
++
++	/*
++	 * We load/store in native endian, but the HTAB is in big endian. If
++	 * we byte swap all data we apply on the PTE we're implicitly correct
++	 * again.
++	 */
++	be_lockbit = cpu_to_be64(HPTE_V_HVLOCK);
++	be_bits = cpu_to_be64(bits);
+ 
+ 	asm volatile("	ldarx	%0,0,%2\n"
+ 		     "	and.	%1,%0,%3\n"
+ 		     "	bne	2f\n"
+-		     "	ori	%0,%0,%4\n"
++		     "	or	%0,%0,%4\n"
+ 		     "  stdcx.	%0,0,%2\n"
+ 		     "	beq+	2f\n"
+ 		     "	mr	%1,%3\n"
+ 		     "2:	isync"
+ 		     : "=&r" (tmp), "=&r" (old)
+-		     : "r" (hpte), "r" (bits), "i" (HPTE_V_HVLOCK)
++		     : "r" (hpte), "r" (be_bits), "r" (be_lockbit)
+ 		     : "cc", "memory");
+ 	return old == 0;
+ }
+--- a/arch/powerpc/kvm/book3s_64_mmu_hv.c
++++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c
+@@ -450,7 +450,7 @@
+ 	unsigned long slb_v;
+ 	unsigned long pp, key;
+ 	unsigned long v, gr;
+-	unsigned long *hptep;
++	__be64 *hptep;
+ 	int index;
+ 	int virtmode = vcpu->arch.shregs.msr & (data ? MSR_DR : MSR_IR);
+ 
+@@ -473,13 +473,13 @@
+ 		preempt_enable();
+ 		return -ENOENT;
+ 	}
+-	hptep = (unsigned long *)(kvm->arch.hpt_virt + (index << 4));
+-	v = hptep[0] & ~HPTE_V_HVLOCK;
++	hptep = (__be64 *)(kvm->arch.hpt_virt + (index << 4));
++	v = be64_to_cpu(hptep[0]) & ~HPTE_V_HVLOCK;
+ 	gr = kvm->arch.revmap[index].guest_rpte;
+ 
+ 	/* Unlock the HPTE */
+ 	asm volatile("lwsync" : : : "memory");
+-	hptep[0] = v;
++	hptep[0] = cpu_to_be64(v);
+ 	preempt_enable();
+ 
+ 	gpte->eaddr = eaddr;
+@@ -583,7 +583,8 @@
+ 				unsigned long ea, unsigned long dsisr)
+ {
+ 	struct kvm *kvm = vcpu->kvm;
+-	unsigned long *hptep, hpte[3], r;
++	unsigned long hpte[3], r;
++	__be64 *hptep;
+ 	unsigned long mmu_seq, psize, pte_size;
+ 	unsigned long gpa_base, gfn_base;
+ 	unsigned long gpa, gfn, hva, pfn;
+@@ -606,16 +607,16 @@
+ 	if (ea != vcpu->arch.pgfault_addr)
+ 		return RESUME_GUEST;
+ 	index = vcpu->arch.pgfault_index;
+-	hptep = (unsigned long *)(kvm->arch.hpt_virt + (index << 4));
++	hptep = (__be64 *)(kvm->arch.hpt_virt + (index << 4));
+ 	rev = &kvm->arch.revmap[index];
+ 	preempt_disable();
+ 	while (!try_lock_hpte(hptep, HPTE_V_HVLOCK))
+ 		cpu_relax();
+-	hpte[0] = hptep[0] & ~HPTE_V_HVLOCK;
+-	hpte[1] = hptep[1];
++	hpte[0] = be64_to_cpu(hptep[0]) & ~HPTE_V_HVLOCK;
++	hpte[1] = be64_to_cpu(hptep[1]);
+ 	hpte[2] = r = rev->guest_rpte;
+ 	asm volatile("lwsync" : : : "memory");
+-	hptep[0] = hpte[0];
++	hptep[0] = cpu_to_be64(hpte[0]);
+ 	preempt_enable();
+ 
+ 	if (hpte[0] != vcpu->arch.pgfault_hpte[0] ||
+@@ -731,8 +732,9 @@
+ 	preempt_disable();
+ 	while (!try_lock_hpte(hptep, HPTE_V_HVLOCK))
+ 		cpu_relax();
+-	if ((hptep[0] & ~HPTE_V_HVLOCK) != hpte[0] || hptep[1] != hpte[1] ||
+-	    rev->guest_rpte != hpte[2])
++	if ((be64_to_cpu(hptep[0]) & ~HPTE_V_HVLOCK) != hpte[0] ||
++		be64_to_cpu(hptep[1]) != hpte[1] ||
++		rev->guest_rpte != hpte[2])
+ 		/* HPTE has been changed under us; let the guest retry */
+ 		goto out_unlock;
+ 	hpte[0] = (hpte[0] & ~HPTE_V_ABSENT) | HPTE_V_VALID;
+@@ -752,20 +754,20 @@
+ 	rcbits = *rmap >> KVMPPC_RMAP_RC_SHIFT;
+ 	r &= rcbits | ~(HPTE_R_R | HPTE_R_C);
+ 
+-	if (hptep[0] & HPTE_V_VALID) {
++	if (be64_to_cpu(hptep[0]) & HPTE_V_VALID) {
+ 		/* HPTE was previously valid, so we need to invalidate it */
+ 		unlock_rmap(rmap);
+-		hptep[0] |= HPTE_V_ABSENT;
++		hptep[0] |= cpu_to_be64(HPTE_V_ABSENT);
+ 		kvmppc_invalidate_hpte(kvm, hptep, index);
+ 		/* don't lose previous R and C bits */
+-		r |= hptep[1] & (HPTE_R_R | HPTE_R_C);
++		r |= be64_to_cpu(hptep[1]) & (HPTE_R_R | HPTE_R_C);
+ 	} else {
+ 		kvmppc_add_revmap_chain(kvm, rev, rmap, index, 0);
+ 	}
+ 
+-	hptep[1] = r;
++	hptep[1] = cpu_to_be64(r);
+ 	eieio();
+-	hptep[0] = hpte[0];
++	hptep[0] = cpu_to_be64(hpte[0]);
+ 	asm volatile("ptesync" : : : "memory");
+ 	preempt_enable();
+ 	if (page && hpte_is_writable(r))
+@@ -784,7 +786,7 @@
+ 	return ret;
+ 
+  out_unlock:
+-	hptep[0] &= ~HPTE_V_HVLOCK;
++	hptep[0] &= ~cpu_to_be64(HPTE_V_HVLOCK);
+ 	preempt_enable();
+ 	goto out_put;
+ }
+@@ -860,7 +862,7 @@
+ {
+ 	struct revmap_entry *rev = kvm->arch.revmap;
+ 	unsigned long h, i, j;
+-	unsigned long *hptep;
++	__be64 *hptep;
+ 	unsigned long ptel, psize, rcbits;
+ 
+ 	for (;;) {
+@@ -876,11 +878,11 @@
+ 		 * rmap chain lock.
+ 		 */
+ 		i = *rmapp & KVMPPC_RMAP_INDEX;
+-		hptep = (unsigned long *) (kvm->arch.hpt_virt + (i << 4));
++		hptep = (__be64 *) (kvm->arch.hpt_virt + (i << 4));
+ 		if (!try_lock_hpte(hptep, HPTE_V_HVLOCK)) {
+ 			/* unlock rmap before spinning on the HPTE lock */
+ 			unlock_rmap(rmapp);
+-			while (hptep[0] & HPTE_V_HVLOCK)
++			while (be64_to_cpu(hptep[0]) & HPTE_V_HVLOCK)
+ 				cpu_relax();
+ 			continue;
+ 		}
+@@ -899,14 +901,14 @@
+ 
+ 		/* Now check and modify the HPTE */
+ 		ptel = rev[i].guest_rpte;
+-		psize = hpte_page_size(hptep[0], ptel);
+-		if ((hptep[0] & HPTE_V_VALID) &&
++		psize = hpte_page_size(be64_to_cpu(hptep[0]), ptel);
++		if ((be64_to_cpu(hptep[0]) & HPTE_V_VALID) &&
+ 		    hpte_rpn(ptel, psize) == gfn) {
+ 			if (kvm->arch.using_mmu_notifiers)
+-				hptep[0] |= HPTE_V_ABSENT;
++				hptep[0] |= cpu_to_be64(HPTE_V_ABSENT);
+ 			kvmppc_invalidate_hpte(kvm, hptep, i);
+ 			/* Harvest R and C */
+-			rcbits = hptep[1] & (HPTE_R_R | HPTE_R_C);
++			rcbits = be64_to_cpu(hptep[1]) & (HPTE_R_R | HPTE_R_C);
+ 			*rmapp |= rcbits << KVMPPC_RMAP_RC_SHIFT;
+ 			if (rcbits & ~rev[i].guest_rpte) {
+ 				rev[i].guest_rpte = ptel | rcbits;
+@@ -914,7 +916,7 @@
+ 			}
+ 		}
+ 		unlock_rmap(rmapp);
+-		hptep[0] &= ~HPTE_V_HVLOCK;
++		hptep[0] &= ~cpu_to_be64(HPTE_V_HVLOCK);
+ 	}
+ 	return 0;
+ }
+@@ -961,7 +963,7 @@
+ {
+ 	struct revmap_entry *rev = kvm->arch.revmap;
+ 	unsigned long head, i, j;
+-	unsigned long *hptep;
++	__be64 *hptep;
+ 	int ret = 0;
+ 
+  retry:
+@@ -977,23 +979,24 @@
+ 
+ 	i = head = *rmapp & KVMPPC_RMAP_INDEX;
+ 	do {
+-		hptep = (unsigned long *) (kvm->arch.hpt_virt + (i << 4));
++		hptep = (__be64 *) (kvm->arch.hpt_virt + (i << 4));
+ 		j = rev[i].forw;
+ 
+ 		/* If this HPTE isn't referenced, ignore it */
+-		if (!(hptep[1] & HPTE_R_R))
++		if (!(be64_to_cpu(hptep[1]) & HPTE_R_R))
+ 			continue;
+ 
+ 		if (!try_lock_hpte(hptep, HPTE_V_HVLOCK)) {
+ 			/* unlock rmap before spinning on the HPTE lock */
+ 			unlock_rmap(rmapp);
+-			while (hptep[0] & HPTE_V_HVLOCK)
++			while (be64_to_cpu(hptep[0]) & HPTE_V_HVLOCK)
+ 				cpu_relax();
+ 			goto retry;
+ 		}
+ 
+ 		/* Now check and modify the HPTE */
+-		if ((hptep[0] & HPTE_V_VALID) && (hptep[1] & HPTE_R_R)) {
++		if ((be64_to_cpu(hptep[0]) & HPTE_V_VALID) &&
++		    (be64_to_cpu(hptep[1]) & HPTE_R_R)) {
+ 			kvmppc_clear_ref_hpte(kvm, hptep, i);
+ 			if (!(rev[i].guest_rpte & HPTE_R_R)) {
+ 				rev[i].guest_rpte |= HPTE_R_R;
+@@ -1001,7 +1004,7 @@
+ 			}
+ 			ret = 1;
+ 		}
+-		hptep[0] &= ~HPTE_V_HVLOCK;
++		hptep[0] &= ~cpu_to_be64(HPTE_V_HVLOCK);
+ 	} while ((i = j) != head);
+ 
+ 	unlock_rmap(rmapp);
+@@ -1035,7 +1038,7 @@
+ 		do {
+ 			hp = (unsigned long *)(kvm->arch.hpt_virt + (i << 4));
+ 			j = rev[i].forw;
+-			if (hp[1] & HPTE_R_R)
++			if (be64_to_cpu(hp[1]) & HPTE_R_R)
+ 				goto out;
+ 		} while ((i = j) != head);
+ 	}
+@@ -1075,7 +1078,7 @@
+ 	unsigned long head, i, j;
+ 	unsigned long n;
+ 	unsigned long v, r;
+-	unsigned long *hptep;
++	__be64 *hptep;
+ 	int npages_dirty = 0;
+ 
+  retry:
+@@ -1091,7 +1094,8 @@
+ 
+ 	i = head = *rmapp & KVMPPC_RMAP_INDEX;
+ 	do {
+-		hptep = (unsigned long *) (kvm->arch.hpt_virt + (i << 4));
++		unsigned long hptep1;
++		hptep = (__be64 *) (kvm->arch.hpt_virt + (i << 4));
+ 		j = rev[i].forw;
+ 
+ 		/*
+@@ -1108,29 +1112,30 @@
+ 		 * Otherwise we need to do the tlbie even if C==0 in
+ 		 * order to pick up any delayed writeback of C.
+ 		 */
+-		if (!(hptep[1] & HPTE_R_C) &&
+-		    (!hpte_is_writable(hptep[1]) || vcpus_running(kvm)))
++		hptep1 = be64_to_cpu(hptep[1]);
++		if (!(hptep1 & HPTE_R_C) &&
++		    (!hpte_is_writable(hptep1) || vcpus_running(kvm)))
+ 			continue;
+ 
+ 		if (!try_lock_hpte(hptep, HPTE_V_HVLOCK)) {
+ 			/* unlock rmap before spinning on the HPTE lock */
+ 			unlock_rmap(rmapp);
+-			while (hptep[0] & HPTE_V_HVLOCK)
++			while (hptep[0] & cpu_to_be64(HPTE_V_HVLOCK))
+ 				cpu_relax();
+ 			goto retry;
+ 		}
+ 
+ 		/* Now check and modify the HPTE */
+-		if (!(hptep[0] & HPTE_V_VALID))
++		if (!(hptep[0] & cpu_to_be64(HPTE_V_VALID)))
+ 			continue;
+ 
+ 		/* need to make it temporarily absent so C is stable */
+-		hptep[0] |= HPTE_V_ABSENT;
++		hptep[0] |= cpu_to_be64(HPTE_V_ABSENT);
+ 		kvmppc_invalidate_hpte(kvm, hptep, i);
+-		v = hptep[0];
+-		r = hptep[1];
++		v = be64_to_cpu(hptep[0]);
++		r = be64_to_cpu(hptep[1]);
+ 		if (r & HPTE_R_C) {
+-			hptep[1] = r & ~HPTE_R_C;
++			hptep[1] = cpu_to_be64(r & ~HPTE_R_C);
+ 			if (!(rev[i].guest_rpte & HPTE_R_C)) {
+ 				rev[i].guest_rpte |= HPTE_R_C;
+ 				note_hpte_modification(kvm, &rev[i]);
+@@ -1143,7 +1148,7 @@
+ 		}
+ 		v &= ~(HPTE_V_ABSENT | HPTE_V_HVLOCK);
+ 		v |= HPTE_V_VALID;
+-		hptep[0] = v;
++		hptep[0] = cpu_to_be64(v);
+ 	} while ((i = j) != head);
+ 
+ 	unlock_rmap(rmapp);
+@@ -1307,7 +1312,7 @@
+  * Returns 1 if this HPT entry has been modified or has pending
+  * R/C bit changes.
+  */
+-static int hpte_dirty(struct revmap_entry *revp, unsigned long *hptp)
++static int hpte_dirty(struct revmap_entry *revp, __be64 *hptp)
+ {
+ 	unsigned long rcbits_unset;
+ 
+@@ -1316,13 +1321,14 @@
+ 
+ 	/* Also need to consider changes in reference and changed bits */
+ 	rcbits_unset = ~revp->guest_rpte & (HPTE_R_R | HPTE_R_C);
+-	if ((hptp[0] & HPTE_V_VALID) && (hptp[1] & rcbits_unset))
++	if ((be64_to_cpu(hptp[0]) & HPTE_V_VALID) &&
++	    (be64_to_cpu(hptp[1]) & rcbits_unset))
+ 		return 1;
+ 
+ 	return 0;
+ }
+ 
+-static long record_hpte(unsigned long flags, unsigned long *hptp,
++static long record_hpte(unsigned long flags, __be64 *hptp,
+ 			unsigned long *hpte, struct revmap_entry *revp,
+ 			int want_valid, int first_pass)
+ {
+@@ -1337,10 +1343,10 @@
+ 		return 0;
+ 
+ 	valid = 0;
+-	if (hptp[0] & (HPTE_V_VALID | HPTE_V_ABSENT)) {
++	if (be64_to_cpu(hptp[0]) & (HPTE_V_VALID | HPTE_V_ABSENT)) {
+ 		valid = 1;
+ 		if ((flags & KVM_GET_HTAB_BOLTED_ONLY) &&
+-		    !(hptp[0] & HPTE_V_BOLTED))
++		    !(be64_to_cpu(hptp[0]) & HPTE_V_BOLTED))
+ 			valid = 0;
+ 	}
+ 	if (valid != want_valid)
+@@ -1352,7 +1358,7 @@
+ 		preempt_disable();
+ 		while (!try_lock_hpte(hptp, HPTE_V_HVLOCK))
+ 			cpu_relax();
+-		v = hptp[0];
++		v = be64_to_cpu(hptp[0]);
+ 
+ 		/* re-evaluate valid and dirty from synchronized HPTE value */
+ 		valid = !!(v & HPTE_V_VALID);
+@@ -1360,9 +1366,9 @@
+ 
+ 		/* Harvest R and C into guest view if necessary */
+ 		rcbits_unset = ~revp->guest_rpte & (HPTE_R_R | HPTE_R_C);
+-		if (valid && (rcbits_unset & hptp[1])) {
+-			revp->guest_rpte |= (hptp[1] & (HPTE_R_R | HPTE_R_C)) |
+-				HPTE_GR_MODIFIED;
++		if (valid && (rcbits_unset & be64_to_cpu(hptp[1]))) {
++			revp->guest_rpte |= (be64_to_cpu(hptp[1]) &
++				(HPTE_R_R | HPTE_R_C)) | HPTE_GR_MODIFIED;
+ 			dirty = 1;
+ 		}
+ 
+@@ -1381,13 +1387,13 @@
+ 			revp->guest_rpte = r;
+ 		}
+ 		asm volatile(PPC_RELEASE_BARRIER "" : : : "memory");
+-		hptp[0] &= ~HPTE_V_HVLOCK;
++		hptp[0] &= ~cpu_to_be64(HPTE_V_HVLOCK);
+ 		preempt_enable();
+ 		if (!(valid == want_valid && (first_pass || dirty)))
+ 			ok = 0;
+ 	}
+-	hpte[0] = v;
+-	hpte[1] = r;
++	hpte[0] = cpu_to_be64(v);
++	hpte[1] = cpu_to_be64(r);
+ 	return ok;
+ }
+ 
+@@ -1397,7 +1403,7 @@
+ 	struct kvm_htab_ctx *ctx = file->private_data;
+ 	struct kvm *kvm = ctx->kvm;
+ 	struct kvm_get_htab_header hdr;
+-	unsigned long *hptp;
++	__be64 *hptp;
+ 	struct revmap_entry *revp;
+ 	unsigned long i, nb, nw;
+ 	unsigned long __user *lbuf;
+@@ -1413,7 +1419,7 @@
+ 	flags = ctx->flags;
+ 
+ 	i = ctx->index;
+-	hptp = (unsigned long *)(kvm->arch.hpt_virt + (i * HPTE_SIZE));
++	hptp = (__be64 *)(kvm->arch.hpt_virt + (i * HPTE_SIZE));
+ 	revp = kvm->arch.revmap + i;
+ 	lbuf = (unsigned long __user *)buf;
+ 
+@@ -1497,7 +1503,7 @@
+ 	unsigned long i, j;
+ 	unsigned long v, r;
+ 	unsigned long __user *lbuf;
+-	unsigned long *hptp;
++	__be64 *hptp;
+ 	unsigned long tmp[2];
+ 	ssize_t nb;
+ 	long int err, ret;
+@@ -1539,7 +1545,7 @@
+ 		    i + hdr.n_valid + hdr.n_invalid > kvm->arch.hpt_npte)
+ 			break;
+ 
+-		hptp = (unsigned long *)(kvm->arch.hpt_virt + (i * HPTE_SIZE));
++		hptp = (__be64 *)(kvm->arch.hpt_virt + (i * HPTE_SIZE));
+ 		lbuf = (unsigned long __user *)buf;
+ 		for (j = 0; j < hdr.n_valid; ++j) {
+ 			err = -EFAULT;
+@@ -1551,7 +1557,7 @@
+ 			lbuf += 2;
+ 			nb += HPTE_SIZE;
+ 
+-			if (hptp[0] & (HPTE_V_VALID | HPTE_V_ABSENT))
++			if (be64_to_cpu(hptp[0]) & (HPTE_V_VALID | HPTE_V_ABSENT))
+ 				kvmppc_do_h_remove(kvm, 0, i, 0, tmp);
+ 			err = -EIO;
+ 			ret = kvmppc_virtmode_do_h_enter(kvm, H_EXACT, i, v, r,
+@@ -1577,7 +1583,7 @@
+ 		}
+ 
+ 		for (j = 0; j < hdr.n_invalid; ++j) {
+-			if (hptp[0] & (HPTE_V_VALID | HPTE_V_ABSENT))
++			if (be64_to_cpu(hptp[0]) & (HPTE_V_VALID | HPTE_V_ABSENT))
+ 				kvmppc_do_h_remove(kvm, 0, i, 0, tmp);
+ 			++i;
+ 			hptp += 2;
+--- a/arch/powerpc/kvm/book3s_hv_rm_mmu.c
++++ b/arch/powerpc/kvm/book3s_hv_rm_mmu.c
+@@ -154,10 +154,10 @@
+ 	return kvmppc_read_update_linux_pte(ptep, writing, hugepage_shift);
+ }
+ 
+-static inline void unlock_hpte(unsigned long *hpte, unsigned long hpte_v)
++static inline void unlock_hpte(__be64 *hpte, unsigned long hpte_v)
+ {
+ 	asm volatile(PPC_RELEASE_BARRIER "" : : : "memory");
+-	hpte[0] = hpte_v;
++	hpte[0] = cpu_to_be64(hpte_v);
+ }
+ 
+ long kvmppc_do_h_enter(struct kvm *kvm, unsigned long flags,
+@@ -166,7 +166,7 @@
+ {
+ 	unsigned long i, pa, gpa, gfn, psize;
+ 	unsigned long slot_fn, hva;
+-	unsigned long *hpte;
++	__be64 *hpte;
+ 	struct revmap_entry *rev;
+ 	unsigned long g_ptel;
+ 	struct kvm_memory_slot *memslot;
+@@ -275,9 +275,9 @@
+ 		return H_PARAMETER;
+ 	if (likely((flags & H_EXACT) == 0)) {
+ 		pte_index &= ~7UL;
+-		hpte = (unsigned long *)(kvm->arch.hpt_virt + (pte_index << 4));
++		hpte = (__be64 *)(kvm->arch.hpt_virt + (pte_index << 4));
+ 		for (i = 0; i < 8; ++i) {
+-			if ((*hpte & HPTE_V_VALID) == 0 &&
++			if ((be64_to_cpu(*hpte) & HPTE_V_VALID) == 0 &&
+ 			    try_lock_hpte(hpte, HPTE_V_HVLOCK | HPTE_V_VALID |
+ 					  HPTE_V_ABSENT))
+ 				break;
+@@ -292,11 +292,13 @@
+ 			 */
+ 			hpte -= 16;
+ 			for (i = 0; i < 8; ++i) {
++				u64 pte;
+ 				while (!try_lock_hpte(hpte, HPTE_V_HVLOCK))
+ 					cpu_relax();
+-				if (!(*hpte & (HPTE_V_VALID | HPTE_V_ABSENT)))
++				pte = be64_to_cpu(*hpte);
++				if (!(pte & (HPTE_V_VALID | HPTE_V_ABSENT)))
+ 					break;
+-				*hpte &= ~HPTE_V_HVLOCK;
++				*hpte &= ~cpu_to_be64(HPTE_V_HVLOCK);
+ 				hpte += 2;
+ 			}
+ 			if (i == 8)
+@@ -304,14 +306,17 @@
+ 		}
+ 		pte_index += i;
+ 	} else {
+-		hpte = (unsigned long *)(kvm->arch.hpt_virt + (pte_index << 4));
++		hpte = (__be64 *)(kvm->arch.hpt_virt + (pte_index << 4));
+ 		if (!try_lock_hpte(hpte, HPTE_V_HVLOCK | HPTE_V_VALID |
+ 				   HPTE_V_ABSENT)) {
+ 			/* Lock the slot and check again */
++			u64 pte;
++
+ 			while (!try_lock_hpte(hpte, HPTE_V_HVLOCK))
+ 				cpu_relax();
+-			if (*hpte & (HPTE_V_VALID | HPTE_V_ABSENT)) {
+-				*hpte &= ~HPTE_V_HVLOCK;
++			pte = be64_to_cpu(*hpte);
++			if (pte & (HPTE_V_VALID | HPTE_V_ABSENT)) {
++				*hpte &= ~cpu_to_be64(HPTE_V_HVLOCK);
+ 				return H_PTEG_FULL;
+ 			}
+ 		}
+@@ -347,11 +352,11 @@
+ 		}
+ 	}
+ 
+-	hpte[1] = ptel;
++	hpte[1] = cpu_to_be64(ptel);
+ 
+ 	/* Write the first HPTE dword, unlocking the HPTE and making it valid */
+ 	eieio();
+-	hpte[0] = pteh;
++	hpte[0] = cpu_to_be64(pteh);
+ 	asm volatile("ptesync" : : : "memory");
+ 
+ 	*pte_idx_ret = pte_index;
+@@ -468,30 +473,35 @@
+ 			unsigned long pte_index, unsigned long avpn,
+ 			unsigned long *hpret)
+ {
+-	unsigned long *hpte;
++	__be64 *hpte;
+ 	unsigned long v, r, rb;
+ 	struct revmap_entry *rev;
++	u64 pte;
+ 
+ 	if (pte_index >= kvm->arch.hpt_npte)
+ 		return H_PARAMETER;
+-	hpte = (unsigned long *)(kvm->arch.hpt_virt + (pte_index << 4));
++	hpte = (__be64 *)(kvm->arch.hpt_virt + (pte_index << 4));
+ 	while (!try_lock_hpte(hpte, HPTE_V_HVLOCK))
+ 		cpu_relax();
+-	if ((hpte[0] & (HPTE_V_ABSENT | HPTE_V_VALID)) == 0 ||
+-	    ((flags & H_AVPN) && (hpte[0] & ~0x7fUL) != avpn) ||
+-	    ((flags & H_ANDCOND) && (hpte[0] & avpn) != 0)) {
+-		hpte[0] &= ~HPTE_V_HVLOCK;
++	pte = be64_to_cpu(hpte[0]);
++	if ((pte & (HPTE_V_ABSENT | HPTE_V_VALID)) == 0 ||
++	    ((flags & H_AVPN) && (pte & ~0x7fUL) != avpn) ||
++	    ((flags & H_ANDCOND) && (pte & avpn) != 0)) {
++		hpte[0] &= ~cpu_to_be64(HPTE_V_HVLOCK);
+ 		return H_NOT_FOUND;
+ 	}
+ 
+ 	rev = real_vmalloc_addr(&kvm->arch.revmap[pte_index]);
+-	v = hpte[0] & ~HPTE_V_HVLOCK;
++	v = pte & ~HPTE_V_HVLOCK;
+ 	if (v & HPTE_V_VALID) {
+-		hpte[0] &= ~HPTE_V_VALID;
+-		rb = compute_tlbie_rb(v, hpte[1], pte_index);
++		u64 pte1;
++
++		pte1 = be64_to_cpu(hpte[1]);
++		hpte[0] &= ~cpu_to_be64(HPTE_V_VALID);
++		rb = compute_tlbie_rb(v, pte1, pte_index);
+ 		do_tlbies(kvm, &rb, 1, global_invalidates(kvm, flags), true);
+ 		/* Read PTE low word after tlbie to get final R/C values */
+-		remove_revmap_chain(kvm, pte_index, rev, v, hpte[1]);
++		remove_revmap_chain(kvm, pte_index, rev, v, pte1);
+ 	}
+ 	r = rev->guest_rpte & ~HPTE_GR_RESERVED;
+ 	note_hpte_modification(kvm, rev);
+@@ -514,12 +524,14 @@
+ {
+ 	struct kvm *kvm = vcpu->kvm;
+ 	unsigned long *args = &vcpu->arch.gpr[4];
+-	unsigned long *hp, *hptes[4], tlbrb[4];
++	__be64 *hp, *hptes[4];
++	unsigned long tlbrb[4];
+ 	long int i, j, k, n, found, indexes[4];
+ 	unsigned long flags, req, pte_index, rcbits;
+ 	int global;
+ 	long int ret = H_SUCCESS;
+ 	struct revmap_entry *rev, *revs[4];
++	u64 hp0;
+ 
+ 	global = global_invalidates(kvm, 0);
+ 	for (i = 0; i < 4 && ret == H_SUCCESS; ) {
+@@ -542,8 +554,7 @@
+ 				ret = H_PARAMETER;
+ 				break;
+ 			}
+-			hp = (unsigned long *)
+-				(kvm->arch.hpt_virt + (pte_index << 4));
++			hp = (__be64 *) (kvm->arch.hpt_virt + (pte_index << 4));
+ 			/* to avoid deadlock, don't spin except for first */
+ 			if (!try_lock_hpte(hp, HPTE_V_HVLOCK)) {
+ 				if (n)
+@@ -552,23 +563,24 @@
+ 					cpu_relax();
+ 			}
+ 			found = 0;
+-			if (hp[0] & (HPTE_V_ABSENT | HPTE_V_VALID)) {
++			hp0 = be64_to_cpu(hp[0]);
++			if (hp0 & (HPTE_V_ABSENT | HPTE_V_VALID)) {
+ 				switch (flags & 3) {
+ 				case 0:		/* absolute */
+ 					found = 1;
+ 					break;
+ 				case 1:		/* andcond */
+-					if (!(hp[0] & args[j + 1]))
++					if (!(hp0 & args[j + 1]))
+ 						found = 1;
+ 					break;
+ 				case 2:		/* AVPN */
+-					if ((hp[0] & ~0x7fUL) == args[j + 1])
++					if ((hp0 & ~0x7fUL) == args[j + 1])
+ 						found = 1;
+ 					break;
+ 				}
+ 			}
+ 			if (!found) {
+-				hp[0] &= ~HPTE_V_HVLOCK;
++				hp[0] &= ~cpu_to_be64(HPTE_V_HVLOCK);
+ 				args[j] = ((0x90 | flags) << 56) + pte_index;
+ 				continue;
+ 			}
+@@ -577,7 +589,7 @@
+ 			rev = real_vmalloc_addr(&kvm->arch.revmap[pte_index]);
+ 			note_hpte_modification(kvm, rev);
+ 
+-			if (!(hp[0] & HPTE_V_VALID)) {
++			if (!(hp0 & HPTE_V_VALID)) {
+ 				/* insert R and C bits from PTE */
+ 				rcbits = rev->guest_rpte & (HPTE_R_R|HPTE_R_C);
+ 				args[j] |= rcbits << (56 - 5);
+@@ -585,8 +597,10 @@
+ 				continue;
+ 			}
+ 
+-			hp[0] &= ~HPTE_V_VALID;		/* leave it locked */
+-			tlbrb[n] = compute_tlbie_rb(hp[0], hp[1], pte_index);
++			/* leave it locked */
++			hp[0] &= ~cpu_to_be64(HPTE_V_VALID);
++			tlbrb[n] = compute_tlbie_rb(be64_to_cpu(hp[0]),
++				be64_to_cpu(hp[1]), pte_index);
+ 			indexes[n] = j;
+ 			hptes[n] = hp;
+ 			revs[n] = rev;
+@@ -605,7 +619,8 @@
+ 			pte_index = args[j] & ((1ul << 56) - 1);
+ 			hp = hptes[k];
+ 			rev = revs[k];
+-			remove_revmap_chain(kvm, pte_index, rev, hp[0], hp[1]);
++			remove_revmap_chain(kvm, pte_index, rev,
++				be64_to_cpu(hp[0]), be64_to_cpu(hp[1]));
+ 			rcbits = rev->guest_rpte & (HPTE_R_R|HPTE_R_C);
+ 			args[j] |= rcbits << (56 - 5);
+ 			hp[0] = 0;
+@@ -620,23 +635,25 @@
+ 		      unsigned long va)
+ {
+ 	struct kvm *kvm = vcpu->kvm;
+-	unsigned long *hpte;
++	__be64 *hpte;
+ 	struct revmap_entry *rev;
+ 	unsigned long v, r, rb, mask, bits;
++	u64 pte;
+ 
+ 	if (pte_index >= kvm->arch.hpt_npte)
+ 		return H_PARAMETER;
+ 
+-	hpte = (unsigned long *)(kvm->arch.hpt_virt + (pte_index << 4));
++	hpte = (__be64 *)(kvm->arch.hpt_virt + (pte_index << 4));
+ 	while (!try_lock_hpte(hpte, HPTE_V_HVLOCK))
+ 		cpu_relax();
+-	if ((hpte[0] & (HPTE_V_ABSENT | HPTE_V_VALID)) == 0 ||
+-	    ((flags & H_AVPN) && (hpte[0] & ~0x7fUL) != avpn)) {
+-		hpte[0] &= ~HPTE_V_HVLOCK;
++	pte = be64_to_cpu(hpte[0]);
++	if ((pte & (HPTE_V_ABSENT | HPTE_V_VALID)) == 0 ||
++	    ((flags & H_AVPN) && (pte & ~0x7fUL) != avpn)) {
++		hpte[0] &= ~cpu_to_be64(HPTE_V_HVLOCK);
+ 		return H_NOT_FOUND;
+ 	}
+ 
+-	v = hpte[0];
++	v = pte;
+ 	bits = (flags << 55) & HPTE_R_PP0;
+ 	bits |= (flags << 48) & HPTE_R_KEY_HI;
+ 	bits |= flags & (HPTE_R_PP | HPTE_R_N | HPTE_R_KEY_LO);
+@@ -650,12 +667,12 @@
+ 		rev->guest_rpte = r;
+ 		note_hpte_modification(kvm, rev);
+ 	}
+-	r = (hpte[1] & ~mask) | bits;
++	r = (be64_to_cpu(hpte[1]) & ~mask) | bits;
+ 
+ 	/* Update HPTE */
+ 	if (v & HPTE_V_VALID) {
+ 		rb = compute_tlbie_rb(v, r, pte_index);
+-		hpte[0] = v & ~HPTE_V_VALID;
++		hpte[0] = cpu_to_be64(v & ~HPTE_V_VALID);
+ 		do_tlbies(kvm, &rb, 1, global_invalidates(kvm, flags), true);
+ 		/*
+ 		 * If the host has this page as readonly but the guest
+@@ -681,9 +698,9 @@
+ 			}
+ 		}
+ 	}
+-	hpte[1] = r;
++	hpte[1] = cpu_to_be64(r);
+ 	eieio();
+-	hpte[0] = v & ~HPTE_V_HVLOCK;
++	hpte[0] = cpu_to_be64(v & ~HPTE_V_HVLOCK);
+ 	asm volatile("ptesync" : : : "memory");
+ 	return H_SUCCESS;
+ }
+@@ -692,7 +709,8 @@
+ 		   unsigned long pte_index)
+ {
+ 	struct kvm *kvm = vcpu->kvm;
+-	unsigned long *hpte, v, r;
++	__be64 *hpte;
++	unsigned long v, r;
+ 	int i, n = 1;
+ 	struct revmap_entry *rev = NULL;
+ 
+@@ -704,9 +722,9 @@
+ 	}
+ 	rev = real_vmalloc_addr(&kvm->arch.revmap[pte_index]);
+ 	for (i = 0; i < n; ++i, ++pte_index) {
+-		hpte = (unsigned long *)(kvm->arch.hpt_virt + (pte_index << 4));
+-		v = hpte[0] & ~HPTE_V_HVLOCK;
+-		r = hpte[1];
++		hpte = (__be64 *)(kvm->arch.hpt_virt + (pte_index << 4));
++		v = be64_to_cpu(hpte[0]) & ~HPTE_V_HVLOCK;
++		r = be64_to_cpu(hpte[1]);
+ 		if (v & HPTE_V_ABSENT) {
+ 			v &= ~HPTE_V_ABSENT;
+ 			v |= HPTE_V_VALID;
+@@ -721,25 +739,27 @@
+ 	return H_SUCCESS;
+ }
+ 
+-void kvmppc_invalidate_hpte(struct kvm *kvm, unsigned long *hptep,
++void kvmppc_invalidate_hpte(struct kvm *kvm, __be64 *hptep,
+ 			unsigned long pte_index)
+ {
+ 	unsigned long rb;
+ 
+-	hptep[0] &= ~HPTE_V_VALID;
+-	rb = compute_tlbie_rb(hptep[0], hptep[1], pte_index);
++	hptep[0] &= ~cpu_to_be64(HPTE_V_VALID);
++	rb = compute_tlbie_rb(be64_to_cpu(hptep[0]), be64_to_cpu(hptep[1]),
++			      pte_index);
+ 	do_tlbies(kvm, &rb, 1, 1, true);
+ }
+ EXPORT_SYMBOL_GPL(kvmppc_invalidate_hpte);
+ 
+-void kvmppc_clear_ref_hpte(struct kvm *kvm, unsigned long *hptep,
++void kvmppc_clear_ref_hpte(struct kvm *kvm, __be64 *hptep,
+ 			   unsigned long pte_index)
+ {
+ 	unsigned long rb;
+ 	unsigned char rbyte;
+ 
+-	rb = compute_tlbie_rb(hptep[0], hptep[1], pte_index);
+-	rbyte = (hptep[1] & ~HPTE_R_R) >> 8;
++	rb = compute_tlbie_rb(be64_to_cpu(hptep[0]), be64_to_cpu(hptep[1]),
++			      pte_index);
++	rbyte = (be64_to_cpu(hptep[1]) & ~HPTE_R_R) >> 8;
+ 	/* modify only the second-last byte, which contains the ref bit */
+ 	*((char *)hptep + 14) = rbyte;
+ 	do_tlbies(kvm, &rb, 1, 1, false);
+@@ -765,7 +785,7 @@
+ 	unsigned long somask;
+ 	unsigned long vsid, hash;
+ 	unsigned long avpn;
+-	unsigned long *hpte;
++	__be64 *hpte;
+ 	unsigned long mask, val;
+ 	unsigned long v, r;
+ 
+@@ -797,11 +817,11 @@
+ 	val |= avpn;
+ 
+ 	for (;;) {
+-		hpte = (unsigned long *)(kvm->arch.hpt_virt + (hash << 7));
++		hpte = (__be64 *)(kvm->arch.hpt_virt + (hash << 7));
+ 
+ 		for (i = 0; i < 16; i += 2) {
+ 			/* Read the PTE racily */
+-			v = hpte[i] & ~HPTE_V_HVLOCK;
++			v = be64_to_cpu(hpte[i]) & ~HPTE_V_HVLOCK;
+ 
+ 			/* Check valid/absent, hash, segment size and AVPN */
+ 			if (!(v & valid) || (v & mask) != val)
+@@ -810,8 +830,8 @@
+ 			/* Lock the PTE and read it under the lock */
+ 			while (!try_lock_hpte(&hpte[i], HPTE_V_HVLOCK))
+ 				cpu_relax();
+-			v = hpte[i] & ~HPTE_V_HVLOCK;
+-			r = hpte[i+1];
++			v = be64_to_cpu(hpte[i]) & ~HPTE_V_HVLOCK;
++			r = be64_to_cpu(hpte[i+1]);
+ 
+ 			/*
+ 			 * Check the HPTE again, including base page size
+@@ -822,7 +842,7 @@
+ 				return (hash << 3) + (i >> 1);
+ 
+ 			/* Unlock and move on */
+-			hpte[i] = v;
++			hpte[i] = cpu_to_be64(v);
+ 		}
+ 
+ 		if (val & HPTE_V_SECONDARY)
+@@ -851,7 +871,7 @@
+ 	struct kvm *kvm = vcpu->kvm;
+ 	long int index;
+ 	unsigned long v, r, gr;
+-	unsigned long *hpte;
++	__be64 *hpte;
+ 	unsigned long valid;
+ 	struct revmap_entry *rev;
+ 	unsigned long pp, key;
+@@ -867,9 +887,9 @@
+ 			return status;	/* there really was no HPTE */
+ 		return 0;		/* for prot fault, HPTE disappeared */
+ 	}
+-	hpte = (unsigned long *)(kvm->arch.hpt_virt + (index << 4));
+-	v = hpte[0] & ~HPTE_V_HVLOCK;
+-	r = hpte[1];
++	hpte = (__be64 *)(kvm->arch.hpt_virt + (index << 4));
++	v = be64_to_cpu(hpte[0]) & ~HPTE_V_HVLOCK;
++	r = be64_to_cpu(hpte[1]);
+ 	rev = real_vmalloc_addr(&kvm->arch.revmap[index]);
+ 	gr = rev->guest_rpte;
+ 

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-Move-vcore-definition-to-end-of-kvm_a.patch (from r21884, dists/sid/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-Move-vcore-definition-to-end-of-kvm_a.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-Move-vcore-definition-to-end-of-kvm_a.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21884, dists/sid/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-Move-vcore-definition-to-end-of-kvm_a.patch)
@@ -0,0 +1,42 @@
+From: Alexander Graf <agraf at suse.de>
+Date: Fri, 4 Jul 2014 12:52:51 +0200
+Subject: KVM: PPC: Book3S: Move vcore definition to end of kvm_arch struct
+Origin: https://git.kernel.org/linus/1287cb3fa85cd4a0d18402f6a23e1d4c6a9d7b8b
+
+When building KVM with a lot of vcores (NR_CPUS is big), we can potentially
+get out of the ld immediate range for dereferences inside that struct.
+
+Move the array to the end of our kvm_arch struct. This fixes compilation
+issues with NR_CPUS=2048 for me.
+
+Signed-off-by: Alexander Graf <agraf at suse.de>
+---
+ arch/powerpc/include/asm/kvm_host.h | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h
+index faf2f0e..855ba4d 100644
+--- a/arch/powerpc/include/asm/kvm_host.h
++++ b/arch/powerpc/include/asm/kvm_host.h
+@@ -255,7 +255,6 @@ struct kvm_arch {
+ 	atomic_t hpte_mod_interest;
+ 	spinlock_t slot_phys_lock;
+ 	cpumask_t need_tlb_flush;
+-	struct kvmppc_vcore *vcores[KVM_MAX_VCORES];
+ 	int hpt_cma_alloc;
+ #endif /* CONFIG_KVM_BOOK3S_HV_POSSIBLE */
+ #ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
+@@ -273,6 +272,10 @@ struct kvm_arch {
+ 	struct kvmppc_xics *xics;
+ #endif
+ 	struct kvmppc_ops *kvm_ops;
++#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
++	/* This array can grow quite large, keep it at the end */
++	struct kvmppc_vcore *vcores[KVM_MAX_VCORES];
++#endif
+ };
+ 
+ /*
+-- 
+2.0.0
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-PR-Fix-sparse-endian-checks.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-PR-Fix-sparse-endian-checks.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-PR-Fix-sparse-endian-checks.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-PR-Fix-sparse-endian-checks.patch)
@@ -0,0 +1,76 @@
+From: Alexander Graf <agraf at suse.de>
+Date: Mon, 16 Jun 2014 13:58:11 +0200
+Subject: KVM: PPC: Book3S PR: Fix sparse endian checks
+Origin: https://git.kernel.org/linus/f396df35188c59a5ecb83932190505ef297754e6
+
+While sending sparse with endian checks over the code base, it triggered at
+some places that were missing casts or had wrong types. Fix them up.
+
+Signed-off-by: Alexander Graf <agraf at suse.de>
+---
+ arch/powerpc/kvm/book3s_pr_papr.c |   21 +++++++++++----------
+ 1 file changed, 11 insertions(+), 10 deletions(-)
+
+diff --git a/arch/powerpc/kvm/book3s_pr_papr.c b/arch/powerpc/kvm/book3s_pr_papr.c
+index 52a63bf..f7c25c6 100644
+--- a/arch/powerpc/kvm/book3s_pr_papr.c
++++ b/arch/powerpc/kvm/book3s_pr_papr.c
+@@ -40,8 +40,9 @@ static int kvmppc_h_pr_enter(struct kvm_vcpu *vcpu)
+ {
+ 	long flags = kvmppc_get_gpr(vcpu, 4);
+ 	long pte_index = kvmppc_get_gpr(vcpu, 5);
+-	unsigned long pteg[2 * 8];
+-	unsigned long pteg_addr, i, *hpte;
++	__be64 pteg[2 * 8];
++	__be64 *hpte;
++	unsigned long pteg_addr, i;
+ 	long int ret;
+ 
+ 	i = pte_index & 7;
+@@ -93,8 +94,8 @@ static int kvmppc_h_pr_remove(struct kvm_vcpu *vcpu)
+ 	pteg = get_pteg_addr(vcpu, pte_index);
+ 	mutex_lock(&vcpu->kvm->arch.hpt_mutex);
+ 	copy_from_user(pte, (void __user *)pteg, sizeof(pte));
+-	pte[0] = be64_to_cpu(pte[0]);
+-	pte[1] = be64_to_cpu(pte[1]);
++	pte[0] = be64_to_cpu((__force __be64)pte[0]);
++	pte[1] = be64_to_cpu((__force __be64)pte[1]);
+ 
+ 	ret = H_NOT_FOUND;
+ 	if ((pte[0] & HPTE_V_VALID) == 0 ||
+@@ -171,8 +172,8 @@ static int kvmppc_h_pr_bulk_remove(struct kvm_vcpu *vcpu)
+ 
+ 		pteg = get_pteg_addr(vcpu, tsh & H_BULK_REMOVE_PTEX);
+ 		copy_from_user(pte, (void __user *)pteg, sizeof(pte));
+-		pte[0] = be64_to_cpu(pte[0]);
+-		pte[1] = be64_to_cpu(pte[1]);
++		pte[0] = be64_to_cpu((__force __be64)pte[0]);
++		pte[1] = be64_to_cpu((__force __be64)pte[1]);
+ 
+ 		/* tsl = AVPN */
+ 		flags = (tsh & H_BULK_REMOVE_FLAGS) >> 26;
+@@ -211,8 +212,8 @@ static int kvmppc_h_pr_protect(struct kvm_vcpu *vcpu)
+ 	pteg = get_pteg_addr(vcpu, pte_index);
+ 	mutex_lock(&vcpu->kvm->arch.hpt_mutex);
+ 	copy_from_user(pte, (void __user *)pteg, sizeof(pte));
+-	pte[0] = be64_to_cpu(pte[0]);
+-	pte[1] = be64_to_cpu(pte[1]);
++	pte[0] = be64_to_cpu((__force __be64)pte[0]);
++	pte[1] = be64_to_cpu((__force __be64)pte[1]);
+ 
+ 	ret = H_NOT_FOUND;
+ 	if ((pte[0] & HPTE_V_VALID) == 0 ||
+@@ -231,8 +232,8 @@ static int kvmppc_h_pr_protect(struct kvm_vcpu *vcpu)
+ 
+ 	rb = compute_tlbie_rb(v, r, pte_index);
+ 	vcpu->arch.mmu.tlbie(vcpu, rb, rb & 1 ? true : false);
+-	pte[0] = cpu_to_be64(pte[0]);
+-	pte[1] = cpu_to_be64(pte[1]);
++	pte[0] = (__force u64)cpu_to_be64(pte[0]);
++	pte[1] = (__force u64)cpu_to_be64(pte[1]);
+ 	copy_to_user((void __user *)pteg, pte, sizeof(pte));
+ 	ret = H_SUCCESS;
+ 
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-PR-Handle-hyp-doorbell-exits.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-PR-Handle-hyp-doorbell-exits.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-PR-Handle-hyp-doorbell-exits.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3S-PR-Handle-hyp-doorbell-exits.patch)
@@ -0,0 +1,28 @@
+From: Alexander Graf <agraf at suse.de>
+Date: Mon, 16 Jun 2014 16:37:38 +0200
+Subject: KVM: PPC: Book3S PR: Handle hyp doorbell exits
+Origin: https://git.kernel.org/linus/568fccc43f901889b94b228cd0238916cb40e0bd
+
+If we're running PR KVM in HV mode, we may get hypervisor doorbell interrupts.
+Handle those the same way we treat normal doorbells.
+
+Signed-off-by: Alexander Graf <agraf at suse.de>
+---
+ arch/powerpc/kvm/book3s_pr.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c
+index 8ea7da4..3b82e86 100644
+--- a/arch/powerpc/kvm/book3s_pr.c
++++ b/arch/powerpc/kvm/book3s_pr.c
+@@ -988,6 +988,7 @@ int kvmppc_handle_exit_pr(struct kvm_run *run, struct kvm_vcpu *vcpu,
+ 	case BOOK3S_INTERRUPT_DECREMENTER:
+ 	case BOOK3S_INTERRUPT_HV_DECREMENTER:
+ 	case BOOK3S_INTERRUPT_DOORBELL:
++	case BOOK3S_INTERRUPT_H_DOORBELL:
+ 		vcpu->stat.dec_exits++;
+ 		r = RESUME_GUEST;
+ 		break;
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3s-HV-Fix-tlbie-compile-error.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3s-HV-Fix-tlbie-compile-error.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3s-HV-Fix-tlbie-compile-error.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3s-HV-Fix-tlbie-compile-error.patch)
@@ -0,0 +1,44 @@
+From: Alexander Graf <agraf at suse.de>
+Date: Wed, 11 Jun 2014 17:13:55 +0200
+Subject: KVM: PPC: Book3s HV: Fix tlbie compile error
+Origin: https://git.kernel.org/linus/f6bf3a66227447f89f25b9db0ae39357decf2509
+
+Some compilers complain about uninitialized variables in the compute_tlbie_rb
+function. When you follow the code path you'll realize that we'll never get
+to that point, but the compiler isn't all that smart.
+
+So just default to 4k page sizes for everything, making the compiler happy
+and the code slightly easier to read.
+
+Signed-off-by: Alexander Graf <agraf at suse.de>
+Acked-by: Paul Mackerras <paulus at samba.org>
+---
+ arch/powerpc/include/asm/kvm_book3s_64.h |    8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/arch/powerpc/include/asm/kvm_book3s_64.h b/arch/powerpc/include/asm/kvm_book3s_64.h
+index fddb72b..c7871f3 100644
+--- a/arch/powerpc/include/asm/kvm_book3s_64.h
++++ b/arch/powerpc/include/asm/kvm_book3s_64.h
+@@ -110,16 +110,12 @@ static inline int __hpte_actual_psize(unsigned int lp, int psize)
+ static inline unsigned long compute_tlbie_rb(unsigned long v, unsigned long r,
+ 					     unsigned long pte_index)
+ {
+-	int b_psize, a_psize;
++	int b_psize = MMU_PAGE_4K, a_psize = MMU_PAGE_4K;
+ 	unsigned int penc;
+ 	unsigned long rb = 0, va_low, sllp;
+ 	unsigned int lp = (r >> LP_SHIFT) & ((1 << LP_BITS) - 1);
+ 
+-	if (!(v & HPTE_V_LARGE)) {
+-		/* both base and actual psize is 4k */
+-		b_psize = MMU_PAGE_4K;
+-		a_psize = MMU_PAGE_4K;
+-	} else {
++	if (v & HPTE_V_LARGE) {
+ 		for (b_psize = 0; b_psize < MMU_PAGE_COUNT; b_psize++) {
+ 
+ 			/* valid entries have a shift value */
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3s-PR-Disable-AIL-mode-with-OPAL.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3s-PR-Disable-AIL-mode-with-OPAL.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Book3s-PR-Disable-AIL-mode-with-OPAL.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Book3s-PR-Disable-AIL-mode-with-OPAL.patch)
@@ -0,0 +1,63 @@
+From: Alexander Graf <agraf at suse.de>
+Date: Mon, 9 Jun 2014 01:16:32 +0200
+Subject: KVM: PPC: Book3s PR: Disable AIL mode with OPAL
+Origin: https://git.kernel.org/linus/fb4188bad02f4871b26cf19b98e8d92499ca5d31
+
+When we're using PR KVM we must not allow the CPU to take interrupts
+in virtual mode, as the SLB does not contain host kernel mappings
+when running inside the guest context.
+
+To make sure we get good performance for non-KVM tasks but still
+properly functioning PR KVM, let's just disable AIL whenever a vcpu
+is scheduled in.
+
+This is fundamentally different from how we deal with AIL on pSeries
+type machines where we disable AIL for the whole machine as soon as
+a single KVM VM is up.
+
+The reason for that is easy - on pSeries we do not have control over
+per-cpu configuration of AIL. We also don't want to mess with CPU hotplug
+races and AIL configuration, so setting it per CPU is easier and more
+flexible.
+
+This patch fixes running PR KVM on POWER8 bare metal for me.
+
+Signed-off-by: Alexander Graf <agraf at suse.de>
+Acked-by: Paul Mackerras <paulus at samba.org>
+---
+ arch/powerpc/kvm/book3s_pr.c |   12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c
+index 3da412e..8ea7da4 100644
+--- a/arch/powerpc/kvm/book3s_pr.c
++++ b/arch/powerpc/kvm/book3s_pr.c
+@@ -71,6 +71,12 @@ static void kvmppc_core_vcpu_load_pr(struct kvm_vcpu *vcpu, int cpu)
+ 	svcpu->in_use = 0;
+ 	svcpu_put(svcpu);
+ #endif
++
++	/* Disable AIL if supported */
++	if (cpu_has_feature(CPU_FTR_HVMODE) &&
++	    cpu_has_feature(CPU_FTR_ARCH_207S))
++		mtspr(SPRN_LPCR, mfspr(SPRN_LPCR) & ~LPCR_AIL);
++
+ 	vcpu->cpu = smp_processor_id();
+ #ifdef CONFIG_PPC_BOOK3S_32
+ 	current->thread.kvm_shadow_vcpu = vcpu->arch.shadow_vcpu;
+@@ -91,6 +97,12 @@ static void kvmppc_core_vcpu_put_pr(struct kvm_vcpu *vcpu)
+ 
+ 	kvmppc_giveup_ext(vcpu, MSR_FP | MSR_VEC | MSR_VSX);
+ 	kvmppc_giveup_fac(vcpu, FSCR_TAR_LG);
++
++	/* Enable AIL if supported */
++	if (cpu_has_feature(CPU_FTR_HVMODE) &&
++	    cpu_has_feature(CPU_FTR_ARCH_207S))
++		mtspr(SPRN_LPCR, mfspr(SPRN_LPCR) | LPCR_AIL_3);
++
+ 	vcpu->cpu = -1;
+ }
+ 
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Enable-IRQFD-support-for-the-XICS-interrupt-.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Enable-IRQFD-support-for-the-XICS-interrupt-.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-PPC-Enable-IRQFD-support-for-the-XICS-interrupt-.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-PPC-Enable-IRQFD-support-for-the-XICS-interrupt-.patch)
@@ -0,0 +1,193 @@
+From: Paul Mackerras <paulus at samba.org>
+Date: Mon, 30 Jun 2014 20:51:14 +1000
+Subject: KVM: PPC: Enable IRQFD support for the XICS interrupt
+ controller
+Origin: https://git.kernel.org/linus/25a2150bee00b4d996487552948b9b3ba21d0257
+
+This makes it possible to use IRQFDs on platforms that use the XICS
+interrupt controller.  To do this we implement kvm_irq_map_gsi() and
+kvm_irq_map_chip_pin() in book3s_xics.c, so as to provide a 1-1 mapping
+between global interrupt numbers and XICS interrupt source numbers.
+For now, all interrupts are mapped as "IRQCHIP" interrupts, and no
+MSI support is provided.
+
+This means that kvm_set_irq can now get called with level == 0 or 1
+as well as the powerpc-specific values KVM_INTERRUPT_SET,
+KVM_INTERRUPT_UNSET and KVM_INTERRUPT_SET_LEVEL.  We change
+ics_deliver_irq() to accept all those values, and remove its
+report_status argument, as it is always false, given that we don't
+support KVM_IRQ_LINE_STATUS.
+
+This also adds support for interrupt ack notifiers to the XICS code
+so that the IRQFD resampler functionality can be supported.
+
+Signed-off-by: Paul Mackerras <paulus at samba.org>
+Tested-by: Eric Auger <eric.auger at linaro.org>
+Tested-by: Cornelia Huck <cornelia.huck at de.ibm.com>
+Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
+---
+ arch/powerpc/kvm/Kconfig             |    2 ++
+ arch/powerpc/kvm/book3s_hv_rm_xics.c |    5 ++++
+ arch/powerpc/kvm/book3s_xics.c       |   55 ++++++++++++++++++++++++++++------
+ arch/powerpc/kvm/book3s_xics.h       |    2 ++
+ 4 files changed, 55 insertions(+), 9 deletions(-)
+
+diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig
+index d4741db..602eb51 100644
+--- a/arch/powerpc/kvm/Kconfig
++++ b/arch/powerpc/kvm/Kconfig
+@@ -170,6 +170,8 @@ config KVM_MPIC
+ config KVM_XICS
+ 	bool "KVM in-kernel XICS emulation"
+ 	depends on KVM_BOOK3S_64 && !KVM_MPIC
++	select HAVE_KVM_IRQCHIP
++	select HAVE_KVM_IRQFD
+ 	---help---
+ 	  Include support for the XICS (eXternal Interrupt Controller
+ 	  Specification) interrupt controller architecture used on
+diff --git a/arch/powerpc/kvm/book3s_hv_rm_xics.c b/arch/powerpc/kvm/book3s_hv_rm_xics.c
+index b4b0082..3ee38e6 100644
+--- a/arch/powerpc/kvm/book3s_hv_rm_xics.c
++++ b/arch/powerpc/kvm/book3s_hv_rm_xics.c
+@@ -401,6 +401,11 @@ int kvmppc_rm_h_eoi(struct kvm_vcpu *vcpu, unsigned long xirr)
+ 		icp->rm_action |= XICS_RM_REJECT;
+ 		icp->rm_reject = irq;
+ 	}
++
++	if (!hlist_empty(&vcpu->kvm->irq_ack_notifier_list)) {
++		icp->rm_action |= XICS_RM_NOTIFY_EOI;
++		icp->rm_eoied_irq = irq;
++	}
+  bail:
+ 	return check_too_hard(xics, icp);
+ }
+diff --git a/arch/powerpc/kvm/book3s_xics.c b/arch/powerpc/kvm/book3s_xics.c
+index d1acd32..eaeb780 100644
+--- a/arch/powerpc/kvm/book3s_xics.c
++++ b/arch/powerpc/kvm/book3s_xics.c
+@@ -64,8 +64,12 @@
+ static void icp_deliver_irq(struct kvmppc_xics *xics, struct kvmppc_icp *icp,
+ 			    u32 new_irq);
+ 
+-static int ics_deliver_irq(struct kvmppc_xics *xics, u32 irq, u32 level,
+-			   bool report_status)
++/*
++ * Return value ideally indicates how the interrupt was handled, but no
++ * callers look at it (given that we don't implement KVM_IRQ_LINE_STATUS),
++ * so just return 0.
++ */
++static int ics_deliver_irq(struct kvmppc_xics *xics, u32 irq, u32 level)
+ {
+ 	struct ics_irq_state *state;
+ 	struct kvmppc_ics *ics;
+@@ -82,17 +86,14 @@ static int ics_deliver_irq(struct kvmppc_xics *xics, u32 irq, u32 level,
+ 	if (!state->exists)
+ 		return -EINVAL;
+ 
+-	if (report_status)
+-		return state->asserted;
+-
+ 	/*
+ 	 * We set state->asserted locklessly. This should be fine as
+ 	 * we are the only setter, thus concurrent access is undefined
+ 	 * to begin with.
+ 	 */
+-	if (level == KVM_INTERRUPT_SET_LEVEL)
++	if (level == 1 || level == KVM_INTERRUPT_SET_LEVEL)
+ 		state->asserted = 1;
+-	else if (level == KVM_INTERRUPT_UNSET) {
++	else if (level == 0 || level == KVM_INTERRUPT_UNSET) {
+ 		state->asserted = 0;
+ 		return 0;
+ 	}
+@@ -100,7 +101,7 @@ static int ics_deliver_irq(struct kvmppc_xics *xics, u32 irq, u32 level,
+ 	/* Attempt delivery */
+ 	icp_deliver_irq(xics, NULL, irq);
+ 
+-	return state->asserted;
++	return 0;
+ }
+ 
+ static void ics_check_resend(struct kvmppc_xics *xics, struct kvmppc_ics *ics,
+@@ -772,6 +773,8 @@ static noinline int kvmppc_h_eoi(struct kvm_vcpu *vcpu, unsigned long xirr)
+ 	if (state->asserted)
+ 		icp_deliver_irq(xics, icp, irq);
+ 
++	kvm_notify_acked_irq(vcpu->kvm, 0, irq);
++
+ 	return H_SUCCESS;
+ }
+ 
+@@ -789,6 +792,8 @@ static noinline int kvmppc_xics_rm_complete(struct kvm_vcpu *vcpu, u32 hcall)
+ 		icp_check_resend(xics, icp);
+ 	if (icp->rm_action & XICS_RM_REJECT)
+ 		icp_deliver_irq(xics, icp, icp->rm_reject);
++	if (icp->rm_action & XICS_RM_NOTIFY_EOI)
++		kvm_notify_acked_irq(vcpu->kvm, 0, icp->rm_eoied_irq);
+ 
+ 	icp->rm_action = 0;
+ 
+@@ -1170,7 +1175,16 @@ int kvm_set_irq(struct kvm *kvm, int irq_source_id, u32 irq, int level,
+ {
+ 	struct kvmppc_xics *xics = kvm->arch.xics;
+ 
+-	return ics_deliver_irq(xics, irq, level, line_status);
++	return ics_deliver_irq(xics, irq, level);
++}
++
++int kvm_set_msi(struct kvm_kernel_irq_routing_entry *irq_entry, struct kvm *kvm,
++		int irq_source_id, int level, bool line_status)
++{
++	if (!level)
++		return -1;
++	return kvm_set_irq(kvm, irq_source_id, irq_entry->gsi,
++			   level, line_status);
+ }
+ 
+ static int xics_set_attr(struct kvm_device *dev, struct kvm_device_attr *attr)
+@@ -1301,3 +1315,26 @@ void kvmppc_xics_free_icp(struct kvm_vcpu *vcpu)
+ 	vcpu->arch.icp = NULL;
+ 	vcpu->arch.irq_type = KVMPPC_IRQ_DEFAULT;
+ }
++
++static int xics_set_irq(struct kvm_kernel_irq_routing_entry *e,
++			struct kvm *kvm, int irq_source_id, int level,
++			bool line_status)
++{
++	return kvm_set_irq(kvm, irq_source_id, e->gsi, level, line_status);
++}
++
++int kvm_irq_map_gsi(struct kvm *kvm,
++		    struct kvm_kernel_irq_routing_entry *entries, int gsi)
++{
++	entries->gsi = gsi;
++	entries->type = KVM_IRQ_ROUTING_IRQCHIP;
++	entries->set = xics_set_irq;
++	entries->irqchip.irqchip = 0;
++	entries->irqchip.pin = gsi;
++	return 1;
++}
++
++int kvm_irq_map_chip_pin(struct kvm *kvm, unsigned irqchip, unsigned pin)
++{
++	return pin;
++}
+diff --git a/arch/powerpc/kvm/book3s_xics.h b/arch/powerpc/kvm/book3s_xics.h
+index dd9326c..e8aaa7a 100644
+--- a/arch/powerpc/kvm/book3s_xics.h
++++ b/arch/powerpc/kvm/book3s_xics.h
+@@ -71,9 +71,11 @@ struct kvmppc_icp {
+ #define XICS_RM_KICK_VCPU	0x1
+ #define XICS_RM_CHECK_RESEND	0x2
+ #define XICS_RM_REJECT		0x4
++#define XICS_RM_NOTIFY_EOI	0x8
+ 	u32 rm_action;
+ 	struct kvm_vcpu *rm_kick_target;
+ 	u32  rm_reject;
++	u32  rm_eoied_irq;
+ 
+ 	/* Debug stuff for real mode */
+ 	union kvmppc_icp_state rm_dbgstate;
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Rename-and-add-argument-to-check_extension.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-Rename-and-add-argument-to-check_extension.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-Rename-and-add-argument-to-check_extension.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-Rename-and-add-argument-to-check_extension.patch)
@@ -0,0 +1,148 @@
+From: Alexander Graf <agraf at suse.de>
+Date: Mon, 14 Jul 2014 18:27:35 +0200
+Subject: KVM: Rename and add argument to check_extension
+Origin: https://git.kernel.org/linus/784aa3d7fb6f729c06d5836c9d9569f58e4d05ae
+
+In preparation to make the check_extension function available to VM scope
+we add a struct kvm * argument to the function header and rename the function
+accordingly. It will still be called from the /dev/kvm fd, but with a NULL
+argument for struct kvm *.
+
+Signed-off-by: Alexander Graf <agraf at suse.de>
+Acked-by: Paolo Bonzini <pbonzini at redhat.com>
+---
+ arch/arm/kvm/arm.c         |    2 +-
+ arch/ia64/kvm/kvm-ia64.c   |    2 +-
+ arch/mips/kvm/kvm_mips.c   |    2 +-
+ arch/powerpc/kvm/powerpc.c |    2 +-
+ arch/s390/kvm/kvm-s390.c   |    2 +-
+ arch/x86/kvm/x86.c         |    2 +-
+ include/linux/kvm_host.h   |    2 +-
+ virt/kvm/kvm_main.c        |    6 +++---
+ 8 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
+index 3c82b37..cb77f999 100644
+--- a/arch/arm/kvm/arm.c
++++ b/arch/arm/kvm/arm.c
+@@ -184,7 +184,7 @@ void kvm_arch_destroy_vm(struct kvm *kvm)
+ 	}
+ }
+ 
+-int kvm_dev_ioctl_check_extension(long ext)
++int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
+ {
+ 	int r;
+ 	switch (ext) {
+diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
+index 6a4309b..0729ba6 100644
+--- a/arch/ia64/kvm/kvm-ia64.c
++++ b/arch/ia64/kvm/kvm-ia64.c
+@@ -190,7 +190,7 @@ void kvm_arch_check_processor_compat(void *rtn)
+ 	*(int *)rtn = 0;
+ }
+ 
+-int kvm_dev_ioctl_check_extension(long ext)
++int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
+ {
+ 
+ 	int r;
+diff --git a/arch/mips/kvm/kvm_mips.c b/arch/mips/kvm/kvm_mips.c
+index d687c6e..3ca79aa 100644
+--- a/arch/mips/kvm/kvm_mips.c
++++ b/arch/mips/kvm/kvm_mips.c
+@@ -885,7 +885,7 @@ int kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf)
+ 	return VM_FAULT_SIGBUS;
+ }
+ 
+-int kvm_dev_ioctl_check_extension(long ext)
++int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
+ {
+ 	int r;
+ 
+diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
+index 8e03568..d870bac 100644
+--- a/arch/powerpc/kvm/powerpc.c
++++ b/arch/powerpc/kvm/powerpc.c
+@@ -391,7 +391,7 @@ void kvm_arch_sync_events(struct kvm *kvm)
+ {
+ }
+ 
+-int kvm_dev_ioctl_check_extension(long ext)
++int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
+ {
+ 	int r;
+ 	/* FIXME!!
+diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
+index 2f3e14f..00268ca 100644
+--- a/arch/s390/kvm/kvm-s390.c
++++ b/arch/s390/kvm/kvm-s390.c
+@@ -146,7 +146,7 @@ long kvm_arch_dev_ioctl(struct file *filp,
+ 	return -EINVAL;
+ }
+ 
+-int kvm_dev_ioctl_check_extension(long ext)
++int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
+ {
+ 	int r;
+ 
+diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
+index 5a8691b..5a62d91 100644
+--- a/arch/x86/kvm/x86.c
++++ b/arch/x86/kvm/x86.c
+@@ -2616,7 +2616,7 @@ out:
+ 	return r;
+ }
+ 
+-int kvm_dev_ioctl_check_extension(long ext)
++int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
+ {
+ 	int r;
+ 
+diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
+index ec4e3bd..5065b95 100644
+--- a/include/linux/kvm_host.h
++++ b/include/linux/kvm_host.h
+@@ -602,7 +602,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
+ 			 unsigned int ioctl, unsigned long arg);
+ int kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf);
+ 
+-int kvm_dev_ioctl_check_extension(long ext);
++int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext);
+ 
+ int kvm_get_dirty_log(struct kvm *kvm,
+ 			struct kvm_dirty_log *log, int *is_dirty);
+diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
+index 4b6c01b..e28f3ca 100644
+--- a/virt/kvm/kvm_main.c
++++ b/virt/kvm/kvm_main.c
+@@ -2571,7 +2571,7 @@ static int kvm_dev_ioctl_create_vm(unsigned long type)
+ 	return r;
+ }
+ 
+-static long kvm_dev_ioctl_check_extension_generic(long arg)
++static long kvm_vm_ioctl_check_extension_generic(struct kvm *kvm, long arg)
+ {
+ 	switch (arg) {
+ 	case KVM_CAP_USER_MEMORY:
+@@ -2595,7 +2595,7 @@ static long kvm_dev_ioctl_check_extension_generic(long arg)
+ 	default:
+ 		break;
+ 	}
+-	return kvm_dev_ioctl_check_extension(arg);
++	return kvm_vm_ioctl_check_extension(kvm, arg);
+ }
+ 
+ static long kvm_dev_ioctl(struct file *filp,
+@@ -2614,7 +2614,7 @@ static long kvm_dev_ioctl(struct file *filp,
+ 		r = kvm_dev_ioctl_create_vm(arg);
+ 		break;
+ 	case KVM_CHECK_EXTENSION:
+-		r = kvm_dev_ioctl_check_extension_generic(arg);
++		r = kvm_vm_ioctl_check_extension_generic(NULL, arg);
+ 		break;
+ 	case KVM_GET_VCPU_MMAP_SIZE:
+ 		r = -EINVAL;
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-irqchip-Provide-and-use-accessors-for-irq-routin.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-irqchip-Provide-and-use-accessors-for-irq-routin.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-irqchip-Provide-and-use-accessors-for-irq-routin.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-irqchip-Provide-and-use-accessors-for-irq-routin.patch)
@@ -0,0 +1,278 @@
+From: Paul Mackerras <paulus at samba.org>
+Date: Mon, 30 Jun 2014 20:51:10 +1000
+Subject: KVM: irqchip: Provide and use accessors for irq
+ routing table
+Origin: https://git.kernel.org/linus/8ba918d488caded2c4368b0b922eb905fe3bb101
+
+This provides accessor functions for the KVM interrupt mappings, in
+order to reduce the amount of code that accesses the fields of the
+kvm_irq_routing_table struct, and restrict that code to one file,
+virt/kvm/irqchip.c.  The new functions are kvm_irq_map_gsi(), which
+maps from a global interrupt number to a set of IRQ routing entries,
+and kvm_irq_map_chip_pin, which maps from IRQ chip and pin numbers to
+a global interrupt number.
+
+This also moves the update of kvm_irq_routing_table::chip[][]
+into irqchip.c, out of the various kvm_set_routing_entry
+implementations.  That means that none of the kvm_set_routing_entry
+implementations need the kvm_irq_routing_table argument anymore,
+so this removes it.
+
+This does not change any locking or data lifetime rules.
+
+Signed-off-by: Paul Mackerras <paulus at samba.org>
+Tested-by: Eric Auger <eric.auger at linaro.org>
+Tested-by: Cornelia Huck <cornelia.huck at de.ibm.com>
+Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
+---
+ arch/powerpc/kvm/mpic.c   |    4 +---
+ arch/s390/kvm/interrupt.c |    3 +--
+ include/linux/kvm_host.h  |    8 ++++++--
+ virt/kvm/eventfd.c        |   10 ++++++----
+ virt/kvm/irq_comm.c       |   20 +++++++++-----------
+ virt/kvm/irqchip.c        |   42 ++++++++++++++++++++++++++++++++++--------
+ 6 files changed, 57 insertions(+), 30 deletions(-)
+
+diff --git a/arch/powerpc/kvm/mpic.c b/arch/powerpc/kvm/mpic.c
+index b68d0dc..39b3a8f 100644
+--- a/arch/powerpc/kvm/mpic.c
++++ b/arch/powerpc/kvm/mpic.c
+@@ -1826,8 +1826,7 @@ int kvm_set_msi(struct kvm_kernel_irq_routing_entry *e,
+ 	return 0;
+ }
+ 
+-int kvm_set_routing_entry(struct kvm_irq_routing_table *rt,
+-			  struct kvm_kernel_irq_routing_entry *e,
++int kvm_set_routing_entry(struct kvm_kernel_irq_routing_entry *e,
+ 			  const struct kvm_irq_routing_entry *ue)
+ {
+ 	int r = -EINVAL;
+@@ -1839,7 +1838,6 @@ int kvm_set_routing_entry(struct kvm_irq_routing_table *rt,
+ 		e->irqchip.pin = ue->u.irqchip.pin;
+ 		if (e->irqchip.pin >= KVM_IRQCHIP_NUM_PINS)
+ 			goto out;
+-		rt->chip[ue->u.irqchip.irqchip][e->irqchip.pin] = ue->gsi;
+ 		break;
+ 	case KVM_IRQ_ROUTING_MSI:
+ 		e->set = kvm_set_msi;
+diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
+index 92528a0..f4c819b 100644
+--- a/arch/s390/kvm/interrupt.c
++++ b/arch/s390/kvm/interrupt.c
+@@ -1556,8 +1556,7 @@ static int set_adapter_int(struct kvm_kernel_irq_routing_entry *e,
+ 	return ret;
+ }
+ 
+-int kvm_set_routing_entry(struct kvm_irq_routing_table *rt,
+-			  struct kvm_kernel_irq_routing_entry *e,
++int kvm_set_routing_entry(struct kvm_kernel_irq_routing_entry *e,
+ 			  const struct kvm_irq_routing_entry *ue)
+ {
+ 	int ret;
+diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
+index 5065b95..4956149 100644
+--- a/include/linux/kvm_host.h
++++ b/include/linux/kvm_host.h
+@@ -752,6 +752,11 @@ void kvm_unregister_irq_mask_notifier(struct kvm *kvm, int irq,
+ void kvm_fire_mask_notifiers(struct kvm *kvm, unsigned irqchip, unsigned pin,
+ 			     bool mask);
+ 
++int kvm_irq_map_gsi(struct kvm_kernel_irq_routing_entry *entries,
++		    struct kvm_irq_routing_table *irq_rt, int gsi);
++int kvm_irq_map_chip_pin(struct kvm_irq_routing_table *irq_rt,
++			 unsigned irqchip, unsigned pin);
++
+ int kvm_set_irq(struct kvm *kvm, int irq_source_id, u32 irq, int level,
+ 		bool line_status);
+ int kvm_set_irq_inatomic(struct kvm *kvm, int irq_source_id, u32 irq, int level);
+@@ -942,8 +947,7 @@ int kvm_set_irq_routing(struct kvm *kvm,
+ 			const struct kvm_irq_routing_entry *entries,
+ 			unsigned nr,
+ 			unsigned flags);
+-int kvm_set_routing_entry(struct kvm_irq_routing_table *rt,
+-			  struct kvm_kernel_irq_routing_entry *e,
++int kvm_set_routing_entry(struct kvm_kernel_irq_routing_entry *e,
+ 			  const struct kvm_irq_routing_entry *ue);
+ void kvm_free_irq_routing(struct kvm *kvm);
+ 
+diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
+index bae593a..15fa948 100644
+--- a/virt/kvm/eventfd.c
++++ b/virt/kvm/eventfd.c
+@@ -282,20 +282,22 @@ static void irqfd_update(struct kvm *kvm, struct _irqfd *irqfd,
+ 			 struct kvm_irq_routing_table *irq_rt)
+ {
+ 	struct kvm_kernel_irq_routing_entry *e;
++	struct kvm_kernel_irq_routing_entry entries[KVM_NR_IRQCHIPS];
++	int i, n_entries;
++
++	n_entries = kvm_irq_map_gsi(entries, irq_rt, irqfd->gsi);
+ 
+ 	write_seqcount_begin(&irqfd->irq_entry_sc);
+ 
+ 	irqfd->irq_entry.type = 0;
+-	if (irqfd->gsi >= irq_rt->nr_rt_entries)
+-		goto out;
+ 
+-	hlist_for_each_entry(e, &irq_rt->map[irqfd->gsi], link) {
++	e = entries;
++	for (i = 0; i < n_entries; ++i, ++e) {
+ 		/* Only fast-path MSI. */
+ 		if (e->type == KVM_IRQ_ROUTING_MSI)
+ 			irqfd->irq_entry = *e;
+ 	}
+ 
+- out:
+ 	write_seqcount_end(&irqfd->irq_entry_sc);
+ }
+ 
+diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c
+index a228ee8..1758445 100644
+--- a/virt/kvm/irq_comm.c
++++ b/virt/kvm/irq_comm.c
+@@ -160,6 +160,7 @@ static int kvm_set_msi_inatomic(struct kvm_kernel_irq_routing_entry *e,
+  */
+ int kvm_set_irq_inatomic(struct kvm *kvm, int irq_source_id, u32 irq, int level)
+ {
++	struct kvm_kernel_irq_routing_entry entries[KVM_NR_IRQCHIPS];
+ 	struct kvm_kernel_irq_routing_entry *e;
+ 	int ret = -EINVAL;
+ 	struct kvm_irq_routing_table *irq_rt;
+@@ -177,14 +178,13 @@ int kvm_set_irq_inatomic(struct kvm *kvm, int irq_source_id, u32 irq, int level)
+ 	 */
+ 	idx = srcu_read_lock(&kvm->irq_srcu);
+ 	irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
+-	if (irq < irq_rt->nr_rt_entries)
+-		hlist_for_each_entry(e, &irq_rt->map[irq], link) {
+-			if (likely(e->type == KVM_IRQ_ROUTING_MSI))
+-				ret = kvm_set_msi_inatomic(e, kvm);
+-			else
+-				ret = -EWOULDBLOCK;
+-			break;
+-		}
++	if (kvm_irq_map_gsi(entries, irq_rt, irq) > 0) {
++		e = &entries[0];
++		if (likely(e->type == KVM_IRQ_ROUTING_MSI))
++			ret = kvm_set_msi_inatomic(e, kvm);
++		else
++			ret = -EWOULDBLOCK;
++	}
+ 	srcu_read_unlock(&kvm->irq_srcu, idx);
+ 	return ret;
+ }
+@@ -272,8 +272,7 @@ void kvm_fire_mask_notifiers(struct kvm *kvm, unsigned irqchip, unsigned pin,
+ 	srcu_read_unlock(&kvm->irq_srcu, idx);
+ }
+ 
+-int kvm_set_routing_entry(struct kvm_irq_routing_table *rt,
+-			  struct kvm_kernel_irq_routing_entry *e,
++int kvm_set_routing_entry(struct kvm_kernel_irq_routing_entry *e,
+ 			  const struct kvm_irq_routing_entry *ue)
+ {
+ 	int r = -EINVAL;
+@@ -304,7 +303,6 @@ int kvm_set_routing_entry(struct kvm_irq_routing_table *rt,
+ 		e->irqchip.pin = ue->u.irqchip.pin + delta;
+ 		if (e->irqchip.pin >= max_pin)
+ 			goto out;
+-		rt->chip[ue->u.irqchip.irqchip][e->irqchip.pin] = ue->gsi;
+ 		break;
+ 	case KVM_IRQ_ROUTING_MSI:
+ 		e->set = kvm_set_msi;
+diff --git a/virt/kvm/irqchip.c b/virt/kvm/irqchip.c
+index b43c275..f4648dd 100644
+--- a/virt/kvm/irqchip.c
++++ b/virt/kvm/irqchip.c
+@@ -31,13 +31,37 @@
+ #include <trace/events/kvm.h>
+ #include "irq.h"
+ 
++int kvm_irq_map_gsi(struct kvm_kernel_irq_routing_entry *entries,
++		    struct kvm_irq_routing_table *irq_rt, int gsi)
++{
++	struct kvm_kernel_irq_routing_entry *e;
++	int n = 0;
++
++	if (gsi < irq_rt->nr_rt_entries) {
++		hlist_for_each_entry(e, &irq_rt->map[gsi], link) {
++			entries[n] = *e;
++			++n;
++		}
++	}
++
++	return n;
++}
++
++int kvm_irq_map_chip_pin(struct kvm_irq_routing_table *irq_rt,
++			 unsigned irqchip, unsigned pin)
++{
++	return irq_rt->chip[irqchip][pin];
++}
++
+ bool kvm_irq_has_notifier(struct kvm *kvm, unsigned irqchip, unsigned pin)
+ {
++	struct kvm_irq_routing_table *irq_rt;
+ 	struct kvm_irq_ack_notifier *kian;
+ 	int gsi, idx;
+ 
+ 	idx = srcu_read_lock(&kvm->irq_srcu);
+-	gsi = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu)->chip[irqchip][pin];
++	irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
++	gsi = kvm_irq_map_chip_pin(irq_rt, irqchip, pin);
+ 	if (gsi != -1)
+ 		hlist_for_each_entry_rcu(kian, &kvm->irq_ack_notifier_list,
+ 					 link)
+@@ -54,13 +78,15 @@ EXPORT_SYMBOL_GPL(kvm_irq_has_notifier);
+ 
+ void kvm_notify_acked_irq(struct kvm *kvm, unsigned irqchip, unsigned pin)
+ {
++	struct kvm_irq_routing_table *irq_rt;
+ 	struct kvm_irq_ack_notifier *kian;
+ 	int gsi, idx;
+ 
+ 	trace_kvm_ack_irq(irqchip, pin);
+ 
+ 	idx = srcu_read_lock(&kvm->irq_srcu);
+-	gsi = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu)->chip[irqchip][pin];
++	irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
++	gsi = kvm_irq_map_chip_pin(irq_rt, irqchip, pin);
+ 	if (gsi != -1)
+ 		hlist_for_each_entry_rcu(kian, &kvm->irq_ack_notifier_list,
+ 					 link)
+@@ -115,8 +141,8 @@ int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi)
+ int kvm_set_irq(struct kvm *kvm, int irq_source_id, u32 irq, int level,
+ 		bool line_status)
+ {
+-	struct kvm_kernel_irq_routing_entry *e, irq_set[KVM_NR_IRQCHIPS];
+-	int ret = -1, i = 0, idx;
++	struct kvm_kernel_irq_routing_entry irq_set[KVM_NR_IRQCHIPS];
++	int ret = -1, i, idx;
+ 	struct kvm_irq_routing_table *irq_rt;
+ 
+ 	trace_kvm_set_irq(irq, level, irq_source_id);
+@@ -127,9 +153,7 @@ int kvm_set_irq(struct kvm *kvm, int irq_source_id, u32 irq, int level,
+ 	 */
+ 	idx = srcu_read_lock(&kvm->irq_srcu);
+ 	irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
+-	if (irq < irq_rt->nr_rt_entries)
+-		hlist_for_each_entry(e, &irq_rt->map[irq], link)
+-			irq_set[i++] = *e;
++	i = kvm_irq_map_gsi(irq_set, irq_rt, irq);
+ 	srcu_read_unlock(&kvm->irq_srcu, idx);
+ 
+ 	while(i--) {
+@@ -171,9 +195,11 @@ static int setup_routing_entry(struct kvm_irq_routing_table *rt,
+ 
+ 	e->gsi = ue->gsi;
+ 	e->type = ue->type;
+-	r = kvm_set_routing_entry(rt, e, ue);
++	r = kvm_set_routing_entry(e, ue);
+ 	if (r)
+ 		goto out;
++	if (e->type == KVM_IRQ_ROUTING_IRQCHIP)
++		rt->chip[e->irqchip.irqchip][e->irqchip.pin] = e->gsi;
+ 
+ 	hlist_add_head(&e->link, &rt->map[e->gsi]);
+ 	r = 0;
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-prepare-for-KVM_-S-G-ET_MP_STATE-on-other-archit.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-prepare-for-KVM_-S-G-ET_MP_STATE-on-other-archit.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/KVM-prepare-for-KVM_-S-G-ET_MP_STATE-on-other-archit.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/KVM-prepare-for-KVM_-S-G-ET_MP_STATE-on-other-archit.patch)
@@ -0,0 +1,84 @@
+From: David Hildenbrand <dahi at linux.vnet.ibm.com>
+Date: Mon, 12 May 2014 16:05:13 +0200
+Subject: KVM: prepare for KVM_(S|G)ET_MP_STATE on other
+ architectures
+Origin: https://git.kernel.org/linus/0b4820d6d8b6448bc9f7fac1bb1a801a53b425e1
+
+Highlight the aspects of the ioctls that are actually specific to x86
+and ia64. As defined restrictions (irqchip) and mp states may not apply
+to other architectures, these parts are flagged to belong to x86 and ia64.
+
+In preparation for the use of KVM_(S|G)ET_MP_STATE by s390.
+Fix a spelling error (KVM_SET_MP_STATE vs. KVM_SET_MPSTATE) on the way.
+
+Signed-off-by: David Hildenbrand <dahi at linux.vnet.ibm.com>
+Reviewed-by: Cornelia Huck <cornelia.huck at de.ibm.com>
+Acked-by: Christian Borntraeger <borntraeger at de.ibm.com>
+Signed-off-by: Christian Borntraeger <borntraeger at de.ibm.com>
+---
+ Documentation/virtual/kvm/api.txt |   21 ++++++++++++---------
+ include/uapi/linux/kvm.h          |    3 ++-
+ 2 files changed, 14 insertions(+), 10 deletions(-)
+
+diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
+index 0fe3649..904c61c 100644
+--- a/Documentation/virtual/kvm/api.txt
++++ b/Documentation/virtual/kvm/api.txt
+@@ -988,18 +988,20 @@ uniprocessor guests).
+ 
+ Possible values are:
+ 
+- - KVM_MP_STATE_RUNNABLE:        the vcpu is currently running
++ - KVM_MP_STATE_RUNNABLE:        the vcpu is currently running [x86, ia64]
+  - KVM_MP_STATE_UNINITIALIZED:   the vcpu is an application processor (AP)
+-                                 which has not yet received an INIT signal
++                                 which has not yet received an INIT signal [x86,
++                                 ia64]
+  - KVM_MP_STATE_INIT_RECEIVED:   the vcpu has received an INIT signal, and is
+-                                 now ready for a SIPI
++                                 now ready for a SIPI [x86, ia64]
+  - KVM_MP_STATE_HALTED:          the vcpu has executed a HLT instruction and
+-                                 is waiting for an interrupt
++                                 is waiting for an interrupt [x86, ia64]
+  - KVM_MP_STATE_SIPI_RECEIVED:   the vcpu has just received a SIPI (vector
+-                                 accessible via KVM_GET_VCPU_EVENTS)
++                                 accessible via KVM_GET_VCPU_EVENTS) [x86, ia64]
+ 
+-This ioctl is only useful after KVM_CREATE_IRQCHIP.  Without an in-kernel
+-irqchip, the multiprocessing state must be maintained by userspace.
++On x86 and ia64, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an
++in-kernel irqchip, the multiprocessing state must be maintained by userspace on
++these architectures.
+ 
+ 
+ 4.39 KVM_SET_MP_STATE
+@@ -1013,8 +1015,9 @@ Returns: 0 on success; -1 on error
+ Sets the vcpu's current "multiprocessing state"; see KVM_GET_MP_STATE for
+ arguments.
+ 
+-This ioctl is only useful after KVM_CREATE_IRQCHIP.  Without an in-kernel
+-irqchip, the multiprocessing state must be maintained by userspace.
++On x86 and ia64, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an
++in-kernel irqchip, the multiprocessing state must be maintained by userspace on
++these architectures.
+ 
+ 
+ 4.40 KVM_SET_IDENTITY_MAP_ADDR
+diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
+index e11d8f1..37d4ec6 100644
+--- a/include/uapi/linux/kvm.h
++++ b/include/uapi/linux/kvm.h
+@@ -399,8 +399,9 @@ struct kvm_vapic_addr {
+ 	__u64 vapic_addr;
+ };
+ 
+-/* for KVM_SET_MPSTATE */
++/* for KVM_SET_MP_STATE */
+ 
++/* not all states are valid on all architectures */
+ #define KVM_MP_STATE_RUNNABLE          0
+ #define KVM_MP_STATE_UNINITIALIZED     1
+ #define KVM_MP_STATE_INIT_RECEIVED     2
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/PPC-Add-asm-helpers-for-BE-32bit-load-store.patch (from r21784, dists/trunk/linux/debian/patches/features/powerpc/PPC-Add-asm-helpers-for-BE-32bit-load-store.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/PPC-Add-asm-helpers-for-BE-32bit-load-store.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21784, dists/trunk/linux/debian/patches/features/powerpc/PPC-Add-asm-helpers-for-BE-32bit-load-store.patch)
@@ -0,0 +1,37 @@
+From: Alexander Graf <agraf at suse.de>
+Date: Wed, 11 Jun 2014 10:07:40 +0200
+Subject: PPC: Add asm helpers for BE 32bit load/store
+Origin: https://git.kernel.org/linus/8f6822c4b9fac6e47414d2f1e11dbabda9bc2163
+
+From assembly code we might not only have to explicitly BE access 64bit values,
+but sometimes also 32bit ones. Add helpers that allow for easy use of lwzx/stwx
+in their respective byte-reverse or native form.
+
+Signed-off-by: Alexander Graf <agraf at suse.de>
+CC: Benjamin Herrenschmidt <benh at kernel.crashing.org>
+---
+ arch/powerpc/include/asm/asm-compat.h |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/arch/powerpc/include/asm/asm-compat.h b/arch/powerpc/include/asm/asm-compat.h
+index 4b237aa..21be8ae 100644
+--- a/arch/powerpc/include/asm/asm-compat.h
++++ b/arch/powerpc/include/asm/asm-compat.h
+@@ -34,10 +34,14 @@
+ #define PPC_MIN_STKFRM	112
+ 
+ #ifdef __BIG_ENDIAN__
++#define LWZX_BE	stringify_in_c(lwzx)
+ #define LDX_BE	stringify_in_c(ldx)
++#define STWX_BE	stringify_in_c(stwx)
+ #define STDX_BE	stringify_in_c(stdx)
+ #else
++#define LWZX_BE	stringify_in_c(lwbrx)
+ #define LDX_BE	stringify_in_c(ldbrx)
++#define STWX_BE	stringify_in_c(stwbrx)
+ #define STDX_BE	stringify_in_c(stdbrx)
+ #endif
+ 
+-- 
+1.7.10.4
+

Copied: dists/wheezy-backports/linux/debian/patches/features/powerpc/deb-pkg-add-support-for-powerpc-little-endian.patch (from r21884, dists/sid/linux/debian/patches/features/powerpc/deb-pkg-add-support-for-powerpc-little-endian.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/powerpc/deb-pkg-add-support-for-powerpc-little-endian.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21884, dists/sid/linux/debian/patches/features/powerpc/deb-pkg-add-support-for-powerpc-little-endian.patch)
@@ -0,0 +1,25 @@
+From: Michael Neuling <mikey at neuling.org>
+Subject: deb-pkg: Add support for powerpc little endian
+Origin: http://marc.info/?l=linux-kernel&m=140989493729069&w=2
+
+The Debian powerpc little endian architecture is called ppc64le.  This
+is the default architecture used by Ubuntu for powerpc.
+
+The below checks the kernel config to see if we are compiling little
+endian and sets the Debian arch appropriately.
+
+Signed-off-by: Michael Neuling <mikey at neuling.org>
+
+diff --git a/scripts/package/builddeb b/scripts/package/builddeb
+index 35d5a58..6f4a1af 100644
+--- a/scripts/package/builddeb
++++ b/scripts/package/builddeb
+@@ -37,7 +37,7 @@ create_package() {
+ 	s390*)
+ 		debarch=s390$(grep -q CONFIG_64BIT=y $KCONFIG_CONFIG && echo x || true) ;;
+ 	ppc*)
+-		debarch=powerpc ;;
++		debarch=$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo ppc64el || echo powerpc) ;;
+ 	parisc*)
+ 		debarch=hppa ;;
+ 	mips*)

Copied: dists/wheezy-backports/linux/debian/patches/features/x86/x86-memtest-WARN-if-bad-RAM-found.patch (from r21884, dists/sid/linux/debian/patches/features/x86/x86-memtest-WARN-if-bad-RAM-found.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-backports/linux/debian/patches/features/x86/x86-memtest-WARN-if-bad-RAM-found.patch	Sun Sep 21 14:23:16 2014	(r21886, copy of r21884, dists/sid/linux/debian/patches/features/x86/x86-memtest-WARN-if-bad-RAM-found.patch)
@@ -0,0 +1,28 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Mon, 5 Dec 2011 04:00:58 +0000
+Subject: x86: memtest: WARN if bad RAM found
+Bug-Debian: https://bugs.debian.org/613321
+Forwarded: http://thread.gmane.org/gmane.linux.kernel/1286471
+
+Since this is not a particularly thorough test, if we find any bad
+bits of RAM then there is a fair chance that there are other bad bits
+we fail to detect.
+
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+ arch/x86/mm/memtest.c |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/arch/x86/mm/memtest.c b/arch/x86/mm/memtest.c
+index 92faf3a..ac6bdaa 100644
+--- a/arch/x86/mm/memtest.c
++++ b/arch/x86/mm/memtest.c
+@@ -30,6 +30,8 @@ static u64 patterns[] __initdata = {
+ 
+ static void __init reserve_bad_mem(u64 pattern, u64 start_bad, u64 end_bad)
+ {
++	WARN_ONCE(1, "Bad RAM detected. Use memtest86+ to perform a thorough test\n"
++		  "and the memmap= parameter to reserve the bad areas.");
+ 	printk(KERN_INFO "  %016llx bad mem addr %010llx - %010llx reserved\n",
+ 	       (unsigned long long) pattern,
+ 	       (unsigned long long) start_bad,

Modified: dists/wheezy-backports/linux/debian/patches/series
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/series	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/series	Sun Sep 21 14:23:16 2014	(r21886)
@@ -6,7 +6,6 @@
 debian/mips-disable-werror.patch
 debian/arch-sh4-fix-uimage-build.patch
 debian/powerpcspe-omit-uimage.patch
-debian/ppc64el-disable-zImage.patch
 features/all/Kbuild-kconfig-Verbose-version-of-listnewconfig.patch
 
 # Fixes/improvements to firmware loading
@@ -25,7 +24,6 @@
 features/all/aufs3/aufs3-standalone.patch
 features/all/aufs3/aufs3-add.patch
 # Debian-specific changes
-features/all/aufs3/aufs3-remove-circular-includes.patch
 debian/aufs3-mark-as-staging.patch
 
 # Change some defaults for security reasons
@@ -48,75 +46,90 @@
 debian/snd-pcsp-disable-autoload.patch
 bugfix/x86/viafb-autoload-on-olpc-xo1.5-only.patch
 
-# Support for microcode updates under Xen
-features/all/xen/microcode.patch
-features/all/xen/microcode-amd-fam15plus.patch
-features/all/xen/microcode-typo.patch
-features/all/xen/microcode-api-update.patch
-
 # Arch bug fixes
 bugfix/arm/omap-musb-choice.patch
 bugfix/mips/disable-advansys.patch
 bugfix/arm/ixp4xx_iobe.patch
 bugfix/m68k/ethernat-kconfig.patch
-bugfix/arm/bfa-Replace-large-udelay-with-mdelay.patch
-bugfix/powerpc/ppc64el-powernv-calls-to-support-little-endian.patch
-bugfix/mips/MIPS-SB1-Fix-excessive-kernel-warnings.patch
 bugfix/mips/MIPS-ZBOOT-add-missing-linux-string.h-include.patch
-bugfix/mips/MIPS-Fix-branch-emulation-of-branch-likely-instructi.patch
-bugfix/mips/MIPS-ptrace-Avoid-smp_processor_id-in-preemptible-co.patch
-bugfix/mips/MIPS-OCTEON-make-get_system_type-thread-safe.patch
-bugfix/mips/MIPS-O32-32-bit-Fix-bug-which-can-cause-incorrect-sy.patch
-bugfix/mips/MIPS-tlbex-fix-a-missing-statement-for-HUGETLB.patch
-bugfix/mips/MIPS-prevent-user-from-setting-FCSR-cause-bits.patch
+bugfix/x86/x86-reject-x32-executables-if-x32-abi-not-supported.patch
+bugfix/s390/s390-3215-fix-hanging-console-issue.patch
+bugfix/arm64/arm64-crypto-fix-makefile-rule-for-aes-glue-.o.patch
 debian/btrfs-work-around-compiler-bug-on-arm.patch
 
+# Arch features
+features/mips/MIPS-Support-hard-limit-of-cpu-count-nr_cpu_ids.patch
+features/mips/MIPS-Support-CPU-topology-files-in-sysfs.patch
+features/mips/MIPS-Loongson-Modify-ChipConfig-register-definition.patch
+features/mips/MIPS-Add-NUMA-support-for-Loongson-3.patch
+features/mips/MIPS-Add-numa-api-support.patch
+features/mips/MIPS-Add-Loongson-3B-support.patch
+features/mips/MIPS-Loongson-3-Enable-the-COP2-usage.patch
+features/mips/MIPS-Loongson-Rename-CONFIG_LEMOTE_MACH3A-to-CONFIG_.patch
+features/mips/MIPS-Loongson-3-Add-Loongson-LS3A-RS780E-1-way-machi.patch
+features/powerpc/KVM-prepare-for-KVM_-S-G-ET_MP_STATE-on-other-archit.patch
+features/powerpc/KVM-PPC-Book3s-PR-Disable-AIL-mode-with-OPAL.patch
+features/powerpc/KVM-PPC-Book3s-HV-Fix-tlbie-compile-error.patch
+features/powerpc/KVM-PPC-Book3S-PR-Handle-hyp-doorbell-exits.patch
+features/powerpc/KVM-PPC-Book3S-HV-Fix-ABIv2-indirect-branch-issue.patch
+features/powerpc/KVM-PPC-Book3S-PR-Fix-sparse-endian-checks.patch
+features/powerpc/KVM-PPC-Book3S-Controls-for-in-kernel-sPAPR-hypercal.patch
+features/powerpc/PPC-Add-asm-helpers-for-BE-32bit-load-store.patch
+features/powerpc/KVM-PPC-Book3S-HV-Make-HTAB-code-LE-host-aware.patch
+features/powerpc/KVM-PPC-Book3S-HV-Access-guest-VPA-in-BE.patch
+features/powerpc/KVM-PPC-Book3S-HV-Access-host-lppaca-and-shadow-slb-.patch
+features/powerpc/KVM-PPC-Book3S-HV-Access-XICS-in-BE.patch
+features/powerpc/KVM-PPC-Book3S-HV-Fix-ABIv2-on-LE.patch
+features/powerpc/KVM-PPC-Book3S-HV-Enable-for-little-endian-hosts.patch
+features/powerpc/KVM-PPC-Book3S-Move-vcore-definition-to-end-of-kvm_a.patch
+features/powerpc/KVM-Rename-and-add-argument-to-check_extension.patch
+features/powerpc/KVM-Allow-KVM_CHECK_EXTENSION-on-the-vm-fd.patch
+features/powerpc/KVM-Don-t-keep-reference-to-irq-routing-table-in-irq.patch
+features/powerpc/KVM-irqchip-Provide-and-use-accessors-for-irq-routin.patch
+features/powerpc/KVM-Move-all-accesses-to-kvm-irq_routing-into-irqchi.patch
+features/powerpc/KVM-Move-irq-notifier-implementation-into-eventfd.c.patch
+features/powerpc/KVM-Give-IRQFD-its-own-separate-enabling-Kconfig-opt.patch
+features/powerpc/KVM-PPC-Enable-IRQFD-support-for-the-XICS-interrupt-.patch
+features/powerpc/KVM-Move-more-code-under-CONFIG_HAVE_KVM_IRQFD.patch
+features/powerpc/deb-pkg-add-support-for-powerpc-little-endian.patch
+features/x86/x86-memtest-WARN-if-bad-RAM-found.patch
+features/x86/x86-make-x32-syscall-support-conditional.patch
+features/arm/deb-pkg-add-automatic-support-for-armhf-architecture.patch
+features/arm64/drivers-net-Add-APM-X-Gene-SoC-ethernet-driver-suppo.patch
+features/arm64/drivers-net-NET_XGENE-should-depend-on-HAS_DMA.patch
+features/arm64/net-xgene-Check-negative-return-value-of-xgene_enet_.patch
+features/arm64/net-xgene-fix-possible-NULL-dereference-in-xgene_ene.patch
+features/arm64/dts-Add-bindings-for-APM-X-Gene-SoC-ethernet-driver.patch
+
 # Miscellaneous bug fixes
 bugfix/all/misc-bmp085-Enable-building-as-a-module.patch
 bugfix/all/kbuild-use-nostdinc-in-compile-tests.patch
 bugfix/all/disable-some-marvell-phys.patch
-bugfix/all/bluetooth-allocate-static-minor-for-vhci.patch
+bugfix/all/aio-fix-reqs_available-handling.patch
+debian/i2o-disable-i2o_ext_adaptec-on-64bit.patch
+bugfix/all/aic94xx-remove-broken-fallback-for-missing-ctrl-a.patch
+bugfix/all/builddeb-put-the-dbg-files-into-the-correct-director.patch
+
+# memfd_create() & kdbus backport
+features/all/kdbus/mm-allow-drivers-to-prevent-new-writable-mappings.patch
+features/all/kdbus/shm-add-sealing-API.patch
+features/all/kdbus/shm-add-memfd_create-syscall.patch
+features/all/kdbus/selftests-add-memfd_create-sealing-tests.patch
+features/all/kdbus/selftests-add-memfd-sealing-page-pinning-tests.patch
+features/all/kdbus/shm-wait-for-pins-to-be-released-when-sealing.patch
+features/all/kdbus/tools-selftests-fix-build-issue-with-make-kselftests.patch
+features/all/kdbus/ARM-wire-up-memfd_create-syscall.patch
+features/all/kdbus/arm64-compat-wire-up-memfd_create-syscall.patch
+features/all/kdbus/s390-wire-up-memfd_create-syscall.patch
+features/all/kdbus/sparc-Hook-up-memfd_create-system-call.patch
+features/all/kdbus/asm-generic-add-memfd_create-system-call-to-unistd.h.patch
+features/all/kdbus/m68k-Wire-up-memfd_create.patch
+features/all/kdbus/MIPS-Wire-up-new-syscalls-getrandom-and-memfd_create.patch
+features/all/kdbus/powerpc-Wire-up-sys_seccomp-sys_getrandom-and-sys_me.patch
 
 # Miscellaneous features
-features/all/x86-memtest-WARN-if-bad-RAM-found.patch
 features/all/efi-autoload-efivars.patch
-features/all/mvsas-Recognise-device-subsystem-9485-9485-as-88SE94.patch
-features/all/support-Thinkpad-X1-Carbon-2nd-generation-s-adaptive.patch
-features/all/save-and-restore-adaptive-keyboard-mode-for-suspend-.patch
-features/all/ARM-sunxi-ahci-and-gmac.patch
-features/arm/0001-spi-sunxi-Add-Allwinner-A31-SPI-controller-driver.patch
-features/arm/0002-spi-sun6i-Fix-define-for-SUN6I_TFR_CTL_CS_MASK.patch
-features/arm/0003-spi-sun6i-Set-bits_per_word_mask-to-only-support-8-b.patch
-features/arm/ARM-dt-sun4i-Add-A10-SPI-controller-nodes.patch
-features/arm/PHY-sunxi-Add-driver-for-sunxi-usb-phy.patch
-features/arm/ARM-sun4i-dt-Add-bindings-for-USB-clocks.patch
-features/arm/ARM-sun4i-dt-Add-USB-host-bindings.patch
-bugfix/all/net-l2tp-don-t-fall-back-on-UDP-get-set-sockopt.patch
-features/mips/0001-MIPS-Loongson-Rename-PRID_IMP_LOONGSON1-and-PRID_IMP.patch
-features/mips/0002-MIPS-Loongson-Add-basic-Loongson-3-definition.patch
-features/mips/0003-MIPS-Loongson-Add-basic-Loongson-3-CPU-support.patch
-features/mips/0004-MIPS-Loongson-3-Add-Lemote-3A-machtypes-definition.patch
-features/mips/0005-MIPS-Loongson-Add-UEFI-like-firmware-interface-LEFI-.patch
-features/mips/0006-MIPS-Loongson-3-Add-HT-linked-PCI-support.patch
-features/mips/0007-MIPS-Loongson-3-Add-IRQ-init-and-dispatch-support.patch
-features/mips/0008-MIPS-Loongson-3-Add-serial-port-support.patch
-features/mips/0009-MIPS-Loongson-Add-swiotlb-to-support-All-Memory-DMA.patch
-features/mips/0010-MIPS-Loongson-Add-Loongson-3-Kconfig-options.patch
-features/mips/0011-MIPS-Loongson-3-Add-Loongson-3-SMP-support.patch
-features/mips/0012-MIPS-Loongson-3-Add-CPU-hotplug-support.patch
-features/mips/0013-MIPS-Loongson-Add-a-Loongson-3-default-config-file.patch
-features/mips/MIPS-Octeon-Add-PCIe2-support-in-arch_setup_msi_irq.patch
-features/mips/MIPS-octeon-Add-interface-mode-detection-for-Octeon-.patch
-features/mips/MIPS-Malta-Setup-PM-I-O-region-on-boot.patch
-features/mips/MIPS-Define-some-more-PIIX4-registers-values.patch
-features/mips/MIPS-Malta-add-suspend-state-entry-code.patch
-features/mips/MIPS-Malta-Let-PIIX4-respond-to-PCI-special-cycles.patch
-features/mips/MIPS-Malta-hang-on-halt.patch
-features/mips/MIPS-Malta-support-powering-down.patch
-features/mips/MIPS-Loongson-3-Add-Loongson-LS3A-RS780E-1-way-machi.patch
-bugfix/x86/x86-reject-x32-executables-if-x32-abi-not-supported.patch
-features/x86/x86-make-x32-syscall-support-conditional.patch
-bugfix/s390/s390-3215-fix-hanging-console-issue.patch
-debian/libata-avoid-abi-change-in-3.14.15.patch
-debian/mutex-avoid-abi-change-in-3.14.14.patch
-bugfix/all/net-sctp-inherit-auth_capable-on-INIT-collisions.patch
+features/all/virtio-scsi-Implement-change_queue_depth-for-virtscs.patch
+debian/revert-staging-sm7xxfb-remove-driver.patch
+features/all/sfc-Adding-PCI-ID-for-Solarflare-7000-series-40G-net.patch
+features/all/sfc-Add-40G-link-capability-decoding.patch

Modified: dists/wheezy-backports/linux/debian/patches/series-orig
==============================================================================
--- dists/wheezy-backports/linux/debian/patches/series-orig	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/patches/series-orig	Sun Sep 21 14:23:16 2014	(r21886)
@@ -5,6 +5,5 @@
 + debian/dfsg/drivers-staging-wlags49_h2-disable.patch
 + debian/dfsg/drivers-staging-wlags49_h25-disable.patch
 + debian/dfsg/video-remove-nvidiafb-and-rivafb.patch
-+ debian/dfsg/staging-rtl8192e-remove-built-in-firmware-images.patch
 + debian/dfsg/firmware-cleanup.patch
 X debian/dfsg/files-1

Modified: dists/wheezy-backports/linux/debian/rules
==============================================================================
--- dists/wheezy-backports/linux/debian/rules	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/rules	Sun Sep 21 14:23:16 2014	(r21886)
@@ -68,7 +68,7 @@
 
 clean: debian/control
 	dh_testdir
-	rm -rf $(BUILD_DIR) $(STAMPS_DIR) debian/lib/python/debian_linux/*.pyc $$(find debian -maxdepth 1 -type d -name 'linux-*') debian/*-modules-*-di* debian/kernel-image-*-di* debian/xen-linux-system-*
+	rm -rf $(BUILD_DIR) $(STAMPS_DIR) debian/lib/python/debian_linux/*.pyc debian/lib/python/debian_linux/__pycache__ $$(find debian -maxdepth 1 -type d -name 'linux-*') debian/*-modules-*-di* debian/kernel-image-*-di* debian/xen-linux-system-*
 	dh_clean
 
 CONTROL_FILES = debian/changelog $(wildcard debian/templates/*.in)

Modified: dists/wheezy-backports/linux/debian/rules.defs
==============================================================================
--- dists/wheezy-backports/linux/debian/rules.defs	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/rules.defs	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1,3 +1,4 @@
 BUILD_DIR = debian/build
 STAMPS_DIR = debian/stamps
 
+-include debian/rules.defs.local

Modified: dists/wheezy-backports/linux/debian/rules.real
==============================================================================
--- dists/wheezy-backports/linux/debian/rules.real	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/rules.real	Sun Sep 21 14:23:16 2014	(r21886)
@@ -32,10 +32,6 @@
 export DH_OPTIONS
 export DEB_HOST_ARCH DEB_HOST_GNU_TYPE DEB_BUILD_ARCH
 
-ifneq (,$(filter experimental UNRELEASED,$(DISTRIBUTION)))
-  export KW_CHECK_NONFATAL = y
-endif
-
 include debian/rules.defs
 
 stamp = [ -d $(dir $@) ] || mkdir $(dir $@); touch $@
@@ -196,12 +192,13 @@
 install-doc: $(STAMPS_DIR)/build-doc
 	dh_prep
 	mkdir -p $(OUT_DIR)
-	cp -a CREDITS MAINTAINERS README REPORTING-BUGS Documentation $(OUT_DIR)
-	rm -rf $(OUT_DIR)/Documentation/DocBook
+	set -o pipefail; \
+	find CREDITS MAINTAINERS README REPORTING-BUGS Documentation \
+		-name '.gitignore' -prune -o -name DocBook -prune -o -print | \
+	cpio -pd --preserve-modification-time '$(CURDIR)/$(OUT_DIR)'
 	set -o pipefail; \
 	cd $(DIR)/Documentation/DocBook; \
-	find * -name '*.html' -print \
-	| \
+	find * -name '*.html' -print | \
 	cpio -pd --preserve-modification-time '$(CURDIR)/$(OUT_DIR)/html'
 	gzip -9qfr $(OUT_DIR)/Documentation
 	+$(MAKE_SELF) install-base

Modified: dists/wheezy-backports/linux/debian/source/options
==============================================================================
--- dists/wheezy-backports/linux/debian/source/options	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/source/options	Sun Sep 21 14:23:16 2014	(r21886)
@@ -1 +1,2 @@
 compression = "xz"
+tar-ignore = debian/*.local

Modified: dists/wheezy-backports/linux/debian/templates/control.source.in
==============================================================================
--- dists/wheezy-backports/linux/debian/templates/control.source.in	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/templates/control.source.in	Sun Sep 21 14:23:16 2014	(r21886)
@@ -2,7 +2,7 @@
 Priority: optional
 Maintainer: Debian Kernel Team <debian-kernel at lists.debian.org>
 Uploaders: Bastian Blank <waldi at debian.org>, Frederik Schüler <fs at debian.org>, maximilian attems <maks at debian.org>, Ben Hutchings <ben at decadent.org.uk>
-Standards-Version: 3.9.4
+Standards-Version: 3.9.5
 Build-Depends: debhelper, cpio, kmod, python, python-six, lzma [armel], kernel-wedge, quilt, patchutils, bc
 Build-Depends-Indep: xz-utils, xmlto
 Vcs-Svn: svn://anonscm.debian.org/svn/kernel/dists/trunk/linux/

Modified: dists/wheezy-backports/linux/debian/templates/po/es.po
==============================================================================
--- dists/wheezy-backports/linux/debian/templates/po/es.po	Sun Sep 21 11:10:34 2014	(r21885)
+++ dists/wheezy-backports/linux/debian/templates/po/es.po	Sun Sep 21 14:23:16 2014	(r21886)
@@ -3,10 +3,11 @@
 #
 #   Changes:
 #    - Initial translation
-#    Omar Campagne <ocampagne at gmail.com> 2010, 2011
+#       Omar Campagne <ocampagne at gmail.com> 2010, 2011
 #   
 #    - Review and update
-#    Javier Fernandez-Sanguino, December 2010
+#       Javier Fernandez-Sanguino, December 2010
+#       Matías Bellone <matiasbellone+debian at gmail.com>, 2014
 #
 # Traductores, si no conocen el formato PO, merece la pena leer la
 # documentación de gettext, especialmente las secciones dedicadas a este
@@ -31,19 +32,14 @@
 "Project-Id-Version: linux-2.6 2.6.32+5\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2014-07-20 22:37+0200\n"
-"PO-Revision-Date: 2011-07-16 17:59+0200\n"
-"Last-Translator: Omar Campagne <ocampagne at gmail.com>\n"
+"PO-Revision-Date: 2014-07-24 17:59-0300\n"
+"Last-Translator: Matías Bellone <matiasbellone+debian at gmail.com>\n"
 "Language-Team: Debian l10n Spanish <debian-l10n-spanish at lists.debian.org>\n"
 "Language: es\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Virtaal 0.6.1\n"
-"X-POFile-SpellExtra: initrd postinsthook conf lib contrib yes IDE depmod\n"
-"X-POFile-SpellExtra: runningversion img script boot Free exitvalue version\n"
-"X-POFile-SpellExtra: Debian CORE free running dobootloader UUID dep SIGNAL\n"
-"X-POFile-SpellExtra: Guidelines modulesbase vmlinuz postinst\n"
 
 #. Type: boolean
 #. Description
@@ -113,7 +109,7 @@
 msgstr ""
 "Puede que el sistema no pueda arrancar posteriormente, ya que eliminaría «/"
 "boot/vmlinuz-${running}» y todos los módulos en el directorio «/lib/modules/"
-"${running}». Esto sólo se puede arreglar esto con una copia de la imagen del "
+"${running}». Esto sólo se puede arreglar con una copia de la imagen del "
 "núcleo y los correspondientes módulos."
 
 #. Type: boolean
@@ -131,6 +127,8 @@
 #: ../image.plain.templates.in:4001
 msgid "Boot loader configuration must be updated to load initramfs"
 msgstr ""
+"Se debe actualizar la configuración del gestor de arranque para cargar "
+"la imagen initramfs"
 
 #. Type: note
 #. Description
@@ -142,6 +140,11 @@
 "flexible boot process, and future kernel versions may require a "
 "corresponding initrd.img to boot."
 msgstr ""
+"Además del núcleo en sí, este paquete generará un fichero «initramfs» "
+"(«/boot/initrd.img- at abiname@@localversion@») para que utilice el gestor de "
+"arranque del sistema. Este método, que no era compatible con MIPS, permite "
+"un arranque más flexible y futuras versiones del núcleo podrían requerir "
+"un fichero «initrd.img» correspondiente para iniciar."
 
 #. Type: note
 #. Description
@@ -153,3 +156,8 @@
 "accomplished by using the initrd.img symbolic link maintained by the kernel "
 "package."
 msgstr ""
+"El núcleo que está ejecutando actualmente inició sin un fichero «initramfs». "
+"Debería reconfigurar el gestor de arranque para cargar el fichero "
+"«initramfs» de la versión de Linux @abiname@ y las versiones posteriores. "
+"Probablemente, la forma más sencilla de conseguirlo es utilizar el enlace "
+"simbólico «initrd.img» provisto por el paquete del núcleo."



More information about the Kernel-svn-changes mailing list