Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp8870476rwr; Thu, 11 May 2023 07:14:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7AtRH0Yn62UaEsH3dDjS0VBvj/wUAEnDGGsv2yWZCOf/FZo0PpjCzfCfB30HaZtYPneuB+ X-Received: by 2002:a17:90b:4aca:b0:247:4f32:d108 with SMTP id mh10-20020a17090b4aca00b002474f32d108mr21985103pjb.13.1683814465704; Thu, 11 May 2023 07:14:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683814465; cv=none; d=google.com; s=arc-20160816; b=ru+owVTGT0vamlE5tOQnIDG0KPX2V/4JcNNiCIupU6vmK5fhDy7EOeLC/lx40Rau8R gHFrlp4WiP+mqs9BHDBjBTm7tnxfqAx6dCw3gZwP/YBFbuNpG3nB2dHjwWjhVx//B2VN zLl84BgF3f0xB02pwk+fYYIK/Lhtm1q33HB+sN0XkA88ODjA3v5TgYSj4UdihTCeDCmY UdhoPUw24rr9tDsGibnIfw7Nljek1+6hvUkyyoNMlyO+V9xUZkVilPFQ+7gcEmxvJlqw tA6XlF/Jqr4Cu3iOrLC1sqq4v/Wv7GltQWjHWIwkRl5LjStYyNSbl8labSXcjjTAK3J2 ULHA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=sd6dUDVlduWJM+HnYeES6xBRaZitnQSV9AIx4FVcTS4=; b=ywoZ0JAA6nImzBCJHpOXOs+UAOR4TIwscyldPFlK2Fu9J87NwQfk/fi2xfQ2EXtGMc nySKHvRIvK3px6M5iQw/meaJqkoi90cfo2gN/MHnWrH9H6dFFcKums9f9naGZ+zXnhkS WwjTqjxKHBV9CPf83OYV+7YsM+OdDMwLHgK2yTbDDTDEqPDUnsY/O5K13drevYcesycl 1eQS7lJ5VMBtzqeHCacy0CGpCyL0j5DPPSqP/3pgajXHfXfjkh8eo4q+IkGx/fDRAtoX Mz2DJ+7yvGv4yqBeX5oU51Bvy5bFygaWNNJHP14uzyEuqcCnX6436WK1DfzKb0VlYPRw +hFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dylanvanassche.be header.s=MBO0001 header.b=enBGY9cN; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l136-20020a633e8e000000b0052c40645e07si6661187pga.57.2023.05.11.07.14.13; Thu, 11 May 2023 07:14:25 -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=enBGY9cN; 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 S237802AbjEKONk (ORCPT + 99 others); Thu, 11 May 2023 10:13:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238164AbjEKONe (ORCPT ); Thu, 11 May 2023 10:13:34 -0400 Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77B521BC1; Thu, 11 May 2023 07:12:54 -0700 (PDT) Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::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-202.mailbox.org (Postfix) with ESMTPS id 4QHDNW34ZCz9spr; Thu, 11 May 2023 16:11:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dylanvanassche.be; s=MBO0001; t=1683814315; 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; bh=sd6dUDVlduWJM+HnYeES6xBRaZitnQSV9AIx4FVcTS4=; b=enBGY9cNK1pl7ZE79ErAPB18bUZq92u1aUO0RZcFogDASNVKiSz0Nbn+hhZkVJx63kAbtb C/m3YuFDkhxXc+zgX9HxU+Jdt4EulWMM6uHtJm0b6qsm3HKw1oY5mKLi3Kr71UYp8uHAh3 37GzsKo+04lmYP0darIL52Co5egARFDiLjdCrTWaU66aMaJWDVleApSFt6UQBdFZxocFPt X1UMVwUdnhnZ6KGWBZZ7fwJwjkgTCWc0BjhC7EwaN2VaQ4UTOtehwzYPbH18RXHAb2Y+9I KOTPW03yjHUrxr0UE+t0fEsUUK3bkwnGDHB999vU60BKHbIa1kNrES2j9RONBw== From: Dylan Van Assche 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, dan.carpenter@linaro.org, Dylan Van Assche Subject: [PATCH v4 0/2] misc: fastrpc: FastRPC reserved memory assignment for SDM845 SLPI Date: Thu, 11 May 2023 16:11:44 +0200 Message-Id: <20230511141146.30465-1-me@dylanvanassche.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4QHDNW34ZCz9spr 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 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 * About * The Qualcomm SDM845 SoC has a separate SLPI (Sensor Low Power Island) DSP for sensors connected to the SoC which is responsible for exposing sensors to userspace, power saving, and other features. While sensors are connected to GPIOs of the SoC, they cannot be used because the hypervisor blocks direct access to the sensors, thus the DSP must be used to access any sensor on this SoC. The SLPI DSP uses a GLink edge (dsps) to communicate with the host and has a FastRPC interface to load files from the host filesystem such as sensor configuration files. The FastRPC interface does not use regular FastRPC Compute Banks but instead uses an allocated CMA region through which communication happens. * Changes * This patchseries add support to the FastRPC for assigning a coherent memory region to a DSP via the hypervisor with the correct permissions. This is necessary to support the SLPI found in the Qualcomm SDM845 SoC which does not have dedicated FastRPC Compute Banks, in contrast to newer SoCs, but uses a memory region instead when allocating buffers. * Related patches * 1. Remoteproc changes to support the SLPI DSP in SDM845 (v3), needs to be applied: https://lore.kernel.org/linux-remoteproc/20230330164633.117335-1-me@dylanvanassche.be 2. DTS changes (v5), already applied: https://lore.kernel.org/linux-devicetree/20230406173148.28309-1-me@dylanvanassche.be This serie does not depend on any serie, but all of them are necessary to enable the feature in the end. * Changelog * Changes in v4: - Fixed possible memory leak when driver encounters an error during probing. Changes in v3: - Dropped debug prints. - Added Reviewed-By tags from v2. Changes in v2: - Removed double blank lines - Dropped dt-bindings property as it is not needed for driver behavior - Add additional patch to allocate buffers via CMA memory for DSPs without dedicated FastRPC Compute Banks. Dylan Van Assche (2): misc: fastrpc: support complete DMA pool access to the DSP misc: fastrpc: use coherent pool for untranslated Compute Banks drivers/misc/fastrpc.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) -- 2.40.1