From patchwork Tue May 17 12:06:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksey Makarov X-Patchwork-Id: 9111861 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EBD1B9F1C3 for ; Tue, 17 May 2016 12:09:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 115BC20306 for ; Tue, 17 May 2016 12:09:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 292FD202F2 for ; Tue, 17 May 2016 12:09:55 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b2dnH-0006a5-CO; Tue, 17 May 2016 12:08:11 +0000 Received: from mail-lf0-x235.google.com ([2a00:1450:4010:c07::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b2dn5-0006UG-Kp for linux-arm-kernel@lists.infradead.org; Tue, 17 May 2016 12:08:01 +0000 Received: by mail-lf0-x235.google.com with SMTP id u64so5844550lff.3 for ; Tue, 17 May 2016 05:07:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=K5GtramhkAdnCH5xj3CB11/uIn9wTb+GPMsqRD5BQH0=; b=i3SGjS1+yb8ppkK+4BKYLA8eV538GR+vYPWbB9m5rNhlvPR0tbzrAxqvzPb55UqRG4 Q8fahc+poDK2Nbxps5kczQCK7Dnl7iB13TSpaI5GyhBe99O8t+gphOUS9fNBRDyDPhuD YVrmDIVmxvR/O9wI1xWy+4Z2EDtaFfwFjccZA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=K5GtramhkAdnCH5xj3CB11/uIn9wTb+GPMsqRD5BQH0=; b=lbgWZoYgrWQrcpA+u7HJ1I2lq/Tl9dwqHMxEtbuF0IgCjUinG8hWqpQ7ICC12nMkBq Yb04K7CcHm7II5O5LbzV6voZImavFDPVCqKZTly3Wpibk064hfgBduKn0swM2I20wLjm O7Wf5q0EcVvl4cL8zHMzy5qkXxyZ6Yb5HcCm2Fg/5jGiXWVDDxkrcUdzpWRePc12jOj1 H4+RiGf8Wt3kXq5elAQODR9boQYuCa7JV1lO9eiUd+Y2SShwBET+sMl3C3SHYKnMMOEZ PT9+RE7VJB4zwlAc35030YuFCmVetXulM2wMOElA0/ZP1SYd0tiF06VYJq+CtBpO+a50 Bn2Q== X-Gm-Message-State: AOPr4FUyXDbVYrUAIUJWIoK6ZpWOVyGoh/AulhZQFuQbyUWFQtWJXZeVcsd/WG/iFkWqC9gv X-Received: by 10.25.159.211 with SMTP id i202mr406735lfe.76.1463486857698; Tue, 17 May 2016 05:07:37 -0700 (PDT) Received: from turnip.localdomain (nivc-213.auriga.ru. [80.240.102.213]) by smtp.gmail.com with ESMTPSA id n37sm466314lfg.46.2016.05.17.05.07.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 May 2016 05:07:37 -0700 (PDT) From: Aleksey Makarov To: Russell King , "Rafael J . Wysocki" , Len Brown Subject: [PATCH 2/3] ACPI: table upgrade: move early_initrd_acpi_init() to header file Date: Tue, 17 May 2016 15:06:02 +0300 Message-Id: <1463486765-31827-3-git-send-email-aleksey.makarov@linaro.org> X-Mailer: git-send-email 2.8.2 In-Reply-To: <1463486765-31827-1-git-send-email-aleksey.makarov@linaro.org> References: <1463486765-31827-1-git-send-email-aleksey.makarov@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160517_050759_944217_8DF45C67 X-CRM114-Status: GOOD ( 14.89 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Graeme Gregory , Jon Masters , x86@kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Aleksey Makarov , Ingo Molnar , "Zheng, Lv" , "H. Peter Anvin" , Thomas Gleixner , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Move early_initrd_acpi_init() to header file so that it can be used with architectures other than X86 Signed-off-by: Aleksey Makarov --- arch/x86/kernel/setup.c | 7 ------- drivers/acpi/tables.c | 7 +++++-- include/linux/acpi.h | 4 ++-- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index c4e7b39..5ddbbfd 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -399,10 +399,6 @@ static void __init reserve_initrd(void) memblock_free(ramdisk_image, ramdisk_end - ramdisk_image); } -static void __init early_initrd_acpi_init(void) -{ - early_acpi_table_init((void *)initrd_start, initrd_end - initrd_start); -} #else static void __init early_reserve_initrd(void) { @@ -410,9 +406,6 @@ static void __init early_reserve_initrd(void) static void __init reserve_initrd(void) { } -static void __init early_initrd_acpi_init(void) -{ -} #endif /* CONFIG_BLK_DEV_INITRD */ static void __init parse_setup_data(void) diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index 449a649..82be84a 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c @@ -34,6 +34,7 @@ #include #include #include +#include #include "internal.h" #ifdef CONFIG_ACPI_CUSTOM_DSDT @@ -742,9 +743,11 @@ acpi_os_table_override(struct acpi_table_header *existing_table, return AE_OK; } -void __init early_acpi_table_init(void *data, size_t size) +void __init early_initrd_acpi_init(void) { - acpi_table_initrd_init(data, size); +#ifdef CONFIG_BLK_DEV_INITRD + acpi_table_initrd_init((void *)initrd_start, initrd_end - initrd_start); +#endif } /* diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 288fac5..cb700c1 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -208,7 +208,7 @@ void acpi_boot_table_init (void); int acpi_mps_check (void); int acpi_numa_init (void); -void early_acpi_table_init(void *data, size_t size); +void early_initrd_acpi_init(void); int acpi_table_init (void); int acpi_table_parse(char *id, acpi_tbl_table_handler handler); int __init acpi_parse_entries(char *id, unsigned long table_size, @@ -588,7 +588,7 @@ static inline const char *acpi_dev_name(struct acpi_device *adev) return NULL; } -static inline void early_acpi_table_init(void *data, size_t size) { } +static inline void early_initrd_acpi_init(void) { } static inline void acpi_early_init(void) { } static inline void acpi_subsystem_init(void) { }