Merge mainline/master into arm/fixes
authorOlof Johansson <olof@lixom.net>
Thu, 5 Dec 2019 21:16:58 +0000 (13:16 -0800)
committerOlof Johansson <olof@lixom.net>
Thu, 5 Dec 2019 21:18:54 +0000 (13:18 -0800)
This brings in the mainline tree right after armsoc contents was merged
this release cycle, so that we can re-run savedefconfig, etc.

Signed-off-by: Olof Johansson <olof@lixom.net>
.mailmap
MAINTAINERS
arch/arm/mach-pxa/icontrol.c
arch/arm64/boot/dts/arm/juno-base.dtsi
arch/arm64/boot/dts/arm/juno-clocks.dtsi
drivers/firmware/arm_scmi/bus.c
drivers/soc/aspeed/aspeed-lpc-snoop.c
drivers/soc/mediatek/mtk-cmdq-helper.c
drivers/tee/optee/call.c
drivers/tee/optee/core.c
drivers/tee/optee/shm_pool.c

index 1fd03c7..c24773d 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -105,6 +105,9 @@ James E Wilson <wilson@specifix.com>
 James Hogan <jhogan@kernel.org> <james.hogan@imgtec.com>
 James Hogan <jhogan@kernel.org> <james@albanarts.com>
 James Ketrenos <jketreno@io.(none)>
+Jan Glauber <jan.glauber@gmail.com> <jang@de.ibm.com>
+Jan Glauber <jan.glauber@gmail.com> <jang@linux.vnet.ibm.com>
+Jan Glauber <jan.glauber@gmail.com> <jglauber@cavium.com>
 Jason Gunthorpe <jgg@ziepe.ca> <jgg@mellanox.com>
 Jason Gunthorpe <jgg@ziepe.ca> <jgunthorpe@obsidianresearch.com>
 Javi Merino <javi.merino@kernel.org> <javi.merino@arm.com>
index 3c6038b..99c9a55 100644 (file)
@@ -1585,8 +1585,8 @@ S:        Maintained
 F:     arch/arm/mach-cns3xxx/
 
 ARM/CAVIUM THUNDER NETWORK DRIVER
-M:     Sunil Goutham <sgoutham@cavium.com>
-M:     Robert Richter <rric@kernel.org>
+M:     Sunil Goutham <sgoutham@marvell.com>
+M:     Robert Richter <rrichter@marvell.com>
 L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 S:     Supported
 F:     drivers/net/ethernet/cavium/thunder/
@@ -3229,8 +3229,7 @@ N:        kona
 F:     arch/arm/mach-bcm/
 
 BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE
-M:     Eric Anholt <eric@anholt.net>
-M:     Stefan Wahren <wahrenst@gmx.net>
+M:     Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
 L:     bcm-kernel-feedback-list@broadcom.com
 L:     linux-rpi-kernel@lists.infradead.org (moderated for non-subscribers)
 L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@ -3743,9 +3742,8 @@ S:        Maintained
 F:     drivers/net/wireless/ath/carl9170/
 
 CAVIUM I2C DRIVER
-M:     Jan Glauber <jglauber@cavium.com>
-M:     David Daney <david.daney@cavium.com>
-W:     http://www.cavium.com
+M:     Robert Richter <rrichter@marvell.com>
+W:     http://www.marvell.com
 S:     Supported
 F:     drivers/i2c/busses/i2c-octeon*
 F:     drivers/i2c/busses/i2c-thunderx*
@@ -3755,27 +3753,25 @@ M:      Derek Chickles <dchickles@marvell.com>
 M:     Satanand Burla <sburla@marvell.com>
 M:     Felix Manlunas <fmanlunas@marvell.com>
 L:     netdev@vger.kernel.org
-W:     http://www.cavium.com
+W:     http://www.marvell.com
 S:     Supported
 F:     drivers/net/ethernet/cavium/liquidio/
 
 CAVIUM MMC DRIVER
-M:     Jan Glauber <jglauber@cavium.com>
-M:     David Daney <david.daney@cavium.com>
-M:     Steven J. Hill <Steven.Hill@cavium.com>
-W:     http://www.cavium.com
+M:     Robert Richter <rrichter@marvell.com>
+W:     http://www.marvell.com
 S:     Supported
 F:     drivers/mmc/host/cavium*
 
 CAVIUM OCTEON-TX CRYPTO DRIVER
-M:     George Cherian <george.cherian@cavium.com>
+M:     George Cherian <gcherian@marvell.com>
 L:     linux-crypto@vger.kernel.org
-W:     http://www.cavium.com
+W:     http://www.marvell.com
 S:     Supported
 F:     drivers/crypto/cavium/cpt/
 
 CAVIUM THUNDERX2 ARM64 SOC
-M:     Robert Richter <rrichter@cavium.com>
+M:     Robert Richter <rrichter@marvell.com>
 L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 S:     Maintained
 F:     arch/arm64/boot/dts/cavium/thunder2-99xx*
@@ -5893,15 +5889,14 @@ F:      drivers/edac/highbank*
 
 EDAC-CAVIUM OCTEON
 M:     Ralf Baechle <ralf@linux-mips.org>
-M:     David Daney <david.daney@cavium.com>
+M:     Robert Richter <rrichter@marvell.com>
 L:     linux-edac@vger.kernel.org
 L:     linux-mips@vger.kernel.org
 S:     Supported
 F:     drivers/edac/octeon_edac*
 
 EDAC-CAVIUM THUNDERX
-M:     David Daney <david.daney@cavium.com>
-M:     Jan Glauber <jglauber@cavium.com>
+M:     Robert Richter <rrichter@marvell.com>
 L:     linux-edac@vger.kernel.org
 S:     Supported
 F:     drivers/edac/thunderx_edac*
@@ -12800,7 +12795,7 @@ F:      Documentation/devicetree/bindings/pci/axis,artpec*
 F:     drivers/pci/controller/dwc/*artpec*
 
 PCIE DRIVER FOR CAVIUM THUNDERX
-M:     David Daney <david.daney@cavium.com>
+M:     Robert Richter <rrichter@marvell.com>
 L:     linux-pci@vger.kernel.org
 L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 S:     Supported
@@ -16373,7 +16368,7 @@ S:      Maintained
 F:     drivers/net/thunderbolt.c
 
 THUNDERX GPIO DRIVER
-M:     David Daney <david.daney@cavium.com>
+M:     Robert Richter <rrichter@marvell.com>
 S:     Maintained
 F:     drivers/gpio/gpio-thunderx.c
 
@@ -18178,10 +18173,9 @@ S:     Supported
 F:     drivers/char/xillybus/
 
 XLP9XX I2C DRIVER
-M:     George Cherian <george.cherian@cavium.com>
-M:     Jan Glauber <jglauber@cavium.com>
+M:     George Cherian <gcherian@marvell.com>
 L:     linux-i2c@vger.kernel.org
-W:     http://www.cavium.com
+W:     http://www.marvell.com
 S:     Supported
 F:     Documentation/devicetree/bindings/i2c/i2c-xlp9xx.txt
 F:     drivers/i2c/busses/i2c-xlp9xx.c
index 0474a4b..151e26e 100644 (file)
@@ -89,7 +89,7 @@ static struct spi_board_info mcp251x_board_info[] = {
                .max_speed_hz    = 6500000,
                .bus_num         = 3,
                .chip_select     = 1,
-               .platform_data   = &mcp251x_info,
+               .properties      = mcp251x_properties,
                .controller_data = &mcp251x_chip_info2,
                .irq             = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ2)
        },
@@ -98,7 +98,7 @@ static struct spi_board_info mcp251x_board_info[] = {
                .max_speed_hz    = 6500000,
                .bus_num         = 4,
                .chip_select     = 0,
-               .platform_data   = &mcp251x_info,
+               .properties      = mcp251x_properties,
                .controller_data = &mcp251x_chip_info3,
                .irq             = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ3)
        },
@@ -107,7 +107,7 @@ static struct spi_board_info mcp251x_board_info[] = {
                .max_speed_hz    = 6500000,
                .bus_num         = 4,
                .chip_select     = 1,
-               .platform_data   = &mcp251x_info,
+               .properties      = mcp251x_properties,
                .controller_data = &mcp251x_chip_info4,
                .irq             = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ4)
        }
index 9e3e8ce..1f3c80a 100644 (file)
@@ -6,7 +6,6 @@
        /*
         *  Devices shared by all Juno boards
         */
-       dma-ranges = <0 0 0 0 0x100 0>;
 
        memtimer: timer@2a810000 {
                compatible = "arm,armv7-timer-mem";
index e5e265d..2870b5e 100644 (file)
@@ -8,10 +8,10 @@
  */
 / {
        /* SoC fixed clocks */
-       soc_uartclk: refclk7273800hz {
+       soc_uartclk: refclk7372800hz {
                compatible = "fixed-clock";
                #clock-cells = <0>;
-               clock-frequency = <7273800>;
+               clock-frequency = <7372800>;
                clock-output-names = "juno:uartclk";
        };
 
index 92f843e..7a30952 100644 (file)
@@ -135,8 +135,10 @@ scmi_device_create(struct device_node *np, struct device *parent, int protocol)
                return NULL;
 
        id = ida_simple_get(&scmi_bus_id, 1, 0, GFP_KERNEL);
-       if (id < 0)
-               goto free_mem;
+       if (id < 0) {
+               kfree(scmi_dev);
+               return NULL;
+       }
 
        scmi_dev->id = id;
        scmi_dev->protocol_id = protocol;
@@ -154,8 +156,6 @@ scmi_device_create(struct device_node *np, struct device *parent, int protocol)
 put_dev:
        put_device(&scmi_dev->dev);
        ida_simple_remove(&scmi_bus_id, id);
-free_mem:
-       kfree(scmi_dev);
        return NULL;
 }
 
index 48f7ac2..f3d8d53 100644 (file)
@@ -97,13 +97,13 @@ static ssize_t snoop_file_read(struct file *file, char __user *buffer,
        return ret ? ret : copied;
 }
 
-static unsigned int snoop_file_poll(struct file *file,
+static __poll_t snoop_file_poll(struct file *file,
                                    struct poll_table_struct *pt)
 {
        struct aspeed_lpc_snoop_channel *chan = snoop_file_to_chan(file);
 
        poll_wait(file, &chan->wq, pt);
-       return !kfifo_is_empty(&chan->fifo) ? POLLIN : 0;
+       return !kfifo_is_empty(&chan->fifo) ? EPOLLIN : 0;
 }
 
 static const struct file_operations snoop_fops = {
index 7aa0517..3c82de5 100644 (file)
@@ -155,7 +155,7 @@ int cmdq_pkt_write_mask(struct cmdq_pkt *pkt, u8 subsys,
                err = cmdq_pkt_append_command(pkt, CMDQ_CODE_MASK, 0, ~mask);
                offset_mask |= CMDQ_WRITE_ENABLE_MASK;
        }
-       err |= cmdq_pkt_write(pkt, value, subsys, offset_mask);
+       err |= cmdq_pkt_write(pkt, subsys, offset_mask, value);
 
        return err;
 }
index 13b0269..cf2367b 100644 (file)
@@ -554,6 +554,13 @@ static int check_mem_type(unsigned long start, size_t num_pages)
        struct mm_struct *mm = current->mm;
        int rc;
 
+       /*
+        * Allow kernel address to register with OP-TEE as kernel
+        * pages are configured as normal memory only.
+        */
+       if (virt_addr_valid(start))
+               return 0;
+
        down_read(&mm->mmap_sem);
        rc = __check_mem_type(find_vma(mm, start),
                              start + num_pages * PAGE_SIZE);
index 1854a3d..b830e0a 100644 (file)
@@ -643,11 +643,6 @@ static struct optee *optee_probe(struct device_node *np)
        if (optee->sec_caps & OPTEE_SMC_SEC_CAP_DYNAMIC_SHM)
                pr_info("dynamic shared memory is enabled\n");
 
-       rc = optee_enumerate_devices();
-       if (rc)
-               goto err;
-
-       pr_info("initialized driver\n");
        return optee;
 err:
        if (optee) {
@@ -702,9 +697,10 @@ static struct optee *optee_svc;
 
 static int __init optee_driver_init(void)
 {
-       struct device_node *fw_np;
-       struct device_node *np;
-       struct optee *optee;
+       struct device_node *fw_np = NULL;
+       struct device_node *np = NULL;
+       struct optee *optee = NULL;
+       int rc = 0;
 
        /* Node is supposed to be below /firmware */
        fw_np = of_find_node_by_name(NULL, "firmware");
@@ -723,6 +719,14 @@ static int __init optee_driver_init(void)
        if (IS_ERR(optee))
                return PTR_ERR(optee);
 
+       rc = optee_enumerate_devices();
+       if (rc) {
+               optee_remove(optee);
+               return rc;
+       }
+
+       pr_info("initialized driver\n");
+
        optee_svc = optee;
 
        return 0;
index de1d9b8..0332a53 100644 (file)
@@ -17,6 +17,7 @@ static int pool_op_alloc(struct tee_shm_pool_mgr *poolm,
 {
        unsigned int order = get_order(size);
        struct page *page;
+       int rc = 0;
 
        page = alloc_pages(GFP_KERNEL | __GFP_ZERO, order);
        if (!page)
@@ -26,12 +27,21 @@ static int pool_op_alloc(struct tee_shm_pool_mgr *poolm,
        shm->paddr = page_to_phys(page);
        shm->size = PAGE_SIZE << order;
 
-       return 0;
+       if (shm->flags & TEE_SHM_DMA_BUF) {
+               shm->flags |= TEE_SHM_REGISTER;
+               rc = optee_shm_register(shm->ctx, shm, &page, 1 << order,
+                                       (unsigned long)shm->kaddr);
+       }
+
+       return rc;
 }
 
 static void pool_op_free(struct tee_shm_pool_mgr *poolm,
                         struct tee_shm *shm)
 {
+       if (shm->flags & TEE_SHM_DMA_BUF)
+               optee_shm_unregister(shm->ctx, shm);
+
        free_pages((unsigned long)shm->kaddr, get_order(shm->size));
        shm->kaddr = NULL;
 }