From patchwork Wed Apr 10 17:08:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Levinsky X-Patchwork-Id: 13624864 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0DE9BCD11C2 for ; Wed, 10 Apr 2024 17:08:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=rW1BZsp9TfkmMppRbwqs5cfxSb2h6Q/8kd/r30JEWmw=; b=09RsMyNJX5xzYW ca2T5q1QLi97zNPVtD6jLa3D2Wq0vPhOmSPInFMVOU05ps/aSz62nUiKVy7jYL4SOosPvpfXKwic/ GYegBws7Ma1oGv6MTeFQwnQ7XJ9W8fAkQ1o8GzRSFY92qmx+kyJKtUC8LTcauPU+udMn1BBWTlLHM mGCZdR7cfJD2307J+208faYbscVdQKNeFrwF4NQTmzGVGe2johEMgPHB8ugijm6+DAEzYaTMcV2FG KM9wgRbOGfyA83hnfl/6Cv4U3/QSwUT0aIYUtRUjJklRPyDmAphULO+mpQwtbVuEhl7L5r8WiuYg1 nWU0m93PHB0HBs0ou+CQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rubRG-00000008AOg-0kOW; Wed, 10 Apr 2024 17:08:46 +0000 Received: from mail-bn8nam12on20600.outbound.protection.outlook.com ([2a01:111:f403:2418::600] helo=NAM12-BN8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rubRB-00000008AMV-3z6F for linux-arm-kernel@lists.infradead.org; Wed, 10 Apr 2024 17:08:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Io14OhtmU18k74alJuWpwS0ymX2nWk9T+CwJsnDKphCy0zInarC2RgA2pIxvLhCToB1n2FpshvWJTjmoT/0JDi0uQaDgcsKu89jT+waR+oayXo/LKAeNsA/MSc5t2b2J/GJro7QKEtLiufl+QsNdedDqnrsRbfIYxdwPovs/0znaQNyxahDjvbsChJ+L5odxxwqb+doV0tbua4ck3/bD8INujgrjN/yCJS0kyhAa/3VWGflMGp5YjoDR0fJdHgQOtjmp+Zh0CxkOKoqRvx16sqsdvLFBMJll6ewXOxWLdw0CjCBvOUbYk87RFwvswLnCGm6r+I+6K6OcbycgsW6R3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bGPV0kEKGJoQWOmH0hmgcw8c6/T2CK0l16VnUjvJnW4=; b=I43ZtG4qgTZE6xJrhwfbdUqPkMJVakV8WBRGkuTBF2lSYl/hqmofjWYeLBLoAnCOCEZNZZpFwGtRihqHTpPaOt3OKY8wG/OTf/f4FB5D42wribXFVxy3D1hetqlJ8I4HBSRIop+IQ9MpVIrV3SEi1vm8miEIqCQIcZ79LwOEyi1voRGfvOymz1tKjKLPvTlhifiBEq9c9v7xBUcbsRj+XkPPGoVnTa4iBhLirGeAYNHEOgRHrZ6hkC39RHXFFG0JlnbZIaJ6cIMxkA5rcFgBzPG5tHXHki6YXeRbOgRD+hsBVDTylNUQXjvE0WyXLAw496O21vO/dKgpM+6TdaDTkw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bGPV0kEKGJoQWOmH0hmgcw8c6/T2CK0l16VnUjvJnW4=; b=JS3nAa2eNHagQQh0hD+ZaL8vacgkaaHC5cQGOyXgmI2oLnh9bD2wlShhwoQpgR5Mso6YpVIx61JK0e3B6Del1k/nqKMqoWdbPUx3O/DcbVpeB57JjR7XFCtZdsYTjIzSeOe0PhgN4Vn/kRqf9+JNCG1cvtdtS/D4BVaUPfWdoME= Received: from MN2PR14CA0028.namprd14.prod.outlook.com (2603:10b6:208:23e::33) by IA0PR12MB7673.namprd12.prod.outlook.com (2603:10b6:208:435::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.55; Wed, 10 Apr 2024 17:08:30 +0000 Received: from BL02EPF00021F6D.namprd02.prod.outlook.com (2603:10b6:208:23e:cafe::f2) by MN2PR14CA0028.outlook.office365.com (2603:10b6:208:23e::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.35 via Frontend Transport; Wed, 10 Apr 2024 17:08:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BL02EPF00021F6D.mail.protection.outlook.com (10.167.249.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7452.22 via Frontend Transport; Wed, 10 Apr 2024 17:08:27 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 10 Apr 2024 12:08:26 -0500 Received: from xsjblevinsk50.xilinx.com (172.19.2.206) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Wed, 10 Apr 2024 12:08:26 -0500 From: Ben Levinsky To: , , , , , Subject: [PATCH v3 0/3] mailbox: zynqmp: Enable Bufferless IPIs for Versal based SOCs Date: Wed, 10 Apr 2024 10:08:22 -0700 Message-ID: <20240410170825.1132324-1-ben.levinsky@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: ben.levinsky@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF00021F6D:EE_|IA0PR12MB7673:EE_ X-MS-Office365-Filtering-Correlation-Id: 011aff1f-0f42-4688-3bbc-08dc5980d6cf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ihOZtZ7h2jkJ3YSy5xea1QNoKVpZzpGxYA4vzk29L+9r2Sj89lwlKP73ccFfmy1qV9Noo5PVeXPTzkz0WKReGSa9dMOrs/0eQOwObnnz1o1djrCw/ODX1xfFVBa0Yn4Dmbqu1figUoIEio86DKSGnX8HrD2XRCwn8AvA66y9aUEKgvFsQAuwZlkx77LBF2A76EQHr4a+0qHLv3lvB7fcK6+pzVpfCbdAZPlaPw9QmFIVsOdhVN7v2UGjXxdNy+9gVCdhf7CIj9iL4d0aGHyTgZsT5iHlNghsMtDg/NrFX+K9BYmPgD5AeAFJYXoBze9o55L0wuwTRD7L4YmGYPeV/Pxh8Vm6rdnK8MnZgDuJjH2V1SFcL5h+rjUSQB+Q1WZKizxG7YQdMgEZQnpxSzoxrhvbyZ2n00RwhqvzYM8vY7qIEtpyIh/Pjgfq8jA7w8rc7XHgSXnF9z1c35yVAhn3CXgXjp8es7yIrkJQQwcDI1/rldt+663wXq+M9UhMtQLRjTPF7tDz8i6/mbObXFKPXoeUUcTzDkd7jYQyavypr3yczBHjyLMtwH0IxfZcwCUQJ1yeNtqZHN3H5/0SVSS2uGnOePUeaRBcR0Ch7GNFHl0xeN4Aqlb/YgHT3LsRTrvdNTjO+ZuL7WjgUDm77GlCsrp52pEI0t5GTR8itoaNKQOFN+fMW/wZ0hO7364waleyMoCGxJxZtoJqzpYldMp6N3VrXzWY19I3u73JQeMe84MGn1dobftKdPdYKeS/eePy X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(82310400014)(1800799015)(376005)(36860700004);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2024 17:08:27.3265 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 011aff1f-0f42-4688-3bbc-08dc5980d6cf X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF00021F6D.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB7673 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240410_100842_159004_B13170A3 X-CRM114-Status: GOOD ( 10.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org For Xilinx-AMD Versal and Versal NET SOC's there exist also inter-processor-interrupts (IPIs) without IPI Message Buffers. For these enable use of IPI Mailbox driver for send/receive as well. This is enabled with new compatible string: "xlnx,versal-ipi-mailbox" Original, buffered usage for ZynqMP based SOC is still supported. Note that Versal bindings are already present in xlnx,zynqmp-ipi-mailbox.yaml v2: - formatting in 2/3 patch - remove extra handling in 3/3 versal_ipi_setup() v3: 1/3 - removed additional newline to avoid ./scripts/checkpatch.pl --strict -f drivers/mailbox/zynqmp-ipi-mailbox.c CHECK: Please don't use multiple blank lines #434: FILE: drivers/mailbox/zynqmp-ipi-mailbox.c:434: + + 2/3 - remove unused variable dev drivers/mailbox/zynqmp-ipi-mailbox.c:565:24: warning: variable 'dev' set but not used [-Wunused-but-set-variable] struct device *mdev, *dev; 3/3 - remove unused variable dev ^ drivers/mailbox/zynqmp-ipi-mailbox.c:666:24: warning: variable 'dev' set but not used [-Wunused-but-set-variable] struct device *mdev, *dev; ^ Ben Levinsky (3): mailbox: zynqmp: Move of_match structure closer to usage mailbox: zynqmp: Move buffered IPI setup to of_match selected routine mailbox: zynqmp: Enable Bufferless IPI usage on Versal-based SOC's drivers/mailbox/zynqmp-ipi-mailbox.c | 257 ++++++++++++++++++++++----- 1 file changed, 212 insertions(+), 45 deletions(-)