Merge branches 'x86/amd', 'x86/vt-d', 'arm/exynos', 'arm/mediatek', 'arm/msm', 'arm...
authorJoerg Roedel <jroedel@suse.de>
Tue, 26 Jul 2016 14:02:37 +0000 (16:02 +0200)
committerJoerg Roedel <jroedel@suse.de>
Tue, 26 Jul 2016 14:02:37 +0000 (16:02 +0200)
1  2  3  4  5  6  7  8  9 
MAINTAINERS
drivers/iommu/Kconfig
drivers/iommu/Makefile
drivers/iommu/intel-iommu.c
drivers/iommu/iommu.c

diff --combined MAINTAINERS
index 8c20323d127744f86edb0d9d4f565c79bd13fe1e,16700e4fcc4a2d89f2e5087d6fc611e35190f2ca,16700e4fcc4a2d89f2e5087d6fc611e35190f2ca,16700e4fcc4a2d89f2e5087d6fc611e35190f2ca,16700e4fcc4a2d89f2e5087d6fc611e35190f2ca,e1b090f86e0dd1ae4bf328f93b74f5d00236dbc8,952fd2aba7b7f15119ab5371521c13d7804f5ae0,1209323b7e43f372b65d0b1db48c0cfc0f6a9973,47b8ab3543795c91e3902a358b10c50033dacfc3..2dfccbcc3d702e9be92fea14003e6ec4ffcad1a9
@@@@@@@@@@ -595,10 -595,6 -595,6 -595,6 -595,6 -595,6 -595,6 -595,10 -595,10 +595,10 @@@@@@@@@@ S:      Odd Fixe
         L:     linux-alpha@vger.kernel.org
         F:     arch/alpha/
         
 ++++++  ALPS PS/2 TOUCHPAD DRIVER
 ++++++  R:     Pali Rohár <pali.rohar@gmail.com>
 ++++++  F:     drivers/input/mouse/alps.*
 ++++++  
         ALTERA MAILBOX DRIVER
         M:     Ley Foon Tan <lftan@altera.com>
         L:     nios2-dev@lists.rocketboards.org (moderated for non-subscribers)
@@@@@@@@@@ -1163,7 -1159,6 -1159,6 -1159,6 -1159,6 -1159,7 -1159,7 -1163,7 -1163,7 +1163,7 @@@@@@@@@@ F:        arch/arm/mach-footbridge
         ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
         M:     Shawn Guo <shawnguo@kernel.org>
         M:     Sascha Hauer <kernel@pengutronix.de>
 ++++    R:     Fabio Estevam <fabio.estevam@nxp.com>
         L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
         S:     Maintained
         T:     git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git
@@@@@@@@@@ -1694,6 -1689,8 -1689,8 -1689,8 -1689,8 -1690,8 -1690,8 -1694,8 -1694,8 +1694,6 @@@@@@@@@@ S:        Maintaine
         F:     drivers/edac/altera_edac.
         
         ARM/STI ARCHITECTURE
 --------M:     Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
 --------M:     Maxime Coquelin <maxime.coquelin@st.com>
         M:     Patrice Chotard <patrice.chotard@st.com>
         L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
         L:     kernel@stlinux.com
@@@@@@@@@@ -1726,7 -1723,6 -1723,6 -1723,6 -1723,6 -1724,6 -1724,6 -1728,6 -1728,6 +1726,7 @@@@@@@@@@ F:        drivers/ata/ahci_st.
         
         ARM/STM32 ARCHITECTURE
         M:     Maxime Coquelin <mcoquelin.stm32@gmail.com>
 ++++++++M:     Alexandre Torgue <alexandre.torgue@st.com>
         L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
         S:     Maintained
         T:     git git://git.kernel.org/pub/scm/linux/kernel/git/mcoquelin/stm32.git
@@@@@@@@@@ -2246,8 -2242,7 -2242,7 -2242,7 -2242,7 -2243,8 -2243,8 -2247,8 -2247,8 +2246,8 @@@@@@@@@@ F:        include/net/ax25.
         F:     net/ax25/
         
         AZ6007 DVB DRIVER
 ----    M:     Mauro Carvalho Chehab <mchehab@osg.samsung.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@s-opensource.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@kernel.org>
         L:     linux-media@vger.kernel.org
         W:     https://linuxtv.org
         T:     git git://linuxtv.org/media_tree.git
@@@@@@@@@@ -2714,8 -2709,7 -2709,7 -2709,7 -2709,7 -2711,8 -2711,8 -2715,8 -2715,8 +2714,8 @@@@@@@@@@ F:        Documentation/filesystems/btrfs.tx
         F:     fs/btrfs/
         
         BTTV VIDEO4LINUX DRIVER
 ----    M:     Mauro Carvalho Chehab <mchehab@osg.samsung.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@s-opensource.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@kernel.org>
         L:     linux-media@vger.kernel.org
         W:     https://linuxtv.org
         T:     git git://linuxtv.org/media_tree.git
@@@@@@@@@@ -2779,9 -2773,9 -2773,9 -2773,9 -2773,9 -2776,9 -2776,9 -2780,9 -2780,9 +2779,9 @@@@@@@@@@ F:        include/net/caif
         F:     net/caif/
         
         CALGARY x86-64 IOMMU
 -----   M:     Muli Ben-Yehuda <muli@il.ibm.com>
 -----   M:     "Jon D. Mason" <jdmason@kudzu.us>
 -----   L:     discuss@x86-64.org
 +++++   M:     Muli Ben-Yehuda <mulix@mulix.org>
 +++++   M:     Jon Mason <jdmason@kudzu.us>
 +++++   L:     iommu@lists.linux-foundation.org
         S:     Maintained
         F:     arch/x86/kernel/pci-calgary_64.c
         F:     arch/x86/kernel/tce_64.c
@@@@@@@@@@ -3350,8 -3344,7 -3344,7 -3344,7 -3344,7 -3347,8 -3347,8 -3351,8 -3351,8 +3350,8 @@@@@@@@@@ S:        Maintaine
         F:     drivers/media/dvb-frontends/cx24120*
         
         CX88 VIDEO4LINUX DRIVER
 ----    M:     Mauro Carvalho Chehab <mchehab@osg.samsung.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@s-opensource.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@kernel.org>
         L:     linux-media@vger.kernel.org
         W:     https://linuxtv.org
         T:     git git://linuxtv.org/media_tree.git
@@@@@@@@@@ -3781,7 -3774,6 -3774,6 -3774,6 -3774,6 -3778,7 -3778,7 -3782,7 -3782,7 +3781,7 @@@@@@@@@@ Q:        https://patchwork.kernel.org/project
         S:     Maintained
         F:     drivers/dma/
         F:     include/linux/dmaengine.h
 ++++    F:     Documentation/devicetree/bindings/dma/
         F:     Documentation/dmaengine/
         T:     git git://git.infradead.org/users/vkoul/slave-dma.git
         
@@@@@@@@@@ -4299,8 -4291,7 -4291,7 -4291,7 -4291,7 -4296,8 -4296,8 -4300,8 -4300,8 +4299,8 @@@@@@@@@@ F:        fs/ecryptfs
         EDAC-CORE
         M:     Doug Thompson <dougthompson@xmission.com>
         M:     Borislav Petkov <bp@alien8.de>
 ----    M:     Mauro Carvalho Chehab <mchehab@osg.samsung.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@s-opensource.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@kernel.org>
         L:     linux-edac@vger.kernel.org
         T:     git git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git for-next
         T:     git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac.git linux_next
@@@@@@@@@@ -4345,8 -4336,7 -4336,7 -4336,7 -4336,7 -4342,8 -4342,8 -4346,8 -4346,8 +4345,8 @@@@@@@@@@ S:        Maintaine
         F:     drivers/edac/e7xxx_edac.c
         
         EDAC-GHES
 ----    M:     Mauro Carvalho Chehab <mchehab@osg.samsung.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@s-opensource.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@kernel.org>
         L:     linux-edac@vger.kernel.org
         S:     Maintained
         F:     drivers/edac/ghes_edac.c
@@@@@@@@@@ -4370,22 -4360,19 -4360,19 -4360,19 -4360,19 -4367,22 -4367,22 -4371,22 -4371,22 +4370,22 @@@@@@@@@@ S:      Maintaine
         F:     drivers/edac/i5000_edac.c
         
         EDAC-I5400
 ----    M:     Mauro Carvalho Chehab <mchehab@osg.samsung.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@s-opensource.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@kernel.org>
         L:     linux-edac@vger.kernel.org
         S:     Maintained
         F:     drivers/edac/i5400_edac.c
         
         EDAC-I7300
 ----    M:     Mauro Carvalho Chehab <mchehab@osg.samsung.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@s-opensource.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@kernel.org>
         L:     linux-edac@vger.kernel.org
         S:     Maintained
         F:     drivers/edac/i7300_edac.c
         
         EDAC-I7CORE
 ----    M:     Mauro Carvalho Chehab <mchehab@osg.samsung.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@s-opensource.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@kernel.org>
         L:     linux-edac@vger.kernel.org
         S:     Maintained
         F:     drivers/edac/i7core_edac.c
@@@@@@@@@@ -4422,8 -4409,7 -4409,7 -4409,7 -4409,7 -4419,8 -4419,8 -4423,8 -4423,8 +4422,8 @@@@@@@@@@ S:        Maintaine
         F:     drivers/edac/r82600_edac.c
         
         EDAC-SBRIDGE
 ----    M:     Mauro Carvalho Chehab <mchehab@osg.samsung.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@s-opensource.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@kernel.org>
         L:     linux-edac@vger.kernel.org
         S:     Maintained
         F:     drivers/edac/sb_edac.c
         F:     fs/efs/
         
         EHEA (IBM pSeries eHEA 10Gb ethernet adapter) DRIVER
 --------M:     Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
 ++++++++M:     Douglas Miller <dougmill@linux.vnet.ibm.com>
         L:     netdev@vger.kernel.org
         S:     Maintained
         F:     drivers/net/ethernet/ibm/ehea/
         
         EM28XX VIDEO4LINUX DRIVER
 ----    M:     Mauro Carvalho Chehab <mchehab@osg.samsung.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@s-opensource.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@kernel.org>
         L:     linux-media@vger.kernel.org
         W:     https://linuxtv.org
         T:     git git://linuxtv.org/media_tree.git
@@@@@@@@@@ -6144,6 -6129,6 -6129,6 -6129,6 -6129,6 -6141,6 -6141,6 -6145,6 -6145,7 +6144,7 @@@@@@@@@@ M:        Joerg Roedel <joro@8bytes.org
         L:     iommu@lists.linux-foundation.org
         T:     git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
         S:     Maintained
++++++++ F:     Documentation/devicetree/bindings/iommu/
         F:     drivers/iommu/
         
         IP MASQUERADING
@@@@@@@@@@ -6502,7 -6487,6 -6487,6 -6487,6 -6487,6 -6499,7 -6499,7 -6503,7 -6504,7 +6503,7 @@@@@@@@@@ F:        include/uapi/linux/sunrpc
         
         KERNEL SELFTEST FRAMEWORK
         M:     Shuah Khan <shuahkh@osg.samsung.com>
 ++++    M:     Shuah Khan <shuah@kernel.org>
         L:     linux-kselftest@vger.kernel.org
         T:     git git://git.kernel.org/pub/scm/shuah/linux-kselftest
         S:     Maintained
@@@@@@@@@@ -7374,8 -7358,7 -7358,7 -7358,7 -7358,7 -7371,8 -7371,8 -7375,8 -7376,8 +7375,8 @@@@@@@@@@ S:        Supporte
         F:     drivers/media/pci/netup_unidvb/*
         
         MEDIA INPUT INFRASTRUCTURE (V4L/DVB)
 ----    M:     Mauro Carvalho Chehab <mchehab@osg.samsung.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@s-opensource.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@kernel.org>
         P:     LinuxTV.org Project
         L:     linux-media@vger.kernel.org
         W:     https://linuxtv.org
@@@@@@@@@@ -7423,7 -7406,7 -7406,7 -7406,7 -7406,7 -7420,7 -7420,7 -7424,7 -7425,7 +7424,7 @@@@@@@@@@ F:        drivers/scsi/megaraid.
         F:     drivers/scsi/megaraid/
         
         MELLANOX ETHERNET DRIVER (mlx4_en)
 ------  M:     Eugenia Emantayev <eugenia@mellanox.com>
 ++++++  M:     Tariq Toukan <tariqt@mellanox.com>
         L:     netdev@vger.kernel.org
         S:     Supported
         W:     http://www.mellanox.com
@@@@@@@@@@ -7475,7 -7458,6 -7458,6 -7458,6 -7458,6 -7472,6 -7472,6 -7476,6 -7477,6 +7476,7 @@@@@@@@@@ Q:        http://patchwork.ozlabs.org/project/
         T:     git git://git.infradead.org/linux-mtd.git
         T:     git git://git.infradead.org/l2-mtd.git
         S:     Maintained
 ++++++++F:     Documentation/devicetree/bindings/mtd/
         F:     drivers/mtd/
         F:     include/linux/mtd/
         F:     include/uapi/mtd/
@@@@@@@@@@ -8963,7 -8945,6 -8945,6 -8945,6 -8945,6 -8959,6 -8959,6 -8963,7 -8964,7 +8964,7 @@@@@@@@@@ L:        linux-gpio@vger.kernel.or
         T:     git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git
         S:     Maintained
         F:     Documentation/devicetree/bindings/pinctrl/
 ++++++  F:     Documentation/pinctrl.txt
         F:     drivers/pinctrl/
         F:     include/linux/pinctrl/
         
@@@@@@@@@@ -9871,8 -9852,7 -9852,7 -9852,7 -9852,7 -9866,8 -9866,8 -9871,8 -9872,8 +9872,8 @@@@@@@@@@ S:        Odd Fixe
         F:     drivers/media/i2c/saa6588*
         
         SAA7134 VIDEO4LINUX DRIVER
 ----    M:     Mauro Carvalho Chehab <mchehab@osg.samsung.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@s-opensource.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@kernel.org>
         L:     linux-media@vger.kernel.org
         W:     https://linuxtv.org
         T:     git git://linuxtv.org/media_tree.git
@@@@@@@@@@ -10391,8 -10371,7 -10371,7 -10371,7 -10371,7 -10386,8 -10386,8 -10391,8 -10392,8 +10392,8 @@@@@@@@@@ S:      Maintaine
         F:     drivers/media/radio/si4713/radio-usb-si4713.c
         
         SIANO DVB DRIVER
 ----    M:     Mauro Carvalho Chehab <mchehab@osg.samsung.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@s-opensource.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@kernel.org>
         L:     linux-media@vger.kernel.org
         W:     https://linuxtv.org
         T:     git git://linuxtv.org/media_tree.git
@@@@@@@@@@ -11158,8 -11137,7 -11137,7 -11137,7 -11137,7 -11153,8 -11153,8 -11158,8 -11159,8 +11159,8 @@@@@@@@@@ S:      Maintaine
         F:     drivers/media/i2c/tda9840*
         
         TEA5761 TUNER DRIVER
 ----    M:     Mauro Carvalho Chehab <mchehab@osg.samsung.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@s-opensource.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@kernel.org>
         L:     linux-media@vger.kernel.org
         W:     https://linuxtv.org
         T:     git git://linuxtv.org/media_tree.git
@@@@@@@@@@ -11167,8 -11145,7 -11145,7 -11145,7 -11145,7 -11162,8 -11162,8 -11167,8 -11168,8 +11168,8 @@@@@@@@@@ S:      Odd fixe
         F:     drivers/media/tuners/tea5761.*
         
         TEA5767 TUNER DRIVER
 ----    M:     Mauro Carvalho Chehab <mchehab@osg.samsung.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@s-opensource.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@kernel.org>
         L:     linux-media@vger.kernel.org
         W:     https://linuxtv.org
         T:     git git://linuxtv.org/media_tree.git
@@@@@@@@@@ -11555,8 -11532,7 -11532,7 -11532,7 -11532,7 -11550,8 -11550,8 -11555,8 -11556,8 +11556,8 @@@@@@@@@@ F:      include/linux/shmem_fs.
         F:     mm/shmem.c
         
         TM6000 VIDEO4LINUX DRIVER
 ----    M:     Mauro Carvalho Chehab <mchehab@osg.samsung.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@s-opensource.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@kernel.org>
         L:     linux-media@vger.kernel.org
         W:     https://linuxtv.org
         T:     git git://linuxtv.org/media_tree.git
@@@@@@@@@@ -11910,8 -11886,7 -11886,7 -11886,7 -11886,7 -11905,8 -11905,8 -11910,8 -11911,8 +11911,8 @@@@@@@@@@ F:      drivers/usb/common/usb-otg-fsm.
         
         USB OVER IP DRIVER
         M:     Valentina Manea <valentina.manea.m@gmail.com>
 ----    M:     Shuah Khan <shuah.kh@samsung.com>
 ++++    M:     Shuah Khan <shuahkh@osg.samsung.com>
 ++++    M:     Shuah Khan <shuah@kernel.org>
         L:     linux-usb@vger.kernel.org
         S:     Maintained
         F:     Documentation/usb/usbip_protocol.txt
@@@@@@@@@@ -11982,7 -11957,6 -11957,6 -11957,6 -11957,6 -11977,7 -11977,7 -11982,7 -11983,7 +11983,7 @@@@@@@@@@ L:      linux-usb@vger.kernel.or
         W:     http://www.linux-usb.org
         T:     git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
         S:     Supported
 ++++    F:     Documentation/devicetree/bindings/usb/
         F:     Documentation/usb/
         F:     drivers/usb/
         F:     include/linux/usb.h
@@@@@@@@@@ -12156,7 -12130,6 -12130,6 -12130,6 -12130,6 -12151,7 -12151,7 -12156,7 -12157,7 +12157,7 @@@@@@@@@@ VIRTIO CORE, NET AND BLOCK DRIVER
         M:     "Michael S. Tsirkin" <mst@redhat.com>
         L:     virtualization@lists.linux-foundation.org
         S:     Maintained
 ++++    F:     Documentation/devicetree/bindings/virtio/
         F:     drivers/virtio/
         F:     tools/virtio/
         F:     drivers/net/virtio_net.c
@@@@@@@@@@ -12545,8 -12518,7 -12518,7 -12518,7 -12518,7 -12540,8 -12540,8 -12545,8 -12546,8 +12546,8 @@@@@@@@@@ S:      Maintaine
         F:     arch/x86/entry/vdso/
         
         XC2028/3028 TUNER DRIVER
 ----    M:     Mauro Carvalho Chehab <mchehab@osg.samsung.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@s-opensource.com>
 ++++    M:     Mauro Carvalho Chehab <mchehab@kernel.org>
         L:     linux-media@vger.kernel.org
         W:     https://linuxtv.org
         T:     git git://linuxtv.org/media_tree.git
diff --combined drivers/iommu/Kconfig
index ad0860383cb37b2dd526ea8deb22d849790be3f8,0b1aabb12de9539fd44a0a1e5e9a948548605e5a,ad0860383cb37b2dd526ea8deb22d849790be3f8,ad0860383cb37b2dd526ea8deb22d849790be3f8,32bb1e5a409191b08df93a21b47adcb9f4065a55,f5f4d1472771701760195d1ce12520d49c0c9bd5,ad0860383cb37b2dd526ea8deb22d849790be3f8,ad0860383cb37b2dd526ea8deb22d849790be3f8,ad0860383cb37b2dd526ea8deb22d849790be3f8..d432ca828472c5bff3830e172ce20bff5d84cb9f
@@@@@@@@@@ -89,8 -89,8 -89,8 -89,8 -89,8 -89,8 -89,8 -89,8 -89,8 +89,8 @@@@@@@@@@ config MSM_IOMM
                bool "MSM IOMMU Support"
                depends on ARM
                depends on ARCH_MSM8X60 || ARCH_MSM8960 || COMPILE_TEST
----- ---       depends on BROKEN
                select IOMMU_API
+++++ +++       select IOMMU_IO_PGTABLE_ARMV7S
                help
                  Support for the IOMMUs found on certain Qualcomm SOCs.
                  These IOMMUs allow virtualization of the address space used by most
@@@@@@@@@@ -111,6 -111,7 -111,6 -111,6 -111,6 -111,6 -111,6 -111,6 -111,6 +111,7 @@@@@@@@@@ config AMD_IOMM
                select PCI_PRI
                select PCI_PASID
                select IOMMU_API
+ +++++++       select IOMMU_IOVA
                depends on X86_64 && PCI && ACPI
                ---help---
                  With this option you can enable support for AMD IOMMU hardware in
@@@@@@@@@@ -343,4 -344,4 -343,4 -343,4 -343,22 -343,4 -343,4 -343,4 -343,4 +344,22 @@@@@@@@@@ config MTK_IOMM
         
                  If unsure, say N here.
         
++++ ++++config MTK_IOMMU_V1
++++ ++++       bool "MTK IOMMU Version 1 (M4U gen1) Support"
++++ ++++       depends on ARM
++++ ++++       depends on ARCH_MEDIATEK || COMPILE_TEST
++++ ++++       select ARM_DMA_USE_IOMMU
++++ ++++       select IOMMU_API
++++ ++++       select MEMORY
++++ ++++       select MTK_SMI
++++ ++++       select COMMON_CLK_MT2701_MMSYS
++++ ++++       select COMMON_CLK_MT2701_IMGSYS
++++ ++++       select COMMON_CLK_MT2701_VDECSYS
++++ ++++       help
++++ ++++         Support for the M4U on certain Mediatek SoCs. M4U generation 1 HW is
++++ ++++         Multimedia Memory Managememt Unit. This option enables remapping of
++++ ++++         DMA memory accesses for the multimedia subsystem.
++++ ++++
++++ ++++         if unsure, say N here.
++++ ++++
         endif # IOMMU_SUPPORT
diff --combined drivers/iommu/Makefile
index c6edb31bf8c65ce7d7cf62a9372608115d10cfcb,c6edb31bf8c65ce7d7cf62a9372608115d10cfcb,c6edb31bf8c65ce7d7cf62a9372608115d10cfcb,c6edb31bf8c65ce7d7cf62a9372608115d10cfcb,778baf5714e1d8e589eae6dd5408c3aebeec0b6c,7fe479fb277061077d26724b3b58c7c25926492c,c6edb31bf8c65ce7d7cf62a9372608115d10cfcb,c6edb31bf8c65ce7d7cf62a9372608115d10cfcb,c6edb31bf8c65ce7d7cf62a9372608115d10cfcb..195f7b997d8e9a4dc97e2713d0740267e0a21d80
@@@@@@@@@@ -7,7 -7,7 -7,7 -7,7 -7,7 -7,7 -7,7 -7,7 -7,7 +7,7 @@@@@@@@@@ obj-$(CONFIG_IOMMU_IO_PGTABLE_ARMV7S) +
         obj-$(CONFIG_IOMMU_IO_PGTABLE_LPAE) += io-pgtable-arm.o
         obj-$(CONFIG_IOMMU_IOVA) += iova.o
         obj-$(CONFIG_OF_IOMMU) += of_iommu.o
----- ---obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o msm_iommu_dev.o
+++++ +++obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o
         obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o amd_iommu_init.o
         obj-$(CONFIG_AMD_IOMMU_V2) += amd_iommu_v2.o
         obj-$(CONFIG_ARM_SMMU) += arm-smmu.o
@@@@@@@@@@ -18,6 -18,6 -18,6 -18,6 -18,7 -18,6 -18,6 -18,6 -18,6 +18,7 @@@@@@@@@@ obj-$(CONFIG_INTEL_IOMMU_SVM) += intel-
         obj-$(CONFIG_IPMMU_VMSA) += ipmmu-vmsa.o
         obj-$(CONFIG_IRQ_REMAP) += intel_irq_remapping.o irq_remapping.o
         obj-$(CONFIG_MTK_IOMMU) += mtk_iommu.o
++++ ++++obj-$(CONFIG_MTK_IOMMU_V1) += mtk_iommu_v1.o
         obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o
         obj-$(CONFIG_OMAP_IOMMU_DEBUG) += omap-iommu-debug.o
         obj-$(CONFIG_ROCKCHIP_IOMMU) += rockchip-iommu.o
index 323dac9900ba3cc0a0c1351dfc39de86b4cb06ab,a644d0cec2d8275d202fd3d871673b7787dd258c,0a97a6da407c7d5f33c4705651c649dc92522d8c,a644d0cec2d8275d202fd3d871673b7787dd258c,a644d0cec2d8275d202fd3d871673b7787dd258c,10700945994eed2e470c92d267c0bb5723ed0d1a,10700945994eed2e470c92d267c0bb5723ed0d1a,323dac9900ba3cc0a0c1351dfc39de86b4cb06ab,cfe410eedaf0b9e7188ca462a4072443b3162bac..9d2938e12aa3a58c8b17f10049e83e1b9c384fed
@@@@@@@@@@ -1672,7 -1672,7 -1672,7 -1672,7 -1672,7 -1672,7 -1672,7 -1672,7 -1672,7 +1672,7 @@@@@@@@@@ static int iommu_init_domains(struct in
                        return -ENOMEM;
                }
         
-- ------       size = ((ndomains >> 8) + 1) * sizeof(struct dmar_domain **);
++ ++++++       size = (ALIGN(ndomains, 256) >> 8) * sizeof(struct dmar_domain **);
                iommu->domains = kzalloc(size, GFP_KERNEL);
         
                if (iommu->domains) {
@@@@@@@@@@ -1737,7 -1737,7 -1737,7 -1737,7 -1737,7 -1737,7 -1737,7 -1737,7 -1737,7 +1737,7 @@@@@@@@@@ static void disable_dmar_iommu(struct i
         static void free_dmar_iommu(struct intel_iommu *iommu)
         {
                if ((iommu->domains) && (iommu->domain_ids)) {
-- ------               int elems = (cap_ndoms(iommu->cap) >> 8) + 1;
++ ++++++               int elems = ALIGN(cap_ndoms(iommu->cap), 256) >> 8;
                        int i;
         
                        for (i = 0; i < elems; i++)
                spin_unlock(&iommu->lock);
                spin_unlock_irqrestore(&device_domain_lock, flags);
         
-- ------       return 0;
++ ++++++       return ret;
         }
         
         struct domain_context_mapping_data {
@@@@@@@@@@ -3222,6 -3222,11 -3222,11 -3222,11 -3222,11 -3222,6 -3222,6 -3222,6 -3222,6 +3222,6 @@@@@@@@@@ static int __init init_dmars(void
                                }
                        }
         
 ----                   iommu_flush_write_buffer(iommu);
 ----                   iommu_set_root_entry(iommu);
 ----                   iommu->flush.flush_context(iommu, 0, 0, 0, DMA_CCMD_GLOBAL_INVL);
 ----                   iommu->flush.flush_iotlb(iommu, 0, 0, 0, DMA_TLB_GLOBAL_FLUSH);
 ----    
                        if (!ecap_pass_through(iommu->ecap))
                                hw_pass_through = 0;
         #ifdef CONFIG_INTEL_IOMMU_SVM
         #endif
                }
         
 ++++           /*
 ++++            * Now that qi is enabled on all iommus, set the root entry and flush
 ++++            * caches. This is required on some Intel X58 chipsets, otherwise the
 ++++            * flush_context function will loop forever and the boot hangs.
 ++++            */
 ++++           for_each_active_iommu(iommu, drhd) {
 ++++                   iommu_flush_write_buffer(iommu);
 ++++                   iommu_set_root_entry(iommu);
 ++++                   iommu->flush.flush_context(iommu, 0, 0, 0, DMA_CCMD_GLOBAL_INVL);
 ++++                   iommu->flush.flush_iotlb(iommu, 0, 0, 0, DMA_TLB_GLOBAL_FLUSH);
 ++++           }
 ++++    
                if (iommu_pass_through)
                        iommu_identity_mapping |= IDENTMAP_ALL;
         
@@@@@@@@@@ -4602,13 -4595,13 -4595,13 -4595,13 -4595,13 -4602,13 -4602,13 -4602,13 -4602,13 +4602,13 @@@@@@@@@@ static void free_all_cpu_cached_iovas(u
                for (i = 0; i < g_num_of_iommus; i++) {
                        struct intel_iommu *iommu = g_iommus[i];
                        struct dmar_domain *domain;
 ------ -               u16 did;
 ++++++ +               int did;
         
                        if (!iommu)
                                continue;
         
 ------                 for (did = 0; did < 0xffff; did++) {
 ------                         domain = get_iommu_domain(iommu, did);
 ++++++                 for (did = 0; did < cap_ndoms(iommu->cap); did++) {
        -                       domain = get_iommu_domain(iommu, did);
 ++++++ +                       domain = get_iommu_domain(iommu, (u16)did);
         
                                if (!domain)
                                        continue;
diff --combined drivers/iommu/iommu.c
index 3000051f48b40c3e1b9e359e009023ce1e245c4c,e8d2fb02d88e6a361855d0d4d263377ddd1f2961,3000051f48b40c3e1b9e359e009023ce1e245c4c,3000051f48b40c3e1b9e359e009023ce1e245c4c,3000051f48b40c3e1b9e359e009023ce1e245c4c,3000051f48b40c3e1b9e359e009023ce1e245c4c,3000051f48b40c3e1b9e359e009023ce1e245c4c,3000051f48b40c3e1b9e359e009023ce1e245c4c,4d3c4a82af03f574423abdb383a44f716f68d4ac..b06d93594436984fa954982a0cb763206df268c0
         #include <trace/events/iommu.h>
         
         static struct kset *iommu_group_kset;
-------- static struct ida iommu_group_ida;
-------- static struct mutex iommu_group_mutex;
++++++++ static DEFINE_IDA(iommu_group_ida);
         
         struct iommu_callback_data {
                const struct iommu_ops *ops;
@@@@@@@@@@ -144,9 -144,9 -144,9 -144,9 -144,9 -144,9 -144,9 -144,9 -143,7 +143,7 @@@@@@@@@@ static void iommu_group_release(struct 
                if (group->iommu_data_release)
                        group->iommu_data_release(group->iommu_data);
         
--------        mutex_lock(&iommu_group_mutex);
--------        ida_remove(&iommu_group_ida, group->id);
--------        mutex_unlock(&iommu_group_mutex);
++++++++        ida_simple_remove(&iommu_group_ida, group->id);
         
                if (group->default_domain)
                        iommu_domain_free(group->default_domain);
@@@@@@@@@@ -186,26 -186,26 -186,26 -186,26 -186,26 -186,26 -186,26 -186,26 -183,17 +183,17 @@@@@@@@@@ struct iommu_group *iommu_group_alloc(v
                INIT_LIST_HEAD(&group->devices);
                BLOCKING_INIT_NOTIFIER_HEAD(&group->notifier);
         
--------        mutex_lock(&iommu_group_mutex);
-------- 
-------- again:
--------        if (unlikely(0 == ida_pre_get(&iommu_group_ida, GFP_KERNEL))) {
++++++++        ret = ida_simple_get(&iommu_group_ida, 0, 0, GFP_KERNEL);
++++++++        if (ret < 0) {
                        kfree(group);
--------                mutex_unlock(&iommu_group_mutex);
--------                return ERR_PTR(-ENOMEM);
++++++++                return ERR_PTR(ret);
                }
-------- 
--------        if (-EAGAIN == ida_get_new(&iommu_group_ida, &group->id))
--------                goto again;
-------- 
--------        mutex_unlock(&iommu_group_mutex);
++++++++        group->id = ret;
         
                ret = kobject_init_and_add(&group->kobj, &iommu_group_ktype,
                                           NULL, "%d", group->id);
                if (ret) {
--------                mutex_lock(&iommu_group_mutex);
--------                ida_remove(&iommu_group_ida, group->id);
--------                mutex_unlock(&iommu_group_mutex);
++++++++                ida_simple_remove(&iommu_group_ida, group->id);
                        kfree(group);
                        return ERR_PTR(ret);
                }
@@@@@@@@@@ -348,6 -348,9 -348,6 -348,6 -348,6 -348,6 -348,6 -348,6 -336,6 +336,9 @@@@@@@@@@ static int iommu_group_create_direct_ma
                list_for_each_entry(entry, &mappings, list) {
                        dma_addr_t start, end, addr;
         
+ +++++++               if (domain->ops->apply_dm_region)
+ +++++++                       domain->ops->apply_dm_region(dev, domain, entry);
+ +++++++
                        start = ALIGN(entry->start, pg_size);
                        end   = ALIGN(entry->start + entry->length, pg_size);
         
@@@@@@@@@@ -1483,9 -1486,9 -1483,9 -1483,9 -1483,9 -1483,9 -1483,9 -1483,9 -1471,6 +1474,6 @@@@@@@@@@ static int __init iommu_init(void
         {
                iommu_group_kset = kset_create_and_add("iommu_groups",
                                                       NULL, kernel_kobj);
--------        ida_init(&iommu_group_ida);
--------        mutex_init(&iommu_group_mutex);
-------- 
                BUG_ON(!iommu_group_kset);
         
                return 0;