From patchwork Sat Jan 22 03:54:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12720463 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 54454C433EF for ; Sat, 22 Jan 2022 04:01:33 +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:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yc2DSPs6YzY5wjMvYCYETxn2AQlpMaVs/sAHgmOTYf8=; b=JharwftONsHsQv 5xha1dVSMg0LEQuT1pn+Wu+J12Fhl9c7RnixU6z7Ea5J5RJwlO0ywMFbxIXKdZwm3jeymiU6+Ycku ta/tryc7KqKsi2KS0k2U61YFCs3Cjx41N8ZCA1I7Z0Vb2dLwdCAj/+aP5zwZEq/+DQIPQPlfxy4uz daDRDfQL7aMsGBMrYA8K48gtPG6B9u2rqA7zykeE38QaQcp3tXX4sqGFdPdjFfQ2VTTRdSLMjLhsM 5t/dHpWL8s326ZgDjUdoMvBMfylYS97YpZGeGsK/I8qlZJu1zBgM+qBHWaigkyBGjrbQ0cSe1pIc3 amF0SDAx+xUqQ25XRp7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nB7Z9-00GVYE-5t; Sat, 22 Jan 2022 03:59:51 +0000 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nB7UQ-00GSwc-Ga for linux-arm-kernel@lists.infradead.org; Sat, 22 Jan 2022 03:55:00 +0000 Received: by mail-pf1-x42b.google.com with SMTP id x37so6641720pfh.8 for ; Fri, 21 Jan 2022 19:54:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CYdDKM03pUu8N31R+N2Sqs9jO4GAOic0QVQiqI/HaA0=; b=AL2qCcPoqTFgjUzcFRRvL/VvqnFeTVVqoh4+z1cDdox9JJR+seu/JofKDmnNLqorsm lKQZA5LxkK+eEjxZgNTLx6uT2x2yQYek1gmIgOohxsef9l/nMjwN37YUi+EbZYX1XkrN N/POapTPbDWDWF2o7bdFQS0bDx0H8xsIs0fJs+mUnMIjY40M535YCAKh+cgcTxWldvMw e8u/Rr3NakeU8KYtuBAwmGWOjeTv16t1rquUOPETA4WpswWl3rbb0gDzCnVs2DGT8ge9 MwdY6QO0rFMdLKJ3PFp6DgxnhUE7qP8NtL5GLTRQKtkbnHgFCEFUvAd9ISk3o8T0epqU oLsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CYdDKM03pUu8N31R+N2Sqs9jO4GAOic0QVQiqI/HaA0=; b=qsljrOdOZ04X8UaUC49buuO4BarMLe7rs+bWjnE+4aOR6Irjc6lvo+x5uT/i2quCVA IZ5u8g07KImGtzls1IviLN1IpVudKgcChtRVokgERQ6WcBuGMyFX9Tn2jGKPvX5K84oV iVsPxUYSW8e0ldPzIZvHnZj/Z5TDSEey2tg1Bu+sp7j2kOz7c2YbBp/JKxYU+XkzGETt DZHOdB37tGYr5tubEK8rCMcPAOdN9srgQA3cKWvDxQVBTlnAZ9kzXOeoS6kwnf+kwa7g WLR9bjuoX3FTEOKLWvxkbXpv3VZQDK6OyQq2yyk2WK6dGbR/QI+VfcD/vYW4/g8DV5Qr MJIw== X-Gm-Message-State: AOAM533Rb9PVO+7Vz2Q6rERSKeox2LFTH7i5vMSo+1dLNglr9CXYHD++ oTPcs9iz7K+VwlQw+a3G9fNiG81H1no= X-Google-Smtp-Source: ABdhPJw070FOByJBVA42p0u7yayirhUO5FRDBBLKlCn0n55ddqhnL/gfrRUE2tQjo3x9yiLZseeJRA== X-Received: by 2002:a05:6a00:810:b0:4c1:e21d:a900 with SMTP id m16-20020a056a00081000b004c1e21da900mr6325088pfk.6.1642823697311; Fri, 21 Jan 2022 19:54:57 -0800 (PST) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id a1sm667255pjm.1.2022.01.21.19.54.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 19:54:56 -0800 (PST) From: Florian Fainelli To: linux-arm-kernel@lists.infradead.org Cc: Florian Fainelli , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE), Mark Rutland , Lorenzo Pieralisi , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/4] firmware: psci: Export a couple of suspend symbols Date: Fri, 21 Jan 2022 19:54:18 -0800 Message-Id: <20220122035421.4086618-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220122035421.4086618-1-f.fainelli@gmail.com> References: <20220122035421.4086618-1-f.fainelli@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220121_195458_585446_EE65C54F X-CRM114-Status: GOOD ( 12.97 ) 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 Export psci_system_suspend_enter() and psci_cpu_suspend_enter() for the Broadcom STB PSCI extension to be usable and built as a loadable module. Signed-off-by: Florian Fainelli Reported-by: kernel test robot --- drivers/firmware/psci/psci.c | 9 ++++++++- include/linux/psci.h | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c index cfb448eabdaa..9a60e340c248 100644 --- a/drivers/firmware/psci/psci.c +++ b/drivers/firmware/psci/psci.c @@ -355,7 +355,13 @@ int psci_cpu_suspend_enter(u32 state) return ret; } +#else +int psci_cpu_suspend_enter(u32 state) +{ + return -EOPNOTSUPP; +} #endif +EXPORT_SYMBOL_GPL(psci_cpu_suspend_enter); static int psci_system_suspend(unsigned long unused) { @@ -365,10 +371,11 @@ static int psci_system_suspend(unsigned long unused) pa_cpu_resume, 0, 0); } -static int psci_system_suspend_enter(suspend_state_t state) +int psci_system_suspend_enter(suspend_state_t state) { return cpu_suspend(0, psci_system_suspend); } +EXPORT_SYMBOL_GPL(psci_system_suspend_enter); static const struct platform_suspend_ops psci_suspend_ops = { .valid = suspend_valid_only_mem, diff --git a/include/linux/psci.h b/include/linux/psci.h index 4ca0060a3fc4..ffeba6b08e10 100644 --- a/include/linux/psci.h +++ b/include/linux/psci.h @@ -9,6 +9,7 @@ #include #include +#include #include #define PSCI_POWER_STATE_TYPE_STANDBY 0 @@ -17,6 +18,7 @@ bool psci_tos_resident_on(int cpu); int psci_cpu_suspend_enter(u32 state); +int psci_system_suspend_enter(suspend_state_t state); bool psci_power_state_is_valid(u32 state); int psci_set_osi_mode(bool enable); bool psci_has_osi_support(void);