Push to branch refs/heads/master:
3b77ffa97214ee730d45953fa8f001c673dcb4cd -->
  27ad889616a25e6fc19eba07ecc3c299fae9f5a1

 .../devicetree/bindings/clock/imx31-clock.txt      |   2 +-
 Documentation/filesystems/00-INDEX                 |   3 +
 Documentation/filesystems/wrapfs.txt               | 172 ++++++
 Documentation/virtual/kvm/api.txt                  |   1 +
 MAINTAINERS                                        |   9 +
 Makefile                                           |   2 +-
 arch/arc/include/asm/cacheflush.h                  |   6 +-
 arch/arc/include/asm/delay.h                       |   4 +-
 arch/arc/kernel/unaligned.c                        |   3 +-
 arch/arc/mm/cache.c                                |  13 +-
 arch/arm/boot/dts/da850-evm.dts                    |   1 +
 arch/arm/boot/dts/imx31.dtsi                       |  18 +-
 arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi       |   4 +-
 arch/arm/boot/dts/r8a7794.dtsi                     |   2 +-
 arch/arm/crypto/aes-ce-glue.c                      |   5 +
 arch/arm/include/asm/cputype.h                     |   3 +
 arch/arm/kernel/hw_breakpoint.c                    |  16 +
 arch/arm/kernel/ptrace.c                           |   2 +-
 arch/arm/kernel/smp_tlb.c                          |   7 +
 arch/arm/mach-davinci/da850.c                      |  12 +-
 arch/arm/mach-omap2/omap-mpuss-lowpower.c          |   5 +-
 arch/arm/mach-ux500/pm.c                           |   4 +-
 arch/arm/mach-zynq/common.c                        |   2 +-
 arch/arm/mm/fault.c                                |   4 +-
 arch/arm/mm/fault.h                                |   4 +
 arch/arm/xen/enlighten.c                           |   3 +-
 arch/arm64/crypto/aes-ce-ccm-core.S                |  53 +-
 arch/arm64/crypto/aes-ce-cipher.c                  |  25 +-
 arch/arm64/crypto/aes-ce.S                         |   1 +
 arch/arm64/crypto/aes-modes.S                      |  91 ++--
 arch/arm64/crypto/aes-neon.S                       |  25 +-
 arch/arm64/crypto/ghash-ce-core.S                  |   6 +-
 arch/arm64/crypto/sha1-ce-core.S                   |   4 +-
 arch/arm64/crypto/sha2-ce-core.S                   |   4 +-
 arch/arm64/include/uapi/asm/ptrace.h               |   1 +
 arch/arm64/kernel/entry.S                          |   2 +-
 arch/arm64/kernel/ptrace.c                         |  16 +-
 arch/arm64/kernel/traps.c                          |  28 +-
 arch/cris/boot/rescue/Makefile                     |   8 +
 arch/mips/kvm/mips.c                               |   4 +-
 arch/parisc/include/asm/bitops.h                   |   8 +-
 arch/parisc/include/uapi/asm/bitsperlong.h         |   2 -
 arch/parisc/include/uapi/asm/swab.h                |   5 +-
 arch/powerpc/boot/ps3-head.S                       |   5 -
 arch/powerpc/boot/ps3.c                            |   8 +-
 arch/powerpc/include/asm/kvm_host.h                |   1 +
 arch/powerpc/include/uapi/asm/kvm.h                |   1 +
 arch/powerpc/kernel/asm-offsets.c                  |   1 +
 arch/powerpc/kernel/eeh_driver.c                   |   2 +-
 arch/powerpc/kernel/ibmebus.c                      |  16 +-
 arch/powerpc/kernel/idle_power7.S                  |   2 +-
 arch/powerpc/kernel/misc_32.S                      |   2 +-
 arch/powerpc/kernel/prom_init.c                    |   3 +
 arch/powerpc/kvm/book3s_hv.c                       |   6 +
 arch/powerpc/kvm/book3s_hv_rm_mmu.c                |   2 +
 arch/powerpc/kvm/book3s_hv_rmhandlers.S            |   4 +
 arch/s390/crypto/prng.c                            |   6 +-
 arch/s390/kernel/ptrace.c                          |   8 +
 arch/tile/kernel/ptrace.c                          |   2 +-
 arch/x86/entry/entry_32.S                          |   4 +-
 arch/x86/kernel/apic/io_apic.c                     |   2 +
 arch/x86/kernel/cpu/common.c                       |   2 +-
 arch/x86/kernel/hpet.c                             |   1 +
 arch/x86/kernel/mcount_64.S                        |   3 +-
 arch/x86/kvm/emulate.c                             | 249 +++++++--
 arch/x86/kvm/lapic.c                               |   6 +
 arch/x86/kvm/lapic.h                               |   1 +
 arch/x86/kvm/vmx.c                                 |  11 +-
 arch/x86/kvm/x86.c                                 |  11 +-
 arch/x86/pci/acpi.c                                |  10 +
 block/blk-mq.c                                     |  10 +-
 block/bsg.c                                        |   3 +
 block/cfq-iosched.c                                |   2 +-
 crypto/algapi.c                                    |   1 +
 drivers/acpi/apei/ghes.c                           |   7 +-
 drivers/acpi/video_detect.c                        |  20 +
 drivers/ata/libata-core.c                          |   4 +-
 drivers/ata/sata_mv.c                              |   3 +
 drivers/base/core.c                                |  39 +-
 drivers/base/firmware_class.c                      |   7 +-
 drivers/base/memory.c                              |  11 +-
 drivers/base/power/power.h                         |  19 +-
 drivers/base/power/runtime.c                       |   8 +-
 drivers/base/power/wakeirq.c                       |  76 ++-
 drivers/block/loop.c                               |   2 +-
 drivers/bus/vexpress-config.c                      |   7 +-
 drivers/char/tpm/xen-tpmfront.c                    |   1 -
 drivers/clk/bcm/clk-bcm2835.c                      |   4 +-
 drivers/clk/clk-wm831x.c                           |   2 +-
 drivers/clk/imx/clk-imx31.c                        |   4 +-
 drivers/clk/ti/clk-3xxx.c                          |  20 +-
 drivers/clk/ti/clock.h                             |   9 +
 drivers/clk/ti/dpll.c                              |  19 +-
 drivers/clk/ti/dpll3xxx.c                          |  67 +++
 drivers/clocksource/exynos_mct.c                   |   1 +
 drivers/cpufreq/powernv-cpufreq.c                  |   8 +-
 drivers/crypto/caam/caamalg.c                      |   4 +-
 drivers/dma/pl330.c                                |  11 +
 drivers/gpu/drm/ast/ast_main.c                     |   7 +-
 drivers/gpu/drm/drm_modes.c                        |   7 +
 drivers/gpu/drm/gma500/psb_drv.c                   |   3 +
 drivers/gpu/drm/i915/intel_crt.c                   |   9 +-
 drivers/gpu/drm/i915/intel_display.c               |   4 +-
 drivers/gpu/drm/nouveau/dispnv04/hw.c              |   3 +-
 drivers/gpu/drm/nouveau/nouveau_bios.c             |   3 +
 drivers/gpu/drm/nouveau/nvkm/engine/device/base.c  |   4 +-
 .../gpu/drm/nouveau/nvkm/engine/disp/hdagt215.c    |   2 +-
 .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c |   9 +-
 .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c |   8 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/bios/priv.h    |   1 +
 drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c  |   7 +-
 .../gpu/drm/nouveau/nvkm/subdev/bios/shadowacpi.c  |   1 +
 drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c     |   2 +
 drivers/gpu/drm/radeon/radeon_cursor.c             |  73 ++-
 drivers/gpu/drm/radeon/radeon_mode.h               |   1 +
 drivers/gpu/drm/radeon/si_dpm.c                    |  14 +-
 drivers/hid/hid-corsair.c                          |  60 ++-
 drivers/hid/hid-cypress.c                          |   3 +
 drivers/hid/wacom_wac.c                            |  28 +-
 drivers/hwmon/amc6821.c                            |   4 +-
 drivers/hwmon/ds620.c                              |   2 +-
 drivers/hwmon/g762.c                               |  11 +-
 drivers/hwmon/nct7802.c                            |   8 +-
 drivers/hwmon/scpi-hwmon.c                         |   1 +
 drivers/i2c/i2c-core.c                             |   2 +-
 drivers/i2c/i2c-dev.c                              |   2 +-
 drivers/infiniband/core/cma.c                      |   3 +-
 drivers/infiniband/core/mad.c                      |   2 +-
 drivers/infiniband/core/multicast.c                |   7 +-
 drivers/infiniband/core/umem.c                     |   2 +
 drivers/infiniband/hw/mlx4/ah.c                    |   6 +-
 drivers/infiniband/hw/mlx4/main.c                  |  29 +-
 drivers/infiniband/hw/mlx4/qp.c                    |   3 +-
 drivers/infiniband/hw/mlx5/mr.c                    |  28 +
 drivers/infiniband/ulp/ipoib/ipoib.h               |  20 +-
 drivers/infiniband/ulp/ipoib/ipoib_cm.c            |  17 +-
 drivers/infiniband/ulp/ipoib/ipoib_ib.c            |  12 +-
 drivers/infiniband/ulp/ipoib/ipoib_main.c          |  54 +-
 drivers/infiniband/ulp/ipoib/ipoib_multicast.c     |  13 +-
 drivers/input/joystick/xpad.c                      |   6 +
 drivers/input/misc/drv260x.c                       |   1 -
 drivers/input/serio/i8042-x86ia64io.h              |   6 +
 drivers/input/touchscreen/elants_i2c.c             |   4 +-
 drivers/iommu/amd_iommu.c                          |   2 +-
 drivers/iommu/amd_iommu_v2.c                       |   4 +-
 drivers/iommu/intel-iommu.c                        |  42 +-
 drivers/irqchip/irq-bcm7038-l1.c                   |  26 +
 drivers/isdn/gigaset/ser-gigaset.c                 |   4 +-
 drivers/isdn/hardware/eicon/message.c              |   3 +-
 drivers/md/dm-crypt.c                              |   7 +-
 drivers/md/dm-flakey.c                             |   2 +
 drivers/md/md.c                                    |   2 +-
 drivers/md/persistent-data/dm-space-map-metadata.c |  14 +-
 drivers/md/raid5.c                                 |   9 +
 drivers/media/i2c/Kconfig                          |   1 +
 drivers/media/pci/cx23885/cx23885-dvb.c            |   6 +-
 drivers/media/pci/solo6x10/solo6x10.h              |   3 +
 drivers/media/platform/blackfin/ppi.c              |   2 +
 drivers/media/rc/ite-cir.c                         |   2 +
 drivers/misc/mei/bus.c                             |   2 +-
 drivers/misc/mei/client.c                          |   2 +-
 drivers/mmc/card/mmc_test.c                        |   2 +-
 drivers/mmc/host/mxs-mmc.c                         |   6 +-
 drivers/mmc/host/sdhci.c                           |  23 +-
 drivers/mtd/nand/Kconfig                           |   2 +-
 drivers/net/can/c_can/c_can_pci.c                  |   1 +
 drivers/net/can/ti_hecc.c                          |  16 +-
 drivers/net/ethernet/broadcom/bcmsysport.c         |  25 +-
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h  |   8 +-
 drivers/net/ethernet/marvell/mvpp2.c               |  59 ++-
 drivers/net/ethernet/mellanox/mlx4/en_rx.c         |   5 +-
 drivers/net/ethernet/mellanox/mlx5/core/main.c     |  10 +-
 drivers/net/ethernet/mellanox/mlxsw/pci.h          |   8 +-
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c     |   1 +
 drivers/net/ethernet/mellanox/mlxsw/switchx2.c     |   1 +
 drivers/net/ethernet/neterion/vxge/vxge-main.c     |  31 +-
 drivers/net/ethernet/renesas/ravb_main.c           |  13 +
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  |  22 +-
 drivers/net/ethernet/ti/cpmac.c                    |   5 +-
 drivers/net/hyperv/netvsc_drv.c                    |   3 +
 drivers/net/ieee802154/atusb.c                     |  31 +-
 drivers/net/loopback.c                             |   1 +
 drivers/net/macvtap.c                              |   4 +-
 drivers/net/phy/bcm63xx.c                          |  21 +-
 drivers/net/ppp/ppp_generic.c                      |   5 +-
 drivers/net/tun.c                                  |  10 +-
 drivers/net/usb/cdc_ether.c                        |   8 +
 drivers/net/usb/qmi_wwan.c                         |   7 +
 drivers/net/usb/r8152.c                            |  89 +++-
 drivers/net/vrf.c                                  |   8 +
 drivers/net/wireless/ath/ath10k/spectral.c         |   2 +-
 drivers/net/wireless/ath/ath9k/pci.c               |   7 +-
 drivers/net/wireless/realtek/rtlwifi/base.c        |   8 +-
 drivers/net/wireless/realtek/rtlwifi/core.c        |   9 +-
 drivers/net/wireless/realtek/rtlwifi/pci.c         |  14 +-
 drivers/net/wireless/realtek/rtlwifi/ps.c          |  36 +-
 drivers/net/xen-netfront.c                         |   3 +-
 drivers/pci/hotplug/rpadlpar_core.c                |  10 +-
 drivers/pci/pci.c                                  |   4 +
 drivers/pci/pcie/aspm.c                            |  19 +-
 drivers/pci/probe.c                                |  12 +-
 drivers/pinctrl/intel/pinctrl-broxton.c            |   2 +-
 drivers/pinctrl/meson/pinctrl-meson.c              |   2 +-
 drivers/pinctrl/sh-pfc/pinctrl.c                   |   3 +-
 drivers/platform/x86/asus-nb-wmi.c                 |   9 +
 drivers/platform/x86/intel_mid_powerbtn.c          |   2 +-
 drivers/regulator/stw481x-vmmc.c                   |   3 +-
 drivers/s390/char/vmlogrdr.c                       |   2 +-
 drivers/s390/scsi/zfcp_dbf.c                       |  17 +-
 drivers/s390/scsi/zfcp_dbf.h                       |  41 +-
 drivers/s390/scsi/zfcp_erp.c                       |  61 ++-
 drivers/s390/scsi/zfcp_ext.h                       |   4 +-
 drivers/s390/scsi/zfcp_fsf.c                       |   8 +-
 drivers/s390/scsi/zfcp_fsf.h                       |   3 +-
 drivers/s390/scsi/zfcp_reqlist.h                   |  30 +-
 drivers/s390/scsi/zfcp_scsi.c                      |  61 ++-
 drivers/scsi/aacraid/comminit.c                    |   8 +-
 drivers/scsi/megaraid/megaraid_sas_fusion.c        |   9 +-
 drivers/scsi/mpt3sas/mpt3sas_scsih.c               |   3 +
 drivers/scsi/mvsas/mv_94xx.c                       |   2 +-
 drivers/scsi/qla2xxx/qla_os.c                      |  16 +-
 drivers/scsi/scsi_sysfs.c                          |   4 -
 drivers/scsi/sg.c                                  |   3 +
 drivers/spi/spi-orion.c                            |  83 ++-
 drivers/ssb/pci.c                                  |   1 +
 drivers/staging/comedi/drivers/dt282x.c            |  65 +--
 drivers/staging/comedi/drivers/ni_mio_common.c     |   8 +-
 drivers/staging/iio/adc/ad7606_core.c              |   2 +-
 drivers/target/iscsi/iscsi_target_tpg.c            |   1 -
 drivers/target/target_core_device.c                |  10 +-
 drivers/target/target_core_sbc.c                   |   8 +-
 drivers/target/target_core_transport.c             |  17 +-
 drivers/target/target_core_user.c                  |   2 -
 drivers/target/target_core_xcopy.c                 |   2 +-
 drivers/thermal/thermal_hwmon.c                    |   2 +-
 drivers/tty/serial/atmel_serial.c                  |  11 +
 drivers/tty/serial/sc16is7xx.c                     |   2 +-
 drivers/tty/sysrq.c                                |   4 +-
 drivers/tty/vt/keyboard.c                          |   2 +-
 drivers/usb/class/cdc-acm.c                        |   1 +
 drivers/usb/core/config.c                          |  10 +
 drivers/usb/core/hub.c                             | 134 ++---
 drivers/usb/core/quirks.c                          |   4 +
 drivers/usb/dwc3/core.h                            |   4 +-
 drivers/usb/dwc3/dwc3-pci.c                        |   2 +
 drivers/usb/dwc3/ep0.c                             |  50 +-
 drivers/usb/dwc3/gadget.c                          |   8 +-
 drivers/usb/gadget/composite.c                     |  23 +-
 drivers/usb/gadget/function/f_fs.c                 |  13 +-
 drivers/usb/gadget/function/f_uac2.c               |  14 +-
 drivers/usb/gadget/function/uvc_video.c            |   2 +-
 drivers/usb/gadget/legacy/inode.c                  |  17 +-
 drivers/usb/gadget/udc/dummy_hcd.c                 |   6 +-
 drivers/usb/host/uhci-pci.c                        |   4 +
 drivers/usb/host/xhci-hub.c                        |  37 ++
 drivers/usb/host/xhci-mem.c                        |  50 +-
 drivers/usb/host/xhci-pci.c                        |   9 +-
 drivers/usb/host/xhci-ring.c                       | 230 ++++----
 drivers/usb/host/xhci.c                            |  17 +-
 drivers/usb/host/xhci.h                            |   8 +-
 drivers/usb/musb/blackfin.c                        |   1 +
 drivers/usb/musb/musb_core.h                       |   7 +
 drivers/usb/musb/musb_dsps.c                       |  12 +
 drivers/usb/musb/musb_host.c                       |  10 +-
 drivers/usb/musb/musbhsdma.h                       |   2 +-
 drivers/usb/phy/phy-am335x-control.c               |   2 +
 drivers/usb/serial/ch341.c                         |  84 +--
 drivers/usb/serial/cyberjack.c                     |  10 +
 drivers/usb/serial/garmin_gps.c                    |   1 +
 drivers/usb/serial/io_edgeport.c                   |   5 +
 drivers/usb/serial/io_ti.c                         |  22 +-
 drivers/usb/serial/iuu_phoenix.c                   |  11 +
 drivers/usb/serial/keyspan_pda.c                   |  14 +
 drivers/usb/serial/kl5kusb105.c                    |  44 +-
 drivers/usb/serial/kobil_sct.c                     |  12 +
 drivers/usb/serial/mos7720.c                       |  51 +-
 drivers/usb/serial/mos7840.c                       |  12 +
 drivers/usb/serial/omninet.c                       |  13 +
 drivers/usb/serial/option.c                        |   8 +
 drivers/usb/serial/oti6858.c                       |  16 +
 drivers/usb/serial/pl2303.c                        |   9 +
 drivers/usb/serial/pl2303.h                        |   1 +
 drivers/usb/serial/qcserial.c                      |   1 +
 drivers/usb/serial/quatech2.c                      |   4 -
 drivers/usb/serial/spcp8x5.c                       |  14 +
 drivers/usb/serial/ti_usb_3410_5052.c              |   7 +
 drivers/usb/storage/unusual_devs.h                 |   7 +
 drivers/video/fbdev/core/fbcmap.c                  |  26 +-
 drivers/vme/bridges/vme_ca91cx42.c                 |   2 +-
 drivers/xen/gntdev.c                               |   2 +-
 fs/Kconfig                                         |   1 +
 fs/Makefile                                        |   1 +
 fs/block_dev.c                                     |   9 +-
 fs/btrfs/async-thread.c                            |  14 +
 fs/btrfs/async-thread.h                            |   1 +
 fs/btrfs/ctree.h                                   |   4 +
 fs/btrfs/delayed-inode.c                           |   6 +-
 fs/btrfs/extent-tree.c                             |  56 +-
 fs/btrfs/extent_io.c                               |   9 +
 fs/btrfs/ioctl.c                                   |   5 +
 fs/btrfs/qgroup.c                                  |   5 +-
 fs/btrfs/relocation.c                              |  27 +-
 fs/btrfs/tree-log.c                                |   3 +-
 fs/ceph/mds_client.c                               |   9 +-
 fs/cifs/cifsglob.h                                 |   3 +
 fs/cifs/cifsproto.h                                |   3 +
 fs/cifs/connect.c                                  |  34 +-
 fs/cifs/readdir.c                                  |   1 +
 fs/cifs/smb2file.c                                 |   2 +-
 fs/cifs/smb2pdu.c                                  |  77 ++-
 fs/cifs/smb2proto.h                                |   1 +
 fs/dcache.c                                        |   7 +-
 fs/exec.c                                          |  32 +-
 fs/ext4/ext4_jbd2.h                                |  14 +-
 fs/ext4/inline.c                                   |   4 +-
 fs/ext4/inode.c                                    |   6 +
 fs/ext4/mballoc.c                                  |   4 +-
 fs/ext4/super.c                                    |  78 ++-
 fs/f2fs/debug.c                                    |   1 +
 fs/fuse/dev.c                                      |   3 +-
 fs/namespace.c                                     |  64 ++-
 fs/nfs/dir.c                                       |  15 +-
 fs/nfs/file.c                                      |   2 +-
 fs/nfs/filelayout/filelayoutdev.c                  |   3 +-
 fs/nfs/nfs4proc.c                                  |   3 +-
 fs/nfs/pnfs.c                                      |   8 +-
 fs/nfsd/nfs4layouts.c                              |   5 +-
 fs/nfsd/nfs4state.c                                |  19 +-
 fs/nfsd/state.h                                    |   4 +-
 fs/ocfs2/dlmglue.c                                 |  10 +
 fs/ocfs2/stackglue.c                               |   6 +
 fs/ocfs2/stackglue.h                               |   3 +
 fs/posix_acl.c                                     |   9 +-
 fs/proc/proc_sysctl.c                              |   3 +-
 fs/ubifs/tnc.c                                     |  25 +-
 fs/wrapfs/Kconfig                                  |   8 +
 fs/wrapfs/Makefile                                 |   7 +
 fs/wrapfs/dentry.c                                 |  49 ++
 fs/wrapfs/file.c                                   | 381 ++++++++++++++
 fs/wrapfs/inode.c                                  | 582 +++++++++++++++++++++
 fs/wrapfs/lookup.c                                 | 323 ++++++++++++
 fs/wrapfs/main.c                                   | 176 +++++++
 fs/wrapfs/mmap.c                                   |  93 ++++
 fs/wrapfs/super.c                                  | 208 ++++++++
 fs/wrapfs/wrapfs.h                                 | 207 ++++++++
 fs/xfs/xfs_log_recover.c                           |   1 +
 include/linux/can/core.h                           |   7 +-
 include/linux/capability.h                         |   4 +-
 include/linux/cpumask.h                            |   8 +-
 include/linux/cred.h                               |   5 +-
 include/linux/jump_label_ratelimit.h               |   5 +
 include/linux/memory_hotplug.h                     |   3 +-
 include/linux/mm_types.h                           |   1 +
 include/linux/namei.h                              |   2 +
 include/linux/netdevice.h                          |  13 +-
 include/linux/nfs4.h                               |   3 +-
 include/linux/percpu-refcount.h                    |   4 +-
 include/linux/ptrace.h                             |   1 -
 include/linux/sched.h                              |   1 +
 include/linux/sunrpc/clnt.h                        |   1 +
 include/linux/tcp.h                                |   7 +-
 include/net/cfg80211.h                             |  11 +
 include/net/cipso_ipv4.h                           |   4 +
 include/rdma/ib_addr.h                             |   6 +-
 include/uapi/linux/magic.h                         |   2 +
 kernel/capability.c                                |  36 +-
 kernel/cpu.c                                       |   9 +-
 kernel/debug/debug_core.c                          |   4 +-
 kernel/events/core.c                               |  42 +-
 kernel/fork.c                                      |   9 +-
 kernel/jump_label.c                                |   7 +
 kernel/memremap.c                                  |   4 +
 kernel/ptrace.c                                    |  28 +-
 kernel/sysctl.c                                    |   1 +
 kernel/time/tick-broadcast.c                       |   3 +
 kernel/time/timekeeping.c                          |   4 +-
 kernel/trace/trace_functions_graph.c               |  17 +-
 kernel/watchdog.c                                  |   1 -
 mm/filemap.c                                       |   5 +
 mm/hugetlb.c                                       |  37 +-
 mm/init-mm.c                                       |   2 +
 mm/memcontrol.c                                    |   4 +-
 mm/memory_hotplug.c                                |  28 +-
 mm/mempolicy.c                                     |   2 +-
 mm/page_alloc.c                                    |  17 +-
 mm/vmscan.c                                        |  14 +-
 mm/zswap.c                                         |  30 +-
 net/ax25/ax25_subr.c                               |   2 +-
 net/bridge/br_netlink.c                            |  33 +-
 net/can/af_can.c                                   |  12 +-
 net/can/af_can.h                                   |   3 +-
 net/can/bcm.c                                      |  27 +-
 net/can/gw.c                                       |   2 +-
 net/can/raw.c                                      |   4 +-
 net/ceph/messenger.c                               |  13 +
 net/core/dev.c                                     |  39 +-
 net/core/drop_monitor.c                            |  39 +-
 net/dsa/slave.c                                    |   2 +
 net/ethernet/eth.c                                 |   1 +
 net/ipv4/cipso_ipv4.c                              |   4 +
 net/ipv4/fib_frontend.c                            |   2 +-
 net/ipv4/fib_semantics.c                           |  20 +-
 net/ipv4/igmp.c                                    |   7 +-
 net/ipv4/ip_sockglue.c                             |   9 +-
 net/ipv4/ping.c                                    |   2 +
 net/ipv4/route.c                                   |   2 +-
 net/ipv4/tcp.c                                     |   6 +
 net/ipv4/tcp_fastopen.c                            |   3 +-
 net/ipv4/tcp_output.c                              |   6 +-
 net/ipv6/addrconf.c                                |   4 +-
 net/ipv6/ip6_gre.c                                 |  41 +-
 net/ipv6/ip6_offload.c                             |   1 +
 net/ipv6/ip6_tunnel.c                              |  34 +-
 net/ipv6/raw.c                                     |   6 +-
 net/ipv6/route.c                                   |   3 +-
 net/ipv6/sit.c                                     |   1 +
 net/ipv6/tcp_ipv6.c                                |  24 +-
 net/l2tp/l2tp_core.h                               |   1 +
 net/l2tp/l2tp_ip.c                                 |  27 +-
 net/l2tp/l2tp_ip6.c                                |   2 +-
 net/mac80211/mesh.c                                |   2 +-
 net/mac80211/mlme.c                                |  21 +-
 net/mac80211/tx.c                                  |   3 +-
 net/openvswitch/conntrack.c                        |   3 +-
 net/packet/af_packet.c                             |   7 +-
 net/sched/cls_api.c                                |   4 +-
 net/sctp/socket.c                                  |   3 +-
 net/sunrpc/auth_gss/gss_rpc_xdr.c                  |   2 +-
 net/sunrpc/auth_gss/svcauth_gss.c                  |   2 +-
 net/sunrpc/clnt.c                                  |   5 +
 net/sunrpc/sunrpc_syms.c                           |   1 +
 net/sunrpc/xprtrdma/svc_rdma_recvfrom.c            |   2 -
 net/unix/af_unix.c                                 |  27 +-
 net/wireless/core.h                                |   1 +
 net/wireless/mlme.c                                |  12 +
 net/wireless/nl80211.c                             |  16 +-
 net/wireless/sme.c                                 |  14 +
 scripts/kconfig/nconf.gui.c                        |  15 +-
 security/selinux/hooks.c                           |   2 +-
 sound/core/seq/seq_memory.c                        |   9 +-
 sound/core/seq/seq_queue.c                         |  33 +-
 sound/firewire/tascam/tascam-stream.c              |   2 +-
 sound/pci/hda/hda_auto_parser.c                    |   4 +-
 sound/pci/hda/patch_ca0132.c                       |   1 +
 sound/pci/hda/patch_conexant.c                     |  17 +
 sound/pci/hda/patch_realtek.c                      |   5 +
 sound/soc/intel/atom/sst-mfld-platform-pcm.c       |   6 +
 sound/soc/samsung/i2s.c                            |   5 +-
 sound/usb/card.c                                   |   1 -
 sound/usb/endpoint.c                               |  17 +-
 sound/usb/endpoint.h                               |   2 +-
 sound/usb/hiface/pcm.c                             |   2 +
 sound/usb/mixer.c                                  |   3 +-
 sound/usb/pcm.c                                    |  10 +-
 sound/usb/quirks.c                                 |   1 +
 tools/perf/util/trace-event-scripting.c            |   6 +-
 tools/testing/selftests/Makefile                   |   2 +-
 tools/testing/selftests/net/run_netsocktests       |   2 +-
 .../powerpc/pmu/ebb/pmc56_overflow_test.c          |   2 +-
 virt/lib/irqbypass.c                               |   4 +-
 460 files changed, 6142 insertions(+), 1610 deletions(-)

commit 27ad889616a25e6fc19eba07ecc3c299fae9f5a1
Author: Erez Zadok <[email protected]>
Date:   Sat Feb 18 19:11:24 2017 -0500

    Wrapfs: ->iget fixes
    
    Change where we igrab/iput to ensure we always hold a valid lower_inode.
    Return ENOMEM (not EACCES) if iget5_locked returns NULL.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit d850628871881289103a972685d4c682a21f94e7
Author: Erez Zadok <[email protected]>
Date:   Sat Feb 18 15:34:57 2017 -0500

    Wrapfs: update copyrights for 2017
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 21a5deb28ee5aed8ed35dd6d89f09a81e15d3893
Author: Erez Zadok <[email protected]>
Date:   Sat May 21 23:53:51 2016 -0400

    Wrapfs: support NFS exports
    
    Based on patch from Sandeep Joshi <[email protected]>.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 55150b4471ce331c4c730ebf28b5b0b161f42d8c
Author: Erez Zadok <[email protected]>
Date:   Sat May 21 23:53:51 2016 -0400

    Wrapfs: use d_splice_alias
    
    Refactor interpose code to allow lookup to use d_splice_alias.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 6f02902ed7f748b7ac39e39ce30facc35b548d10
Author: Erez Zadok <[email protected]>
Date:   Tue Nov 3 21:19:11 2015 -0500

    Wrapfs: update copyright year to 2015

commit a4177cf0b147cec330641fa5884d4f14c24c2243
Author: Erez Zadok <[email protected]>
Date:   Tue Nov 3 21:16:58 2015 -0500

    Wrapfs: use vfs xattr helpers
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 6b284fa4a825706d92adffaf7f99ed259d958d51
Author: Erez Zadok <[email protected]>
Date:   Fri Sep 4 23:23:14 2015 -0400

    Wrapfs: update follow_link
    
    Signed-off-by: Erez Zadok <[email protected]>

commit e8d0ef15001c088751085d6fff43b82172e3ba59
Author: Erez Zadok <[email protected]>
Date:   Fri Sep 4 23:13:21 2015 -0400

    Wrapfs: update ->direct_IO op prototype
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 3d7beb6f6401a5fb8641434b4ece0537fd326817
Author: Erez Zadok <[email protected]>
Date:   Fri Sep 4 23:12:21 2015 -0400

    Wrapfs: use d_inode macro
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 6b6e827b83635821e0c3d299d76338b3f21e3e77
Author: Erez Zadok <[email protected]>
Date:   Fri Sep 4 23:11:21 2015 -0400

    Wrapfs: remove aio_read/write ops
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 57da7ea6f103be4a3fca447bdeb10ec8e529df20
Author: Erez Zadok <[email protected]>
Date:   Fri Aug 15 22:48:32 2014 -0400

    Wrapfs: properly copy meta-data after AIO operations from lower inode
    
    Signed-off-by: Mengyang Li <[email protected]>
    Signed-off-by: Erez Zadok <[email protected]>

commit c430306613b1944476c210bc6f61c2cd96d3457c
Author: Erez Zadok <[email protected]>
Date:   Mon Aug 11 18:10:35 2014 -0400

    Wrapfs: leave placeholders for updating upper inode after AIO
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 2db058720ab72b8d1ddfa7cbd7aa91fdaa1c260e
Author: Erez Zadok <[email protected]>
Date:   Sun Aug 10 00:40:56 2014 -0400

    Wrapfs: protect lower_file by ref-count during aio operation
    
    Signed-off-by: Erez Zadok <[email protected]>
    Signed-off-by: Mengyang Li <[email protected]>

commit 5e7a117e39210cc6f38148734a705a3446f3d5e2
Author: Erez Zadok <[email protected]>
Date:   Sun Aug 10 00:40:56 2014 -0400

    Wrapfs: add read_iter/write_iter opeations
    
    Signed-off-by: Erez Zadok <[email protected]>
    Signed-off-by: Mengyang Li <[email protected]>

commit cbf5605ca7f372ac9bdee5b1faf561023478a887
Author: Erez Zadok <[email protected]>
Date:   Sun Aug 10 00:40:56 2014 -0400

    Wrapfs: update to new direct_IO interface
    
    Signed-off-by: Mengyang Li <[email protected]>
    Signed-off-by: Erez Zadok <[email protected]>

commit 0b95341646afcf4c0dac13d21cf7b535580f3e24
Author: Erez Zadok <[email protected]>
Date:   Sat Jul 26 19:06:53 2014 -0400

    Wrapfs: update wrapfs_fsync
    
    In v3.16 generic_file_fsync will access ->i_sb->s_bdev->bd_disk, but
    s_bdev is NULL for wrapfs inode.  This will trigger a kernel panic in
    xfstests generic/075, generic/091, etc. as of  kernel v3.16-rc1.
    
    This patch fixes this issue by using __generic_file_fsync, a new
    interface introduced in v3.16.
    
    Signed-off-by: Mengyang Li <[email protected]>
    Signed-off-by: Erez Zadok <[email protected]>

commit 4f9841c5716c40fadfe4df3df2baf7542e97f280
Author: Erez Zadok <[email protected]>
Date:   Wed Jun 25 22:37:16 2014 -0400

    Wrapfs: fix ->llseek to update upper and lower offsets
    
    Fixes bug: xfstests generic/257. f_pos consistently is required by and
    only by dir_ops->wrapfs_readdir, main_ops is not affected.
    
    Signed-off-by: Erez Zadok <[email protected]>
    Signed-off-by: Mengyang Li <[email protected]>

commit ffc15218d7e91c9840a829c066c7a55d97bc7ee2
Author: Erez Zadok <[email protected]>
Date:   Wed Jun 25 22:30:27 2014 -0400

     Wrapfs: support extended attributes (xattr) operations
    
    Signed-off-by: Erez Zadok <[email protected]>
    Signed-off-by: Mengyang Li <[email protected]>

commit 9104dda39eabecf1045f1045d19a54d177db03da
Author: Erez Zadok <[email protected]>
Date:   Fri Jun 20 19:40:04 2014 -0400

    Wrapfs: support asynchronous-IO (AIO) operations
    
    Signed-off-by: Li Mengyang <[email protected]>
    Signed-off-by: Erez Zadok <[email protected]>

commit 2dda373f9d6493da5e641d086952621e5b36c792
Author: Erez Zadok <[email protected]>
Date:   Fri Jun 20 19:39:40 2014 -0400

    Wrapfs: support direct-IO (DIO) operations
    
    Signed-off-by: Li Mengyang <[email protected]>
    Signed-off-by: Erez Zadok <[email protected]>

commit fc27725b46a3ea021aa828ae21166c43e1640f12
Author: Erez Zadok <[email protected]>
Date:   Wed May 14 23:45:28 2014 -0400

    Wrapfs: implement vm_ops->page_mkwrite
    
    Some file systems (e.g., ext4) require it.  Reported by Ted Ts'o.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 027febe48e6119d7a08a001df7147e5b279e5f69
Author: Erez Zadok <[email protected]>
Date:   Sat Apr 26 22:43:20 2014 -0400

    Wrapfs: use new vfs_rename prototype
    
    Signed-off-by: Erez Zadok <[email protected]>

commit e44792a8ca984c602230a4fffe36424d68e67be3
Author: Erez Zadok <[email protected]>
Date:   Thu Apr 3 13:24:28 2014 -0400

    Wrapfs: update documentation
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 38b6287b189128930cb1009080f7eefa6e8c23a0
Author: Erez Zadok <[email protected]>
Date:   Thu Apr 3 13:17:55 2014 -0400

    Wrapfs: update maintainers
    
    Signed-off-by: Erez Zadok <[email protected]>

commit e7aabab57ab4706bd0234477669917f144f933a6
Author: Erez Zadok <[email protected]>
Date:   Tue Jan 21 03:03:00 2014 -0500

    Wrapfs: update documentation
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 62676b2ecfb763ba40171f1d45bbb2b0b4e2a5d3
Author: Erez Zadok <[email protected]>
Date:   Tue Jan 21 01:25:54 2014 -0500

    Wrapfs: 2014 Copyright update
    
    Signed-off-by: Erez Zadok <[email protected]>

commit c1ad59520da7a6b6f014fa5a561443b476d56f24
Author: Erez Zadok <[email protected]>
Date:   Tue Nov 26 23:05:22 2013 -0500

    Wrapfs: use generic put_link helper
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 056e887e4ac9f4a0b90796c35abb20fee42f1e80
Author: Erez Zadok <[email protected]>
Date:   Tue Nov 26 23:03:46 2013 -0500

    Wrapfs: remove unnecessary initializations
    
    Signed-off-by: Erez Zadok <[email protected]>

commit b375db58e80a61231bc6ae5350421a4093c20ab1
Author: Erez Zadok <[email protected]>
Date:   Sun Nov 24 11:12:07 2013 -0500

    Wrapfs: remove deprecated init_lower_nd
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 0b100e28f8e2ec634a61db585ffae19c74f43387
Author: Erez Zadok <[email protected]>
Date:   Tue Nov 19 19:00:00 2013 -0500

    Wrapfs: update MAINTAINERS info
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 230707630517a2e1160c443b644e219eec5b9b99
Author: Erez Zadok <[email protected]>
Date:   Tue Nov 19 18:59:47 2013 -0500

    patch wrapfs-copyright-update.patch

commit 408f8fc2f5a937fbf47342e2b349915390735902
Author: Erez Zadok <[email protected]>
Date:   Tue Nov 19 17:23:31 2013 -0500

    Wrapfs: use DCACHE_OP_REVALIDATE flag in ->d_revalidate
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 33c9900b0bc2b9eaae714a5b23da061cea314938
Author: Erez Zadok <[email protected]>
Date:   Tue Nov 19 17:22:31 2013 -0500

    Wrapfs: implement ->getattr
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 7267bee6a9db510c424fc22c6f091a6b56161d84
Author: Erez Zadok <[email protected]>
Date:   Tue Nov 19 17:21:31 2013 -0500

    Wrapfs: use file_inode helper
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 9c96edad41401408a4ca5205d7bdf5000956a0b7
Author: Erez Zadok <[email protected]>
Date:   Tue Nov 19 17:20:31 2013 -0500

    Wrapfs: call filemap_write_and_wait in ->flush
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 69d11f5661302cb4534cefcb75fe7363e0047b21
Author: Erez Zadok <[email protected]>
Date:   Tue Nov 19 17:19:31 2013 -0500

    Wrapfs: handle new VFS API with delegation support
    
    For now, wrapfs isn't supporting NFS delegations.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 8a2d01e7049dd14317e51e28dba8e58da71514a0
Author: Erez Zadok <[email protected]>
Date:   Tue Nov 19 17:18:31 2013 -0500

    VFS: export vfs_path_lookup
    
    In 3.12, this useful function was unexported: wrapfs needs a way to lookup
    relative to a struct path and use a proper vfsmount, unlike lookup_one_len.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 84963570c5739516f78db5c2c5a41737d83b4f0f
Author: Erez Zadok <[email protected]>
Date:   Tue Nov 19 17:17:31 2013 -0500

    Wrapfs: ->readdir op now ->iterate
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 288d2904c30464e6d271a9489f7295381b40df4a
Author: Erez Zadok <[email protected]>
Date:   Wed Jun 5 01:36:58 2013 -0400

    Wrapfs: copy lower inode attributes in ->ioctl
    
    Some ioctls (e.g., EXT2_IOC_SETFLAGS) can change inode attributes, so copy
    them from lower inode.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit fefa4903571359eab604287818a7d98a84d75a6f
Author: Erez Zadok <[email protected]>
Date:   Wed Jun 5 01:36:58 2013 -0400

    Wrapfs: remove unnecessary call to vm_unmap in ->mmap
    
    Code is unnecessary and causes deadlocks in newer kernels.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 295e712b57df2b3eea8db946fa5d33e7a3d8ff5a
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:32 2013 -0400

    Wrapfs: declare MODULE_ALIAS_FS
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 666c86827f50c5064c3045caeda37478e482c09b
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:32 2013 -0400

    Wrapfs: don't use FS_REVAL_DOT in fs_flags
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 68ad06a7154a983d3c907c35cb9317516b7bacc9
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:31 2013 -0400

    Wrapfs: remove dependency on now-defunct CONFIG_EXPERIMENTAL
    
    Signed-off-by: Erez Zadok <[email protected]>

commit ed38008499687b9eef806f07e1b7c8b3f98b4c97
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:31 2013 -0400

    Wrapfs: dentry_open() no longer does mntput/dput
    
    We need to grab a reference on the path before dentry_open, and drop it
    after.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 4092664d45a83a3e0d6437c623cec88f87efac75
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:30 2013 -0400

    Wrapfs: no need to call mnt_want_write any longer
    
    Apparently this is now being done by the VFS.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit e645d1395eff5f2951f78f0c7a5504a106528305
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:30 2013 -0400

    Wrapfs: remove VM_CAN_NONLINEAR flag use in ->mmap
    
    Signed-off-by: Erez Zadok <[email protected]>

commit fb2d84ba0cc97e018d97a6ee4895114fa3f5ffdb
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:29 2013 -0400

    Wrapfs: ->lookup takes flags not a nameidata
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 9192fda786a0d741324042e1486a060335e1e741
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:29 2013 -0400

    Wrapfs: ->create no longer takes a nameidata, only a flag
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 009a4cd76f384a2bebf547cfd37cc5778a1ecc9f
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:29 2013 -0400

    Wrapfs: ->d_revalidate now takes namei flags, not nameidata
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 12aec05b744db604c39f16b92c58919dfc207d36
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:28 2013 -0400

    Wrapfs: struct nameidata no longer has an open-intent data
    
    Signed-off-by: Erez Zadok <[email protected]>

commit fa5d8c5e73a666dd2ac528a646dbc97b59a2afc1
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:28 2013 -0400

    Wrapfs: dentry_open now takes a struct path
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 36300a74d95d0c53ce103228ca22e52e6104cbc1
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:27 2013 -0400

    Wrapfs: use vm_munmap in ->mmap
    
    Signed-off-by: Erez Zadok <[email protected]>

commit cd77c7610c949d16c7d1c87bb0d169ff629c2e0d
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:27 2013 -0400

    Wrapfs: use clear_inode in evict_inode
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 059c876836e9b25aaafc2dfe5dcc72de4ebaf554
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:26 2013 -0400

    Wrapfs: use d_make_root
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 953e297d7e872f3f7bd4b62cdceb468404d338a3
Author: Erez Zadok <[email protected]>
Date:   Tue Jan 31 04:40:19 2012 -0500

    Wrapfs: use mode_t
    
    Signed-off-by: Erez Zadok <[email protected]>

commit d591d68a481abba55c70908028d8b9a9f84cdc05
Author: Erez Zadok <[email protected]>
Date:   Sun Jan 29 20:34:27 2012 -0500

    Wrapfs: use set_nlink()
    
    Signed-off-by: Erez Zadok <[email protected]>

commit b733a3fd22d250957f1042aa8a03048f186d9dd4
Author: Erez Zadok <[email protected]>
Date:   Fri Sep 9 00:47:49 2011 -0400

    Wrapfs: drop our dentry in ->rmdir
    
    Also clear nlinks on our inode.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 8a8e51ec9fb9742a46579bbcc4b2ac60ed47bb37
Author: Erez Zadok <[email protected]>
Date:   Tue Sep 6 00:10:32 2011 -0400

    Wrapfs: use d_alloc_root
    
    Signed-off-by: Erez Zadok <[email protected]>

commit bf87d3efed40b12beec7733cfefff803f0914af9
Author: Erez Zadok <[email protected]>
Date:   Tue Sep 6 00:10:31 2011 -0400

    Wrapfs: use d_set_d_op
    
    Signed-off-by: Erez Zadok <[email protected]>

commit a62ffe3b29451e5fc00ee311335a856731c46123
Author: Erez Zadok <[email protected]>
Date:   Tue Sep 6 00:10:30 2011 -0400

    Wrapfs: use updated vfs_path_lookup prototype
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 3db7dffa430c3a451b1535a213755bda05e32fc3
Author: Erez Zadok <[email protected]>
Date:   Tue Sep 6 00:10:30 2011 -0400

    Wrapfs: ->fsync updates for new prototype
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 6991e99992c5de53074e300f6c3c3c8336ea9af3
Author: Erez Zadok <[email protected]>
Date:   Tue Sep 6 00:10:29 2011 -0400

    Wrapfs: support LOOKUP_RCU in ->d_revalidate
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 9624a63c21a454c6e2653528b2331c6d2e775469
Author: Erez Zadok <[email protected]>
Date:   Tue Sep 6 00:10:28 2011 -0400

    Wrapfs: new ->permission prototype and fixes.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 942c89c23efeafd5d3a8b02b8375ea6074208865
Author: Erez Zadok <[email protected]>
Date:   Mon May 2 02:00:02 2011 -0400

    Wrapfs: lookup fixes
    
    Don't use lookup_one_len any longer (doesn't work for NFS).
    Initialize lower wrapfs_dentry_info so lower_path is NULL.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 3018aa8167782074f44047942849baa79ee0bf88
Author: Erez Zadok <[email protected]>
Date:   Fri Mar 18 13:14:28 2011 -0400

    Wrapfs: remove extra debug in rmdir
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 6d24edf61e93f751cd1d998f6b3c6e34ba2c3e70
Author: Erez Zadok <[email protected]>
Date:   Fri Mar 18 12:38:01 2011 -0400

    Wrapfs: checkpatch fixes
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 86711afcb83b082ba2430a83df9923c87814f4f0
Author: Erez Zadok <[email protected]>
Date:   Fri Mar 18 00:45:17 2011 -0400

    Wrapfs: port to 2.6.39
    
    Remove lock/unlock_kernel in ->fasync.
    Convert from ->get_sb to ->mount op.
    Remove include to smp_lock.h, added sched.h.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 25568030a30cf4a1bd792a796424895a32a5b27f
Author: Erez Zadok <[email protected]>
Date:   Thu Mar 17 23:21:55 2011 -0400

    Wrapfs: copyright update for 2011
    
    Signed-off-by: Erez Zadok <[email protected]>

commit c50381fd87fe48d5bb94b8c4664a49cf4b1698d8
Author: Erez Zadok <[email protected]>
Date:   Thu Mar 17 23:21:55 2011 -0400

    Wrapfs: better handling of NFS silly-renamed files
    
    In ->unlink, if we try to unlink an NFS silly-renamed file, NFS returns
    -EBUSY.  We have to treat it as a success and return 0 to the VFS.  NFS will
    remove silly-deleted files later on anyway.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 88813cc28ce5f053cef238874d7da0c0fdbcf4ba
Author: Erez Zadok <[email protected]>
Date:   Thu Mar 17 23:21:55 2011 -0400

    Wrapfs: update parent directory inode size in inode ops
    
    After ->unlink, ->rmdir, and ->rename, we need to copy the (possibly
    changed) inode size of the parent directory(ies) where the operation took
    place.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 8376492634891df6464fb80bada7f6937afe7973
Author: Erez Zadok <[email protected]>
Date:   Thu Mar 17 23:21:55 2011 -0400

    Wrapfs: remove unnecessary calls to copy lower inode->n_links
    
    Removed from ->create, ->symlink, and ->mknod.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit bbc72a67d7b3a7afc632029f984f02eca7284ddf
Author: Erez Zadok <[email protected]>
Date:   Mon Mar 7 23:20:33 2011 -0500

    Wrapfs: ->setattr fixes
    
    Call inode_change_ok on our inode, not lower.
    Don't copy inode sizes (VFS does it).
    Pass lower file in struct iattr passed to notify_change on lower inode.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 704183765e3107947c7e1b9dc54f0d1db1d8bd01
Author: Erez Zadok <[email protected]>
Date:   Sun Mar 6 16:23:16 2011 -0500

    Wrapfs: update ->permission prototye and code for new iperm flag
    
    Signed-off-by: Erez Zadok <[email protected]>

commit ebc001be191d28091ff9b1ebaa62a009e1e55f26
Author: Erez Zadok <[email protected]>
Date:   Fri Nov 12 18:15:05 2010 -0500

    Wrapfs: handle maxbytes properly
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 282c788b32a18524afc02e39c3acdb8d6419124e
Author: Erez Zadok <[email protected]>
Date:   Sat Sep 11 15:49:33 2010 -0400

    Wrapfs: support ->unlocked_ioctl and ->compat_ioctl
    
    Old ->ioctl was split into ->unlocked_ioctl and ->compat_ioctl.  Compat
    version doesn't need to lock_kernel any longer.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit a191e2f2ee13b37c6b5de6e9b86d2bf805509d61
Author: Erez Zadok <[email protected]>
Date:   Tue Aug 10 23:50:14 2010 -0400

    Wrapfs: new vfs_statfs and ->evict_inode prototypes
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 722d2d6e7bb2956238ee74a2c714351ceeecb62f
Author: Erez Zadok <[email protected]>
Date:   Fri Aug 6 23:37:29 2010 -0400

    Wrapfs: update ->fsync prototype
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 09a32abadec0ecd2d6b6876a8865ad0313becb98
Author: Erez Zadok <[email protected]>
Date:   Tue Apr 20 21:22:02 2010 -0400

    Wrapfs: update documentation
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 2f35f88c9e942b4abc86baa289e287d40ba45282
Author: Erez Zadok <[email protected]>
Date:   Tue Apr 20 15:32:09 2010 -0400

    Wrapfs: include slab.h
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 44ff1262e00a7073ed0d715a6e360154c47e2f9f
Author: Erez Zadok <[email protected]>
Date:   Tue Apr 20 15:26:02 2010 -0400

    Wrapfs: avoid an extra path_get/put pair in wrapfs_open
    
    Signed-off-by: Erez Zadok <[email protected]>

commit ac06df21c46472ac3ff93690b85eed2f12e7f0bb
Author: Erez Zadok <[email protected]>
Date:   Fri Feb 26 03:18:04 2010 -0500

    Wrapfs: decrement nd_path on follow_link error
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 939ca4d2b1868625005f3069ed2567808d75b6b2
Author: Erez Zadok <[email protected]>
Date:   Tue Jan 5 04:27:00 2010 -0500

    Wrapfs: don't mention kernel version in modload message
    
    Signed-off-by: Erez Zadok <[email protected]>

commit cf8e2d1d974fb0e28fa8cd550314d5a8fc558ba9
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Kconfig: hook to configure Wrapfs
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 8644f2f9672a7d63211404d325992395d77a0008
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Makefile: hook to compile Wrapfs
    
    Signed-off-by: Erez Zadok <[email protected]>

commit dc3fafdeffaaf2cac7a68511bc3f96e55f4b74f1
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: file system magic number
    
    Signed-off-by: Erez Zadok <[email protected]>

commit cc09c94335de3da5a566c64f4b890900324f77a7
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: Kconfig options
    
    Signed-off-by: Erez Zadok <[email protected]>

commit ed2ad6ac71718373c43142dd61df25242391a4ac
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: main Makefile
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 0fef6790c87b86310b0ddf338a1123ba647e203e
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: vm_ops operations
    
    Includes necessary address_space workaround ops.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 06e9a6963ce5ba18f9ae1fb16d4a70424e8ca8d7
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: mount-time and module-linkage functions
    
    Signed-off-by: Erez Zadok <[email protected]>

commit f9680a80086e178d43633afc34463d9a7225342e
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: lookup-related functions
    
    Main lookup function, nameidata helpers, and stacking-interposition
    functions.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit bb86a45da0c810c0cddf98d6ea47bd11b56e4eaf
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: file operations
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 77c2f9dffa494f00a4e500d00ce40fc2053af223
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: dentry operations
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 3fe564b518f79ba9efcad9fc903f6cc180886420
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: inode operations
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 960d253d882ce9f74047b7d4d49e7206f66c6649
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: superblock operations
    
    Signed-off-by: Erez Zadok <[email protected]>

commit f6c4a16a46c801f3aa27034fff30453bf03ef56b
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: main header file
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 3625fc29adc1f18a09c1ef4219148cfcc8f95ebb
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: Maintainers
    
    Signed-off-by: Erez Zadok <[email protected]>

commit b12d83f2ecf5a68d9f74302b85b5411140cdfe3a
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Documentation: index entry for Wrapfs
    
    Signed-off-by: Erez Zadok <[email protected]>

commit a97525a488b437bd2fd267a01210b5d6d87ae412
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: introduction and usage documentation
    
    Signed-off-by: Erez Zadok <[email protected]>

commit c50b74d886619bf0fe742a2c461530232a7dc60d
Author: Greg Kroah-Hartman <[email protected]>
Date:   Sat Feb 18 16:39:37 2017 +0100

    Linux 4.4.50

commit b9dee56027ae5704e3c4bc243a0a3313ea3814ec
Author: Eric Dumazet <[email protected]>
Date:   Thu Feb 9 16:15:52 2017 -0800

    l2tp: do not use udp_ioctl()
    
    [ Upstream commit 72fb96e7bdbbdd4421b0726992496531060f3636 ]
    
    udp_ioctl(), as its name suggests, is used by UDP protocols,
    but is also used by L2TP :(
    
    L2TP should use its own handler, because it really does not
    look the same.
    
    SIOCINQ for instance should not assume UDP checksum or headers.
    
    Thanks to Andrey and syzkaller team for providing the report
    and a nice reproducer.
    
    While crashes only happen on recent kernels (after commit
    7c13f97ffde6 ("udp: do fwd memory scheduling on dequeue")), this
    probably needs to be backported to older kernels.
    
    Fixes: 7c13f97ffde6 ("udp: do fwd memory scheduling on dequeue")
    Fixes: 85584672012e ("udp: Fix udp_poll() and ioctl()")
    Signed-off-by: Eric Dumazet <[email protected]>
    Reported-by: Andrey Konovalov <[email protected]>
    Acked-by: Paolo Abeni <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

diff --git a/Documentation/devicetree/bindings/clock/imx31-clock.txt 
b/Documentation/devicetree/bindings/clock/imx31-clock.txt
index 19df842..8163d56 100644
--- a/Documentation/devicetree/bindings/clock/imx31-clock.txt
+++ b/Documentation/devicetree/bindings/clock/imx31-clock.txt
@@ -77,7 +77,7 @@ Examples:
 clks: ccm@53f80000{
        compatible = "fsl,imx31-ccm";
        reg = <0x53f80000 0x4000>;
-       interrupts = <0 31 0x04 0 53 0x04>;
+       interrupts = <31>, <53>;
        #clock-cells = <1>;
 };
 
diff --git a/Documentation/virtual/kvm/api.txt 
b/Documentation/virtual/kvm/api.txt
index 092ee9f..df8ab4f 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -1991,6 +1991,7 @@ registers, find a list below:
   PPC   | KVM_REG_PPC_TM_VSCR           | 32
   PPC   | KVM_REG_PPC_TM_DSCR           | 64
   PPC   | KVM_REG_PPC_TM_TAR            | 64
+  PPC   | KVM_REG_PPC_TM_XER            | 64
         |                               |
   MIPS  | KVM_REG_MIPS_R0               | 64
           ...
diff --git a/Makefile b/Makefile
index 88d26a6..1099371 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 4
-SUBLEVEL = 39
+SUBLEVEL = 50
 EXTRAVERSION =
 NAME = Blurry Fish Butt
 
diff --git a/arch/arc/include/asm/cacheflush.h 
b/arch/arc/include/asm/cacheflush.h
index fbe3587..56aeb5e 100644
--- a/arch/arc/include/asm/cacheflush.h
+++ b/arch/arc/include/asm/cacheflush.h
@@ -85,6 +85,10 @@ void flush_anon_page(struct vm_area_struct *vma,
  */
 #define PG_dc_clean    PG_arch_1
 
+#define CACHE_COLORS_NUM       4
+#define CACHE_COLORS_MSK       (CACHE_COLORS_NUM - 1)
+#define CACHE_COLOR(addr)      (((unsigned long)(addr) >> (PAGE_SHIFT)) & 
CACHE_COLORS_MSK)
+
 /*
  * Simple wrapper over config option
  * Bootup code ensures that hardware matches kernel configuration
@@ -94,8 +98,6 @@ static inline int cache_is_vipt_aliasing(void)
        return IS_ENABLED(CONFIG_ARC_CACHE_VIPT_ALIASING);
 }
 
-#define CACHE_COLOR(addr)      (((unsigned long)(addr) >> (PAGE_SHIFT)) & 1)
-
 /*
  * checks if two addresses (after page aligning) index into same cache set
  */
diff --git a/arch/arc/include/asm/delay.h b/arch/arc/include/asm/delay.h
index a36e860..d5da211 100644
--- a/arch/arc/include/asm/delay.h
+++ b/arch/arc/include/asm/delay.h
@@ -26,7 +26,9 @@ static inline void __delay(unsigned long loops)
        "       lp  1f                  \n"
        "       nop                     \n"
        "1:                             \n"
-       : : "r"(loops));
+       :
+        : "r"(loops)
+        : "lp_count");
 }
 
 extern void __bad_udelay(void);
diff --git a/arch/arc/kernel/unaligned.c b/arch/arc/kernel/unaligned.c
index abd961f..5f69c3b 100644
--- a/arch/arc/kernel/unaligned.c
+++ b/arch/arc/kernel/unaligned.c
@@ -241,8 +241,9 @@ int misaligned_fixup(unsigned long address, struct pt_regs 
*regs,
        if (state.fault)
                goto fault;
 
+       /* clear any remanants of delay slot */
        if (delay_mode(regs)) {
-               regs->ret = regs->bta;
+               regs->ret = regs->bta & ~1U;
                regs->status32 &= ~STATUS_DE_MASK;
        } else {
                regs->ret += state.instr_len;
diff --git a/arch/arc/mm/cache.c b/arch/arc/mm/cache.c
index aaf1e2d..d81b6d7 100644
--- a/arch/arc/mm/cache.c
+++ b/arch/arc/mm/cache.c
@@ -960,11 +960,16 @@ void arc_cache_init(void)
                /* check for D-Cache aliasing on ARCompact: ARCv2 has PIPT */
                if (is_isa_arcompact()) {
                        int handled = 
IS_ENABLED(CONFIG_ARC_CACHE_VIPT_ALIASING);
-
-                       if (dc->alias && !handled)
-                               panic("Enable 
CONFIG_ARC_CACHE_VIPT_ALIASING\n");
-                       else if (!dc->alias && handled)
+                       int num_colors = dc->sz_k/dc->assoc/TO_KB(PAGE_SIZE);
+
+                       if (dc->alias) {
+                               if (!handled)
+                                       panic("Enable 
CONFIG_ARC_CACHE_VIPT_ALIASING\n");
+                               if (CACHE_COLORS_NUM != num_colors)
+                                       panic("CACHE_COLORS_NUM not optimized 
for config\n");
+                       } else if (!dc->alias && handled) {
                                panic("Disable 
CONFIG_ARC_CACHE_VIPT_ALIASING\n");
+                       }
                }
        }
 
diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 4f935ad..6881757 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -85,6 +85,7 @@
                                #size-cells = <1>;
                                compatible = "m25p64";
                                spi-max-frequency = <30000000>;
+                               m25p,fast-read;
                                reg = <0>;
                                partition@0 {
                                        label = "U-Boot-SPL";
diff --git a/arch/arm/boot/dts/imx31.dtsi b/arch/arm/boot/dts/imx31.dtsi
index 5fdb222..cbe5fd5 100644
--- a/arch/arm/boot/dts/imx31.dtsi
+++ b/arch/arm/boot/dts/imx31.dtsi
@@ -30,11 +30,11 @@
                };
        };
 
-       avic: avic-interrupt-controller@60000000 {
+       avic: interrupt-controller@68000000 {
                compatible = "fsl,imx31-avic", "fsl,avic";
                interrupt-controller;
                #interrupt-cells = <1>;
-               reg = <0x60000000 0x100000>;
+               reg = <0x68000000 0x100000>;
        };
 
        soc {
@@ -110,13 +110,6 @@
                                interrupts = <19>;
                                clocks = <&clks 25>;
                        };
-
-                       clks: ccm@53f80000{
-                               compatible = "fsl,imx31-ccm";
-                               reg = <0x53f80000 0x4000>;
-                               interrupts = <0 31 0x04 0 53 0x04>;
-                               #clock-cells = <1>;
-                       };
                };
 
                aips@53f00000 { /* AIPS2 */
@@ -126,6 +119,13 @@
                        reg = <0x53f00000 0x100000>;
                        ranges;
 
+                       clks: ccm@53f80000{
+                               compatible = "fsl,imx31-ccm";
+                               reg = <0x53f80000 0x4000>;
+                               interrupts = <31>, <53>;
+                               #clock-cells = <1>;
+                       };
+
                        gpt: timer@53f90000 {
                                compatible = "fsl,imx31-gpt";
                                reg = <0x53f90000 0x4000>;
diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi 
b/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
index a35d54f..ddfdb75 100644
--- a/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
@@ -319,8 +319,6 @@
                compatible = "fsl,imx6q-nitrogen6_max-sgtl5000",
                             "fsl,imx-audio-sgtl5000";
                model = "imx6q-nitrogen6_max-sgtl5000";
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_sgtl5000>;
                ssi-controller = <&ssi1>;
                audio-codec = <&codec>;
                audio-routing =
@@ -401,6 +399,8 @@
 
        codec: sgtl5000@0a {
                compatible = "fsl,sgtl5000";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_sgtl5000>;
                reg = <0x0a>;
                clocks = <&clks 201>;
                VDDA-supply = <&reg_2p5v>;
diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi
index a9977d6..1696535 100644
--- a/arch/arm/boot/dts/r8a7794.dtsi
+++ b/arch/arm/boot/dts/r8a7794.dtsi
@@ -1023,7 +1023,7 @@
                mstp7_clks: mstp7_clks@e615014c {
                        compatible = "renesas,r8a7794-mstp-clocks", 
"renesas,cpg-mstp-clocks";
                        reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>;
-                       clocks = <&mp_clk>, <&mp_clk>,
+                       clocks = <&mp_clk>, <&hp_clk>,
                                 <&zs_clk>, <&p_clk>, <&p_clk>, <&zs_clk>,
                                 <&zs_clk>, <&p_clk>, <&p_clk>, <&p_clk>, 
<&p_clk>;
                        #clock-cells = <1>;
diff --git a/arch/arm/crypto/aes-ce-glue.c b/arch/arm/crypto/aes-ce-glue.c
index 593da7f..679c589 100644
--- a/arch/arm/crypto/aes-ce-glue.c
+++ b/arch/arm/crypto/aes-ce-glue.c
@@ -87,8 +87,13 @@ static int ce_aes_expandkey(struct crypto_aes_ctx *ctx, 
const u8 *in_key,
                u32 *rki = ctx->key_enc + (i * kwords);
                u32 *rko = rki + kwords;
 
+#ifndef CONFIG_CPU_BIG_ENDIAN
                rko[0] = ror32(ce_aes_sub(rki[kwords - 1]), 8);
                rko[0] = rko[0] ^ rki[0] ^ rcon[i];
+#else
+               rko[0] = rol32(ce_aes_sub(rki[kwords - 1]), 8);
+               rko[0] = rko[0] ^ rki[0] ^ (rcon[i] << 24);
+#endif
                rko[1] = rko[0] ^ rki[1];
                rko[2] = rko[1] ^ rki[2];
                rko[3] = rko[2] ^ rki[3];
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
index 85e374f..e9d04f4 100644
--- a/arch/arm/include/asm/cputype.h
+++ b/arch/arm/include/asm/cputype.h
@@ -81,6 +81,9 @@
 #define ARM_CPU_XSCALE_ARCH_V2         0x4000
 #define ARM_CPU_XSCALE_ARCH_V3         0x6000
 
+/* Qualcomm implemented cores */
+#define ARM_CPU_PART_SCORPION          0x510002d0
+
 extern unsigned int processor_id;
 
 #ifdef CONFIG_CPU_CP15
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c
index 6284779..abcbea1 100644
--- a/arch/arm/kernel/hw_breakpoint.c
+++ b/arch/arm/kernel/hw_breakpoint.c
@@ -1066,6 +1066,22 @@ static int __init arch_hw_breakpoint_init(void)
                return 0;
        }
 
+       /*
+        * Scorpion CPUs (at least those in APQ8060) seem to set DBGPRSR.SPD
+        * whenever a WFI is issued, even if the core is not powered down, in
+        * violation of the architecture.  When DBGPRSR.SPD is set, accesses to
+        * breakpoint and watchpoint registers are treated as undefined, so
+        * this results in boot time and runtime failures when these are
+        * accessed and we unexpectedly take a trap.
+        *
+        * It's not clear if/how this can be worked around, so we blacklist
+        * Scorpion CPUs to avoid these issues.
+       */
+       if (read_cpuid_part() == ARM_CPU_PART_SCORPION) {
+               pr_info("Scorpion CPU detected. Hardware breakpoints and 
watchpoints disabled\n");
+               return 0;
+       }
+
        has_ossr = core_has_os_save_restore();
 
        /* Determine how many BRPs/WRPs are available. */
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index 4d93758..d54c53b 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -600,7 +600,7 @@ static int gpr_set(struct task_struct *target,
                   const void *kbuf, const void __user *ubuf)
 {
        int ret;
-       struct pt_regs newregs;
+       struct pt_regs newregs = *task_pt_regs(target);
 
        ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
                                 &newregs,
diff --git a/arch/arm/kernel/smp_tlb.c b/arch/arm/kernel/smp_tlb.c
index 2e72be4..7cb079e 100644
--- a/arch/arm/kernel/smp_tlb.c
+++ b/arch/arm/kernel/smp_tlb.c
@@ -9,6 +9,7 @@
  */
 #include <linux/preempt.h>
 #include <linux/smp.h>
+#include <linux/uaccess.h>
 
 #include <asm/smp_plat.h>
 #include <asm/tlbflush.h>
@@ -40,8 +41,11 @@ static inline void ipi_flush_tlb_mm(void *arg)
 static inline void ipi_flush_tlb_page(void *arg)
 {
        struct tlb_args *ta = (struct tlb_args *)arg;
+       unsigned int __ua_flags = uaccess_save_and_enable();
 
        local_flush_tlb_page(ta->ta_vma, ta->ta_start);
+
+       uaccess_restore(__ua_flags);
 }
 
 static inline void ipi_flush_tlb_kernel_page(void *arg)
@@ -54,8 +58,11 @@ static inline void ipi_flush_tlb_kernel_page(void *arg)
 static inline void ipi_flush_tlb_range(void *arg)
 {
        struct tlb_args *ta = (struct tlb_args *)arg;
+       unsigned int __ua_flags = uaccess_save_and_enable();
 
        local_flush_tlb_range(ta->ta_vma, ta->ta_start, ta->ta_end);
+
+       uaccess_restore(__ua_flags);
 }
 
 static inline void ipi_flush_tlb_kernel_range(void *arg)
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 6769978..f5f81a1 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -298,6 +298,16 @@ static struct clk emac_clk = {
        .gpsc           = 1,
 };
 
+/*
+ * In order to avoid adding the emac_clk to the clock lookup table twice (and
+ * screwing up the linked list in the process) create a separate clock for
+ * mdio inheriting the rate from emac_clk.
+ */
+static struct clk mdio_clk = {
+       .name           = "mdio",
+       .parent         = &emac_clk,
+};
+
 static struct clk mcasp_clk = {
        .name           = "mcasp",
        .parent         = &pll0_sysclk2,
@@ -462,7 +472,7 @@ static struct clk_lookup da850_clks[] = {
        CLK(NULL,               "arm",          &arm_clk),
        CLK(NULL,               "rmii",         &rmii_clk),
        CLK("davinci_emac.1",   NULL,           &emac_clk),
-       CLK("davinci_mdio.0",   "fck",          &emac_clk),
+       CLK("davinci_mdio.0",   "fck",          &mdio_clk),
        CLK("davinci-mcasp.0",  NULL,           &mcasp_clk),
        CLK("da8xx_lcdc.0",     "fck",          &lcdc_clk),
        CLK("da830-mmc.0",      NULL,           &mmcsd0_clk),
diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c 
b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
index 65024af..d3c14da 100644
--- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c
+++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
@@ -243,10 +243,9 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int 
power_state)
                save_state = 1;
                break;
        case PWRDM_POWER_RET:
-               if (IS_PM44XX_ERRATUM(PM_OMAP4_CPU_OSWR_DISABLE)) {
+               if (IS_PM44XX_ERRATUM(PM_OMAP4_CPU_OSWR_DISABLE))
                        save_state = 0;
-                       break;
-               }
+               break;
        default:
                /*
                 * CPUx CSWR is invalid hardware state. Also CPUx OSWR
diff --git a/arch/arm/mach-ux500/pm.c b/arch/arm/mach-ux500/pm.c
index 8538910..a970e7f 100644
--- a/arch/arm/mach-ux500/pm.c
+++ b/arch/arm/mach-ux500/pm.c
@@ -134,8 +134,8 @@ bool prcmu_pending_irq(void)
  */
 bool prcmu_is_cpu_in_wfi(int cpu)
 {
-       return readl(PRCM_ARM_WFI_STANDBY) & cpu ? PRCM_ARM_WFI_STANDBY_WFI1 :
-                    PRCM_ARM_WFI_STANDBY_WFI0;
+       return readl(PRCM_ARM_WFI_STANDBY) &
+               (cpu ? PRCM_ARM_WFI_STANDBY_WFI1 : PRCM_ARM_WFI_STANDBY_WFI0);
 }
 
 /*
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
index 6f39d03..0a43143 100644
--- a/arch/arm/mach-zynq/common.c
+++ b/arch/arm/mach-zynq/common.c
@@ -59,7 +59,7 @@ void __iomem *zynq_scu_base;
 static void __init zynq_memory_init(void)
 {
        if (!__pa(PAGE_OFFSET))
-               memblock_reserve(__pa(PAGE_OFFSET), __pa(swapper_pg_dir));
+               memblock_reserve(__pa(PAGE_OFFSET), 0x80000);
 }
 
 static struct platform_device zynq_cpuidle_device = {
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index daafcf1..c095455 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -610,9 +610,9 @@ static int __init early_abort_handler(unsigned long addr, 
unsigned int fsr,
 
 void __init early_abt_enable(void)
 {
-       fsr_info[22].fn = early_abort_handler;
+       fsr_info[FSR_FS_AEA].fn = early_abort_handler;
        local_abt_enable();
-       fsr_info[22].fn = do_bad;
+       fsr_info[FSR_FS_AEA].fn = do_bad;
 }
 
 #ifndef CONFIG_ARM_LPAE
diff --git a/arch/arm/mm/fault.h b/arch/arm/mm/fault.h
index 05ec5e0..7883065 100644
--- a/arch/arm/mm/fault.h
+++ b/arch/arm/mm/fault.h
@@ -11,11 +11,15 @@
 #define FSR_FS5_0              (0x3f)
 
 #ifdef CONFIG_ARM_LPAE
+#define FSR_FS_AEA             17
+
 static inline int fsr_fs(unsigned int fsr)
 {
        return fsr & FSR_FS5_0;
 }
 #else
+#define FSR_FS_AEA             22
+
 static inline int fsr_fs(unsigned int fsr)
 {
        return (fsr & FSR_FS3_0) | (fsr & FSR_FS4) >> 6;
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
index fc7ea52..52c8c1f 100644
--- a/arch/arm/xen/enlighten.c
+++ b/arch/arm/xen/enlighten.c
@@ -239,8 +239,7 @@ static int __init xen_guest_init(void)
         * for secondary CPUs as they are brought up.
         * For uniformity we use VCPUOP_register_vcpu_info even on cpu0.
         */
-       xen_vcpu_info = __alloc_percpu(sizeof(struct vcpu_info),
-                                              sizeof(struct vcpu_info));
+       xen_vcpu_info = alloc_percpu(struct vcpu_info);
        if (xen_vcpu_info == NULL)
                return -ENOMEM;
 
diff --git a/arch/arm64/crypto/aes-ce-ccm-core.S 
b/arch/arm64/crypto/aes-ce-ccm-core.S
index a2a7fbc..3363560 100644
--- a/arch/arm64/crypto/aes-ce-ccm-core.S
+++ b/arch/arm64/crypto/aes-ce-ccm-core.S
@@ -9,6 +9,7 @@
  */
 
 #include <linux/linkage.h>
+#include <asm/assembler.h>
 
        .text
        .arch   armv8-a+crypto
@@ -19,7 +20,7 @@
         */
 ENTRY(ce_aes_ccm_auth_data)
        ldr     w8, [x3]                        /* leftover from prev round? */
-       ld1     {v0.2d}, [x0]                   /* load mac */
+       ld1     {v0.16b}, [x0]                  /* load mac */
        cbz     w8, 1f
        sub     w8, w8, #16
        eor     v1.16b, v1.16b, v1.16b
@@ -31,7 +32,7 @@ ENTRY(ce_aes_ccm_auth_data)
        beq     8f                              /* out of input? */
        cbnz    w8, 0b
        eor     v0.16b, v0.16b, v1.16b
-1:     ld1     {v3.2d}, [x4]                   /* load first round key */
+1:     ld1     {v3.16b}, [x4]                  /* load first round key */
        prfm    pldl1strm, [x1]
        cmp     w5, #12                         /* which key size? */
        add     x6, x4, #16
@@ -41,17 +42,17 @@ ENTRY(ce_aes_ccm_auth_data)
        mov     v5.16b, v3.16b
        b       4f
 2:     mov     v4.16b, v3.16b
-       ld1     {v5.2d}, [x6], #16              /* load 2nd round key */
+       ld1     {v5.16b}, [x6], #16             /* load 2nd round key */
 3:     aese    v0.16b, v4.16b
        aesmc   v0.16b, v0.16b
-4:     ld1     {v3.2d}, [x6], #16              /* load next round key */
+4:     ld1     {v3.16b}, [x6], #16             /* load next round key */
        aese    v0.16b, v5.16b
        aesmc   v0.16b, v0.16b
-5:     ld1     {v4.2d}, [x6], #16              /* load next round key */
+5:     ld1     {v4.16b}, [x6], #16             /* load next round key */
        subs    w7, w7, #3
        aese    v0.16b, v3.16b
        aesmc   v0.16b, v0.16b
-       ld1     {v5.2d}, [x6], #16              /* load next round key */
+       ld1     {v5.16b}, [x6], #16             /* load next round key */
        bpl     3b
        aese    v0.16b, v4.16b
        subs    w2, w2, #16                     /* last data? */
@@ -60,7 +61,7 @@ ENTRY(ce_aes_ccm_auth_data)
        ld1     {v1.16b}, [x1], #16             /* load next input block */
        eor     v0.16b, v0.16b, v1.16b          /* xor with mac */
        bne     1b
-6:     st1     {v0.2d}, [x0]                   /* store mac */
+6:     st1     {v0.16b}, [x0]                  /* store mac */
        beq     10f
        adds    w2, w2, #16
        beq     10f
@@ -79,7 +80,7 @@ ENTRY(ce_aes_ccm_auth_data)
        adds    w7, w7, #1
        bne     9b
        eor     v0.16b, v0.16b, v1.16b
-       st1     {v0.2d}, [x0]
+       st1     {v0.16b}, [x0]
 10:    str     w8, [x3]
        ret
 ENDPROC(ce_aes_ccm_auth_data)
@@ -89,27 +90,27 @@ ENDPROC(ce_aes_ccm_auth_data)
         *                       u32 rounds);
         */
 ENTRY(ce_aes_ccm_final)
-       ld1     {v3.2d}, [x2], #16              /* load first round key */
-       ld1     {v0.2d}, [x0]                   /* load mac */
+       ld1     {v3.16b}, [x2], #16             /* load first round key */
+       ld1     {v0.16b}, [x0]                  /* load mac */
        cmp     w3, #12                         /* which key size? */
        sub     w3, w3, #2                      /* modified # of rounds */
-       ld1     {v1.2d}, [x1]                   /* load 1st ctriv */
+       ld1     {v1.16b}, [x1]                  /* load 1st ctriv */
        bmi     0f
        bne     3f
        mov     v5.16b, v3.16b
        b       2f
 0:     mov     v4.16b, v3.16b
-1:     ld1     {v5.2d}, [x2], #16              /* load next round key */
+1:     ld1     {v5.16b}, [x2], #16             /* load next round key */
        aese    v0.16b, v4.16b
        aesmc   v0.16b, v0.16b
        aese    v1.16b, v4.16b
        aesmc   v1.16b, v1.16b
-2:     ld1     {v3.2d}, [x2], #16              /* load next round key */
+2:     ld1     {v3.16b}, [x2], #16             /* load next round key */
        aese    v0.16b, v5.16b
        aesmc   v0.16b, v0.16b
        aese    v1.16b, v5.16b
        aesmc   v1.16b, v1.16b
-3:     ld1     {v4.2d}, [x2], #16              /* load next round key */
+3:     ld1     {v4.16b}, [x2], #16             /* load next round key */
        subs    w3, w3, #3
        aese    v0.16b, v3.16b
        aesmc   v0.16b, v0.16b
@@ -120,47 +121,47 @@ ENTRY(ce_aes_ccm_final)
        aese    v1.16b, v4.16b
        /* final round key cancels out */
        eor     v0.16b, v0.16b, v1.16b          /* en-/decrypt the mac */
-       st1     {v0.2d}, [x0]                   /* store result */
+       st1     {v0.16b}, [x0]                  /* store result */
        ret
 ENDPROC(ce_aes_ccm_final)
 
        .macro  aes_ccm_do_crypt,enc
        ldr     x8, [x6, #8]                    /* load lower ctr */
-       ld1     {v0.2d}, [x5]                   /* load mac */
-       rev     x8, x8                          /* keep swabbed ctr in reg */
+       ld1     {v0.16b}, [x5]                  /* load mac */
+CPU_LE(        rev     x8, x8                  )       /* keep swabbed ctr in 
reg */
 0:     /* outer loop */
-       ld1     {v1.1d}, [x6]                   /* load upper ctr */
+       ld1     {v1.8b}, [x6]                   /* load upper ctr */
        prfm    pldl1strm, [x1]
        add     x8, x8, #1
        rev     x9, x8
        cmp     w4, #12                         /* which key size? */
        sub     w7, w4, #2                      /* get modified # of rounds */
        ins     v1.d[1], x9                     /* no carry in lower ctr */
-       ld1     {v3.2d}, [x3]                   /* load first round key */
+       ld1     {v3.16b}, [x3]                  /* load first round key */
        add     x10, x3, #16
        bmi     1f
        bne     4f
        mov     v5.16b, v3.16b
        b       3f
 1:     mov     v4.16b, v3.16b
-       ld1     {v5.2d}, [x10], #16             /* load 2nd round key */
+       ld1     {v5.16b}, [x10], #16            /* load 2nd round key */
 2:     /* inner loop: 3 rounds, 2x interleaved */
        aese    v0.16b, v4.16b
        aesmc   v0.16b, v0.16b
        aese    v1.16b, v4.16b
        aesmc   v1.16b, v1.16b
-3:     ld1     {v3.2d}, [x10], #16             /* load next round key */
+3:     ld1     {v3.16b}, [x10], #16            /* load next round key */
        aese    v0.16b, v5.16b
        aesmc   v0.16b, v0.16b
        aese    v1.16b, v5.16b
        aesmc   v1.16b, v1.16b
-4:     ld1     {v4.2d}, [x10], #16             /* load next round key */
+4:     ld1     {v4.16b}, [x10], #16            /* load next round key */
        subs    w7, w7, #3
        aese    v0.16b, v3.16b
        aesmc   v0.16b, v0.16b
        aese    v1.16b, v3.16b
        aesmc   v1.16b, v1.16b
-       ld1     {v5.2d}, [x10], #16             /* load next round key */
+       ld1     {v5.16b}, [x10], #16            /* load next round key */
        bpl     2b
        aese    v0.16b, v4.16b
        aese    v1.16b, v4.16b
@@ -177,14 +178,14 @@ ENDPROC(ce_aes_ccm_final)
        eor     v0.16b, v0.16b, v2.16b          /* xor mac with pt ^ rk[last] */
        st1     {v1.16b}, [x0], #16             /* write output block */
        bne     0b
-       rev     x8, x8
-       st1     {v0.2d}, [x5]                   /* store mac */
+CPU_LE(        rev     x8, x8                  )
+       st1     {v0.16b}, [x5]                  /* store mac */
        str     x8, [x6, #8]                    /* store lsb end of ctr (BE) */
 5:     ret
 
 6:     eor     v0.16b, v0.16b, v5.16b          /* final round mac */
        eor     v1.16b, v1.16b, v5.16b          /* final round enc */
-       st1     {v0.2d}, [x5]                   /* store mac */
+       st1     {v0.16b}, [x5]                  /* store mac */
        add     w2, w2, #16                     /* process partial tail block */
 7:     ldrb    w9, [x1], #1                    /* get 1 byte of input */
        umov    w6, v1.b[0]                     /* get top crypted ctr byte */
diff --git a/arch/arm64/crypto/aes-ce-cipher.c 
b/arch/arm64/crypto/aes-ce-cipher.c
index f7bd9bf..50d9fe1 100644
--- a/arch/arm64/crypto/aes-ce-cipher.c
+++ b/arch/arm64/crypto/aes-ce-cipher.c
@@ -47,24 +47,24 @@ static void aes_cipher_encrypt(struct crypto_tfm *tfm, u8 
dst[], u8 const src[])
        kernel_neon_begin_partial(4);
 
        __asm__("       ld1     {v0.16b}, %[in]                 ;"
-               "       ld1     {v1.2d}, [%[key]], #16          ;"
+               "       ld1     {v1.16b}, [%[key]], #16         ;"
                "       cmp     %w[rounds], #10                 ;"
                "       bmi     0f                              ;"
                "       bne     3f                              ;"
                "       mov     v3.16b, v1.16b                  ;"
                "       b       2f                              ;"
                "0:     mov     v2.16b, v1.16b                  ;"
-               "       ld1     {v3.2d}, [%[key]], #16          ;"
+               "       ld1     {v3.16b}, [%[key]], #16         ;"
                "1:     aese    v0.16b, v2.16b                  ;"
                "       aesmc   v0.16b, v0.16b                  ;"
-               "2:     ld1     {v1.2d}, [%[key]], #16          ;"
+               "2:     ld1     {v1.16b}, [%[key]], #16         ;"
                "       aese    v0.16b, v3.16b                  ;"
                "       aesmc   v0.16b, v0.16b                  ;"
-               "3:     ld1     {v2.2d}, [%[key]], #16          ;"
+               "3:     ld1     {v2.16b}, [%[key]], #16         ;"
                "       subs    %w[rounds], %w[rounds], #3      ;"
                "       aese    v0.16b, v1.16b                  ;"
                "       aesmc   v0.16b, v0.16b                  ;"
-               "       ld1     {v3.2d}, [%[key]], #16          ;"
+               "       ld1     {v3.16b}, [%[key]], #16         ;"
                "       bpl     1b                              ;"
                "       aese    v0.16b, v2.16b                  ;"
                "       eor     v0.16b, v0.16b, v3.16b          ;"
@@ -92,24 +92,24 @@ static void aes_cipher_decrypt(struct crypto_tfm *tfm, u8 
dst[], u8 const src[])
        kernel_neon_begin_partial(4);
 
        __asm__("       ld1     {v0.16b}, %[in]                 ;"
-               "       ld1     {v1.2d}, [%[key]], #16          ;"
+               "       ld1     {v1.16b}, [%[key]], #16         ;"
                "       cmp     %w[rounds], #10                 ;"
                "       bmi     0f                              ;"
                "       bne     3f                              ;"
                "       mov     v3.16b, v1.16b                  ;"
                "       b       2f                              ;"
                "0:     mov     v2.16b, v1.16b                  ;"
-               "       ld1     {v3.2d}, [%[key]], #16          ;"
+               "       ld1     {v3.16b}, [%[key]], #16         ;"
                "1:     aesd    v0.16b, v2.16b                  ;"
                "       aesimc  v0.16b, v0.16b                  ;"
-               "2:     ld1     {v1.2d}, [%[key]], #16          ;"
+               "2:     ld1     {v1.16b}, [%[key]], #16         ;"
                "       aesd    v0.16b, v3.16b                  ;"
                "       aesimc  v0.16b, v0.16b                  ;"
-               "3:     ld1     {v2.2d}, [%[key]], #16          ;"
+               "3:     ld1     {v2.16b}, [%[key]], #16         ;"
                "       subs    %w[rounds], %w[rounds], #3      ;"
                "       aesd    v0.16b, v1.16b                  ;"
                "       aesimc  v0.16b, v0.16b                  ;"
-               "       ld1     {v3.2d}, [%[key]], #16          ;"
+               "       ld1     {v3.16b}, [%[key]], #16         ;"
                "       bpl     1b                              ;"
                "       aesd    v0.16b, v2.16b                  ;"
                "       eor     v0.16b, v0.16b, v3.16b          ;"
@@ -173,7 +173,12 @@ int ce_aes_expandkey(struct crypto_aes_ctx *ctx, const u8 
*in_key,
                u32 *rki = ctx->key_enc + (i * kwords);
                u32 *rko = rki + kwords;
 
+#ifndef CONFIG_CPU_BIG_ENDIAN
                rko[0] = ror32(aes_sub(rki[kwords - 1]), 8) ^ rcon[i] ^ rki[0];
+#else
+               rko[0] = rol32(aes_sub(rki[kwords - 1]), 8) ^ (rcon[i] << 24) ^
+                        rki[0];
+#endif
                rko[1] = rko[0] ^ rki[1];
                rko[2] = rko[1] ^ rki[2];
                rko[3] = rko[2] ^ rki[3];
diff --git a/arch/arm64/crypto/aes-ce.S b/arch/arm64/crypto/aes-ce.S
index 78f3cfe..b46093d 100644
--- a/arch/arm64/crypto/aes-ce.S
+++ b/arch/arm64/crypto/aes-ce.S
@@ -10,6 +10,7 @@
  */
 
 #include <linux/linkage.h>
+#include <asm/assembler.h>
 
 #define AES_ENTRY(func)                ENTRY(ce_ ## func)
 #define AES_ENDPROC(func)      ENDPROC(ce_ ## func)
diff --git a/arch/arm64/crypto/aes-modes.S b/arch/arm64/crypto/aes-modes.S
index f6e372c..838dad5 100644
--- a/arch/arm64/crypto/aes-modes.S
+++ b/arch/arm64/crypto/aes-modes.S
@@ -193,15 +193,16 @@ AES_ENTRY(aes_cbc_encrypt)
        cbz             w6, .Lcbcencloop
 
        ld1             {v0.16b}, [x5]                  /* get iv */
-       enc_prepare     w3, x2, x5
+       enc_prepare     w3, x2, x6
 
 .Lcbcencloop:
        ld1             {v1.16b}, [x1], #16             /* get next pt block */
        eor             v0.16b, v0.16b, v1.16b          /* ..and xor with iv */
-       encrypt_block   v0, w3, x2, x5, w6
+       encrypt_block   v0, w3, x2, x6, w7
        st1             {v0.16b}, [x0], #16
        subs            w4, w4, #1
        bne             .Lcbcencloop
+       st1             {v0.16b}, [x5]                  /* return iv */
        ret
 AES_ENDPROC(aes_cbc_encrypt)
 
@@ -211,7 +212,7 @@ AES_ENTRY(aes_cbc_decrypt)
        cbz             w6, .LcbcdecloopNx
 
        ld1             {v7.16b}, [x5]                  /* get iv */
-       dec_prepare     w3, x2, x5
+       dec_prepare     w3, x2, x6
 
 .LcbcdecloopNx:
 #if INTERLEAVE >= 2
@@ -248,7 +249,7 @@ AES_ENTRY(aes_cbc_decrypt)
 .Lcbcdecloop:
        ld1             {v1.16b}, [x1], #16             /* get next ct block */
        mov             v0.16b, v1.16b                  /* ...and copy to v0 */
-       decrypt_block   v0, w3, x2, x5, w6
+       decrypt_block   v0, w3, x2, x6, w7
        eor             v0.16b, v0.16b, v7.16b          /* xor with iv => pt */
        mov             v7.16b, v1.16b                  /* ct is next iv */
        st1             {v0.16b}, [x0], #16
@@ -256,6 +257,7 @@ AES_ENTRY(aes_cbc_decrypt)
        bne             .Lcbcdecloop
 .Lcbcdecout:
        FRAME_POP
+       st1             {v7.16b}, [x5]                  /* return iv */
        ret
 AES_ENDPROC(aes_cbc_decrypt)
 
@@ -267,24 +269,15 @@ AES_ENDPROC(aes_cbc_decrypt)
 
 AES_ENTRY(aes_ctr_encrypt)
        FRAME_PUSH
-       cbnz            w6, .Lctrfirst          /* 1st time around? */
-       umov            x5, v4.d[1]             /* keep swabbed ctr in reg */
-       rev             x5, x5
-#if INTERLEAVE >= 2
-       cmn             w5, w4                  /* 32 bit overflow? */
-       bcs             .Lctrinc
-       add             x5, x5, #1              /* increment BE ctr */
-       b               .LctrincNx
-#else
-       b               .Lctrinc
-#endif
-.Lctrfirst:
+       cbz             w6, .Lctrnotfirst       /* 1st time around? */
        enc_prepare     w3, x2, x6
        ld1             {v4.16b}, [x5]
-       umov            x5, v4.d[1]             /* keep swabbed ctr in reg */
-       rev             x5, x5
+
+.Lctrnotfirst:
+       umov            x8, v4.d[1]             /* keep swabbed ctr in reg */
+       rev             x8, x8
 #if INTERLEAVE >= 2
-       cmn             w5, w4                  /* 32 bit overflow? */
+       cmn             w8, w4                  /* 32 bit overflow? */
        bcs             .Lctrloop
 .LctrloopNx:
        subs            w4, w4, #INTERLEAVE
@@ -292,11 +285,11 @@ AES_ENTRY(aes_ctr_encrypt)
 #if INTERLEAVE == 2
        mov             v0.8b, v4.8b
        mov             v1.8b, v4.8b
-       rev             x7, x5
-       add             x5, x5, #1
+       rev             x7, x8
+       add             x8, x8, #1
        ins             v0.d[1], x7
-       rev             x7, x5
-       add             x5, x5, #1
+       rev             x7, x8
+       add             x8, x8, #1
        ins             v1.d[1], x7
        ld1             {v2.16b-v3.16b}, [x1], #32      /* get 2 input blocks */
        do_encrypt_block2x
@@ -305,7 +298,7 @@ AES_ENTRY(aes_ctr_encrypt)
        st1             {v0.16b-v1.16b}, [x0], #32
 #else
        ldr             q8, =0x30000000200000001        /* addends 1,2,3[,0] */
-       dup             v7.4s, w5
+       dup             v7.4s, w8
        mov             v0.16b, v4.16b
        add             v7.4s, v7.4s, v8.4s
        mov             v1.16b, v4.16b
@@ -323,18 +316,12 @@ AES_ENTRY(aes_ctr_encrypt)
        eor             v2.16b, v7.16b, v2.16b
        eor             v3.16b, v5.16b, v3.16b
        st1             {v0.16b-v3.16b}, [x0], #64
-       add             x5, x5, #INTERLEAVE
+       add             x8, x8, #INTERLEAVE
 #endif
-       cbz             w4, .LctroutNx
-.LctrincNx:
-       rev             x7, x5
+       rev             x7, x8
        ins             v4.d[1], x7
+       cbz             w4, .Lctrout
        b               .LctrloopNx
-.LctroutNx:
-       sub             x5, x5, #1
-       rev             x7, x5
-       ins             v4.d[1], x7
-       b               .Lctrout
 .Lctr1x:
        adds            w4, w4, #INTERLEAVE
        beq             .Lctrout
@@ -342,30 +329,39 @@ AES_ENTRY(aes_ctr_encrypt)
 .Lctrloop:
        mov             v0.16b, v4.16b
        encrypt_block   v0, w3, x2, x6, w7
+
+       adds            x8, x8, #1              /* increment BE ctr */
+       rev             x7, x8
+       ins             v4.d[1], x7
+       bcs             .Lctrcarry              /* overflow? */
+
+.Lctrcarrydone:
        subs            w4, w4, #1
        bmi             .Lctrhalfblock          /* blocks < 0 means 1/2 block */
        ld1             {v3.16b}, [x1], #16
        eor             v3.16b, v0.16b, v3.16b
        st1             {v3.16b}, [x0], #16
-       beq             .Lctrout
-.Lctrinc:
-       adds            x5, x5, #1              /* increment BE ctr */
-       rev             x7, x5
-       ins             v4.d[1], x7
-       bcc             .Lctrloop               /* no overflow? */
-       umov            x7, v4.d[0]             /* load upper word of ctr  */
-       rev             x7, x7                  /* ... to handle the carry */
-       add             x7, x7, #1
-       rev             x7, x7
-       ins             v4.d[0], x7
-       b               .Lctrloop
+       bne             .Lctrloop
+
+.Lctrout:
+       st1             {v4.16b}, [x5]          /* return next CTR value */
+       FRAME_POP
+       ret
+
 .Lctrhalfblock:
        ld1             {v3.8b}, [x1]
        eor             v3.8b, v0.8b, v3.8b
        st1             {v3.8b}, [x0]
-.Lctrout:
        FRAME_POP
        ret
+
+.Lctrcarry:
+       umov            x7, v4.d[0]             /* load upper word of ctr  */
+       rev             x7, x7                  /* ... to handle the carry */
+       add             x7, x7, #1
+       rev             x7, x7
+       ins             v4.d[0], x7
+       b               .Lctrcarrydone
 AES_ENDPROC(aes_ctr_encrypt)
        .ltorg
 
@@ -386,7 +382,8 @@ AES_ENDPROC(aes_ctr_encrypt)
        .endm
 
 .Lxts_mul_x:
-       .word           1, 0, 0x87, 0
+CPU_LE(        .quad           1, 0x87         )
+CPU_BE(        .quad           0x87, 1         )
 
 AES_ENTRY(aes_xts_encrypt)
        FRAME_PUSH
diff --git a/arch/arm64/crypto/aes-neon.S b/arch/arm64/crypto/aes-neon.S
index b93170e..85f07ea 100644
--- a/arch/arm64/crypto/aes-neon.S
+++ b/arch/arm64/crypto/aes-neon.S
@@ -9,6 +9,7 @@
  */
 
 #include <linux/linkage.h>
+#include <asm/assembler.h>
 
 #define AES_ENTRY(func)                ENTRY(neon_ ## func)
 #define AES_ENDPROC(func)      ENDPROC(neon_ ## func)
@@ -83,13 +84,13 @@
        .endm
 
        .macro          do_block, enc, in, rounds, rk, rkp, i
-       ld1             {v15.16b}, [\rk]
+       ld1             {v15.4s}, [\rk]
        add             \rkp, \rk, #16
        mov             \i, \rounds
 1111:  eor             \in\().16b, \in\().16b, v15.16b         /* ^round key */
        tbl             \in\().16b, {\in\().16b}, v13.16b       /* ShiftRows */
        sub_bytes       \in
-       ld1             {v15.16b}, [\rkp], #16
+       ld1             {v15.4s}, [\rkp], #16
        subs            \i, \i, #1
        beq             2222f
        .if             \enc == 1
@@ -229,7 +230,7 @@
        .endm
 
        .macro          do_block_2x, enc, in0, in1 rounds, rk, rkp, i
-       ld1             {v15.16b}, [\rk]
+       ld1             {v15.4s}, [\rk]
        add             \rkp, \rk, #16
        mov             \i, \rounds
 1111:  eor             \in0\().16b, \in0\().16b, v15.16b       /* ^round key */
@@ -237,7 +238,7 @@
        sub_bytes_2x    \in0, \in1
        tbl             \in0\().16b, {\in0\().16b}, v13.16b     /* ShiftRows */
        tbl             \in1\().16b, {\in1\().16b}, v13.16b     /* ShiftRows */
-       ld1             {v15.16b}, [\rkp], #16
+       ld1             {v15.4s}, [\rkp], #16
        subs            \i, \i, #1
        beq             2222f
        .if             \enc == 1
@@ -254,7 +255,7 @@
        .endm
 
        .macro          do_block_4x, enc, in0, in1, in2, in3, rounds, rk, rkp, i
-       ld1             {v15.16b}, [\rk]
+       ld1             {v15.4s}, [\rk]
        add             \rkp, \rk, #16
        mov             \i, \rounds
 1111:  eor             \in0\().16b, \in0\().16b, v15.16b       /* ^round key */
@@ -266,7 +267,7 @@
        tbl             \in1\().16b, {\in1\().16b}, v13.16b     /* ShiftRows */
        tbl             \in2\().16b, {\in2\().16b}, v13.16b     /* ShiftRows */
        tbl             \in3\().16b, {\in3\().16b}, v13.16b     /* ShiftRows */
-       ld1             {v15.16b}, [\rkp], #16
+       ld1             {v15.4s}, [\rkp], #16
        subs            \i, \i, #1
        beq             2222f
        .if             \enc == 1
@@ -306,12 +307,16 @@
        .text
        .align          4
 .LForward_ShiftRows:
-       .byte           0x0, 0x5, 0xa, 0xf, 0x4, 0x9, 0xe, 0x3
-       .byte           0x8, 0xd, 0x2, 0x7, 0xc, 0x1, 0x6, 0xb
+CPU_LE(        .byte           0x0, 0x5, 0xa, 0xf, 0x4, 0x9, 0xe, 0x3  )
+CPU_LE(        .byte           0x8, 0xd, 0x2, 0x7, 0xc, 0x1, 0x6, 0xb  )
+CPU_BE(        .byte           0xb, 0x6, 0x1, 0xc, 0x7, 0x2, 0xd, 0x8  )
+CPU_BE(        .byte           0x3, 0xe, 0x9, 0x4, 0xf, 0xa, 0x5, 0x0  )
 
 .LReverse_ShiftRows:
-       .byte           0x0, 0xd, 0xa, 0x7, 0x4, 0x1, 0xe, 0xb
-       .byte           0x8, 0x5, 0x2, 0xf, 0xc, 0x9, 0x6, 0x3
+CPU_LE(        .byte           0x0, 0xd, 0xa, 0x7, 0x4, 0x1, 0xe, 0xb  )
+CPU_LE(        .byte           0x8, 0x5, 0x2, 0xf, 0xc, 0x9, 0x6, 0x3  )
+CPU_BE(        .byte           0x3, 0x6, 0x9, 0xc, 0xf, 0x2, 0x5, 0x8  )
+CPU_BE(        .byte           0xb, 0xe, 0x1, 0x4, 0x7, 0xa, 0xd, 0x0  )
 
 .LForward_Sbox:
        .byte           0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5
diff --git a/arch/arm64/crypto/ghash-ce-core.S 
b/arch/arm64/crypto/ghash-ce-core.S
index dc45701..f0bb9f0b 100644
--- a/arch/arm64/crypto/ghash-ce-core.S
+++ b/arch/arm64/crypto/ghash-ce-core.S
@@ -29,8 +29,8 @@
         *                         struct ghash_key const *k, const char *head)
         */
 ENTRY(pmull_ghash_update)
-       ld1             {SHASH.16b}, [x3]
-       ld1             {XL.16b}, [x1]
+       ld1             {SHASH.2d}, [x3]
+       ld1             {XL.2d}, [x1]
        movi            MASK.16b, #0xe1
        ext             SHASH2.16b, SHASH.16b, SHASH.16b, #8
        shl             MASK.2d, MASK.2d, #57

_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to