From patchwork Wed Aug 19 22:07:26 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: 7039641 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 D5FC2C05AC for ; Wed, 19 Aug 2015 22:11:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EC2E220866 for ; Wed, 19 Aug 2015 22:11:02 +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 1644C2084F for ; Wed, 19 Aug 2015 22:11:02 +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 1ZSBXE-0005G8-4z; Wed, 19 Aug 2015 22:08:40 +0000 Received: from mail-ig0-f176.google.com ([209.85.213.176]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZSBWu-00051a-Bx for linux-arm-kernel@lists.infradead.org; Wed, 19 Aug 2015 22:08:21 +0000 Received: by igbjg10 with SMTP id jg10so115766424igb.0 for ; Wed, 19 Aug 2015 15:07: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:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jmZYT7Iz4jhq40mnLOYUUgWi8wev5k0SyXF5x5/7bYo=; b=NhC/w7sHqWF3lttLGJkw9lHN/WxeXiZLCk+LL7G+EKvG/Ulmk6bzYzPhmINWRU+E7N kB/RRhpMWWWw9to6Kp2RjbW6W9wZOIP9XJrxhVwDtDIxPGbZqbBs/zViR4QzJbuQsPbc B2BRiBX6VlvOJc01tdbWgXEk21PesiFx36tIuVMmWzDPVWEE+6ArVSQrMU4NW8AeW4pS 0M5/BVWknWWnm5vH5vrI300J0mNeNl9eDaxKWOY4fpMorfuv2QLRWleaVIive17ldVlE ITEiOwLL9wIYQJMDvMVCzG6GeV4kkEMXn1EVZwKhkk8+7sWhcUpadZ3q2ToMa01uObwF P6Ag== X-Gm-Message-State: ALoCoQmQcZ8B5Nxu4fmZW2SrE4iGcT8E6aUpelB+wyexZYTAA0/GAJN0cVkpwi+FlHuPLRUEN7sO X-Received: by 10.50.143.2 with SMTP id sa2mr24168330igb.72.1440022077873; Wed, 19 Aug 2015 15:07:57 -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 f126sm1708666ioe.21.2015.08.19.15.07.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Aug 2015 15:07:56 -0700 (PDT) From: Al Stone To: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 3/5] ACPI / IA64: remove usage of BAD_MADT_ENTRY Date: Wed, 19 Aug 2015 16:07:26 -0600 Message-Id: <1440022048-6285-4-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1440022048-6285-1-git-send-email-al.stone@linaro.org> References: <1440022048-6285-1-git-send-email-al.stone@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150819_150820_546453_3FB9D57F 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.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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; }