]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
remoteproc: add name in rproc_mem_entry struct
authorLoic Pallardy <loic.pallardy@st.com>
Fri, 27 Jul 2018 13:14:39 +0000 (15:14 +0200)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Wed, 10 Oct 2018 05:39:05 +0000 (22:39 -0700)
Add name field in struct rproc_mem_entry.
This new field will be used to match memory area
requested in resource table with pre-registered carveout.

Signed-off-by: Loic Pallardy <loic.pallardy@st.com>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/remoteproc_core.c
drivers/remoteproc/remoteproc_debugfs.c
include/linux/remoteproc.h

index 674f88d237b85a16c14796e4111954d2012bb9dc..a2d338fc8ddd515af8d0bbf9c73d1c7bfe5b0c93 100644 (file)
@@ -752,6 +752,7 @@ static int rproc_handle_carveout(struct rproc *rproc,
        carveout->dma = dma;
        carveout->da = rsc->da;
        carveout->release = rproc_release_carveout;
+       strlcpy(carveout->name, rsc->name, sizeof(carveout->name));
 
        list_add_tail(&carveout->node, &rproc->carveouts);
 
index a5c29f2764a34f4d12b3080cbcec30d4fc908506..e90135c64af0761ec37d392921a33aa602829f0f 100644 (file)
@@ -260,6 +260,7 @@ static int rproc_carveouts_show(struct seq_file *seq, void *p)
 
        list_for_each_entry(carveout, &rproc->carveouts, node) {
                seq_puts(seq, "Carveout memory entry:\n");
+               seq_printf(seq, "\tName: %s\n", carveout->name);
                seq_printf(seq, "\tVirtual address: %pK\n", carveout->va);
                seq_printf(seq, "\tDMA address: %pad\n", &carveout->dma);
                seq_printf(seq, "\tDevice address: 0x%x\n", carveout->da);
index 4116e92d4b3d1c1095b751f7746a34f4e810d30e..19908c930f47a2bbb937dff9ea35a2a4d416cfdd 100644 (file)
@@ -315,6 +315,7 @@ struct rproc;
  * @da: device address
  * @release: release associated memory
  * @priv: associated data
+ * @name: associated memory region name (optional)
  * @node: list node
  */
 struct rproc_mem_entry {
@@ -323,6 +324,7 @@ struct rproc_mem_entry {
        int len;
        u32 da;
        void *priv;
+       char name[32];
        struct list_head node;
        int (*release)(struct rproc *rproc, struct rproc_mem_entry *mem);
 };