From patchwork Wed Apr 9 15:14:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Nowicki X-Patchwork-Id: 28091 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f70.google.com (mail-yh0-f70.google.com [209.85.213.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 53BAB2145A for ; Wed, 9 Apr 2014 15:14:28 +0000 (UTC) Received: by mail-yh0-f70.google.com with SMTP id c41sf7987317yho.1 for ; Wed, 09 Apr 2014 08:14:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=zYbHV8GjCAiTOz8IasDGkrLMNqJmi9GET0F3PcLrqFw=; b=dWujCT/zliDwM2IZu4etjkvuEKH7qMCu203zBIvaVTUH07JKPcc5pxsE8iXQdR5T9B 12U6g2dSn4D691SHxjd/0qGIbhnJ6leAdkc8p7cJCEFNtLuqkKVDOkBFzr+ApDvFbP1E 4tHTuUqvrfzd3z568NdspFoW8yu0DwvbgVG4zVRs1esAaDKPnFoKmuQgRXC0W8/L2Hhi WkOymA2syNeOeOJqvTmffndasvZ1gwuCwLpl/f7duPXwOj0P+gD/yJqXpM+k45Fu7/i8 9nUow7xFw87dt/n6igvcfoCUS3az09WSQltjpAdWkYR8PEeacPlN4BnwUH/t6c+CxpUk QiRQ== X-Gm-Message-State: ALoCoQnrksydTarohImjwG+ZoDDX93r1i2MbVuk0v/Ev0YjiFcgxs/T7956TU51aFFSEgrc+AyEn X-Received: by 10.236.84.141 with SMTP id s13mr4988092yhe.5.1397056468045; Wed, 09 Apr 2014 08:14:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.27.38 with SMTP id 35ls728469qgw.77.gmail; Wed, 09 Apr 2014 08:14:27 -0700 (PDT) X-Received: by 10.221.50.70 with SMTP id vd6mr983894vcb.51.1397056467877; Wed, 09 Apr 2014 08:14:27 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id xo2si181926vec.170.2014.04.09.08.14.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Apr 2014 08:14:27 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id db11so2224944veb.35 for ; Wed, 09 Apr 2014 08:14:27 -0700 (PDT) X-Received: by 10.220.191.134 with SMTP id dm6mr9510708vcb.16.1397056467770; Wed, 09 Apr 2014 08:14:27 -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.220.12.8 with SMTP id v8csp338115vcv; Wed, 9 Apr 2014 08:14:27 -0700 (PDT) X-Received: by 10.67.14.69 with SMTP id fe5mr12953837pad.120.1397056466663; Wed, 09 Apr 2014 08:14:26 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bi5si611541pbb.406.2014.04.09.08.14.25; Wed, 09 Apr 2014 08:14:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933809AbaDIPOY (ORCPT + 8 others); Wed, 9 Apr 2014 11:14:24 -0400 Received: from mail-ee0-f50.google.com ([74.125.83.50]:46036 "EHLO mail-ee0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964806AbaDIPOU (ORCPT ); Wed, 9 Apr 2014 11:14:20 -0400 Received: by mail-ee0-f50.google.com with SMTP id c13so2002825eek.37 for ; Wed, 09 Apr 2014 08:14:18 -0700 (PDT) X-Received: by 10.14.216.2 with SMTP id f2mr674497eep.83.1397056458624; Wed, 09 Apr 2014 08:14:18 -0700 (PDT) Received: from tn-HP3-PC.semihalf.com ([80.82.22.190]) by mx.google.com with ESMTPSA id x46sm2326082een.17.2014.04.09.08.14.16 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Apr 2014 08:14:18 -0700 (PDT) From: Tomasz Nowicki To: rjw@rjwysocki.net, lenb@kernel.org, tony.luck@intel.com, bp@alien8.de, bp@suse.de, m.chehab@samsung.com Cc: linux-edac@vger.kernel.org, x86@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, Tomasz Nowicki Subject: [PATCH 1/7] apei, mce: Call MCE-specific code only for X86 architecture. Date: Wed, 9 Apr 2014 17:14:29 +0200 Message-Id: <1397056476-9183-2-git-send-email-tomasz.nowicki@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1397056476-9183-1-git-send-email-tomasz.nowicki@linaro.org> References: <1397056476-9183-1-git-send-email-tomasz.nowicki@linaro.org> Sender: linux-acpi-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: tomasz.nowicki@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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-Post: , List-Help: , List-Archive: List-Unsubscribe: , This commit is dealing with MCE code in: - hest.c Move acpi_disable_cmcff flag to hest_parse_cmc() and makes that depend on CONFIG_X86_MCE so that we do not have to maintain acpi_disable_cmcff for architectures which do not support MCE. Also, wrap architectural MCE header inside #ifdef CONFIG_X86_MCE. - ghes.c Wrap architectural MCE header inside #ifdef CONFIG_X86_MCE similar to rest of the MCE code in this file. Signed-off-by: Tomasz Nowicki --- drivers/acpi/apei/ghes.c | 2 ++ drivers/acpi/apei/hest.c | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index dab7cb7..f7edffc 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -49,7 +49,9 @@ #include #include +#ifdef CONFIG_X86_MCE #include +#endif #include #include diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c index f5e37f3..98db702 100644 --- a/drivers/acpi/apei/hest.c +++ b/drivers/acpi/apei/hest.c @@ -36,7 +36,9 @@ #include #include #include +#ifdef CONFIG_X86_MCE #include +#endif #include "apei-internal.h" @@ -133,6 +135,9 @@ static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data) struct acpi_hest_ia_corrected *cmc; struct acpi_hest_ia_error_bank *mc_bank; + if (acpi_disable_cmcff) + return 1; + if (hest_hdr->type != ACPI_HEST_TYPE_IA32_CORRECTED_CHECK) return 0; @@ -263,8 +268,7 @@ void __init acpi_hest_init(void) goto err; } - if (!acpi_disable_cmcff) - apei_hest_parse(hest_parse_cmc, NULL); + apei_hest_parse(hest_parse_cmc, NULL); if (!ghes_disable) { rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count);