From patchwork Wed Sep 16 23:26:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: al.stone@linaro.org X-Patchwork-Id: 7201271 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8C1B49F65E for ; Wed, 16 Sep 2015 23:29:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A770720632 for ; Wed, 16 Sep 2015 23:29:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BABB42062A for ; Wed, 16 Sep 2015 23:29:10 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZcM77-0007uT-Rw; Wed, 16 Sep 2015 23:27:45 +0000 Received: from mail-ig0-f182.google.com ([209.85.213.182]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZcM6m-0007YF-7Y for linux-arm-kernel@lists.infradead.org; Wed, 16 Sep 2015 23:27:25 +0000 Received: by igcpb10 with SMTP id pb10so876011igc.1 for ; Wed, 16 Sep 2015 16:27:03 -0700 (PDT) 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=jmZYT7Iz4jhq40mnLOYUUgWi8wev5k0SyXF5x5/7bYo=; b=WfvkslJ0lrJXYlmDMk4vuAC8GOaB7KZzhQsK411W8I5v8VQAOCi9k3V0NDx3orLdVS 7Ggyi35b7ruTVh3yAG9epDY4lWvrFolLrVU2sPBm7HonWWmayliwBMc5+JFdj7nQntPt 5zr66RXddUxCKn/gAg8AGBQnYNevwMtnn8Vk1UAkCw20uS9K74L7eeTQp4NOsSzLkSNn Lql15UiwebHmTgWs2C6VxjiPzUSUCsZZ71q/y4kVEVAG2rKtKxPFDA/dQCdMErCKOC5r WXgcJaLCHz4Pe8rL0UzvY+Mz9LriUexVfn8VeGBda/x3yvkx8ZmmS4JbBJXE0zqhBk6H Xlqg== X-Gm-Message-State: ALoCoQm+JrOsv+qh5xLq/nLAtucS+hxKdbf3EiPnxuXyfpSJ303cMVSf2YVYBdJhZzkjveCyaVkE X-Received: by 10.50.28.8 with SMTP id x8mr1110167igg.49.1442446023347; Wed, 16 Sep 2015 16:27:03 -0700 (PDT) Received: from fidelio.ahs3.com (c-50-134-239-249.hsd1.co.comcast.net. [50.134.239.249]) by smtp.googlemail.com with ESMTPSA id ht6sm2983562igb.11.2015.09.16.16.27.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Sep 2015 16:27:02 -0700 (PDT) From: Al Stone To: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 3/5] ACPI / IA64: remove usage of BAD_MADT_ENTRY Date: Wed, 16 Sep 2015 17:26:43 -0600 Message-Id: <1442446005-19799-4-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1442446005-19799-1-git-send-email-al.stone@linaro.org> References: <1442446005-19799-1-git-send-email-al.stone@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150916_162724_361121_94276D25 X-CRM114-Status: GOOD ( 10.39 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fenghua Yu , linaro-kernel@lists.linaro.org, linux-ia64@vger.kernel.org, Al Stone , patches@linaro.org, linux-pm@vger.kernel.org, linaro-acpi@lists.linaro.org, linux-kernel@vger.kernel.org, Tony Luck MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Now that we have introduced the bad_madt_entry() function, and that function is being invoked in acpi_table_parse_madt() for us, there is no longer any need to use the BAD_MADT_ENTRY macro. Signed-off-by: Al Stone Cc: Tony Luck Cc: Fenghua Yu --- arch/ia64/kernel/acpi.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index b1698bc..efa3f0a 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c @@ -184,9 +184,6 @@ acpi_parse_lapic_addr_ovr(struct acpi_subtable_header * header, lapic = (struct acpi_madt_local_apic_override *)header; - if (BAD_MADT_ENTRY(lapic, end)) - return -EINVAL; - if (lapic->address) { iounmap(ipi_base_addr); ipi_base_addr = ioremap(lapic->address, 0); @@ -201,8 +198,6 @@ acpi_parse_lsapic(struct acpi_subtable_header * header, const unsigned long end) lsapic = (struct acpi_madt_local_sapic *)header; - /*Skip BAD_MADT_ENTRY check, as lsapic size could vary */ - if (lsapic->lapic_flags & ACPI_MADT_ENABLED) { #ifdef CONFIG_SMP smp_boot_data.cpu_phys_id[available_cpus] = @@ -222,9 +217,6 @@ acpi_parse_lapic_nmi(struct acpi_subtable_header * header, const unsigned long e lacpi_nmi = (struct acpi_madt_local_apic_nmi *)header; - if (BAD_MADT_ENTRY(lacpi_nmi, end)) - return -EINVAL; - /* TBD: Support lapic_nmi entries */ return 0; } @@ -236,9 +228,6 @@ acpi_parse_iosapic(struct acpi_subtable_header * header, const unsigned long end iosapic = (struct acpi_madt_io_sapic *)header; - if (BAD_MADT_ENTRY(iosapic, end)) - return -EINVAL; - return iosapic_init(iosapic->address, iosapic->global_irq_base); } @@ -253,9 +242,6 @@ acpi_parse_plat_int_src(struct acpi_subtable_header * header, plintsrc = (struct acpi_madt_interrupt_source *)header; - if (BAD_MADT_ENTRY(plintsrc, end)) - return -EINVAL; - /* * Get vector assignment for this interrupt, set attributes, * and program the IOSAPIC routing table. @@ -336,9 +322,6 @@ acpi_parse_int_src_ovr(struct acpi_subtable_header * header, p = (struct acpi_madt_interrupt_override *)header; - if (BAD_MADT_ENTRY(p, end)) - return -EINVAL; - iosapic_override_isa_irq(p->source_irq, p->global_irq, ((p->inti_flags & ACPI_MADT_POLARITY_MASK) == ACPI_MADT_POLARITY_ACTIVE_LOW) ? @@ -356,9 +339,6 @@ acpi_parse_nmi_src(struct acpi_subtable_header * header, const unsigned long end nmi_src = (struct acpi_madt_nmi_source *)header; - if (BAD_MADT_ENTRY(nmi_src, end)) - return -EINVAL; - /* TBD: Support nimsrc entries */ return 0; }