Message ID | 20230507080839.37578-3-me@dylanvanassche.be |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1457297vqo; Sun, 7 May 2023 01:23:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7BNltLNXzUzjIwhhFi9qCpOnETtxPiwAgpKUOBVWMStoHoiycFGcelDZQFCl+i/A8deIvl X-Received: by 2002:a05:6a00:2e18:b0:638:7e00:3737 with SMTP id fc24-20020a056a002e1800b006387e003737mr8571386pfb.23.1683447781028; Sun, 07 May 2023 01:23:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683447781; cv=none; d=google.com; s=arc-20160816; b=VUo0Myd992cC4jnM1LXyP9A244T7nJGjZmuGTUWVEMFaE4+45faktkkP3kXOouUfY/ wIL5JQCKeQZRrjV+GzIvNlES1zbG4/3/9YRsOGM3xqjVtTXiq+VBKoZ0fh2uCGe08ock bxl7P1YCqnXceYb7QVm2FQNBW2d04tbNBjgpxk/eTCDrj0aOaIpe3R4kGtqgnb5rReCe brSJ3EmW+kHfvMfgbwJUhkYKLMM/jScHXqXRi16CcUxPoAhkrn2uOFg3XeEl3uTvyckC F37HzidRktZY24xL8jt7062MpZDnGZlA85yYeQrvt0xVxOdEyWK6NsH0lSYSvRohrZdr 4a1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XDem5KbBYqf0yzHTVvfDGPYYkUomJeVEa1QHHvpSfOA=; b=lM3OQy+lAUliJCgZkFsF8ONOTl0TITDVS/G4w7lN/X0BGUYVRWUT+Aswboj6c0WlGM VGhnf5k+zr6pBNK2S+9QocavtGHH8VXf+9VF84io85t2E9e6lKoCR/y/DuAStLgIwULI fKlsW3UYj/BHbfzxGnNIxO2cv9QRAshkmwo2dwf7H2SKBrBBeYHXVW6e7EkCtpC1qGf1 Eo0WP2Wau6EJApYrHeTfu/A5hPOqFqLvwK+I1vJ/PXoLc21uKZSOGRj67u3yeRiAfINv E2XxEmDc/WU1o7IlSM7qOHib6nA8iLWB6bL6q/4WmBcPtkWwCC4ep+6XqG/9aOGvcTBe b+bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dylanvanassche.be header.s=MBO0001 header.b="uZ/V9DJw"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=dylanvanassche.be Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o12-20020aa7978c000000b0063b817e3f1esi6059338pfp.166.2023.05.07.01.22.48; Sun, 07 May 2023 01:23:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@dylanvanassche.be header.s=MBO0001 header.b="uZ/V9DJw"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=dylanvanassche.be Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231286AbjEGILh (ORCPT <rfc822;baris.duru.linux@gmail.com> + 99 others); Sun, 7 May 2023 04:11:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231219AbjEGILb (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 7 May 2023 04:11:31 -0400 Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [IPv6:2001:67c:2050:0:465::201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3437E13869; Sun, 7 May 2023 01:11:28 -0700 (PDT) Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4QDcZN6LGCz9scZ; Sun, 7 May 2023 10:11:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dylanvanassche.be; s=MBO0001; t=1683447084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XDem5KbBYqf0yzHTVvfDGPYYkUomJeVEa1QHHvpSfOA=; b=uZ/V9DJw4Ek/cxgu5uVrzOpCL7FzQ1EpkjAaiLEXvfo2VxEQAUI7+EPPEtlAmSsGBN0HRG 2W5LiVB18L9byZhrfU0/PBQLdiHbH+DnQgh3Q/RhGn+eHSgI1ySmv5HGXNN1ytDPVBy9fl UYgWhe2cTe96wc69Qhgn8tYU7aLjhQ1Q00wE0nqgW9IPuau/1xTmzNnNY9RVvn2MP2retJ jFjadOCfR0LUBo6LlPcQd4k3xJMzfd1x0iCyhNX8HxVizW1QKxNoPxur4jN6D7WN14bNw4 YSAsL7pBNdrtX8gDUXnvO+9KGXt3korypU1aaD+e34SUTyMgDWLTYnd1p7pwjw== From: Dylan Van Assche <me@dylanvanassche.be> To: srinivas.kandagatla@linaro.org, amahesh@qti.qualcomm.com, arnd@arndb.de, gregkh@linuxfoundation.org Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Dylan Van Assche <me@dylanvanassche.be>, Caleb Connolly <caleb.connolly@linaro.org> Subject: [PATCH v3 2/2] misc: fastrpc: use coherent pool for untranslated Compute Banks Date: Sun, 7 May 2023 10:08:39 +0200 Message-Id: <20230507080839.37578-3-me@dylanvanassche.be> In-Reply-To: <20230507080839.37578-1-me@dylanvanassche.be> References: <20230507080839.37578-1-me@dylanvanassche.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765222940754143496?= X-GMAIL-MSGID: =?utf-8?q?1765222940754143496?= |
Series |
misc: fastrpc: FastRPC reserved memory assignment for SDM845 SLPI
|
|
Commit Message
Dylan Van Assche
May 7, 2023, 8:08 a.m. UTC
Use fastrpc_remote_heap_alloc to allocate from the FastRPC device instead of the Compute Bank when the session ID is 0. This ensures that the allocation is inside the coherent DMA pool which is already accessible to the DSP. This is necessary to support FastRPC devices which do not have dedicated Compute Banks such as the SLPI on the SDM845. The latter uses an allocated CMA region instead of FastRPC Compute Banks. Signed-off-by: Dylan Van Assche <me@dylanvanassche.be> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> --- drivers/misc/fastrpc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 423272bcbbf5..44763a95869b 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -939,7 +939,10 @@ static int fastrpc_get_args(u32 kernel, struct fastrpc_invoke_ctx *ctx) ctx->msg_sz = pkt_size; - err = fastrpc_buf_alloc(ctx->fl, dev, pkt_size, &ctx->buf); + if (ctx->fl->sctx->sid) + err = fastrpc_buf_alloc(ctx->fl, dev, pkt_size, &ctx->buf); + else + err = fastrpc_remote_heap_alloc(ctx->fl, dev, pkt_size, &ctx->buf); if (err) return err;