Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4374572rwl; Tue, 28 Mar 2023 06:26:28 -0700 (PDT) X-Google-Smtp-Source: AKy350aMMIFDUoHpKcm8mFPtBf3uJJzej6uBVq4a9UvMnw8c6icIG4aL7kYII48y9ui2Z9aKCkML X-Received: by 2002:a17:906:d207:b0:92b:b4d9:3f07 with SMTP id w7-20020a170906d20700b0092bb4d93f07mr15143744ejz.14.1680009988737; Tue, 28 Mar 2023 06:26:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680009988; cv=none; d=google.com; s=arc-20160816; b=dM1CPEwFlfyvSPnNfaEaTPqaznR3uVrw2/9txuq4ahiS5vwCy8knlzwtBYUhCWCiJg Ev7jsWIrkpwLBPcaVWJuZ9Y/WQ+4rms0Vpx0boj1s81efMhUjegPBvqxBgIkIuMeS8pd cU+DFtcl6EfWOPVgfxCDomU8yR4RiMKZSYiefeNOW6fDOHqiutw9PCdVH0bJA3ILnpuy 8bIsu0yMXjGSdroVZ3dukpUVECrEhyDLkXKnqtWKyiwF9V83IoIBkO8xATTp7pRH1+Oj x2+A2sc5Mq5a5fu95HjaZn66KRQigEdJXfU1o2n+a1MHqyONgbIN3Bg6PNN9Xxqq7qPt rkmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=LbtFhEMaa36GZ/wDzpX+egkjlG+BloYkmD+WmsXLab8=; b=cVMS0VCuie9Bqs6z3mwFsS4zIBafIlw/z6cnI2WZ3h3eW4ijaN+lu3TmTudMkFKqf7 XxCvDshdBrhbTex3rFcy50r3P2I9CTKGXg0q/TkY3NcB9rwo0851URFPdIydOMBDqEGG CSXcry3RnGSJi6Dsr0Ndf82Y1ak+OVDAiQBTHRyLL0wotyTsRYz9AAlx1eOFlmH/IAGk eJoayvIGnsyyNT5Dxrf4xx8TGc2ocDXvuZO5vt4nkKtyQIYwsND2KVnn0U4sdsMRSLsn mPwMI8oSnE2Js/KYfQ/zKkTr/HBjRSHDzDdpfBwLyReG7c/+9oL/Xr4+9Ixj1aFBuJsM j7ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b=yhLrq3a2; 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=marcan.st Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h23-20020a170906261700b0092beae94d7dsi26244792ejc.67.2023.03.28.06.26.03; Tue, 28 Mar 2023 06:26:28 -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=@marcan.st header.s=default header.b=yhLrq3a2; 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=marcan.st Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233069AbjC1NPI (ORCPT + 99 others); Tue, 28 Mar 2023 09:15:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233152AbjC1NOu (ORCPT ); Tue, 28 Mar 2023 09:14:50 -0400 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D430AD3C for ; Tue, 28 Mar 2023 06:14:43 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sendonly@marcansoft.com) by mail.marcansoft.com (Postfix) with ESMTPSA id 8F51C424E7; Tue, 28 Mar 2023 13:14:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marcan.st; s=default; t=1680009281; bh=M7BzVw3d+64yIlKTxTOsMPRrEdN40ois41hxCJhxNek=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=yhLrq3a2VSPO6qAAar4w8yMBuoTwqmf6c9lHfCFOeyqPCzzYTVMCCl8kHGb8TpYYf 5N9ZrFREQYfuxQTLdgj1f7hY+7iFdHUe4KRqmGpQu2RmxPA5ZfPuVs0F4kjPdza5pf lm6f4HYnyHTExicoh7tNB1EC/USPBZ+WYDjV5PNPIKKWci504PUx+Aq2YhvlB2HNJ1 r4rOBRcjtibaU406MtKCBAC5tyqepsgQ8mrilPDJ0RUmJ2G5Pxrmh0IoPXV0+hTStU vVRq06BES7HPDwJ6+eNfTcmLVNpterB1yzsxZFodqNsjdjSwfEBFK1kUCXi0ylvmSy wBkbnQ/3+pobA== From: Hector Martin Date: Tue, 28 Mar 2023 22:14:14 +0900 Subject: [PATCH 1/5] soc: apple: rtkit: Get rid of apple_rtkit_send_message_wait MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230328-soc-mailbox-v1-1-3953814532fd@marcan.st> References: <20230328-soc-mailbox-v1-0-3953814532fd@marcan.st> In-Reply-To: <20230328-soc-mailbox-v1-0-3953814532fd@marcan.st> To: Sven Peter , Alyssa Rosenzweig , Jassi Brar , Janne Grunau Cc: linux-kernel@vger.kernel.org, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Hector Martin X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2779; i=marcan@marcan.st; h=from:subject:message-id; bh=M7BzVw3d+64yIlKTxTOsMPRrEdN40ois41hxCJhxNek=; b=owGbwMvMwCEm+yP4NEe/cRLjabUkhhSlF5arc30WH38iP59FQLWl7b9feMIP52DDW9ULV56O1 jqQ8kqjo5SFQYyDQVZMkaXxRO+pbs/p59RVU6bDzGFlAhnCwMUpABNJu8DIsK2db2X7ohmdi6+c OFY0p+iBxwEmw6S7+/1KZ5z6IV7wq5vhf/J1tqkdvyUiFDmuzgno3RTCvGKa4+Nt927dd/96NWr ZVC4A X-Developer-Key: i=marcan@marcan.st; a=openpgp; fpr=FC18F00317968B7BE86201CBE22A629A4C515DD5 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 It is fundamentally broken and has no users. Just remove it. Signed-off-by: Hector Martin --- drivers/soc/apple/rtkit.c | 32 -------------------------------- include/linux/soc/apple/rtkit.h | 18 ------------------ 2 files changed, 50 deletions(-) diff --git a/drivers/soc/apple/rtkit.c b/drivers/soc/apple/rtkit.c index d9f19dc99da5..7c9b9f25bbc1 100644 --- a/drivers/soc/apple/rtkit.c +++ b/drivers/soc/apple/rtkit.c @@ -641,38 +641,6 @@ int apple_rtkit_send_message(struct apple_rtkit *rtk, u8 ep, u64 message, } EXPORT_SYMBOL_GPL(apple_rtkit_send_message); -int apple_rtkit_send_message_wait(struct apple_rtkit *rtk, u8 ep, u64 message, - unsigned long timeout, bool atomic) -{ - DECLARE_COMPLETION_ONSTACK(completion); - int ret; - long t; - - ret = apple_rtkit_send_message(rtk, ep, message, &completion, atomic); - if (ret < 0) - return ret; - - if (atomic) { - ret = mbox_flush(rtk->mbox_chan, timeout); - if (ret < 0) - return ret; - - if (try_wait_for_completion(&completion)) - return 0; - - return -ETIME; - } else { - t = wait_for_completion_interruptible_timeout( - &completion, msecs_to_jiffies(timeout)); - if (t < 0) - return t; - else if (t == 0) - return -ETIME; - return 0; - } -} -EXPORT_SYMBOL_GPL(apple_rtkit_send_message_wait); - int apple_rtkit_poll(struct apple_rtkit *rtk) { return mbox_client_peek_data(rtk->mbox_chan); diff --git a/include/linux/soc/apple/rtkit.h b/include/linux/soc/apple/rtkit.h index fc456f75c131..8c9ca857ccf6 100644 --- a/include/linux/soc/apple/rtkit.h +++ b/include/linux/soc/apple/rtkit.h @@ -160,24 +160,6 @@ int apple_rtkit_start_ep(struct apple_rtkit *rtk, u8 endpoint); int apple_rtkit_send_message(struct apple_rtkit *rtk, u8 ep, u64 message, struct completion *completion, bool atomic); -/* - * Send a message to the given endpoint and wait until it has been submitted - * to the hardware FIFO. - * Will return zero on success and a negative error code on failure - * (e.g. -ETIME when the message couldn't be written within the given - * timeout) - * - * @rtk: RTKit reference - * @ep: target endpoint - * @message: message to be sent - * @timeout: timeout in milliseconds to allow the message transmission - * to be completed - * @atomic: if set to true this function can be called from atomic - * context. - */ -int apple_rtkit_send_message_wait(struct apple_rtkit *rtk, u8 ep, u64 message, - unsigned long timeout, bool atomic); - /* * Process incoming messages in atomic context. * This only guarantees that messages arrive as far as the recv_message_early -- 2.40.0