Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp675452lqb; Fri, 24 May 2024 09:43:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVA86o5GJVd27jwCZ/myxD3unzfcAGEoaVilGgcAEZKeobEsztB90a1SVEbN7GcfY1rSrlVD2iNjGseqnjq8XBnexpcVwVh2RsUrR5OEw== X-Google-Smtp-Source: AGHT+IHhc5TLrFAuodCiuXjLF4rVXGKOP2hHsLuG2m0+QxTCuZm8Xf5/Y9ZypQyRKdeq4XPhciqU X-Received: by 2002:a05:6808:191b:b0:3c7:4db:9769 with SMTP id 5614622812f47-3d1a7647021mr3816186b6e.47.1716568985494; Fri, 24 May 2024 09:43:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716568985; cv=pass; d=google.com; s=arc-20160816; b=pFf5lqPszj/lWdxOpLZvgEzkpqc5kiuEqTZrVR0VTRRqSIzuxeJCfnAybgwBCZ+dmF Z3i/8SMlIxv8uDK024Vxm6cTFicfRwdig319+ZOD9UxJEvllK4oiMQ3P19ZyGH7WSI9q 0j3xPpAuWgc7aeXA/b+AkqKp2LW2VuOMA/iL6bSonlx5+fD6d4uAr2isPT8BULhxB8xw LAvrOrVJWKgH1N1eyJqQZu0K2WM0jlxtw7qnFM/S6JpFAwMhRqDzhnredcDYzopVp7da lZmL9EqtVaWuhNbLHju2mSBImxi/zdAhsimscIHS42aVPflLBhEkMf8f2hzdnKsuLCgj NvHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=YX9E6Ij88ACGoWd05mXkF/EXj7DNLDqMPEhMZaF6BOY=; fh=mtXBjmywHSrwwqTwrs2PRZxISbTB/CbndFHA9O6afMs=; b=mHKDd3/LnrbG7o/rU0jT95XV14sKd7UktTF1ZS5eu9OqYfDH6XJQehAmjv5PakQJ1X G4/Ig+C0d5RjE7FCjhyJA6Y61046bydTcOxxvIRoVBsP6w6C58RG55okaetrnce1HKLR 9AmFINRP5PvjWEUj5DsHd48I9Mt1RwPQgGqmWjVyilCdpdTUCXTAx86oan789EhAoB7d K20nqKQk9CI0QxTjEjjV/dZSoHYaTCwsOw9x9k3YrzDDOllbjKYWGmQk8Dce6yrQaAlN sNxLJF2GNcDdU4SPtSy0GlKyIFMr6tjogDf4NxiAX90wS9Kysfm8oFhkeGu1nrDC/er/ rw2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@dylanvanassche.be header.s=default2306 header.b=cDnhqIZU; arc=pass (i=1 spf=pass spfdomain=dylanvanassche.be dkim=pass dkdomain=dylanvanassche.be dmarc=pass fromdomain=dylanvanassche.be); spf=pass (google.com: domain of linux-kernel+bounces-188938-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188938-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=dylanvanassche.be Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ac070f150esi20083466d6.308.2024.05.24.09.43.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 09:43:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-188938-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@dylanvanassche.be header.s=default2306 header.b=cDnhqIZU; arc=pass (i=1 spf=pass spfdomain=dylanvanassche.be dkim=pass dkdomain=dylanvanassche.be dmarc=pass fromdomain=dylanvanassche.be); spf=pass (google.com: domain of linux-kernel+bounces-188938-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188938-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=dylanvanassche.be Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1C6BA1C20B8A for ; Fri, 24 May 2024 16:43:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C0C7612EBED; Fri, 24 May 2024 16:42:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dylanvanassche.be header.i=@dylanvanassche.be header.b="cDnhqIZU" Received: from www316.your-server.de (www316.your-server.de [88.198.220.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E4ED86251; Fri, 24 May 2024 16:42:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=88.198.220.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716568976; cv=none; b=ZtYIn87ny7zW0iE0CPN1EmtaHoFEZ0paHqH7uORLaedBSW3alIZQV+LTZbYWnZg0kgVItLwuQCg+9LhTAOykyox/Gh9Qa5QL/3vtKqUjUxJL9xH6QMEte2sDpokwh1BNSIJ9pAC2mpYBdhrZHYNvL+dortE1IjwUbRLcTCzpP2I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716568976; c=relaxed/simple; bh=t+YModx5IJ7i5mA14PTSUCfUZivYXk693ycSQhxzxdI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GicM9B1Ca+iZchxYcPS6Ux6iCJmkHKtYCrxB8s2ARRL5Y90ozG/nJArRzt3pU5hY0ZJNoMkt5CIoB/tSAYopqEXm2Sx3CQ1F993W3DR9Ny4VaG5acHHo/fb0Xsn4ni59tWzb72jv3OOCGVeCfoTuqBlJr2iKdAuTXLv0Ls34dTo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=dylanvanassche.be; spf=pass smtp.mailfrom=dylanvanassche.be; dkim=pass (2048-bit key) header.d=dylanvanassche.be header.i=@dylanvanassche.be header.b=cDnhqIZU; arc=none smtp.client-ip=88.198.220.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=dylanvanassche.be Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dylanvanassche.be DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dylanvanassche.be; s=default2306; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=YX9E6Ij88ACGoWd05mXkF/EXj7DNLDqMPEhMZaF6BOY=; b=cDnhqIZUl8o75/ULztpfX3e7co QN1z9NuArUEBkXMMbiIGQrCaipczliltmNneysj2YPARx4Wi7aLskCcyn4f18ofd+hNsL+9Kl6nBW Ia5xOEozXNZMcSrX4hUy/lCcchdXDewJF+SRSuT6kHi1kASReN1OgzqpoSgwptv1rI/hH85uAK62P bygtri8LvYF1EOnWLfW+rUCvjClAskoi3wMJ9b2mkgibASap2uUMOOmpu6gnc77aGKxzn/BLOF6FK n6Ct2dLY9gTcr2zfn1Dm7OO4lNk3ewRNu57CAyZ0cR8R4fowe0YNqLqiontBK7iZJvnmKi5xWQ0lf qE8GVI/w==; Received: from sslproxy06.your-server.de ([78.46.172.3]) by www316.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sAXYq-000K0N-1r; Fri, 24 May 2024 18:14:28 +0200 Received: from [169.150.196.25] (helo=desktop.telenet.be) by sslproxy06.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sAXYp-0000gS-0N; Fri, 24 May 2024 18:14:27 +0200 From: Dylan Van Assche To: Srinivas Kandagatla , Amol Maheshwari , Arnd Bergmann , Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Caleb Connolly , phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Dylan Van Assche Subject: [PATCH v5 0/2] misc: fastrpc: FastRPC reserved memory assignment for SDM845 SLPI Date: Fri, 24 May 2024 18:14:01 +0200 Message-ID: <20240524161423.15392-1-me@dylanvanassche.be> X-Mailer: git-send-email 2.45.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authenticated-Sender: me@dylanvanassche.be X-Virus-Scanned: Clear (ClamAV 0.103.10/27285/Fri May 24 10:30:55 2024) * 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 v5: - Adjusted to FastRPC driver changes in 6.9.X. 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 | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) -- 2.45.1