]> Git Repo - linux.git/commitdiff
Merge tag 'armsoc-tee' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
authorLinus Torvalds <[email protected]>
Wed, 10 May 2017 18:20:09 +0000 (11:20 -0700)
committerLinus Torvalds <[email protected]>
Wed, 10 May 2017 18:20:09 +0000 (11:20 -0700)
Pull TEE driver infrastructure and OP-TEE drivers from Arnd Bergmann:
 "This introduces a generic TEE framework in the kernel, to handle
  trusted environemtns (security coprocessor or software implementations
  such as OP-TEE/TrustZone). I'm sending it separately from the other
  arm-soc driver changes to give it a little more visibility, once the
  subsystem is merged, we will likely keep this in the arm₋soc drivers
  branch or have the maintainers submit pull requests directly,
  depending on the patch volume.

  I have reviewed earlier versions in the past, and have reviewed the
  latest version in person during Linaro Connect BUD17.

  Here is my overall assessment of the subsystem:

   - There is clearly demand for this, both for the generic
     infrastructure and the specific OP-TEE implementation.

   - The code has gone through a large number of reviews, and the review
     comments have all been addressed, but the reviews were not coming
     up with serious issues any more and nobody volunteered to vouch for
     the quality.

   - The user space ioctl interface is sufficient to work with the
     OP-TEE driver, and it should in principle work with other TEE
     implementations that follow the GlobalPlatform[1] standards, but it
     might need to be extended in minor ways depending on specific
     requirements of future TEE implementations

   - The main downside of the API to me is how the user space is tied to
     the TEE implementation in hardware or firmware, but uses a generic
     way to communicate with it. This seems to be an inherent problem
     with what it is trying to do, and I could not come up with any
     better solution than what is implemented here.

  For a detailed history of the patch series, see

    https://lkml.org/lkml/2017/3/10/1277"

* tag 'armsoc-tee' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  arm64: dt: hikey: Add optee node
  Documentation: tee subsystem and op-tee driver
  tee: add OP-TEE driver
  tee: generic TEE subsystem
  dt/bindings: add bindings for optee

1  2 
Documentation/devicetree/bindings/vendor-prefixes.txt
Documentation/ioctl/ioctl-number.txt
MAINTAINERS
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
drivers/Makefile
drivers/tee/tee_shm.c

index f9fe94535b4668e3ac84a746aeca937cd8a8bc0e,e18a96cf7c3a9b017e8ddef1f7038d722739980f..12e27844bb7b60d33a04673c27e408f09bfa3887
@@@ -51,7 -51,6 +51,7 @@@ brcm  Broadcom Corporatio
  buffalo       Buffalo, Inc.
  calxeda       Calxeda
  capella       Capella Microsystems, Inc
 +cascoda       Cascoda, Ltd.
  cavium        Cavium, Inc.
  cdns  Cadence Design Systems Inc.
  ceva  Ceva, Inc.
@@@ -80,7 -79,6 +80,7 @@@ denx  Denx Software Engineerin
  devantech     Devantech, Ltd.
  digi  Digi International Inc.
  digilent      Diglent, Inc.
 +dioo  Dioo Microcircuit Co., Ltd
  dlg   Dialog Semiconductor
  dlink D-Link Corporation
  dmo   Data Modul AG
@@@ -104,7 -102,6 +104,7 @@@ ettus      NI Ettus Researc
  eukrea  Eukréa Electromatique
  everest       Everest Semiconductor Co. Ltd.
  everspin      Everspin Technologies, Inc.
 +exar  Exar Corporation
  excito        Excito
  ezchip        EZchip Semiconductor
  faraday       Faraday Technology Corporation
@@@ -139,7 -136,6 +139,7 @@@ holt       Holt Integrated Circuits, Inc
  honeywell     Honeywell
  hp    Hewlett Packard
  holtek        Holtek Semiconductor, Inc.
 +hwacom        HwaCom Systems Inc.
  i2se  I2SE GmbH
  ibm   International Business Machines (IBM)
  idt   Integrated Device Technologies, Inc.
@@@ -163,7 -159,6 +163,7 @@@ jedec      JEDEC Solid State Technology Asso
  karo  Ka-Ro electronics GmbH
  keithkoep     Keith & Koep GmbH
  keymile       Keymile GmbH
 +khadas        Khadas
  kinetic Kinetic Technologies
  kosagi        Sutajio Ko-Usagi PTE Ltd.
  kyo   Kyocera Corporation
@@@ -173,6 -168,7 +173,7 @@@ lego       LEGO Systems A/
  lenovo        Lenovo Group Ltd.
  lg    LG Corporation
  licheepi      Lichee Pi
+ linaro        Linaro Limited
  linux Linux-specific binding
  lltc  Linear Technology Corporation
  lsi   LSI Corp. (LSI Logic)
@@@ -183,7 -179,6 +184,7 @@@ maxim      Maxim Integrated Product
  mcube mCube
  meas  Measurement Specialties
  mediatek      MediaTek Inc.
 +megachips     MegaChips
  melexis       Melexis N.V.
  melfas        MELFAS Inc.
  memsic        MEMSIC Inc.
@@@ -218,7 -213,6 +219,7 @@@ newhaven   Newhaven Display Internationa
  ni    National Instruments
  nintendo      Nintendo
  nokia Nokia
 +nordic        Nordic Semiconductor
  nuvoton       Nuvoton Technology Corporation
  nvd   New Vision Display
  nvidia        NVIDIA
@@@ -265,7 -259,6 +266,7 @@@ richtek    Richtek Technology Corporatio
  ricoh Ricoh Co. Ltd.
  rikomagic     Rikomagic Tech Corp. Ltd
  rockchip      Fuzhou Rockchip Electronics Co., Ltd
 +rohm  ROHM Semiconductor Co., Ltd
  samsung       Samsung Semiconductor
  samtec        Samtec/Softing company
  sandisk       Sandisk Corporation
@@@ -273,7 -266,6 +274,7 @@@ sbs        Smart Battery Syste
  schindler     Schindler
  seagate       Seagate Technology PLC
  semtech       Semtech Corporation
 +sensirion     Sensirion AG
  sgx   SGX Sensortech
  sharp Sharp Corporation
  si-en Si-En Technology Ltd.
@@@ -344,7 -336,6 +345,7 @@@ wd Western Digital Corp
  wetek WeTek Electronics, limited.
  wexler        Wexler
  winbond Winbond Electronics corp.
 +winstar       Winstar Display Corp.
  wlf   Wolfson Microelectronics
  wm    Wondermedia Technologies, Inc.
  x-powers      X-Powers
index eccb675a285259391f7bfb4213acc218e77b6c5f,002331b0b48a62a7e44c7e728d66e0f56b03e911..1e9fcb4d0ec83ed4eaf2330f16775769ac366aa3
@@@ -191,7 -191,6 +191,7 @@@ Code  Seq#(hex)    Include File            Comment
  'W'   00-1F   linux/watchdog.h        conflict!
  'W'   00-1F   linux/wanrouter.h       conflict!               (pre 3.9)
  'W'   00-3F   sound/asound.h          conflict!
 +'W'   40-5F   drivers/pci/switch/switchtec.c
  'X'   all     fs/xfs/xfs_fs.h         conflict!
                and fs/xfs/linux-2.6/xfs_ioctl32.h
                and include/linux/falloc.h
  'c'   00-1F   linux/chio.h            conflict!
  'c'   80-9F   arch/s390/include/asm/chsc.h    conflict!
  'c'   A0-AF   arch/x86/include/asm/msr.h      conflict!
 -'d'   00-FF   linux/char/drm/drm/h    conflict!
 +'d'   00-FF   linux/char/drm/drm.h    conflict!
  'd'   02-40   pcmcia/ds.h             conflict!
  'd'   F0-FF   linux/digi1.h
  'e'   all     linux/digi1.h           conflict!
  0xA3  80-8F   Port ACL                in development:
                                        <mailto:[email protected]>
  0xA3  90-9F   linux/dtlk.h
+ 0xA4  00-1F   uapi/linux/tee.h        Generic TEE subsystem
  0xAA  00-3F   linux/uapi/linux/userfaultfd.h
  0xAB  00-1F   linux/nbd.h
  0xAC  00-1F   linux/raw.h
diff --combined MAINTAINERS
index 0cfa573ecfef3738121c82676698b200818e8b54,b814a9d6bd4a5e662dbe89c00317ef25d2dd6aca..2decf40d28e1f8131d7f4b65de4639830c492fe9
@@@ -653,9 -653,7 +653,9 @@@ M: Thor Thayer <[email protected]
  S:    Maintained
  F:    drivers/gpio/gpio-altera-a10sr.c
  F:    drivers/mfd/altera-a10sr.c
 +F:    drivers/reset/reset-a10sr.c
  F:    include/linux/mfd/altera-a10sr.h
 +F:    include/dt-bindings/reset/altr,rst-mgr-a10sr.h
  
  ALTERA TRIPLE SPEED ETHERNET DRIVER
  M:    Vince Bridgers <[email protected]>
@@@ -815,7 -813,6 +815,7 @@@ W: http://wiki.analog.com
  W:    http://ez.analog.com/community/linux-device-drivers
  S:    Supported
  F:    drivers/iio/*/ad*
 +F:    drivers/iio/adc/ltc2497*
  X:    drivers/iio/*/adjd*
  F:    drivers/staging/iio/*/ad*
  F:    drivers/staging/iio/trigger/iio-trig-bfin-timer.c
@@@ -899,19 -896,12 +899,19 @@@ F:      arch/arm64/boot/dts/apm
  APPLIED MICRO (APM) X-GENE SOC ETHERNET DRIVER
  M:    Iyappan Subramanian <[email protected]>
  M:    Keyur Chudgar <[email protected]>
 +M:    Quan Nguyen <[email protected]>
  S:    Supported
  F:    drivers/net/ethernet/apm/xgene/
  F:    drivers/net/phy/mdio-xgene.c
  F:    Documentation/devicetree/bindings/net/apm-xgene-enet.txt
  F:    Documentation/devicetree/bindings/net/apm-xgene-mdio.txt
  
 +APPLIED MICRO (APM) X-GENE SOC ETHERNET (V2) DRIVER
 +M:    Iyappan Subramanian <[email protected]>
 +M:    Keyur Chudgar <[email protected]>
 +S:    Supported
 +F:    drivers/net/ethernet/apm/xgene-v2/
 +
  APPLIED MICRO (APM) X-GENE SOC PMU
  M:    Tai Nguyen <[email protected]>
  S:    Supported
@@@ -986,7 -976,6 +986,7 @@@ F: arch/arm*/include/asm/perf_event.
  F:    drivers/perf/*
  F:    include/linux/perf/arm_pmu.h
  F:    Documentation/devicetree/bindings/arm/pmu.txt
 +F:    Documentation/devicetree/bindings/perf/
  
  ARM PORT
  M:    Russell King <[email protected]>
@@@ -1058,13 -1047,8 +1058,13 @@@ M:    Chen-Yu Tsai <[email protected]
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  N:    sun[x456789]i
 -F:    arch/arm/boot/dts/ntc-gr8*
 +N:    sun50i
 +F:    arch/arm/mach-sunxi/
  F:    arch/arm64/boot/dts/allwinner/
 +F:    drivers/clk/sunxi-ng/
 +F:    drivers/pinctrl/sunxi/
 +F:    drivers/soc/sunxi/
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git
  
  ARM/Allwinner SoC Clock Support
  M:    Emilio López <[email protected]>
@@@ -1104,8 -1088,6 +1104,8 @@@ L:      [email protected]
  F:    arch/arm/mach-artpec
  F:    arch/arm/boot/dts/artpec6*
  F:    drivers/clk/axis
 +F:    drivers/pinctrl/pinctrl-artpec*
 +F:    Documentation/devicetree/bindings/pinctrl/axis,artpec6-pinctrl.txt
  
  ARM/ASPEED MACHINE SUPPORT
  M:    Joel Stanley <[email protected]>
@@@ -1117,6 -1099,7 +1117,6 @@@ F:      drivers/*/*aspeed
  ARM/ATMEL AT91RM9200, AT91SAM9 AND SAMA5 SOC SUPPORT
  M:    Nicolas Ferre <[email protected]>
  M:    Alexandre Belloni <[email protected]>
 -M:    Jean-Christophe Plagniol-Villard <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  W:    http://www.linux4sam.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91.git
@@@ -1128,7 -1111,6 +1128,7 @@@ F:      arch/arm/boot/dts/at91*.dts
  F:    arch/arm/boot/dts/sama*.dts
  F:    arch/arm/boot/dts/sama*.dtsi
  F:    arch/arm/include/debug/at91.S
 +F:    drivers/memory/atmel*
  
  ARM/ATMEL AT91 Clock Support
  M:    Boris Brezillon <[email protected]>
@@@ -1284,7 -1266,6 +1284,7 @@@ F:      arch/arm/mach-mxs
  F:    arch/arm/boot/dts/imx*
  F:    arch/arm/configs/imx*_defconfig
  F:    drivers/clk/imx/
 +F:    drivers/soc/imx/
  F:    include/soc/imx/
  
  ARM/FREESCALE VYBRID ARM ARCHITECTURE
@@@ -1505,7 -1486,6 +1505,7 @@@ M:      Sebastian Hesselbarth <sebastian.hes
  M:    Gregory Clement <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
 +F:    Documentation/devicetree/bindings/soc/dove/
  F:    arch/arm/mach-dove/
  F:    arch/arm/mach-mv78xx0/
  F:    arch/arm/mach-orion5x/
@@@ -2244,7 -2224,7 +2244,7 @@@ ATMEL ISI DRIVE
  M:    Ludovic Desroches <[email protected]>
  L:    [email protected]
  S:    Supported
 -F:    drivers/media/platform/soc_camera/atmel-isi.c
 +F:    drivers/media/platform/atmel/atmel-isi.c
  F:    include/media/atmel-isi.h
  
  ATMEL LCDFB DRIVER
@@@ -2347,6 -2327,21 +2347,6 @@@ S:     Maintaine
  F:    drivers/auxdisplay/
  F:    include/linux/cfag12864b.h
  
 -AVR32 ARCHITECTURE
 -M:    Haavard Skinnemoen <[email protected]>
 -M:    Hans-Christian Egtvedt <[email protected]>
 -W:    http://www.atmel.com/products/AVR32/
 -W:    http://mirror.egtvedt.no/avr32linux.org/
 -W:    http://avrfreaks.net/
 -S:    Maintained
 -F:    arch/avr32/
 -
 -AVR32/AT32AP MACHINE SUPPORT
 -M:    Haavard Skinnemoen <[email protected]>
 -M:    Hans-Christian Egtvedt <[email protected]>
 -S:    Maintained
 -F:    arch/avr32/mach-at32ap/
 -
  AX.25 NETWORK LAYER
  M:    Ralf Baechle <[email protected]>
  L:    [email protected]
@@@ -2549,14 -2544,6 +2549,14 @@@ F:    block
  F:    kernel/trace/blktrace.c
  F:    lib/sbitmap.c
  
 +BFQ I/O SCHEDULER
 +M:    Paolo Valente <[email protected]>
 +M:    Jens Axboe <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    block/bfq-*
 +F:    Documentation/block/bfq-iosched.txt
 +
  BLOCK2MTD DRIVER
  M:    Joern Engel <[email protected]>
  L:    [email protected]
@@@ -2598,26 -2585,12 +2598,26 @@@ F:   include/uapi/linux/if_bonding.
  
  BPF (Safe dynamic programs and tools)
  M:    Alexei Starovoitov <[email protected]>
 +M:    Daniel Borkmann <[email protected]>
  L:    [email protected]
  L:    [email protected]
  S:    Supported
 +F:    arch/x86/net/bpf_jit*
 +F:    Documentation/networking/filter.txt
 +F:    include/linux/bpf*
 +F:    include/linux/filter.h
 +F:    include/uapi/linux/bpf*
 +F:    include/uapi/linux/filter.h
  F:    kernel/bpf/
 -F:    tools/testing/selftests/bpf/
 +F:    kernel/trace/bpf_trace.c
  F:    lib/test_bpf.c
 +F:    net/bpf/
 +F:    net/core/filter.c
 +F:    net/sched/act_bpf.c
 +F:    net/sched/cls_bpf.c
 +F:    samples/bpf/
 +F:    tools/net/bpf*
 +F:    tools/testing/selftests/bpf/
  
  BROADCOM B44 10/100 ETHERNET DRIVER
  M:    Michael Chan <[email protected]>
@@@ -2676,9 -2649,9 +2676,9 @@@ N:      kon
  F:    arch/arm/mach-bcm/
  
  BROADCOM BCM2835 ARM ARCHITECTURE
 -M:    Stephen Warren <[email protected]>
  M:    Lee Jones <[email protected]>
  M:    Eric Anholt <[email protected]>
 +M:    Stefan Wahren <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  L:    [email protected] (moderated for non-subscribers)
  T:    git git://github.com/anholt/linux
@@@ -2698,14 -2671,12 +2698,14 @@@ F:   arch/mips/include/asm/mach-bcm47xx/
  BROADCOM BCM5301X ARM ARCHITECTURE
  M:    Hauke Mehrtens <[email protected]>
  M:    Rafał Miłecki <[email protected]>
 +M:    Jon Mason <[email protected]>
  M:    [email protected]
  L:    [email protected]
  S:    Maintained
  F:    arch/arm/mach-bcm/bcm_5301x.c
  F:    arch/arm/boot/dts/bcm5301x*.dtsi
  F:    arch/arm/boot/dts/bcm470*
 +F:    arch/arm/boot/dts/bcm953012*
  
  BROADCOM BCM53573 ARM ARCHITECTURE
  M:    Rafał Miłecki <[email protected]>
  S:    Supported
  F:    drivers/net/ethernet/broadcom/bcmsysport.*
  
 -BROADCOM VULCAN ARM64 SOC
 -M:    Jayachandran C. <[email protected]>
 -M:    [email protected]
 -L:    [email protected] (moderated for non-subscribers)
 -S:    Maintained
 -F:    arch/arm64/boot/dts/broadcom/vulcan*
 -
  BROADCOM NETXTREME-E ROCE DRIVER
  M:    Selvin Xavier <[email protected]>
  M:    Devesh Sharma <[email protected]>
@@@ -2926,8 -2904,6 +2926,8 @@@ T:      git git://git.kernel.org/pub/scm/lin
  S:    Maintained
  F:    Documentation/filesystems/btrfs.txt
  F:    fs/btrfs/
 +F:    include/linux/btrfs*
 +F:    include/uapi/linux/btrfs*
  
  BTTV VIDEO4LINUX DRIVER
  M:    Mauro Carvalho Chehab <[email protected]>
@@@ -2961,15 -2937,6 +2961,15 @@@ W:    http://www.linux-c6x.org/wiki/index.
  S:    Maintained
  F:    arch/c6x/
  
 +CA8210 IEEE-802.15.4 RADIO DRIVER
 +M:    Harry Morris <[email protected]>
 +M:    [email protected]
 +L:    [email protected]
 +W:    https://github.com/Cascoda/ca8210-linux.git
 +S:    Maintained
 +F:    drivers/net/ieee802154/ca8210.c
 +F:    Documentation/devicetree/bindings/net/ieee802154/ca8210.txt
 +
  CACHEFILES: FS-CACHE BACKEND FOR CACHING ON MOUNTED FILESYSTEMS
  M:    David Howells <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
@@@ -3057,12 -3024,13 +3057,12 @@@ CAPELLA MICROSYSTEMS LIGHT SENSOR DRIVE
  M:    Kevin Tsai <[email protected]>
  S:    Maintained
  F:    drivers/iio/light/cm*
 -F:    Documentation/devicetree/bindings/i2c/trivial-admin-guide/devices.rst
  
  CAVIUM THUNDERX2 ARM64 SOC
  M:    Jayachandran C <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
 -F:    arch/arm64/boot/dts/cavium/thunder-99xx*
 +F:    arch/arm64/boot/dts/cavium/thunder2-99xx*
  F:    Documentation/devicetree/bindings/arm/cavium-thunder2.txt
  
  CAVIUM I2C DRIVER
@@@ -3073,14 -3041,6 +3073,14 @@@ S:    Supporte
  F:    drivers/i2c/busses/i2c-octeon*
  F:    drivers/i2c/busses/i2c-thunderx*
  
 +CAVIUM MMC DRIVER
 +M:    Jan Glauber <[email protected]>
 +M:    David Daney <[email protected]>
 +M:    Steven J. Hill <[email protected]>
 +W:    http://www.cavium.com
 +S:    Supported
 +F:    drivers/mmc/host/cavium*
 +
  CAVIUM LIQUIDIO NETWORK DRIVER
  M:     Derek Chickles <[email protected]>
  M:     Satanand Burla <[email protected]>
@@@ -3106,7 -3066,7 +3106,7 @@@ F:      drivers/net/ieee802154/cc2520.
  F:    include/linux/spi/cc2520.h
  F:    Documentation/devicetree/bindings/net/ieee802154/cc2520.txt
  
 -CEC DRIVER
 +CEC FRAMEWORK
  M:    Hans Verkuil <[email protected]>
  L:    [email protected]
  T:    git git://linuxtv.org/media_tree.git
@@@ -3115,9 -3075,10 +3115,9 @@@ S:     Supporte
  F:    Documentation/media/kapi/cec-core.rst
  F:    Documentation/media/uapi/cec
  F:    drivers/media/cec/
 -F:    drivers/media/cec-edid.c
  F:    drivers/media/rc/keymaps/rc-cec.c
  F:    include/media/cec.h
 -F:    include/media/cec-edid.h
 +F:    include/media/cec-notifier.h
  F:    include/uapi/linux/cec.h
  F:    include/uapi/linux/cec-funcs.h
  
@@@ -3255,6 -3216,7 +3255,6 @@@ F:      drivers/platform/chrome
  
  CISCO VIC ETHERNET NIC DRIVER
  M:    Christian Benvenuti <[email protected]>
 -M:    Sujith Sankar <[email protected]>
  M:    Govindarajulu Varadarajan <[email protected]>
  M:    Neel Patel <[email protected]>
  S:    Supported
@@@ -3488,7 -3450,6 +3488,7 @@@ T:      git git://git.kernel.org/pub/scm/lin
  T:    git git://git.linaro.org/people/vireshk/linux.git (For ARM Updates)
  B:    https://bugzilla.kernel.org
  F:    Documentation/cpu-freq/
 +F:    Documentation/devicetree/bindings/cpufreq/
  F:    drivers/cpufreq/
  F:    include/linux/cpufreq.h
  F:    tools/testing/selftests/cpufreq/
@@@ -3892,12 -3853,6 +3892,12 @@@ T:    git git://git.kernel.org/pub/scm/lin
  S:    Maintained
  F:    drivers/usb/dwc3/
  
 +DEVANTECH SRF ULTRASONIC RANGER IIO DRIVER
 +M:    Andreas Klinger <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/iio/proximity/srf*.c
 +
  DEVICE COREDUMP (DEV_COREDUMP)
  M:    Johannes Berg <[email protected]>
  L:    [email protected]
@@@ -4143,18 -4098,6 +4143,18 @@@ S:    Maintaine
  F:    drivers/char/dtlk.c
  F:    include/linux/dtlk.h
  
 +DPAA2 DATAPATH I/O (DPIO) DRIVER
 +M:    Roy Pledge <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/staging/fsl-mc/bus/dpio
 +
 +DPAA2 ETHERNET DRIVER
 +M:    Ioana Radulescu <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/staging/fsl-dpaa2/ethernet
 +
  DPT_I2O SCSI RAID DRIVER
  M:    Adaptec OEM Raid Solutions <[email protected]>
  L:    [email protected]
@@@ -4175,13 -4118,14 +4175,13 @@@ F:   drivers/block/drbd
  F:    lib/lru_cache.c
  F:    Documentation/blockdev/drbd/
  
 -DRIVER CORE, KOBJECTS, DEBUGFS, KERNFS AND SYSFS
 +DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS
  M:    Greg Kroah-Hartman <[email protected]>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
  S:    Supported
  F:    Documentation/kobject.txt
  F:    drivers/base/
  F:    fs/debugfs/
 -F:    fs/kernfs/
  F:    fs/sysfs/
  F:    include/linux/debugfs.h
  F:    include/linux/kobj*
@@@ -4202,7 -4146,6 +4202,7 @@@ F:      Documentation/devicetree/bindings/vi
  F:    Documentation/gpu/
  F:    include/drm/
  F:    include/uapi/drm/
 +F:    include/linux/vga*
  
  DRM DRIVERS AND MISC GPU PATCHES
  M:    Daniel Vetter <[email protected]>
@@@ -4216,7 -4159,6 +4216,7 @@@ F:      drivers/gpu/vga
  F:    drivers/gpu/drm/*
  F:    include/drm/drm*
  F:    include/uapi/drm/drm*
 +F:    include/linux/vga*
  
  DRM DRIVER FOR AST SERVER GRAPHICS CHIPS
  M:    Dave Airlie <[email protected]>
@@@ -4232,7 -4174,7 +4232,7 @@@ F:      drivers/gpu/drm/bridge
  DRM DRIVER FOR BOCHS VIRTUAL GPU
  M:    Gerd Hoffmann <[email protected]>
  L:    [email protected]
 -T:    git git://git.kraxel.org/linux drm-qemu
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
  S:    Maintained
  F:    drivers/gpu/drm/bochs/
  
@@@ -4240,7 -4182,7 +4240,7 @@@ DRM DRIVER FOR QEMU'S CIRRUS DEVIC
  M:    Dave Airlie <[email protected]>
  M:    Gerd Hoffmann <[email protected]>
  L:    [email protected]
 -T:    git git://git.kraxel.org/linux drm-qemu
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
  S:    Obsolete
  W:    https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-considered-harmful/
  F:    drivers/gpu/drm/cirrus/
@@@ -4297,7 -4239,6 +4297,7 @@@ L:      [email protected]
  S:    Supported
  F:    drivers/gpu/drm/atmel-hlcdc/
  F:    Documentation/devicetree/bindings/drm/atmel/
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
  
  DRM DRIVERS FOR ALLWINNER A10
  M:    Maxime Ripard  <[email protected]>
@@@ -4305,7 -4246,6 +4305,7 @@@ L:      [email protected]
  S:    Supported
  F:    drivers/gpu/drm/sun4i/
  F:    Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux.git
  
  DRM DRIVERS FOR AMLOGIC SOCS
  M:    Neil Armstrong <[email protected]>
@@@ -4315,9 -4255,6 +4315,9 @@@ W:      http://linux-meson.com
  S:    Supported
  F:    drivers/gpu/drm/meson/
  F:    Documentation/devicetree/bindings/display/amlogic,meson-vpu.txt
 +F:    Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.txt
 +F:    Documentation/gpu/meson.rst
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
  
  DRM DRIVERS FOR EXYNOS
  M:    Inki Dae <[email protected]>
@@@ -4442,14 -4379,13 +4442,14 @@@ S:   Supporte
  F:    drivers/gpu/drm/rcar-du/
  F:    drivers/gpu/drm/shmobile/
  F:    include/linux/platform_data/shmob_drm.h
 +F:    Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt
  F:    Documentation/devicetree/bindings/display/renesas,du.txt
  
  DRM DRIVER FOR QXL VIRTUAL GPU
  M:    Dave Airlie <[email protected]>
  M:    Gerd Hoffmann <[email protected]>
  L:    [email protected]
 -T:    git git://git.kraxel.org/linux drm-qemu
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
  S:    Maintained
  F:    drivers/gpu/drm/qxl/
  F:    include/uapi/drm/qxl_drm.h
@@@ -4460,7 -4396,6 +4460,7 @@@ L:      [email protected]
  S:    Maintained
  F:    drivers/gpu/drm/rockchip/
  F:    Documentation/devicetree/bindings/display/rockchip/
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
  
  DRM DRIVER FOR SAVAGE VIDEO CARDS
  S:    Orphan / Obsolete
@@@ -4476,7 -4411,7 +4476,7 @@@ DRM DRIVERS FOR ST
  M:    Benjamin Gaignard <[email protected]>
  M:    Vincent Abriou <[email protected]>
  L:    [email protected]
 -T:    git http://git.linaro.org/people/benjamin.gaignard/kernel.git
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
  S:    Maintained
  F:    drivers/gpu/drm/sti
  F:    Documentation/devicetree/bindings/display/st,stih4xx.txt
@@@ -4519,7 -4454,6 +4519,7 @@@ S:      Supporte
  F:    drivers/gpu/drm/vc4/
  F:    include/uapi/drm/vc4_drm.h
  F:    Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
  
  DRM DRIVERS FOR TI OMAP
  M:    Tomi Valkeinen <[email protected]>
@@@ -4542,7 -4476,6 +4542,7 @@@ L:      [email protected]
  S:    Maintained
  F:    drivers/gpu/drm/zte/
  F:    Documentation/devicetree/bindings/display/zte,vou.txt
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
  
  DSBR100 USB FM RADIO DRIVER
  M:    Alexey Klimov <[email protected]>
@@@ -4762,7 -4695,6 +4762,7 @@@ L:      [email protected]
  L:    [email protected]
  S:    Supported
  F:    drivers/edac/octeon_edac*
 +F:    drivers/edac/thunderx_edac*
  
  EDAC-E752X
  M:    Mark Gross <[email protected]>
  S:    Maintained
  F:    drivers/edac/mpc85xx_edac.[ch]
  
 +EDAC-PND2
 +M:    Tony Luck <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/edac/pnd2_edac.[ch]
 +
  EDAC-PASEMI
  M:    Egor Martovetsky <[email protected]>
  L:    [email protected]
@@@ -4997,7 -4923,6 +4997,7 @@@ F:      include/linux/netfilter_bridge
  F:    net/bridge/
  
  ETHERNET PHY LIBRARY
 +M:    Andrew Lunn <[email protected]>
  M:    Florian Fainelli <[email protected]>
  L:    [email protected]
  S:    Maintained
@@@ -5185,6 -5110,7 +5185,6 @@@ F:      include/uapi/linux/firewire*.
  F:    tools/firewire/
  
  FIRMWARE LOADER (request_firmware)
 -M:    Ming Lei <[email protected]>
  M:    Luis R. Rodriguez <[email protected]>
  L:    [email protected]
  S:    Maintained
@@@ -5214,15 -5140,13 +5214,15 @@@ F:   include/linux/ipmi-fru.
  K:    fmc_d.*register
  
  FPGA MANAGER FRAMEWORK
 -M:    Alan Tull <atull@opensource.altera.com>
 +M:    Alan Tull <atull@kernel.org>
  R:    Moritz Fischer <[email protected]>
  L:    [email protected]
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/atull/linux-fpga.git
 +F:    Documentation/fpga/
 +F:    Documentation/devicetree/bindings/fpga/
  F:    drivers/fpga/
 -F:    include/linux/fpga/fpga-mgr.h
 +F:    include/linux/fpga/
  W:    http://www.rocketboards.org
  
  FPU EMULATOR
@@@ -5334,7 -5258,6 +5334,7 @@@ M:      Scott Wood <[email protected]
  L:    [email protected]
  L:    [email protected]
  S:    Maintained
 +F:    Documentation/devicetree/bindings/powerpc/fsl/
  F:    drivers/soc/fsl/
  F:    include/linux/fsl/
  
@@@ -5423,12 -5346,10 +5423,12 @@@ F:   Documentation/filesystems/caching
  F:    fs/fscache/
  F:    include/linux/fscache*.h
  
 -FS-CRYPTO: FILE SYSTEM LEVEL ENCRYPTION SUPPORT
 +FSCRYPT: FILE SYSTEM LEVEL ENCRYPTION SUPPORT
  M:    Theodore Y. Ts'o <[email protected]>
  M:    Jaegeuk Kim <[email protected]>
 -L:    [email protected]
 +L:    [email protected]
 +Q:    https://patchwork.kernel.org/project/linux-fscrypt/list/
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt.git
  S:    Supported
  F:    fs/crypto/
  F:    include/linux/fscrypt*.h
@@@ -5480,23 -5401,6 +5480,23 @@@ F:    fs/fuse
  F:    include/uapi/linux/fuse.h
  F:    Documentation/filesystems/fuse.txt
  
 +FUTEX SUBSYSTEM
 +M:    Thomas Gleixner <[email protected]>
 +M:    Ingo Molnar <[email protected]>
 +R:    Peter Zijlstra <[email protected]>
 +R:    Darren Hart <[email protected]>
 +L:    [email protected]
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
 +S:    Maintained
 +F:    kernel/futex.c
 +F:    kernel/futex_compat.c
 +F:    include/asm-generic/futex.h
 +F:    include/linux/futex.h
 +F:    include/uapi/linux/futex.h
 +F:    tools/testing/selftests/futex/
 +F:    tools/perf/bench/futex*
 +F:    Documentation/*futex*
 +
  FUTURE DOMAIN TMC-16x0 SCSI DRIVER (16-bit)
  M:    Rik Faith <[email protected]>
  L:    [email protected]
@@@ -5590,7 -5494,6 +5590,7 @@@ L:      [email protected]
  S:    Supported
  F:    drivers/base/power/domain*.c
  F:    include/linux/pm_domain.h
 +F:    Documentation/devicetree/bindings/power/power_domain.txt
  
  GENERIC UIO DRIVER FOR PCI DEVICES
  M:    "Michael S. Tsirkin" <[email protected]>
@@@ -5940,13 -5843,6 +5940,13 @@@ F:    drivers/block/cciss
  F:    include/linux/cciss_ioctl.h
  F:    include/uapi/linux/cciss_ioctl.h
  
 +OPA-VNIC DRIVER
 +M:    Dennis Dalessandro <[email protected]>
 +M:    Niranjana Vishwanathapura <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/infiniband/ulp/opa_vnic
 +
  HFI1 DRIVER
  M:    Mike Marciniszyn <[email protected]>
  M:    Dennis Dalessandro <[email protected]>
@@@ -6109,7 -6005,7 +6109,7 @@@ M:      Sebastian Reichel <[email protected]
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi.git
  S:    Maintained
  F:    Documentation/ABI/testing/sysfs-bus-hsi
 -F:    Documentation/device-drivers/serial-interfaces.rst
 +F:    Documentation/driver-api/hsi.rst
  F:    drivers/hsi/
  F:    include/linux/hsi/
  F:    include/uapi/linux/hsi/
@@@ -6315,7 -6211,7 +6315,7 @@@ F:      drivers/crypto/nx/nx_csbcpb.
  F:    drivers/crypto/nx/nx_debugfs.h
  
  IBM Power 842 compression accelerator
 -M:    Dan Streetman <[email protected]>
 +M:    Haren Myneni <[email protected]>
  S:    Supported
  F:    drivers/crypto/nx/Makefile
  F:    drivers/crypto/nx/Kconfig
@@@ -6555,7 -6451,6 +6555,7 @@@ W:      http://www.openfabrics.org
  Q:    http://patchwork.kernel.org/project/linux-rdma/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma.git
  S:    Supported
 +F:    Documentation/devicetree/bindings/infiniband/
  F:    Documentation/infiniband/
  F:    drivers/infiniband/
  F:    include/uapi/linux/if_infiniband.h
@@@ -6588,7 -6483,7 +6588,7 @@@ INPUT MULTITOUCH (MT) PROTOCO
  M:    Henrik Rydberg <[email protected]>
  L:    [email protected]
  S:    Odd fixes
 -F:    Documentation/input/multi-touch-protocol.txt
 +F:    Documentation/input/multi-touch-protocol.rst
  F:    drivers/input/input-mt.c
  K:    \b(ABS|SYN)_MT_
  
@@@ -6869,8 -6764,6 +6869,8 @@@ T:      git git://git.kernel.org/pub/scm/lin
  S:    Maintained
  F:    Documentation/devicetree/bindings/iommu/
  F:    drivers/iommu/
 +F:    include/linux/iommu.h
 +F:    include/linux/iova.h
  
  IP MASQUERADING
  M:    Juanjo Ciarlante <[email protected]>
@@@ -7191,9 -7084,9 +7191,9 @@@ S:      Maintaine
  F:    fs/autofs4/
  
  KERNEL BUILD + files below scripts/ (unless maintained elsewhere)
 +M:    Masahiro Yamada <[email protected]>
  M:    Michal Marek <[email protected]>
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild.git for-next
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild.git rc-fixes
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
  L:    [email protected]
  S:    Maintained
  F:    Documentation/kbuild/
@@@ -7277,7 -7170,6 +7277,7 @@@ S:      Supporte
  F:    Documentation/s390/kvm.txt
  F:    arch/s390/include/asm/kvm*
  F:    arch/s390/kvm/
 +F:    arch/s390/mm/gmap.c
  
  KERNEL VIRTUAL MACHINE (KVM) FOR ARM
  M:    Christoffer Dall <[email protected]>
@@@ -7311,14 -7203,6 +7311,14 @@@ F:    arch/mips/include/uapi/asm/kvm
  F:    arch/mips/include/asm/kvm*
  F:    arch/mips/kvm/
  
 +KERNFS
 +M:    Greg Kroah-Hartman <[email protected]>
 +M:    Tejun Heo <[email protected]>
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
 +S:    Supported
 +F:    include/linux/kernfs.h
 +F:    fs/kernfs/
 +
  KEXEC
  M:    Eric Biederman <[email protected]>
  W:    http://kernel.org/pub/linux/utils/kernel/kexec/
@@@ -7598,7 -7482,7 +7598,7 @@@ Q:      http://patchwork.ozlabs.org/project/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
  S:    Supported
  F:    Documentation/ABI/stable/sysfs-firmware-opal-*
 -F:    Documentation/devicetree/bindings/powerpc/opal/
 +F:    Documentation/devicetree/bindings/powerpc/
  F:    Documentation/devicetree/bindings/rtc/rtc-opal.txt
  F:    Documentation/devicetree/bindings/i2c/i2c-opal.txt
  F:    Documentation/powerpc/
@@@ -7814,14 -7698,6 +7814,14 @@@ S:    Maintaine
  F:    Documentation/hwmon/ltc4261
  F:    drivers/hwmon/ltc4261.c
  
 +LTC4306 I2C MULTIPLEXER DRIVER
 +M:    Michael Hennerich <[email protected]>
 +W:    http://ez.analog.com/community/linux-device-drivers
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/i2c/muxes/i2c-mux-ltc4306.c
 +F:    Documentation/devicetree/bindings/i2c/i2c-mux-ltc4306.txt
 +
  LTP (Linux Test Project)
  M:    Mike Frysinger <[email protected]>
  M:    Cyril Hrubis <[email protected]>
@@@ -7898,6 -7774,13 +7898,6 @@@ F:     include/net/mac80211.
  F:    net/mac80211/
  F:    drivers/net/wireless/mac80211_hwsim.[ch]
  
 -MACVLAN DRIVER
 -M:    Patrick McHardy <[email protected]>
 -L:    [email protected]
 -S:    Maintained
 -F:    drivers/net/macvlan.c
 -F:    include/linux/if_macvlan.h
 -
  MAILBOX API
  M:    Jassi Brar <[email protected]>
  L:    [email protected]
@@@ -7968,10 -7851,8 +7968,10 @@@ S:    Maintaine
  F:    drivers/net/ethernet/marvell/mvneta.*
  
  MARVELL MWIFIEX WIRELESS DRIVER
 -M:    Amitkumar Karwar <akarwar@marvell.com>
 +M:    Amitkumar Karwar <amitkarwar@gmail.com>
  M:    Nishant Sarmukadam <[email protected]>
 +M:    Ganapathi Bhat <[email protected]>
 +M:    Xinming Hu <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/net/wireless/marvell/mwifiex/
@@@ -7987,13 -7868,6 +7987,13 @@@ M:    Nicolas Pitre <[email protected]
  S:    Odd Fixes
  F:    drivers/mmc/host/mvsdio.*
  
 +MARVELL XENON MMC/SD/SDIO HOST CONTROLLER DRIVER
 +M:    Hu Ziji <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/mmc/host/sdhci-xenon*
 +F:    Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.txt
 +
  MATROX FRAMEBUFFER DRIVER
  L:    [email protected]
  S:    Orphan
@@@ -8199,7 -8073,6 +8199,7 @@@ W:      https://linuxtv.or
  Q:    http://patchwork.kernel.org/project/linux-media/list/
  T:    git git://linuxtv.org/media_tree.git
  S:    Maintained
 +F:    Documentation/devicetree/bindings/media/
  F:    Documentation/media/
  F:    drivers/media/
  F:    drivers/staging/media/
  S:    Maintained
  F:    drivers/net/ethernet/mediatek/
  
 +MEDIATEK JPEG DRIVER
 +M:    Rick Chang <[email protected]>
 +M:    Bin Liu <[email protected]>
 +S:    Supported
 +F:    drivers/media/platform/mtk-jpeg/
 +F:    Documentation/devicetree/bindings/media/mediatek-jpeg-decoder.txt
 +
  MEDIATEK MEDIA DRIVER
  M:    Tiffany Lin <[email protected]>
  M:    Andrew-CT Chen <[email protected]>
  S:    Maintained
  F:    drivers/net/wireless/mediatek/mt7601u/
  
 +MEGACHIPS STDPXXXX-GE-B850V3-FW LVDS/DP++ BRIDGES
 +M:    Peter Senna Tschudin <[email protected]>
 +M:    Martin Donnelly <[email protected]>
 +M:    Martyn Welch <[email protected]>
 +S:    Maintained
 +F:    drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
 +F:    Documentation/devicetree/bindings/video/bridge/megachips-stdpxxxx-ge-b850v3-fw.txt
 +
  MEGARAID SCSI/SAS DRIVERS
  M:    Kashyap Desai <[email protected]>
  M:    Sumit Saxena <[email protected]>
@@@ -8425,7 -8283,7 +8425,7 @@@ MICROCHIP / ATMEL AT91 / AT32 SERIAL DR
  M:    Richard Genoud <[email protected]>
  S:    Maintained
  F:    drivers/tty/serial/atmel_serial.c
 -F:    include/linux/atmel_serial.h
 +F:    drivers/tty/serial/atmel_serial.h
  
  MICROCHIP / ATMEL DMA DRIVER
  M:    Ludovic Desroches <[email protected]>
@@@ -8821,16 -8679,14 +8821,16 @@@ F:   drivers/net/ethernet/neterion
  NETFILTER
  M:    Pablo Neira Ayuso <[email protected]>
  M:    Jozsef Kadlecsik <[email protected]>
 +M:    Florian Westphal <[email protected]>
  L:    [email protected]
  L:    [email protected]
  W:    http://www.netfilter.org/
  W:    http://www.iptables.org/
 +W:    http://www.nftables.org/
  Q:    http://patchwork.ozlabs.org/project/netfilter-devel/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git
 -S:    Supported
 +S:    Maintained
  F:    include/linux/netfilter*
  F:    include/linux/netfilter/
  F:    include/net/netfilter/
@@@ -8897,7 -8753,6 +8897,7 @@@ W:      http://www.linuxfoundation.org/en/Ne
  Q:    http://patchwork.ozlabs.org/project/netdev/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
 +B:    mailto:[email protected]
  S:    Maintained
  F:    net/
  F:    include/net/
@@@ -8938,12 -8793,12 +8938,12 @@@ F:   net/core/flow.
  F:    net/xfrm/
  F:    net/key/
  F:    net/ipv4/xfrm*
 -F:    net/ipv4/esp4.c
 +F:    net/ipv4/esp4*
  F:    net/ipv4/ah4.c
  F:    net/ipv4/ipcomp.c
  F:    net/ipv4/ip_vti.c
  F:    net/ipv6/xfrm*
 -F:    net/ipv6/esp6.c
 +F:    net/ipv6/esp6*
  F:    net/ipv6/ah6.c
  F:    net/ipv6/ipcomp6.c
  F:    net/ipv6/ip6_vti.c
@@@ -8997,6 -8852,8 +8997,6 @@@ S:      Supporte
  F:    drivers/net/ethernet/qlogic/netxen/
  
  NFC SUBSYSTEM
 -M:    Lauro Ramos Venancio <[email protected]>
 -M:    Aloisio Almeida Jr <[email protected]>
  M:    Samuel Ortiz <[email protected]>
  L:    [email protected]
  L:    [email protected] (subscribers-only)
@@@ -9170,6 -9027,7 +9170,6 @@@ F:      drivers/nvme/target/fcloop.
  
  NVMEM FRAMEWORK
  M:    Srinivas Kandagatla <[email protected]>
 -M:    Maxime Ripard <[email protected]>
  S:    Maintained
  F:    drivers/nvmem/
  F:    Documentation/devicetree/bindings/nvmem/
@@@ -9401,20 -9259,12 +9401,20 @@@ M:   Harald Welte <[email protected]
  S:    Maintained
  F:    drivers/char/pcmcia/cm4040_cs.*
  
 +OMNIVISION OV5647 SENSOR DRIVER
 +M:    Ramiro Oliveira <[email protected]>
 +L:    [email protected]
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    drivers/media/i2c/ov5647.c
 +
  OMNIVISION OV7670 SENSOR DRIVER
  M:    Jonathan Corbet <[email protected]>
  L:    [email protected]
  T:    git git://linuxtv.org/media_tree.git
  S:    Maintained
  F:    drivers/media/i2c/ov7670.c
 +F:    Documentation/devicetree/bindings/media/i2c/ov7670.txt
  
  ONENAND FLASH DRIVER
  M:    Kyungmin Park <[email protected]>
@@@ -9518,6 -9368,11 +9518,11 @@@ F:    arch/*/oprofile
  F:    drivers/oprofile/
  F:    include/linux/oprofile.h
  
+ OP-TEE DRIVER
+ M:    Jens Wiklander <[email protected]>
+ S:    Maintained
+ F:    drivers/tee/optee/
  ORACLE CLUSTER FILESYSTEM 2 (OCFS2)
  M:    Mark Fasheh <[email protected]>
  M:    Joel Becker <[email protected]>
@@@ -9730,15 -9585,6 +9735,15 @@@ F:    include/linux/pci
  F:    arch/x86/pci/
  F:    arch/x86/kernel/quirks.c
  
 +PCI ENDPOINT SUBSYSTEM
 +M:    Kishon Vijay Abraham I <[email protected]>
 +L:    [email protected]
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kishon/pci-endpoint.git
 +S:    Supported
 +F:    drivers/pci/endpoint/
 +F:    drivers/misc/pci_endpoint_test.c
 +F:    tools/pci/
 +
  PCI DRIVER FOR ALTERA PCIE IP
  M:    Ley Foon Tan <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
@@@ -9813,17 -9659,6 +9818,17 @@@ S:    Maintaine
  F:    Documentation/devicetree/bindings/pci/aardvark-pci.txt
  F:    drivers/pci/host/pci-aardvark.c
  
 +PCI DRIVER FOR MICROSEMI SWITCHTEC
 +M:    Kurt Schwemmer <[email protected]>
 +M:    Stephen Bates <[email protected]>
 +M:    Logan Gunthorpe <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    Documentation/switchtec.txt
 +F:    Documentation/ABI/testing/sysfs-class-switchtec
 +F:    drivers/pci/switch/switchtec*
 +F:    include/uapi/linux/switchtec_ioctl.h
 +
  PCI DRIVER FOR NVIDIA TEGRA
  M:    Thierry Reding <[email protected]>
  L:    [email protected]
@@@ -10078,8 -9913,6 +10083,8 @@@ M:    Krzysztof Kozlowski <[email protected]
  M:    Sylwester Nawrocki <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  L:    [email protected] (moderated for non-subscribers)
 +Q:    https://patchwork.kernel.org/project/linux-samsung-soc/list/
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/samsung.git
  S:    Maintained
  F:    drivers/pinctrl/samsung/
  F:    include/dt-bindings/pinctrl/samsung.h
@@@ -10147,6 -9980,7 +10152,6 @@@ F:    drivers/scsi/pmcraid.
  PMC SIERRA PM8001 DRIVER
  M:    Jack Wang <[email protected]>
  M:    [email protected]
 -L:    [email protected]
  L:    [email protected]
  S:    Supported
  F:    drivers/scsi/pm8001/
@@@ -10245,7 -10079,7 +10250,7 @@@ W:   http://sourceforge.net/projects/acce
  PREEMPTIBLE KERNEL
  M:    Robert Love <[email protected]>
  L:    [email protected]
 -W:    ftp://ftp.kernel.org/pub/linux/kernel/people/rml/preempt-kernel
 +W:    https://www.kernel.org/pub/linux/kernel/people/rml/preempt-kernel
  S:    Supported
  F:    Documentation/preempt-locking.txt
  F:    include/linux/preempt.h
@@@ -10382,8 -10216,6 +10387,8 @@@ F:   include/linux/pwm.
  F:    drivers/pwm/
  F:    drivers/video/backlight/pwm_bl.c
  F:    include/linux/pwm_backlight.h
 +F:    drivers/gpio/gpio-mvebu.c
 +F:    Documentation/devicetree/bindings/gpio/gpio-mvebu.txt
  
  PXA2xx/PXA3xx SUPPORT
  M:    Daniel Mack <[email protected]>
  S:    Maintained
  F:    drivers/video/fbdev/aty/aty128fb.c
  
 +RAINSHADOW-CEC DRIVER
 +M:    Hans Verkuil <[email protected]>
 +L:    [email protected]
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    drivers/media/usb/rainshadow-cec/*
 +
  RALINK MIPS ARCHITECTURE
  M:    John Crispin <[email protected]>
  L:    [email protected]
@@@ -10994,7 -10819,6 +10999,7 @@@ F:   drivers/s390/block/dasd
  F:    block/partitions/ibm.c
  
  S390 NETWORK DRIVERS
 +M:    Julian Wiedmann <[email protected]>
  M:    Ursula Braun <[email protected]>
  L:    [email protected]
  W:    http://www.ibm.com/developerworks/linux/linux390/
@@@ -11025,7 -10849,6 +11030,7 @@@ S:   Supporte
  F:    drivers/s390/scsi/zfcp_*
  
  S390 IUCV NETWORK LAYER
 +M:    Julian Wiedmann <[email protected]>
  M:    Ursula Braun <[email protected]>
  L:    [email protected]
  W:    http://www.ibm.com/developerworks/linux/linux390/
@@@ -11041,16 -10864,6 +11046,16 @@@ W: http://www.ibm.com/developerworks/li
  S:    Supported
  F:    drivers/iommu/s390-iommu.c
  
 +S390 VFIO-CCW DRIVER
 +M:    Cornelia Huck <[email protected]>
 +M:    Dong Jia Shi <[email protected]>
 +L:    [email protected]
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/s390/cio/vfio_ccw*
 +F:    Documentation/s390/vfio-ccw.txt
 +F:    include/uapi/linux/vfio_ccw.h
 +
  S3C24XX SD/MMC Driver
  M:    Ben Dooks <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  S:    Supported
  F:    sound/soc/samsung/
  
 +SAMSUNG EXYNOS PSEUDO RANDOM NUMBER GENERATOR (RNG) DRIVER
 +M:    Krzysztof Kozlowski <[email protected]>
 +L:    [email protected]
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/crypto/exynos-rng.c
 +F:    Documentation/devicetree/bindings/rng/samsung,exynos-rng4.txt
 +
  SAMSUNG FRAMEBUFFER DRIVER
  M:    Jingoo Han <[email protected]>
  L:    [email protected]
@@@ -11130,14 -10935,6 +11135,14 @@@ F: Documentation/devicetree/bindings/re
  F:    Documentation/devicetree/bindings/regulator/samsung,s5m*.txt
  F:    Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
  
 +SAMSUNG S5P Security SubSystem (SSS) DRIVER
 +M:    Krzysztof Kozlowski <[email protected]>
 +M:    Vladimir Zapolskiy <[email protected]>
 +L:    [email protected]
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/crypto/s5p-sss.c
 +
  SAMSUNG S5P/EXYNOS4 SOC SERIES CAMERA SUBSYSTEM DRIVERS
  M:    Kyungmin Park <[email protected]>
  M:    Sylwester Nawrocki <[email protected]>
@@@ -11269,12 -11066,6 +11274,12 @@@ F: include/linux/dma/dw.
  F:    include/linux/platform_data/dma-dw.h
  F:    drivers/dma/dw/
  
 +SYNOPSYS DESIGNWARE ENTERPRISE ETHERNET DRIVER
 +M:    Jie Deng <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/net/ethernet/synopsys/
 +
  SYNOPSYS DESIGNWARE I2C DRIVER
  M:    Jarkko Nikula <[email protected]>
  R:    Andy Shevchenko <[email protected]>
@@@ -11299,6 -11090,14 +11304,14 @@@ F: drivers/hwtracing/stm
  F:    include/linux/stm.h
  F:    include/uapi/linux/stm.h
  
+ TEE SUBSYSTEM
+ M:    Jens Wiklander <[email protected]>
+ S:    Maintained
+ F:    include/linux/tee_drv.h
+ F:    include/uapi/linux/tee.h
+ F:    drivers/tee/
+ F:    Documentation/tee.txt
  THUNDERBOLT DRIVER
  M:    Andreas Noever <[email protected]>
  S:    Maintained
@@@ -11313,7 -11112,6 +11326,7 @@@ F:   drivers/power/supply/bq27xxx_battery
  TIMEKEEPING, CLOCKSOURCE CORE, NTP, ALARMTIMER
  M:    John Stultz <[email protected]>
  M:    Thomas Gleixner <[email protected]>
 +R:    Stephen Boyd <[email protected]>
  L:    [email protected]
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
  S:    Supported
@@@ -11573,11 -11371,11 +11586,11 @@@ S:        Supporte
  F:    drivers/net/ethernet/emulex/benet/
  
  EMULEX ONECONNECT ROCE DRIVER
 -M:    Selvin Xavier <selvin.xavier@avagotech.com>
 -M:    Devesh Sharma <devesh.sharma@avagotech.com>
 +M:    Selvin Xavier <selvin.xavier@broadcom.com>
 +M:    Devesh Sharma <devesh.sharma@broadcom.com>
  L:    [email protected]
 -W:    http://www.emulex.com
 -S:    Supported
 +W:    http://www.broadcom.com
 +S:    Odd Fixes
  F:    drivers/infiniband/hw/ocrdma/
  F:    include/uapi/rdma/ocrdma-abi.h
  
@@@ -12379,19 -12177,12 +12392,19 @@@ F:        Documentation/accounting/taskstats
  F:    include/linux/taskstats*
  F:    kernel/taskstats.c
  
 -TC CLASSIFIER
 +TC subsystem
  M:    Jamal Hadi Salim <[email protected]>
 +M:    Cong Wang <[email protected]>
 +M:    Jiri Pirko <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    include/net/pkt_cls.h
 +F:    include/net/pkt_sched.h
 +F:    include/net/tc_act/
  F:    include/uapi/linux/pkt_cls.h
 +F:    include/uapi/linux/pkt_sched.h
 +F:    include/uapi/linux/tc_act/
 +F:    include/uapi/linux/tc_ematch/
  F:    net/sched/
  
  TCP LOW PRIORITY MODULE
@@@ -12523,8 -12314,9 +12536,8 @@@ S:   Maintaine
  F:    drivers/media/rc/ttusbir.c
  
  TEGRA ARCHITECTURE SUPPORT
 -M:    Stephen Warren <[email protected]>
  M:    Thierry Reding <[email protected]>
 -M:    Alexandre Courbot <gnurou@gmail.com>
 +M:    Jonathan Hunter <jonathanh@nvidia.com>
  L:    [email protected]
  Q:    http://patchwork.ozlabs.org/project/linux-tegra/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git
@@@ -12603,9 -12395,6 +12616,9 @@@ S:   Maintaine
  F:    Documentation/devicetree/bindings/arm/keystone/ti,sci.txt
  F:    drivers/firmware/ti_sci*
  F:    include/linux/soc/ti/ti_sci_protocol.h
 +F:    Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
 +F:    include/dt-bindings/genpd/k2g.h
 +F:    drivers/soc/ti/ti_sci_pm_domains.c
  
  THANKO'S RAREMONO AM/FM/SW RADIO RECEIVER USB DRIVER
  M:    Hans Verkuil <[email protected]>
@@@ -12678,6 -12467,7 +12691,6 @@@ F:   drivers/clk/ti
  F:    include/linux/clk/ti.h
  
  TI ETHERNET SWITCH DRIVER (CPSW)
 -M:    Mugunthan V N <[email protected]>
  R:    Grygorii Strashko <[email protected]>
  L:    [email protected]
  L:    [email protected]
@@@ -13323,15 -13113,6 +13336,15 @@@ F: drivers/usb
  F:    include/linux/usb.h
  F:    include/linux/usb/
  
 +USB TYPEC SUBSYSTEM
 +M:    Heikki Krogerus <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    Documentation/ABI/testing/sysfs-class-typec
 +F:    Documentation/usb/typec.rst
 +F:    drivers/usb/typec/
 +F:    include/linux/usb/typec.h
 +
  USB UHCI DRIVER
  M:    Alan Stern <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/vfio/platform/
  
 +VGA_SWITCHEROO
 +R:    Lukas Wunner <[email protected]>
 +S:    Maintained
 +F:    Documentation/gpu/vga-switcheroo.rst
 +F:    drivers/gpu/vga/vga_switcheroo.c
 +F:    include/linux/vga_switcheroo.h
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
 +
  VIDEOBUF2 FRAMEWORK
  M:    Pawel Osciak <[email protected]>
  M:    Marek Szyprowski <[email protected]>
  S:    Maintained
  F:    include/linux/virtio_vsock.h
  F:    include/uapi/linux/virtio_vsock.h
 +F:    include/uapi/linux/vsockmon.h
 +F:    net/vmw_vsock/af_vsock_tap.c
  F:    net/vmw_vsock/virtio_transport_common.c
  F:    net/vmw_vsock/virtio_transport.c
 +F:    drivers/net/vsockmon.c
  F:    drivers/vhost/vsock.c
  F:    drivers/vhost/vsock.h
  
@@@ -13538,7 -13308,7 +13551,7 @@@ F:   drivers/virtio
  F:    tools/virtio/
  F:    drivers/net/virtio_net.c
  F:    drivers/block/virtio_blk.c
 -F:    include/linux/virtio_*.h
 +F:    include/linux/virtio*.h
  F:    include/uapi/linux/virtio_*.h
  F:    drivers/crypto/virtio/
  
@@@ -13556,7 -13326,7 +13569,7 @@@ M:   David Airlie <[email protected]
  M:    Gerd Hoffmann <[email protected]>
  L:    [email protected]
  L:    [email protected]
 -T:    git git://git.kraxel.org/linux drm-qemu
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
  S:    Maintained
  F:    drivers/gpu/drm/virtio/
  F:    include/uapi/linux/virtio_gpu.h
@@@ -13626,13 -13396,13 +13639,13 @@@ W:        https://linuxtv.or
  S:    Maintained
  F:    drivers/media/platform/vivid/*
  
 -VLAN (802.1Q)
 -M:    Patrick McHardy <[email protected]>
 -L:    [email protected]
 +VIMC VIRTUAL MEDIA CONTROLLER DRIVER
 +M:    Helen Koike <[email protected]>
 +L:    [email protected]
 +T:    git git://linuxtv.org/media_tree.git
 +W:    https://linuxtv.org
  S:    Maintained
 -F:    drivers/net/macvlan.c
 -F:    include/linux/if_*vlan.h
 -F:    net/8021q/
 +F:    drivers/media/platform/vimc/*
  
  VLYNQ BUS
  M:    Florian Fainelli <[email protected]>
@@@ -13842,7 -13612,6 +13855,7 @@@ F:   Documentation/hwmon/wm83?
  F:    Documentation/devicetree/bindings/extcon/extcon-arizona.txt
  F:    Documentation/devicetree/bindings/regulator/arizona-regulator.txt
  F:    Documentation/devicetree/bindings/mfd/arizona.txt
 +F:    Documentation/devicetree/bindings/mfd/wm831x.txt
  F:    arch/arm/mach-s3c64xx/mach-crag6410*
  F:    drivers/clk/clk-wm83*.c
  F:    drivers/extcon/extcon-arizona.c
@@@ -13859,14 -13628,12 +13872,14 @@@ F:        drivers/mfd/cs47l24
  F:    drivers/power/supply/wm83*.c
  F:    drivers/rtc/rtc-wm83*.c
  F:    drivers/regulator/wm8*.c
 +F:    drivers/regulator/arizona*
  F:    drivers/video/backlight/wm83*_bl.c
  F:    drivers/watchdog/wm83*_wdt.c
  F:    include/linux/mfd/arizona/
  F:    include/linux/mfd/wm831x/
  F:    include/linux/mfd/wm8350/
  F:    include/linux/mfd/wm8400*
 +F:    include/linux/regulator/arizona*
  F:    include/linux/wm97xx.h
  F:    include/sound/wm????.h
  F:    sound/soc/codecs/arizona.?
@@@ -14066,7 -13833,7 +14079,7 @@@ YEALINK PHONE DRIVE
  M:    Henk Vergonet <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/input/yealink.txt
 +F:    Documentation/input/yealink.rst
  F:    drivers/input/misc/yealink.*
  
  Z8530 DRIVER FOR AX.25
index 9b4ba71692101077d5a77a6b18749b7c6c4d26f6,89c15399bec2dc49559438c54bcbae1dd84e3a85..75bce2d0b1a83fa9f953b55a75ebdcb2ff4dc526
                        assigned-clocks = <&sys_ctrl HI6220_UART1_SRC>;
                        assigned-clock-rates = <150000000>;
                        status = "ok";
 +
 +                      bluetooth {
 +                              compatible = "ti,wl1835-st";
 +                              enable-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
 +                      };
                };
  
                uart2: uart@f7112000 {
                        };
                };
        };
+       firmware {
+               optee {
+                       compatible = "linaro,optee-tz";
+                       method = "smc";
+               };
+       };
  };
  
  &uart2 {
diff --combined drivers/Makefile
index edba1edc66549c4b80c5cfde88f4cf8633d3e743,5db9aa6beeafd938f385de260552d56af319a81a..cfabd141dba2ad3a6208f3c880f5cc7a14eecc3e
@@@ -14,9 -14,7 +14,9 @@@ obj-$(CONFIG_GENERIC_PHY)     += phy
  obj-$(CONFIG_PINCTRL)         += pinctrl/
  obj-$(CONFIG_GPIOLIB)         += gpio/
  obj-y                         += pwm/
 +
  obj-$(CONFIG_PCI)             += pci/
 +obj-$(CONFIG_PCI_ENDPOINT)    += pci/endpoint/
  # PCI dwc controller drivers
  obj-y                         += pci/dwc/
  
@@@ -73,7 -71,7 +73,7 @@@ obj-$(CONFIG_PARPORT)         += parport
  obj-$(CONFIG_NVM)             += lightnvm/
  obj-y                         += base/ block/ misc/ mfd/ nfc/
  obj-$(CONFIG_LIBNVDIMM)               += nvdimm/
 -obj-$(CONFIG_DEV_DAX)         += dax/
 +obj-$(CONFIG_DAX)             += dax/
  obj-$(CONFIG_DMA_SHARED_BUFFER) += dma-buf/
  obj-$(CONFIG_NUBUS)           += nubus/
  obj-y                         += macintosh/
@@@ -106,7 -104,6 +106,7 @@@ obj-$(CONFIG_USB_PHY)              += usb
  obj-$(CONFIG_USB)             += usb/
  obj-$(CONFIG_PCI)             += usb/
  obj-$(CONFIG_USB_GADGET)      += usb/
 +obj-$(CONFIG_OF)              += usb/
  obj-$(CONFIG_SERIO)           += input/serio/
  obj-$(CONFIG_GAMEPORT)                += input/gameport/
  obj-$(CONFIG_INPUT)           += input/
@@@ -180,3 -177,4 +180,4 @@@ obj-$(CONFIG_ANDROID)              += android
  obj-$(CONFIG_NVMEM)           += nvmem/
  obj-$(CONFIG_FPGA)            += fpga/
  obj-$(CONFIG_FSI)             += fsi/
+ obj-$(CONFIG_TEE)             += tee/
diff --combined drivers/tee/tee_shm.c
index 0000000000000000000000000000000000000000,0be1e3e93bee5d2a812ef47fdb3d045dd5a4990e..d356d7f025eb4cf92cc3c2f6615a2b8dad6f7e36
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,358 +1,358 @@@
 -static void *tee_shm_op_kmap_atomic(struct dma_buf *dmabuf, unsigned long pgnum)
+ /*
+  * Copyright (c) 2015-2016, Linaro Limited
+  *
+  * This software is licensed under the terms of the GNU General Public
+  * License version 2, as published by the Free Software Foundation, and
+  * may be copied, distributed, and modified under those terms.
+  *
+  * This program is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  * GNU General Public License for more details.
+  *
+  */
+ #include <linux/device.h>
+ #include <linux/dma-buf.h>
+ #include <linux/fdtable.h>
+ #include <linux/idr.h>
+ #include <linux/sched.h>
+ #include <linux/slab.h>
+ #include <linux/tee_drv.h>
+ #include "tee_private.h"
+ static void tee_shm_release(struct tee_shm *shm)
+ {
+       struct tee_device *teedev = shm->teedev;
+       struct tee_shm_pool_mgr *poolm;
+       mutex_lock(&teedev->mutex);
+       idr_remove(&teedev->idr, shm->id);
+       if (shm->ctx)
+               list_del(&shm->link);
+       mutex_unlock(&teedev->mutex);
+       if (shm->flags & TEE_SHM_DMA_BUF)
+               poolm = &teedev->pool->dma_buf_mgr;
+       else
+               poolm = &teedev->pool->private_mgr;
+       poolm->ops->free(poolm, shm);
+       kfree(shm);
+       tee_device_put(teedev);
+ }
+ static struct sg_table *tee_shm_op_map_dma_buf(struct dma_buf_attachment
+                       *attach, enum dma_data_direction dir)
+ {
+       return NULL;
+ }
+ static void tee_shm_op_unmap_dma_buf(struct dma_buf_attachment *attach,
+                                    struct sg_table *table,
+                                    enum dma_data_direction dir)
+ {
+ }
+ static void tee_shm_op_release(struct dma_buf *dmabuf)
+ {
+       struct tee_shm *shm = dmabuf->priv;
+       tee_shm_release(shm);
+ }
 -static void *tee_shm_op_kmap(struct dma_buf *dmabuf, unsigned long pgnum)
++static void *tee_shm_op_map_atomic(struct dma_buf *dmabuf, unsigned long pgnum)
+ {
+       return NULL;
+ }
 -      .kmap_atomic = tee_shm_op_kmap_atomic,
 -      .kmap = tee_shm_op_kmap,
++static void *tee_shm_op_map(struct dma_buf *dmabuf, unsigned long pgnum)
+ {
+       return NULL;
+ }
+ static int tee_shm_op_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma)
+ {
+       struct tee_shm *shm = dmabuf->priv;
+       size_t size = vma->vm_end - vma->vm_start;
+       return remap_pfn_range(vma, vma->vm_start, shm->paddr >> PAGE_SHIFT,
+                              size, vma->vm_page_prot);
+ }
+ static struct dma_buf_ops tee_shm_dma_buf_ops = {
+       .map_dma_buf = tee_shm_op_map_dma_buf,
+       .unmap_dma_buf = tee_shm_op_unmap_dma_buf,
+       .release = tee_shm_op_release,
++      .map_atomic = tee_shm_op_map_atomic,
++      .map = tee_shm_op_map,
+       .mmap = tee_shm_op_mmap,
+ };
+ /**
+  * tee_shm_alloc() - Allocate shared memory
+  * @ctx:      Context that allocates the shared memory
+  * @size:     Requested size of shared memory
+  * @flags:    Flags setting properties for the requested shared memory.
+  *
+  * Memory allocated as global shared memory is automatically freed when the
+  * TEE file pointer is closed. The @flags field uses the bits defined by
+  * TEE_SHM_* in <linux/tee_drv.h>. TEE_SHM_MAPPED must currently always be
+  * set. If TEE_SHM_DMA_BUF global shared memory will be allocated and
+  * associated with a dma-buf handle, else driver private memory.
+  */
+ struct tee_shm *tee_shm_alloc(struct tee_context *ctx, size_t size, u32 flags)
+ {
+       struct tee_device *teedev = ctx->teedev;
+       struct tee_shm_pool_mgr *poolm = NULL;
+       struct tee_shm *shm;
+       void *ret;
+       int rc;
+       if (!(flags & TEE_SHM_MAPPED)) {
+               dev_err(teedev->dev.parent,
+                       "only mapped allocations supported\n");
+               return ERR_PTR(-EINVAL);
+       }
+       if ((flags & ~(TEE_SHM_MAPPED | TEE_SHM_DMA_BUF))) {
+               dev_err(teedev->dev.parent, "invalid shm flags 0x%x", flags);
+               return ERR_PTR(-EINVAL);
+       }
+       if (!tee_device_get(teedev))
+               return ERR_PTR(-EINVAL);
+       if (!teedev->pool) {
+               /* teedev has been detached from driver */
+               ret = ERR_PTR(-EINVAL);
+               goto err_dev_put;
+       }
+       shm = kzalloc(sizeof(*shm), GFP_KERNEL);
+       if (!shm) {
+               ret = ERR_PTR(-ENOMEM);
+               goto err_dev_put;
+       }
+       shm->flags = flags;
+       shm->teedev = teedev;
+       shm->ctx = ctx;
+       if (flags & TEE_SHM_DMA_BUF)
+               poolm = &teedev->pool->dma_buf_mgr;
+       else
+               poolm = &teedev->pool->private_mgr;
+       rc = poolm->ops->alloc(poolm, shm, size);
+       if (rc) {
+               ret = ERR_PTR(rc);
+               goto err_kfree;
+       }
+       mutex_lock(&teedev->mutex);
+       shm->id = idr_alloc(&teedev->idr, shm, 1, 0, GFP_KERNEL);
+       mutex_unlock(&teedev->mutex);
+       if (shm->id < 0) {
+               ret = ERR_PTR(shm->id);
+               goto err_pool_free;
+       }
+       if (flags & TEE_SHM_DMA_BUF) {
+               DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
+               exp_info.ops = &tee_shm_dma_buf_ops;
+               exp_info.size = shm->size;
+               exp_info.flags = O_RDWR;
+               exp_info.priv = shm;
+               shm->dmabuf = dma_buf_export(&exp_info);
+               if (IS_ERR(shm->dmabuf)) {
+                       ret = ERR_CAST(shm->dmabuf);
+                       goto err_rem;
+               }
+       }
+       mutex_lock(&teedev->mutex);
+       list_add_tail(&shm->link, &ctx->list_shm);
+       mutex_unlock(&teedev->mutex);
+       return shm;
+ err_rem:
+       mutex_lock(&teedev->mutex);
+       idr_remove(&teedev->idr, shm->id);
+       mutex_unlock(&teedev->mutex);
+ err_pool_free:
+       poolm->ops->free(poolm, shm);
+ err_kfree:
+       kfree(shm);
+ err_dev_put:
+       tee_device_put(teedev);
+       return ret;
+ }
+ EXPORT_SYMBOL_GPL(tee_shm_alloc);
+ /**
+  * tee_shm_get_fd() - Increase reference count and return file descriptor
+  * @shm:      Shared memory handle
+  * @returns user space file descriptor to shared memory
+  */
+ int tee_shm_get_fd(struct tee_shm *shm)
+ {
+       u32 req_flags = TEE_SHM_MAPPED | TEE_SHM_DMA_BUF;
+       int fd;
+       if ((shm->flags & req_flags) != req_flags)
+               return -EINVAL;
+       fd = dma_buf_fd(shm->dmabuf, O_CLOEXEC);
+       if (fd >= 0)
+               get_dma_buf(shm->dmabuf);
+       return fd;
+ }
+ /**
+  * tee_shm_free() - Free shared memory
+  * @shm:      Handle to shared memory to free
+  */
+ void tee_shm_free(struct tee_shm *shm)
+ {
+       /*
+        * dma_buf_put() decreases the dmabuf reference counter and will
+        * call tee_shm_release() when the last reference is gone.
+        *
+        * In the case of driver private memory we call tee_shm_release
+        * directly instead as it doesn't have a reference counter.
+        */
+       if (shm->flags & TEE_SHM_DMA_BUF)
+               dma_buf_put(shm->dmabuf);
+       else
+               tee_shm_release(shm);
+ }
+ EXPORT_SYMBOL_GPL(tee_shm_free);
+ /**
+  * tee_shm_va2pa() - Get physical address of a virtual address
+  * @shm:      Shared memory handle
+  * @va:               Virtual address to tranlsate
+  * @pa:               Returned physical address
+  * @returns 0 on success and < 0 on failure
+  */
+ int tee_shm_va2pa(struct tee_shm *shm, void *va, phys_addr_t *pa)
+ {
+       /* Check that we're in the range of the shm */
+       if ((char *)va < (char *)shm->kaddr)
+               return -EINVAL;
+       if ((char *)va >= ((char *)shm->kaddr + shm->size))
+               return -EINVAL;
+       return tee_shm_get_pa(
+                       shm, (unsigned long)va - (unsigned long)shm->kaddr, pa);
+ }
+ EXPORT_SYMBOL_GPL(tee_shm_va2pa);
+ /**
+  * tee_shm_pa2va() - Get virtual address of a physical address
+  * @shm:      Shared memory handle
+  * @pa:               Physical address to tranlsate
+  * @va:               Returned virtual address
+  * @returns 0 on success and < 0 on failure
+  */
+ int tee_shm_pa2va(struct tee_shm *shm, phys_addr_t pa, void **va)
+ {
+       /* Check that we're in the range of the shm */
+       if (pa < shm->paddr)
+               return -EINVAL;
+       if (pa >= (shm->paddr + shm->size))
+               return -EINVAL;
+       if (va) {
+               void *v = tee_shm_get_va(shm, pa - shm->paddr);
+               if (IS_ERR(v))
+                       return PTR_ERR(v);
+               *va = v;
+       }
+       return 0;
+ }
+ EXPORT_SYMBOL_GPL(tee_shm_pa2va);
+ /**
+  * tee_shm_get_va() - Get virtual address of a shared memory plus an offset
+  * @shm:      Shared memory handle
+  * @offs:     Offset from start of this shared memory
+  * @returns virtual address of the shared memory + offs if offs is within
+  *    the bounds of this shared memory, else an ERR_PTR
+  */
+ void *tee_shm_get_va(struct tee_shm *shm, size_t offs)
+ {
+       if (offs >= shm->size)
+               return ERR_PTR(-EINVAL);
+       return (char *)shm->kaddr + offs;
+ }
+ EXPORT_SYMBOL_GPL(tee_shm_get_va);
+ /**
+  * tee_shm_get_pa() - Get physical address of a shared memory plus an offset
+  * @shm:      Shared memory handle
+  * @offs:     Offset from start of this shared memory
+  * @pa:               Physical address to return
+  * @returns 0 if offs is within the bounds of this shared memory, else an
+  *    error code.
+  */
+ int tee_shm_get_pa(struct tee_shm *shm, size_t offs, phys_addr_t *pa)
+ {
+       if (offs >= shm->size)
+               return -EINVAL;
+       if (pa)
+               *pa = shm->paddr + offs;
+       return 0;
+ }
+ EXPORT_SYMBOL_GPL(tee_shm_get_pa);
+ /**
+  * tee_shm_get_from_id() - Find shared memory object and increase reference
+  * count
+  * @ctx:      Context owning the shared memory
+  * @id:               Id of shared memory object
+  * @returns a pointer to 'struct tee_shm' on success or an ERR_PTR on failure
+  */
+ struct tee_shm *tee_shm_get_from_id(struct tee_context *ctx, int id)
+ {
+       struct tee_device *teedev;
+       struct tee_shm *shm;
+       if (!ctx)
+               return ERR_PTR(-EINVAL);
+       teedev = ctx->teedev;
+       mutex_lock(&teedev->mutex);
+       shm = idr_find(&teedev->idr, id);
+       if (!shm || shm->ctx != ctx)
+               shm = ERR_PTR(-EINVAL);
+       else if (shm->flags & TEE_SHM_DMA_BUF)
+               get_dma_buf(shm->dmabuf);
+       mutex_unlock(&teedev->mutex);
+       return shm;
+ }
+ EXPORT_SYMBOL_GPL(tee_shm_get_from_id);
+ /**
+  * tee_shm_get_id() - Get id of a shared memory object
+  * @shm:      Shared memory handle
+  * @returns id
+  */
+ int tee_shm_get_id(struct tee_shm *shm)
+ {
+       return shm->id;
+ }
+ EXPORT_SYMBOL_GPL(tee_shm_get_id);
+ /**
+  * tee_shm_put() - Decrease reference count on a shared memory handle
+  * @shm:      Shared memory handle
+  */
+ void tee_shm_put(struct tee_shm *shm)
+ {
+       if (shm->flags & TEE_SHM_DMA_BUF)
+               dma_buf_put(shm->dmabuf);
+ }
+ EXPORT_SYMBOL_GPL(tee_shm_put);
This page took 0.153246 seconds and 4 git commands to generate.