Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp337935imu; Mon, 19 Nov 2018 23:35:22 -0800 (PST) X-Google-Smtp-Source: AJdET5elrrL3VQQXJ092fegYlf+zDkeySf4fBpqFsITLAMn/WBdgGsQG4rdFU3Ahq0+zzqtX+owv X-Received: by 2002:a62:6486:: with SMTP id y128-v6mr1136334pfb.76.1542699322191; Mon, 19 Nov 2018 23:35:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542699322; cv=none; d=google.com; s=arc-20160816; b=zVzPvA5I5WP14Uf7L92LmE4E1u+goKdv21PcoQbFuKNlQpo7jkvJbQN9NchZCmwifV iEOQrwrynxpBg1nl9K57HwUu8bBsOPCYxQ5c6XRLgYgSteGrku36gbM9595mjGcuVIbH 5CopSAVhp04ep1zjBzP8tju9FK3ERY+O/PoonBiTKmEx7cXTVrmn3rNWJDeZEJBFwfKm PXYk3v8YdVjKmootRY8HiSQ3DSbAPSf+dqcB2XgdR7E2sRPMm5V146FzugnlLIXOeZ+j XWwwuIZskUqiigBBeLh/irQOQ73WAFG96Qgcbl671S9GUDIolxlaen88L0GthoJydgd7 maMA== 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; bh=Rc3medTls6/nRMcJPT/CGSG7Qrkqz9Y+DxkgF9D1398=; b=YtCSduiC3E13kI5ENzWD5cnWQdlNC+YNdli3KFFpch0Sn2th1dLpaKfMubekkrYyxp y/Grd/PRkTxLXwUNSvRMR/6kQkf/B9wkAR3KFs9RTAFHw60xTQ1morl8eOZ2Xyu2oyXR B0Kgmsb1Y3TJmeQrsg0qZO38PC0x2NzcWtDBvGFoonG8FrZWOG0duCxcm6cwTtC0uWwV OBQjxVrOAWmwb3eNRXYY25ezGGOj7NrQWTaiVBDcD9JinhIGVCvZ5W6R/B+E8ZVHV5Yh 6LO49NMrZdZNH/hLmICb9AHHSIXXJCXP0Ox+1IVyyT7IJ/8ELR2eS9c4R6uhRMwSAFok FVrg== 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 h32si6213574pgh.276.2018.11.19.23.35.07; Mon, 19 Nov 2018 23:35:22 -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 S1732576AbeKTRxN (ORCPT + 99 others); Tue, 20 Nov 2018 12:53:13 -0500 Received: from mx2.suse.de ([195.135.220.15]:44254 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731756AbeKTRxM (ORCPT ); Tue, 20 Nov 2018 12:53:12 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 6CE32B082; Tue, 20 Nov 2018 07:25:32 +0000 (UTC) From: Juergen Gross To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, x86@kernel.org Cc: boris.ostrovsky@oracle.com, sstabellini@kernel.org, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, daniel.kiper@oracle.com, Juergen Gross Subject: [PATCH 2/2] x86/acpi, x86/boot: Take RSDP address from boot params if available Date: Tue, 20 Nov 2018 08:25:29 +0100 Message-Id: <20181120072529.5489-3-jgross@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20181120072529.5489-1-jgross@suse.com> References: <20181120072529.5489-1-jgross@suse.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In case the RSDP address in struct boot_params is specified don't try to find the table by searching, but take the address directly as set by the boot loader. Signed-off-by: Juergen Gross --- arch/x86/include/uapi/asm/bootparam.h | 3 ++- arch/x86/kernel/acpi/boot.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h index a06cbf019744..60733f137e9a 100644 --- a/arch/x86/include/uapi/asm/bootparam.h +++ b/arch/x86/include/uapi/asm/bootparam.h @@ -155,7 +155,8 @@ struct boot_params { __u8 _pad2[4]; /* 0x054 */ __u64 tboot_addr; /* 0x058 */ struct ist_info ist_info; /* 0x060 */ - __u8 _pad3[16]; /* 0x070 */ + __u64 acpi_rsdp_addr; /* 0x070 */ + __u8 _pad3[8]; /* 0x078 */ __u8 hd0_info[16]; /* obsolete! */ /* 0x080 */ __u8 hd1_info[16]; /* obsolete! */ /* 0x090 */ struct sys_desc_table sys_desc_table; /* obsolete! */ /* 0x0a0 */ diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index fb3b1f3a5aba..06635fbca81c 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -1776,5 +1776,5 @@ void __init arch_reserve_mem_area(acpi_physical_address addr, size_t size) u64 x86_default_get_root_pointer(void) { - return 0; + return boot_params.acpi_rsdp_addr; } -- 2.16.4