Revert "remoteproc: Add new get_loaded_rsc_table() to rproc_ops"
This reverts commit 7b95472049
which is
commit 1a631382be1d22ddab0582dae3498b3d28e2e44a upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: I6b803ae688ecf0106b12c244b953c3fd1605d6de
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -1548,32 +1548,6 @@ disable_iommu:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rproc_set_rsc_table(struct rproc *rproc)
|
|
||||||
{
|
|
||||||
struct resource_table *table_ptr;
|
|
||||||
struct device *dev = &rproc->dev;
|
|
||||||
size_t table_sz;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
table_ptr = rproc_get_loaded_rsc_table(rproc, &table_sz);
|
|
||||||
if (!table_ptr) {
|
|
||||||
/* Not having a resource table is acceptable */
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ERR(table_ptr)) {
|
|
||||||
ret = PTR_ERR(table_ptr);
|
|
||||||
dev_err(dev, "can't load resource table: %d\n", ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
rproc->cached_table = NULL;
|
|
||||||
rproc->table_ptr = table_ptr;
|
|
||||||
rproc->table_sz = table_sz;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Attach to remote processor - similar to rproc_fw_boot() but without
|
* Attach to remote processor - similar to rproc_fw_boot() but without
|
||||||
* the steps that deal with the firmware image.
|
* the steps that deal with the firmware image.
|
||||||
@@ -1593,12 +1567,6 @@ static int rproc_actuate(struct rproc *rproc)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = rproc_set_rsc_table(rproc);
|
|
||||||
if (ret) {
|
|
||||||
dev_err(dev, "can't load resource table: %d\n", ret);
|
|
||||||
goto disable_iommu;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* reset max_notifyid */
|
/* reset max_notifyid */
|
||||||
rproc->max_notifyid = -1;
|
rproc->max_notifyid = -1;
|
||||||
|
|
||||||
|
@@ -173,16 +173,6 @@ struct resource_table *rproc_find_loaded_rsc_table(struct rproc *rproc,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline
|
|
||||||
struct resource_table *rproc_get_loaded_rsc_table(struct rproc *rproc,
|
|
||||||
size_t *size)
|
|
||||||
{
|
|
||||||
if (rproc->ops->get_loaded_rsc_table)
|
|
||||||
return rproc->ops->get_loaded_rsc_table(rproc, size);
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
bool rproc_u64_fit_in_size_t(u64 val)
|
bool rproc_u64_fit_in_size_t(u64 val)
|
||||||
{
|
{
|
||||||
|
@@ -370,9 +370,7 @@ enum rsc_handling_status {
|
|||||||
* RSC_HANDLED if resource was handled, RSC_IGNORED if not handled and a
|
* RSC_HANDLED if resource was handled, RSC_IGNORED if not handled and a
|
||||||
* negative value on error
|
* negative value on error
|
||||||
* @load_rsc_table: load resource table from firmware image
|
* @load_rsc_table: load resource table from firmware image
|
||||||
* @find_loaded_rsc_table: find the loaded resource table from firmware image
|
* @find_loaded_rsc_table: find the loaded resouce table
|
||||||
* @get_loaded_rsc_table: get resource table installed in memory
|
|
||||||
* by external entity
|
|
||||||
* @load: load firmware to memory, where the remote processor
|
* @load: load firmware to memory, where the remote processor
|
||||||
* expects to find it
|
* expects to find it
|
||||||
* @sanity_check: sanity check the fw image
|
* @sanity_check: sanity check the fw image
|
||||||
@@ -394,8 +392,6 @@ struct rproc_ops {
|
|||||||
int offset, int avail);
|
int offset, int avail);
|
||||||
struct resource_table *(*find_loaded_rsc_table)(
|
struct resource_table *(*find_loaded_rsc_table)(
|
||||||
struct rproc *rproc, const struct firmware *fw);
|
struct rproc *rproc, const struct firmware *fw);
|
||||||
struct resource_table *(*get_loaded_rsc_table)(
|
|
||||||
struct rproc *rproc, size_t *size);
|
|
||||||
int (*load)(struct rproc *rproc, const struct firmware *fw);
|
int (*load)(struct rproc *rproc, const struct firmware *fw);
|
||||||
int (*sanity_check)(struct rproc *rproc, const struct firmware *fw);
|
int (*sanity_check)(struct rproc *rproc, const struct firmware *fw);
|
||||||
u64 (*get_boot_addr)(struct rproc *rproc, const struct firmware *fw);
|
u64 (*get_boot_addr)(struct rproc *rproc, const struct firmware *fw);
|
||||||
|
Reference in New Issue
Block a user