From patchwork Sat Sep 21 19:28:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 2922971 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AA4779F1E2 for ; Sat, 21 Sep 2013 19:28:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ACCFC204D8 for ; Sat, 21 Sep 2013 19:28:56 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6C641204C4 for ; Sat, 21 Sep 2013 19:28:55 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VNSrF-0001dx-Ly; Sat, 21 Sep 2013 19:28:45 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VNSrD-0005ti-A8; Sat, 21 Sep 2013 19:28:43 +0000 Received: from mail-ob0-x231.google.com ([2607:f8b0:4003:c01::231]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VNSr9-0005tK-W4 for linux-arm-kernel@lists.infradead.org; Sat, 21 Sep 2013 19:28:40 +0000 Received: by mail-ob0-f177.google.com with SMTP id wp18so2080966obc.8 for ; Sat, 21 Sep 2013 12:28:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=FnM30G4OMLrx2nnQ1248Ecfl4us41zmuZqzh/K+KQuo=; b=ZWsbekKkyRhp0qhAJM/i8Ewa5I2JYdko1ADqZe1Fw0dOMNEd5xh2aHoCHoyUo4X79Z EUzDxivGLQ9jEBUCSyivLHHV9Z4pjqzVlNH4xWYt3CADNM/kLafgJYPqKWlq68GZ7/dI oXyOGV6DQvqzRC+kqyKafmjucVxP0rAqf9/wQBV/K498N87EjNm5Ch/Dbr0mrGz7PVJA BSour6xwfpAyQcmxyimMLNLuo5eiUOYflWYotBphnqMkqPTqDP+Wk9fKpGSIOre1LH01 PqgJ1zbkWhhoVEu1emM8Y7E5lkfom/uY1L3mqfizp1DmNBBM1AEf90+bf/6eCoXjSBC+ ymJQ== X-Received: by 10.182.49.166 with SMTP id v6mr11698002obn.13.1379791698227; Sat, 21 Sep 2013 12:28:18 -0700 (PDT) Received: from rob-laptop.grandenetworks.net (65-36-73-129.dyn.grandenetworks.net. [65.36.73.129]) by mx.google.com with ESMTPSA id d8sm7884486oeu.6.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 21 Sep 2013 12:28:17 -0700 (PDT) From: Rob Herring To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: move ARM errata 798181 declaration out of CONFIG_MMU Date: Sat, 21 Sep 2013 14:28:09 -0500 Message-Id: <1379791689-3141-1-git-send-email-robherring2@gmail.com> X-Mailer: git-send-email 1.8.1.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130921_152840_118287_BB7A1110 X-CRM114-Status: UNSURE ( 9.11 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.8 (-) Cc: khilman@linaro.org, Russell King , Rob Herring X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Rob Herring With commit 75a675720d980d7 (ARM: 7838/1: Add check for Cortex-A15 errata 798181 ECO), !CONFIG_MMU builds fail to build: ../../arch/arm/kernel/setup.c:602:2: error: implicit declaration of function 'erratum_a15_798181_init' [-Werror=implicit-function-declaration] Fix this by moving the declarations for errata 798181 out of CONFIG_MMU ifdef. The errata work-around already depends on SMP, so other condition checks are not needed. Reported-by: Kevin Hilman Signed-off-by: Rob Herring --- Based on rmk's for-next branch. Compiled all defconfigs. Rob arch/arm/include/asm/tlbflush.h | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h index dfad966..def9e57 100644 --- a/arch/arm/include/asm/tlbflush.h +++ b/arch/arm/include/asm/tlbflush.h @@ -560,21 +560,6 @@ static inline void __flush_bp_all(void) asm("mcr p15, 0, %0, c7, c1, 6" : : "r" (zero)); } -#ifdef CONFIG_ARM_ERRATA_798181 -extern void erratum_a15_798181_init(void); -#else -static inline void erratum_a15_798181_init(void) {} -#endif -extern bool (*erratum_a15_798181_handler)(void); - -static inline bool erratum_a15_798181(void) -{ - if (unlikely(IS_ENABLED(CONFIG_ARM_ERRATA_798181) && - erratum_a15_798181_handler)) - return erratum_a15_798181_handler(); - return false; -} - /* * flush_pmd_entry * @@ -681,4 +666,21 @@ extern void flush_bp_all(void); #endif +#ifndef __ASSEMBLY__ +#ifdef CONFIG_ARM_ERRATA_798181 +extern void erratum_a15_798181_init(void); +#else +static inline void erratum_a15_798181_init(void) {} +#endif +extern bool (*erratum_a15_798181_handler)(void); + +static inline bool erratum_a15_798181(void) +{ + if (unlikely(IS_ENABLED(CONFIG_ARM_ERRATA_798181) && + erratum_a15_798181_handler)) + return erratum_a15_798181_handler(); + return false; +} +#endif + #endif