From patchwork Wed Dec 19 22:46:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 10738267 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A2393161F for ; Wed, 19 Dec 2018 22:47:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91C5B286B5 for ; Wed, 19 Dec 2018 22:47:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 864FE286BF; Wed, 19 Dec 2018 22:47:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F09B286C1 for ; Wed, 19 Dec 2018 22:47:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726716AbeLSWrG (ORCPT ); Wed, 19 Dec 2018 17:47:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:59676 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728519AbeLSWrG (ORCPT ); Wed, 19 Dec 2018 17:47:06 -0500 Received: from sinanubuntu1604.mkjiurmyylmellclgttazegk5f.bx.internal.cloudapp.net (unknown [13.90.192.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8D3FA2133F; Wed, 19 Dec 2018 22:47:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545259626; bh=CdNSErPT5isDG9mC26VskUxt5/1BONHziImHLRyTOe4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RhrxUAs1RUjBfA+y2/IOa0ro6ZE6FoxzX+9o6TMm6HWcF5QCQPRhxIr0za9VhaKlS ghd7ss8YLksiqe07OqRECTnPB3p0nVACodO0KJ6xgAm9CvDp2hHWWVGxhXWZ0xsNiJ vpDYw7KK084M6sDUqL/eLwkdYuvZ3xYPKaOYrsFE= From: Sinan Kaya To: linux-acpi@vger.kernel.org Cc: Sinan Kaya , "Rafael J. Wysocki" , Len Brown , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v12 2/7] ACPI: Allow CONFIG_PCI to be unset for reboot Date: Wed, 19 Dec 2018 22:46:54 +0000 Message-Id: <20181219224659.4802-3-okaya@kernel.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181219224659.4802-1-okaya@kernel.org> References: <20181219224659.4802-1-okaya@kernel.org> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make PCI reboot conditional on CONFIG_PCI set on the kernel configuration. Signed-off-by: Sinan Kaya --- drivers/acpi/reboot.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/acpi/reboot.c b/drivers/acpi/reboot.c index d642a9dede52..ca707f5b521d 100644 --- a/drivers/acpi/reboot.c +++ b/drivers/acpi/reboot.c @@ -4,6 +4,7 @@ #include #include +#ifdef CONFIG_PCI static void acpi_pci_reboot(struct acpi_generic_address *rr, u8 reset_value) { unsigned int devfn; @@ -21,6 +22,13 @@ static void acpi_pci_reboot(struct acpi_generic_address *rr, u8 reset_value) pci_bus_write_config_byte(bus0, devfn, (rr->address & 0xffff), reset_value); } +#else +static inline void acpi_pci_reboot(struct acpi_generic_address *rr, + u8 reset_value) +{ + pr_warn_once("PCI configuration space access is not supported\n"); +} +#endif void acpi_reboot(void) {