On 7/9/25 7:47 AM, Ling Xu wrote: > Currently the domain ids are added for each instance of domains, this is > totally not scalable approach. Clean this mess and create domain ids for > only domains not its instances. > > Co-developed-by: Srinivas Kandagatla <[email protected]> > Signed-off-by: Srinivas Kandagatla <[email protected]> > Signed-off-by: Ling Xu <[email protected]> > ---
[...] > @@ -2330,21 +2323,20 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device > *rpdev) > case ADSP_DOMAIN_ID: > case MDSP_DOMAIN_ID: > case SDSP_DOMAIN_ID: > - /* Unsigned PD offloading is only supported on CDSP and CDSP1 */ > + /* Unsigned PD offloading is only supported on CDSP */ > data->unsigned_support = false; > - err = fastrpc_device_register(rdev, data, secure_dsp, > domains[domain_id]); > + err = fastrpc_device_register(rdev, data, secure_dsp, domain); > if (err) > goto err_free_data; > break; > case CDSP_DOMAIN_ID: > - case CDSP1_DOMAIN_ID: > data->unsigned_support = true; > /* Create both device nodes so that we can allow both Signed > and Unsigned PD */ > - err = fastrpc_device_register(rdev, data, true, > domains[domain_id]); > + err = fastrpc_device_register(rdev, data, true, domain); > if (err) > goto err_free_data; > > - err = fastrpc_device_register(rdev, data, false, > domains[domain_id]); > + err = fastrpc_device_register(rdev, data, false, domain); > if (err) > goto err_deregister_fdev; > break; Taking a step back, do we realistically need these checks at all? I would assume that there is a layer of security on the DSP side that would disallow running code in unsigned PDs on e.g. the ADSP. What happens if one skips them and attempts doing just that? Konrad
