Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3652143rwb; Mon, 16 Jan 2023 10:52:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXswknBHQeZ0799Gj09Ghv/qFOzUCR7fwtKeD6PiPSTT8ASB78T2O9obd36qj0Qjx4WJ99dv X-Received: by 2002:a17:906:6d7:b0:7c1:22a9:ba8b with SMTP id v23-20020a17090606d700b007c122a9ba8bmr13235869ejb.50.1673895153509; Mon, 16 Jan 2023 10:52:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673895153; cv=none; d=google.com; s=arc-20160816; b=GwirZAX/ULOlViLonhWivNz2Yq0kdNek5Tw6In5O5LifNSCVhyxolwhQpwcvjrSPDC l0JjyQvkXtmPmdTnyJmZm3WEQ2b4KsRuZrTElY6xQ94G3hKHm1i8DMsl+HokTUt1OTSC zuZMYmYcwanI4so1+7kh7bXW9aO86alovuppF9gGbjb3NURAi6vbF6IMDMedGth9vP5K 4/sE619PjxCnUeqNOh0OlqMMQwn+ttvlJNJ8GpA1joYdWnrb1mKMjUloUCddIZ1JO6b0 5Y+3gU7CgtGLYPFX/EW8KFs7IHJsHXChp+SOJUC7lDdNSuleDNRzoOXAJs3NVLDbMm2n 2gpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :to:from:dkim-signature:dkim-filter; bh=JZq9G5MlrIm9vmsNAI+byLNXbxxsM+mcQ1O6doawohU=; b=vjqCv3xuOdjQq3/npaHDGu0jwaYMGdkhMvJhyuoNLrr1iqn+ah2p4yEfXXu+gaj3YZ zxi4aXqWCFFJlKdjTJ9K3s/l22CPZyYeYiqyH7G86QGBGlewquepKvccoLDlgRo2MVkr t79jwriVMjIKZVxdGAeZauOaVxVFLNtg31vX3vOT582/RgcpWcfeUgU9bHrdoSaZSXV4 Rqno1Zs1EnTYvHLWS/4zk4xkfs8i7VYSktaVp/vePA0xFqfLGqMcjwoVW4VYmq4UXQgO nOMKNuAbav5ORaQl5UA44GU0808W66TqXwFQN6fOS/pcTeUbrX3Aq0u5YH+ejS3wy+qT 8+Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=DM6T02C1; 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=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hq25-20020a1709073f1900b008672552b4c9si16425932ejc.38.2023.01.16.10.52.21; Mon, 16 Jan 2023 10:52:33 -0800 (PST) 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=@linux.microsoft.com header.s=default header.b=DM6T02C1; 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=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234268AbjAPRIL (ORCPT + 50 others); Mon, 16 Jan 2023 12:08:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232468AbjAPRHm (ORCPT ); Mon, 16 Jan 2023 12:07:42 -0500 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9B2DD45216; Mon, 16 Jan 2023 08:48:14 -0800 (PST) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 1483D20DFE79; Mon, 16 Jan 2023 08:48:13 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1483D20DFE79 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1673887693; bh=JZq9G5MlrIm9vmsNAI+byLNXbxxsM+mcQ1O6doawohU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DM6T02C13nUQxv9ynrGjywSQSw3cYMHP0HQEhBzbYKhx7W/K+tUgLuceXmjtWtQ+B G1zGkFR8XgmvxNvk+OOKGm4VeDqhnuB/nXVsNIPIrorfi8PBErI2UcCZj5CyRfnTId d+GkTyQyHD1ip4lyYRSSPaOY5WurmpKZV6VBDSeg= From: Saurabh Sengar To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, daniel.lezcano@linaro.org, tglx@linutronix.de, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, mikelley@microsoft.com, ssengar@microsoft.com Subject: [PATCH 2/4] Drivers: hv: allow non ACPI compilation for hv_is_hibernation_supported Date: Mon, 16 Jan 2023 08:48:06 -0800 Message-Id: <1673887688-19151-3-git-send-email-ssengar@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1673887688-19151-1-git-send-email-ssengar@linux.microsoft.com> References: <1673887688-19151-1-git-send-email-ssengar@linux.microsoft.com> X-Spam-Status: No, score=-19.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 acpi_sleep_state_supported API is only define for CONFIG_ACPI flag and thus it can't be used for non-ACPI builds. Initaly there won't be hibernate support for non ACPI builds. This change will help adding device tree support in subsequent commits. Signed-off-by: Saurabh Sengar --- drivers/hv/hv_common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c index 52a6f89..370ec20 100644 --- a/drivers/hv/hv_common.c +++ b/drivers/hv/hv_common.c @@ -234,7 +234,11 @@ void hv_setup_dma_ops(struct device *dev, bool coherent) bool hv_is_hibernation_supported(void) { +#ifdef CONFIG_ACPI return !hv_root_partition && acpi_sleep_state_supported(ACPI_STATE_S4); +#else + return false; +#endif } EXPORT_SYMBOL_GPL(hv_is_hibernation_supported); -- 1.8.3.1