From patchwork Tue Nov 17 09:56:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 56768 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1830887lbb; Tue, 17 Nov 2015 01:57:34 -0800 (PST) X-Received: by 10.66.246.137 with SMTP id xw9mr41670199pac.31.1447754254114; Tue, 17 Nov 2015 01:57:34 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qh12si56570759pab.145.2015.11.17.01.57.33; Tue, 17 Nov 2015 01:57:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-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 devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro-org.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753685AbbKQJ5a (ORCPT + 6 others); Tue, 17 Nov 2015 04:57:30 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:36529 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753498AbbKQJ52 (ORCPT ); Tue, 17 Nov 2015 04:57:28 -0500 Received: by wmww144 with SMTP id w144so146073292wmw.1 for ; Tue, 17 Nov 2015 01:57:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5GWmST7BPFgZEyqrFy35ghU+V+rKcP88Vc/dxIxywq0=; b=Q1NHpsdmy2FIKAcbTnSYzm8kPzaiGHphG7OH9Rvy85E+KWBS/ig/0nGxE5JIrzfwhe l7zXoBhq8gzCbHHWlIlZka0HkcO29laQetbbH7u8dpsNBceeBs+QLA6EWcSWKkGUbSes 6kQsEsaZ3ZZ76Xoz5UivfqDDzCuSgnZv17755gR+GuEaTIKlIm/drlBx8CJH8+//VKQV BlUhHj+8/1uAW3pzJLIiBR+vWjoXZJQeXUns7uSPXDzm7BEgUohcLq3vEazGkTzvNWXG lQHTvA7BGWAJeooOJ9Z7YEo8hhoeJvX/mFsAjNfUioK26hLvM1L6lOqu4imnfkT1TvE5 ag8w== 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=5GWmST7BPFgZEyqrFy35ghU+V+rKcP88Vc/dxIxywq0=; b=COx40aeQDdgKMTj+fhgc1KWPCmNgKXoCqqiwU8IxEqdJOjJxDnFug3PAeVN+4Skjnh thuG8iEmxtr+LO+tmLwjdIT3t5l+/vuRSKUVW9LWfx9IrBC7ukR7QccWkZGjNXktW4RW UIp2DgvAOrQgRK0urofDzmDEfAS7Q1XOK084Vi5C0s0LNJOsVcuiygAYsoCOR0HlkCJF T7RGDHT15CHgS23+PqjVAqq1SaLALfJ10seDOEGVGIK75tHm94b5qNaOVUhkoXmkk6hw RLBOEM0FZfWvPenieqD1FLc+cxkEG58CwvUtDpC4HdsrV6VoP0wvVhfGdJ0QO2Tnbf4x Sk1g== X-Gm-Message-State: ALoCoQkznjf6gobGruVXGNjfAGe4TAnLbG+BEYmp4GbT9QYAvat0yIkp/K5eXnMmur9/h4ov8iRP X-Received: by 10.28.186.67 with SMTP id k64mr1629498wmf.56.1447754247094; Tue, 17 Nov 2015 01:57:27 -0800 (PST) Received: from localhost ([78.129.251.54]) by smtp.gmail.com with ESMTPSA id v192sm23060187wmv.5.2015.11.17.01.57.25 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 17 Nov 2015 01:57:26 -0800 (PST) From: shannon.zhao@linaro.org To: ian.campbell@citrix.com, stefano.stabellini@citrix.com, catalin.marinas@arm.com, will.deacon@arm.com, julien.grall@citrix.com, ard.biesheuvel@linaro.org, mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org Cc: xen-devel@lists.xen.org, christoffer.dall@linaro.org, devicetree@vger.kernel.org, linux-efi@vger.kernel.org, peter.huangpeng@huawei.com, shannon.zhao@linaro.org, zhaoshenglong@huawei.com, hangaohuai@huawei.com Subject: [PATCH 01/13] Xen : Hide UART used by Xen Date: Tue, 17 Nov 2015 17:56:59 +0800 Message-Id: <1447754231-7772-2-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1447754231-7772-1-git-send-email-shannon.zhao@linaro.org> References: <1447754231-7772-1-git-send-email-shannon.zhao@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Shannon Zhao According to the STAO table, hide UART used by Xen from Dom0. Signed-off-by: Shannon Zhao --- drivers/acpi/bus.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index a212cef..e93806b 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -46,6 +46,7 @@ ACPI_MODULE_NAME("bus"); struct acpi_device *acpi_root; struct proc_dir_entry *acpi_root_dir; EXPORT_SYMBOL(acpi_root_dir); +static u64 uart_addr; #ifdef CONFIG_X86 #ifdef CONFIG_ACPI_CUSTOM_DSDT @@ -93,6 +94,16 @@ acpi_status acpi_bus_get_status_handle(acpi_handle handle, { acpi_status status; + if (uart_addr) { + u64 addr; + status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, + &addr); + if (ACPI_SUCCESS(status) && (addr == uart_addr)) { + *sta = 0; + return AE_OK; + } + } + status = acpi_evaluate_integer(handle, "_STA", NULL, sta); if (ACPI_SUCCESS(status)) return AE_OK; @@ -1069,6 +1080,7 @@ EXPORT_SYMBOL_GPL(acpi_kobj); static int __init acpi_init(void) { int result; + struct acpi_table_stao *stao_ptr; if (acpi_disabled) { printk(KERN_INFO PREFIX "Interpreter disabled.\n"); @@ -1081,6 +1093,16 @@ static int __init acpi_init(void) acpi_kobj = NULL; } + acpi_get_table(ACPI_SIG_STAO, 1, + (struct acpi_table_header **)&stao_ptr); + if(stao_ptr->ignore_uart) + { + struct acpi_table_spcr *spcr_ptr; + acpi_get_table(ACPI_SIG_SPCR, 1, + (struct acpi_table_header **)&spcr_ptr); + uart_addr = spcr_ptr->serial_port.address; + } + init_acpi_device_notify(); result = acpi_bus_init(); if (result) {