From patchwork Tue Aug 4 04:19:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 51890 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by patches.linaro.org (Postfix) with ESMTPS id 971C6228F2 for ; Tue, 4 Aug 2015 04:21:59 +0000 (UTC) Received: by lbcjj5 with SMTP id jj5sf50505784lbc.1 for ; Mon, 03 Aug 2015 21:21:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=mGknTxDYubsgUIwS73w+PbkWcY0blK5k4+19q6nGOUE=; b=GUzujVMzD7sIB9EiBb39AHO45cuB4L9upN8iPU7Dz1uJnwXg9GvlCEFRk4tT+R29sG hqd8EG9JgNXQyMjoJuweI2AeldgZLvecl6plimU/Op8W7kXaTUzhME+jJ9xQ3wlmNZkb ZsydCtCmJm0Wb0akuz9HwW8X3QkafaQWF1/rUf2ZtWMYXBLgJ7JIN901QCgEzvcLZvx2 nHLDxoJglq6Su1LDoHl8IAuAGCIaTE+7ZtwtpwIR3mNGB83bVyJ/gwfqGaMTaCp+UfmW kVam7ImZ0CgtAA7N5/q+IaidU7URT5jcEOSU8reBHdbz2z9S0py0TZWjm2dn5QSA5fNv BWXA== X-Gm-Message-State: ALoCoQnQ296vNNUJPBgBw8VrneOWdyJmFZABH/4ZIxrvk3ahD0SDJZXmAbHWVjhx1qpECEHoCuq9 X-Received: by 10.180.205.198 with SMTP id li6mr503617wic.5.1438662118563; Mon, 03 Aug 2015 21:21:58 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.3 with SMTP id r3ls191947lae.89.gmail; Mon, 03 Aug 2015 21:21:58 -0700 (PDT) X-Received: by 10.112.131.98 with SMTP id ol2mr1307858lbb.56.1438662118286; Mon, 03 Aug 2015 21:21:58 -0700 (PDT) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id xg1si13749387lac.41.2015.08.03.21.21.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Aug 2015 21:21:58 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by labix3 with SMTP id ix3so13582161lab.0 for ; Mon, 03 Aug 2015 21:21:57 -0700 (PDT) X-Received: by 10.153.7.66 with SMTP id da2mr1213719lad.117.1438662117695; Mon, 03 Aug 2015 21:21:57 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp2200400lba; Mon, 3 Aug 2015 21:21:57 -0700 (PDT) X-Received: by 10.194.58.167 with SMTP id s7mr3642182wjq.69.1438662116848; Mon, 03 Aug 2015 21:21:56 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id bd2si30108243wjc.130.2015.08.03.21.21.55 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 03 Aug 2015 21:21:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZMTi6-0002vl-W0; Tue, 04 Aug 2015 04:20:18 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZMTi5-0002vg-Fq for xen-devel@lists.xen.org; Tue, 04 Aug 2015 04:20:17 +0000 Received: from [193.109.254.147] by server-4.bemta-14.messagelabs.com id B3/A7-10715-08D30C55; Tue, 04 Aug 2015 04:20:16 +0000 X-Env-Sender: zhaoshenglong@huawei.com X-Msg-Ref: server-8.tower-27.messagelabs.com!1438662010!37716379!1 X-Originating-IP: [119.145.14.66] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTE5LjE0NS4xNC42NiA9PiA4NTI3\n X-StarScan-Received: X-StarScan-Version: 6.13.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 3798 invoked from network); 4 Aug 2015 04:20:16 -0000 Received: from szxga03-in.huawei.com (HELO szxga03-in.huawei.com) (119.145.14.66) by server-8.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 4 Aug 2015 04:20:16 -0000 Received: from 172.24.1.47 (EHLO szxeml430-hub.china.huawei.com) ([172.24.1.47]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BKJ20820; Tue, 04 Aug 2015 12:20:04 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml430-hub.china.huawei.com (10.82.67.185) with Microsoft SMTP Server id 14.3.158.1; Tue, 4 Aug 2015 12:19:51 +0800 From: Shannon Zhao To: , Date: Tue, 4 Aug 2015 12:19:32 +0800 Message-ID: <1438661972-10140-3-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1438661972-10140-1-git-send-email-zhaoshenglong@huawei.com> References: <1438661972-10140-1-git-send-email-zhaoshenglong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.16.142] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.55C03D75.00D8, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 5e3746f8340386719b7bdefff0102fee Cc: shannon.zhao@linaro.org, zhaoshenglong@huawei.com Subject: [Xen-devel] [PATCH 2/2] ACPI/table: Make acpi_table_init return meaningful value X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: From: Shannon Zhao If ACPI fails to initialize tables, it should return one meaningful value to tell the caller to diable acpi. Signed-off-by: Shannon Zhao --- xen/drivers/acpi/tables.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xen/drivers/acpi/tables.c b/xen/drivers/acpi/tables.c index 822689e..1594e3b 100644 --- a/xen/drivers/acpi/tables.c +++ b/xen/drivers/acpi/tables.c @@ -330,7 +330,11 @@ static void __init check_multiple_madt(void) int __init acpi_table_init(void) { - acpi_initialize_tables(NULL, ACPI_MAX_TABLES, 0); + acpi_status status; + + status = acpi_initialize_tables(NULL, ACPI_MAX_TABLES, 0); + if (ACPI_FAILURE(status)) + return -EINVAL; check_multiple_madt(); return 0; }