Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

misc: fastrpc: define names for protection domain ids

Define SENSORS_PD for the next patch, to void using magic values for these.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Link: https://lore.kernel.org/r/20200908131013.19630-3-jonathan@marek.ca
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jonathan Marek and committed by
Greg Kroah-Hartman
84195d20 7c920da3

+7 -2
+7 -2
drivers/misc/fastrpc.c
··· 73 73 #define FASTRPC_RMID_INIT_CREATE_ATTR 7 74 74 #define FASTRPC_RMID_INIT_CREATE_STATIC 8 75 75 76 + /* Protection Domain(PD) ids */ 77 + #define AUDIO_PD (0) /* also GUEST_OS PD? */ 78 + #define USER_PD (1) 79 + #define SENSORS_PD (2) 80 + 76 81 #define miscdev_to_cctx(d) container_of(d, struct fastrpc_channel_ctx, miscdev) 77 82 78 83 static const char *domains[FASTRPC_DEV_MAX] = { "adsp", "mdsp", ··· 1042 1037 inbuf.pageslen = 1; 1043 1038 inbuf.attrs = init.attrs; 1044 1039 inbuf.siglen = init.siglen; 1045 - fl->pd = 1; 1040 + fl->pd = USER_PD; 1046 1041 1047 1042 if (init.filelen && init.filefd) { 1048 1043 err = fastrpc_map_create(fl, init.filefd, init.filelen, &map); ··· 1292 1287 args[0].fd = -1; 1293 1288 args[0].reserved = 0; 1294 1289 sc = FASTRPC_SCALARS(FASTRPC_RMID_INIT_ATTACH, 1, 0); 1295 - fl->pd = 0; 1290 + fl->pd = AUDIO_PD; 1296 1291 1297 1292 return fastrpc_internal_invoke(fl, true, FASTRPC_INIT_HANDLE, 1298 1293 sc, &args[0]);