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: 67942 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp2033786qge; Tue, 17 May 2016 05:08:11 -0700 (PDT) X-Received: by 10.98.38.130 with SMTP id m124mr1461270pfm.14.1463486891869; Tue, 17 May 2016 05:08:11 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s70si4238529pfa.185.2016.05.17.05.08.11; Tue, 17 May 2016 05:08:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932598AbcEQMIA (ORCPT + 29 others); Tue, 17 May 2016 08:08:00 -0400 Received: from mail-lf0-f44.google.com ([209.85.215.44]:33318 "EHLO mail-lf0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754972AbcEQMHj (ORCPT ); Tue, 17 May 2016 08:07:39 -0400 Received: by mail-lf0-f44.google.com with SMTP id y84so5866735lfc.0 for ; Tue, 17 May 2016 05:07:38 -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=EIpaDVz0M2GgYrPaz3o4vVmH6ss6fARHqyVpOi6xPqDFrlSsqd8RS1d2rLAUCci6ZT kO7Q30thJOo20ClGN61ZR9xF1vthmG1e4J42EsYowqKpo6JiR2ZD5XvdoPNYgglbGZNl BiRHr/twda3tvgnli1AzzAXk45edrrFKtCVID3Hs9svF5wsMuLOKZ+l8ThCXAN0ClzNO pdsGQaTtCQ8al9exnnI13GiMh7Dl2cST7UBTnyYnRGhNrVjJ7iOcZO3vznJK9/M1otv7 G8deRS3MBBopIjwFYk9R9L7GsyJq2D+CRlH1LPchrTP2jxXH2F9dCHnd7HBsfdExvhg2 eE6Q== X-Gm-Message-State: AOPr4FWyVrqW6lZGGhghLYEBWlLepGMwe+EgSWp1jkuF9s0eggg1SkBdOSdlkA4MTlBhM5/5 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 Cc: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Aleksey Makarov , Graeme Gregory , Jon Masters , "Zheng, Lv" , Mark Rutland , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.8.2 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) { }