Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4179184pxk; Tue, 8 Sep 2020 12:45:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyb0zIhsyOEjAJ4bfHuvchmL4MOaF5fYtg0ei1wM68T2uc9rNR1+33wxNagofpr1wVEySOs X-Received: by 2002:aa7:dcd2:: with SMTP id w18mr669126edu.288.1599594312820; Tue, 08 Sep 2020 12:45:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599594312; cv=none; d=google.com; s=arc-20160816; b=wkeVpRQbh2CNLn47h06kFFx/XIs2zk/4Qc2Hi3cHuMABMkV1VE8Jo8zxptei+V9MHY c8zNlEpwccyTQu1DNqfvavDlC0CcSRQyYqo+kHe62KRCH0f2+2qjcxc0wJfwLr7raSuL CxLIo/Sri2G4SXCJft+wRSIJ55Nm29qwxWHFFiXA02VK1DG17YKfBOo9uRDAbDI6lzr5 oeKzGjXIH9/DET+3g1qA+LX/AgrE7XzfJyUKWU9+rukZ0RMc4pAWyK6rZomJUdUmgYhh tGWyyjQiL4IGCNHEIOXVsQNHYxpMyC28jIFkJ7LvH5+iXu8992jcvUYIK3veN8ebWfyN mOmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=234lHPOkmRtRf38tY/dBUtuiJiCNT+A1HGusExETXW8=; b=jyYT9hjh0guui2RLjYvZG7P/gsipAQrPc2ouY4nrnzujGqMY0kTVpuF1VSPXq8Bn5n u4735p9ewVAQlkZqWwslKSCb3zIi2t21G31CmWrkVhjoy00r0PSmT3kyXGVMdY8fWC4U pjSEEjflXWzNjNsTYTFZ1ldLIaTVVaK+KTRQZeI21Q5xPf2i/3tL9NRs7bbPHauiClsr x6Kc4BvqvFdObZjvmU1cpIUCfy5mB1ycfTB3P+IDTjwXCdRVpcgTPfz4YzUjeE7eKH/c xCDz753JtjLPbUTH7GHCxuDTYlSCLBiaiYcKufAWnCUK7J5SqfdZ3TyK6Zq4qKeT/MdF tpHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marek-ca.20150623.gappssmtp.com header.s=20150623 header.b=Mr9PlJQE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a5si57704edx.243.2020.09.08.12.44.49; Tue, 08 Sep 2020 12:45:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@marek-ca.20150623.gappssmtp.com header.s=20150623 header.b=Mr9PlJQE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730943AbgIHTm7 (ORCPT + 99 others); Tue, 8 Sep 2020 15:42:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730892AbgIHPwr (ORCPT ); Tue, 8 Sep 2020 11:52:47 -0400 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02ED3C0612B2 for ; Tue, 8 Sep 2020 06:11:32 -0700 (PDT) Received: by mail-qt1-x844.google.com with SMTP id n18so11832976qtw.0 for ; Tue, 08 Sep 2020 06:11:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=234lHPOkmRtRf38tY/dBUtuiJiCNT+A1HGusExETXW8=; b=Mr9PlJQE8npLe+p4mJ2C+cdVwblHUugaVSN0/1HpRNKDtU2yAgDDTRwo31DxGctwUT olHRgrKSDFjj7TvrvMkScApWdYiLUEko63sQQvNnR72Ko7jxmlBVe/qlpcADv3rpJCJc /x1XGudl2dNlAK5wMVg63lvoO4CKTr1zSXLdQ1vp1mqThpBX4k9XcBdyn2Y6JzM6m2qT b0yxgO+pavHTR05Fn7jlVEmxIs4NSgQ3oiVpbF2IknhHKK6n6TBjDEbQIsYuPgKL2KHH nXCJxmGj2PYyduIFg67o7M1b8J+e1v3aUQYhJ0MHWDCGyxy7mJ20Uhx6lHrUEgZzOR7N 44WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=234lHPOkmRtRf38tY/dBUtuiJiCNT+A1HGusExETXW8=; b=tvph+4MzpimUYFsZoieekHwjZRTeJl9ffkWz4f+CVw1FGxGXoorQBXirMFiDr+0hpz WgRpZIjdZ7lyhs+Ix7K0wXz99LyzesaJEinjiVcLuZGRWF1aF0P1od++pHntfM1j8wYv xn2oWe0abs3YAFKSym7xgRc1i0zigl21oO21YeBqK8vXB5D0p11S2pXUMIotW/OjOMSc zwH0ddlqy3d1DJA54E4gBiKjky6/c6+GkjXVK9EZer1U4GDl7bCzA/vaQ61caoooGUFF MGXlxZp14I7smEGz0/gfdIUxKrQrhMxEKNuRp0R8X/iyPRAnRaZNQ+qs+EuPZ8E6L9Aw qYcA== X-Gm-Message-State: AOAM533RHGEY4QAjtI1vVBpOlOODh9cvH3tMvXac/HB0/ghrVhuj/Fvd r8dS+8qqjE7AgKj+k0AHKA090s65oJQ0+paP2f8= X-Received: by 2002:ac8:498d:: with SMTP id f13mr11909985qtq.35.1599570691197; Tue, 08 Sep 2020 06:11:31 -0700 (PDT) Received: from localhost.localdomain ([147.253.86.153]) by smtp.gmail.com with ESMTPSA id m196sm13394069qke.87.2020.09.08.06.11.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 06:11:30 -0700 (PDT) From: Jonathan Marek To: linux-arm-msm@vger.kernel.org Cc: Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 2/3] misc: fastrpc: define names for protection domain ids Date: Tue, 8 Sep 2020 09:10:10 -0400 Message-Id: <20200908131013.19630-3-jonathan@marek.ca> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200908131013.19630-1-jonathan@marek.ca> References: <20200908131013.19630-1-jonathan@marek.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Define SENSORS_PD for the next patch, to void using magic values for these. Signed-off-by: Jonathan Marek --- drivers/misc/fastrpc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 7939c55daceb..07b381c042cd 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -73,6 +73,11 @@ #define FASTRPC_RMID_INIT_CREATE_ATTR 7 #define FASTRPC_RMID_INIT_CREATE_STATIC 8 +/* Protection Domain(PD) ids */ +#define AUDIO_PD (0) /* also GUEST_OS PD? */ +#define USER_PD (1) +#define SENSORS_PD (2) + #define miscdev_to_cctx(d) container_of(d, struct fastrpc_channel_ctx, miscdev) static const char *domains[FASTRPC_DEV_MAX] = { "adsp", "mdsp", @@ -1037,7 +1042,7 @@ static int fastrpc_init_create_process(struct fastrpc_user *fl, inbuf.pageslen = 1; inbuf.attrs = init.attrs; inbuf.siglen = init.siglen; - fl->pd = 1; + fl->pd = USER_PD; if (init.filelen && init.filefd) { err = fastrpc_map_create(fl, init.filefd, init.filelen, &map); @@ -1287,7 +1292,7 @@ static int fastrpc_init_attach(struct fastrpc_user *fl) args[0].fd = -1; args[0].reserved = 0; sc = FASTRPC_SCALARS(FASTRPC_RMID_INIT_ATTACH, 1, 0); - fl->pd = 0; + fl->pd = AUDIO_PD; return fastrpc_internal_invoke(fl, true, FASTRPC_INIT_HANDLE, sc, &args[0]); -- 2.26.1