Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2435572rwr; Sat, 6 May 2023 10:51:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6cWoNep5J1EwHluiw0n9Kwx/Ml/p9KQP5gRxKe2cArjabhK7fGaOMDZgOCjzWnZ7R45Sjk X-Received: by 2002:a05:6a20:5484:b0:f2:14f7:c1e1 with SMTP id i4-20020a056a20548400b000f214f7c1e1mr7210797pzk.12.1683395477499; Sat, 06 May 2023 10:51:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683395477; cv=none; d=google.com; s=arc-20160816; b=AjvQ8SRuwKpPiw/4bdq70McqEPXcbPVXKCeweEihIcOOyjhhdvxsQjKLMHZb0WAr92 /J+YL3HNANCkrbNom2RGPWrLr8DR8GL5jusnG6sHwz8UUa0DjsOowoGeJeSLKZRqMBnh VZ1fFk8xwtOrDQX7LzXlXvJ297WETYL1irAY8WeC596DKGMZtepVkQNTKjs/i0udXNUA qjAv8l8GDFKQyzJEqXrIrj6Ege8b0FT+YWZaHuj7U+yJRQOgxIPFok4GUvWKMbuLyDlF mNtJibOaENZ3fO1PjnzWZmjmZnwmA2rqSbNN2OmiSU7SoWQA9E2LTJTPXhQX6kpAERMS nCng== 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 :feedback-id:references:in-reply-to:message-id:subject:cc:from:to :dkim-signature:date; bh=gyUQwzJC1ZRfkAbs3rA4h6kPX2f1RCrCAewsnOz8ABw=; b=Aja4lb+dhZCEFgh+HPrdyERz1UTCkZRwJ/ThrwDUlpzBWJUyfr80VvIOtSR0+uKFA1 9FwvYui4ILQ+YZgEc7seF0cE8N3FUUQG38mUBKr9S03IvtSKbqBu9m2jn5oNrPvI7m8s 3w+VHA7lwwVRT4MyCAUKarsQ0jNozB3ClbqmGlU58N0y9UczkkYh26GwSAVZh25SVDNh 0qy72LTPmM2eko8B0ZkzjVBX1iDy9cjG28D9MtE4OgyIVv8YpbcZR6OehcSi+nLOM/vG UituMHZ5jkGDRLlEWt5KWZ8XaCAVcxW0CyyOgGL/7MuobIH8NQSG6GKMinn+7X8VMYE/ fdrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@connolly.tech header.s=protonmail header.b=CUb+05hP; 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=NONE sp=NONE dis=NONE) header.from=connolly.tech Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h188-20020a636cc5000000b0051b3ea27f98si4908195pgc.629.2023.05.06.10.51.00; Sat, 06 May 2023 10:51:17 -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=@connolly.tech header.s=protonmail header.b=CUb+05hP; 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=NONE sp=NONE dis=NONE) header.from=connolly.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229743AbjEFRax (ORCPT + 99 others); Sat, 6 May 2023 13:30:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjEFRaw (ORCPT ); Sat, 6 May 2023 13:30:52 -0400 Received: from mail-4317.proton.ch (mail-4317.proton.ch [185.70.43.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E928E1608D for ; Sat, 6 May 2023 10:30:50 -0700 (PDT) Date: Sat, 06 May 2023 17:30:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=connolly.tech; s=protonmail; t=1683394248; x=1683653448; bh=gyUQwzJC1ZRfkAbs3rA4h6kPX2f1RCrCAewsnOz8ABw=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=CUb+05hP0RRZ1U7ZloZJaSpHCkNFytkAUbHIbZUP1nHXp8BKizDxDTHgdLn3KjBU8 b/L0YZXxv70fwnCEANY298F7DrBmjeJV8jh8okHcmzlF2b9dx0NSuwy2RbZIVXvtxp bsPzLcI4V4QRrUgDSPHjQJcoSYYDdgWl6Q0EdGjE= To: Dylan Van Assche , Srinivas Kandagatla , Amol Maheshwari From: Caleb Connolly Cc: Arnd Bergmann , Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org Subject: Re: [PATCH v2 2/2] misc: fastrpc: use coherent pool for untranslated Compute Banks Message-ID: In-Reply-To: <20230327184204.498032-3-me@dylanvanassche.be> References: <20230327184204.498032-1-me@dylanvanassche.be> <20230327184204.498032-3-me@dylanvanassche.be> Feedback-ID: 10753939:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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: X-Mailing-List: linux-kernel@vger.kernel.org On 27/03/2023 19:42, Dylan Van Assche wrote: > 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 Reviewed-by: Caleb Connolly > --- > 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 caf2ae556956..b7ddf6b90022 100644 > --- a/drivers/misc/fastrpc.c > +++ b/drivers/misc/fastrpc.c > @@ -939,7 +939,10 @@ static int fastrpc_get_args(u32 kernel, struct fastr= pc_invoke_ctx *ctx) > > =09ctx->msg_sz =3D pkt_size; > > -=09err =3D fastrpc_buf_alloc(ctx->fl, dev, pkt_size, &ctx->buf); > +=09if (ctx->fl->sctx->sid) > +=09=09err =3D fastrpc_buf_alloc(ctx->fl, dev, pkt_size, &ctx->buf); > +=09else > +=09=09err =3D fastrpc_remote_heap_alloc(ctx->fl, dev, pkt_size, &ctx->bu= f); > =09if (err) > =09=09return err; > > -- > 2.39.2 > -- Kind Regards, Caleb