From patchwork Tue Sep 29 23:45:44 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: 7291601 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 20DDDBEEA4 for ; Tue, 29 Sep 2015 23:51:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3D1A22056C for ; Tue, 29 Sep 2015 23:51:07 +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 E790020552 for ; Tue, 29 Sep 2015 23:51:05 +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 1Zh4eH-0005eh-1Y; Tue, 29 Sep 2015 23:49:29 +0000 Received: from mail-io0-f178.google.com ([209.85.223.178]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zh4bI-0004Yh-Uz for linux-arm-kernel@lists.infradead.org; Tue, 29 Sep 2015 23:46:25 +0000 Received: by ioiz6 with SMTP id z6so29207507ioi.2 for ; Tue, 29 Sep 2015 16:46: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=S3kj4UKhaJnpnIaetWkG0TUosbosPLiz5bt3D9x/u72GklGbgzr6/Kv2S0/Poajx+d f83j44Y2A8tAmwpM2ePf3pVV411HBHRQmlzT3COdpJ5lN6P9qMWyAGc3cZ7adpXKa26y /jIwpOjd6NmMRJCD6iEnsm1FbsTcr7ut+eQwn0AtqtD/Gkp99pz2nhkQSB/IhIaymG7K GRMiriw8iwCYNckRGIzEIgeK1+vYFPjMchcTycT8Ir2nuAkcY0vkEudoc9bzpUsS02C2 4GBhAuP1i2xMoMoSQssWPPBLRgQtYoXZS4kEHUfSVCo8E+yojyJy+vIaUfEMhcmt2xBQ 8s+A== X-Gm-Message-State: ALoCoQmWb+jk1rIsUYzw27DOVc+D4ep4DfwYSQ13D7b+yoN9Eql2mQ3AXyZjg57fgoKSAfk5Sde3 X-Received: by 10.107.19.234 with SMTP id 103mr1758240iot.41.1443570363774; Tue, 29 Sep 2015 16:46: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 r40sm12256182ioe.20.2015.09.29.16.46.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Sep 2015 16:46:02 -0700 (PDT) From: Al Stone To: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 3/5] ACPI / IA64: remove usage of BAD_MADT_ENTRY Date: Tue, 29 Sep 2015 17:45:44 -0600 Message-Id: <1443570346-15378-4-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1443570346-15378-1-git-send-email-al.stone@linaro.org> References: <1443570346-15378-1-git-send-email-al.stone@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150929_164625_109568_22A3E9D3 X-CRM114-Status: GOOD ( 10.92 ) 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; }