Received: by 10.223.176.46 with SMTP id f43csp2220617wra; Thu, 25 Jan 2018 06:45:29 -0800 (PST) X-Google-Smtp-Source: AH8x227JlPc6qKqk0mMluExsl3h7qvc/Qq1QH7afDny7atg4+yK96DcprM0y2E+y0cEcS96lVJx9 X-Received: by 10.98.133.93 with SMTP id u90mr16593080pfd.134.1516891529470; Thu, 25 Jan 2018 06:45:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516891529; cv=none; d=google.com; s=arc-20160816; b=I5QKvIrgGQ2WHe4D9mi84NR1NqpjMsX01wRLMLcpFJTtuvWCP6AXjGa3a0QE1XHcw5 s7Q0K+CpL/31oTacXISV+6m/KhX7UjmzL58AHPyjZStsgTn/iH2uboT4xL7Z+CI9Lmxy F29WatFaxaaHgp+i1Y8RwqLwmY1IAHk9cU8zV399xvIoOjh+2hO6ca6ruxkThE6VmLOz 0X1iADgJniXgfUhOISHKYcY/5ABkv3dy0U94r2IFbRIfFFeW2s7VzyluES7BcO/tHvB/ LNXdxvrDN8iYcE6/ADRWeG887cMJdOTHM2KFdxAc8cTCaTcXKv7ApOjN7iQFoukS7fko /bpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=MJmrUYiN6qorBo778jha8aqqJhRPKTWkdcr6cB0Eo3U=; b=CDBJHP/MgNNsj3o93ardYLIiSRy+iqFsYXNEWvLxIpeVhkCL+es7o4aAlPAiZ9BHIS ZW+MvztRV0DBldAFNGFJJpSvsSqCtb++cev1UFQs7TC2ekN5D6K4K+nt5i5QJXzTTA1H 75lcBoLL8lUo8uKbZsLCdNU7Z8P+R1gonGrN3quLX7WuMDyMWdbVGfPHoY2sv6Yx4DXZ AspcosuS+0XEdrAsStb461IeiP/vrSqdfZFGVNg/tMo84nsl0RB4niwbDvBCwL8gizNQ ejNzMlPUNrsuzhcCQ8fNQO+tLpejCd6rZc1AX1B7yJkb93pemFLz/ilCzSeptqrMNcpw BSpA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o2si1643951pgs.580.2018.01.25.06.45.15; Thu, 25 Jan 2018 06:45:29 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751829AbeAYOgr (ORCPT + 99 others); Thu, 25 Jan 2018 09:36:47 -0500 Received: from mx2.suse.de ([195.135.220.15]:50073 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751045AbeAYOgo (ORCPT ); Thu, 25 Jan 2018 09:36:44 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 83014AE6D; Thu, 25 Jan 2018 14:36:42 +0000 (UTC) From: Juergen Gross To: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, xen-devel@lists.xenproject.org Cc: lenb@kernel.org, rafael.j.wysocki@intel.com, mingo@redhat.com, boris.ostrovsky@oracle.com, Juergen Gross , stable@vger.kernel.org Subject: [PATCH v2 1/2] x86/acpi: add retrieval function for rsdp address Date: Thu, 25 Jan 2018 15:36:38 +0100 Message-Id: <20180125143639.9969-2-jgross@suse.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180125143639.9969-1-jgross@suse.com> References: <20180125143639.9969-1-jgross@suse.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a function to get the address of the RSDP table. Per default use a __weak annotated function being a nop. Cc: # 4.11 Signed-off-by: Juergen Gross --- drivers/acpi/osl.c | 10 +++++++++- include/linux/acpi.h | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 3bb46cb24a99..2b77db914752 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -178,6 +178,11 @@ void acpi_os_vprintf(const char *fmt, va_list args) #endif } +__weak acpi_physical_address acpi_arch_get_root_pointer(void) +{ + return 0; +} + #ifdef CONFIG_KEXEC static unsigned long acpi_rsdp; static int __init setup_acpi_rsdp(char *arg) @@ -189,12 +194,15 @@ early_param("acpi_rsdp", setup_acpi_rsdp); acpi_physical_address __init acpi_os_get_root_pointer(void) { - acpi_physical_address pa = 0; + acpi_physical_address pa; #ifdef CONFIG_KEXEC if (acpi_rsdp) return acpi_rsdp; #endif + pa = acpi_arch_get_root_pointer(); + if (pa) + return pa; if (efi_enabled(EFI_CONFIG_TABLES)) { if (efi.acpi20 != EFI_INVALID_TABLE_ADDR) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index dc1ebfeeb5ec..aa603cc5ad30 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1266,4 +1266,6 @@ static inline int lpit_read_residency_count_address(u64 *address) } #endif +acpi_physical_address acpi_arch_get_root_pointer(void); + #endif /*_LINUX_ACPI_H*/ -- 2.13.6