From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E81DC35669 for ; Fri, 21 Feb 2020 20:16:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 248B92064C for ; Fri, 21 Feb 2020 20:16:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="UfJrRFWd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 248B92064C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=atomide.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8DkToMOTHFJrjb7X1hDwnlqudCBZ1rdVM2QblUqqEww=; b=UfJrRFWdiIB9kc n8bN7kSmSSIH6Qz4NFszMh2XPM7Pln5k0akISzJoiG4yNNp6b9HYlnui/BIjIidSdPuYORW/z1j9R jNoC1xohv1lQqg+CLJZChzoLzqwFDsszKmT5hDdXZDS+EPrLp3NW0bASWiDLkp6EQi6/JQWQZMqxv 8B7Zr3qzwVXAUai121mSyTfemQCc9UR/bLfCBgIdZmRTlQBBLCRyNZc2Gp4iX4kedlfL6k9mynFoJ Yo/+MpRvNlRrKZk+nLPXP0+iOviXKrsowLOe8nN2yLC944UcYQs9N2fModqnVQhR/jwimvLQaqrvi ou5ShyUUeRaU6Qp9uTfw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j5EiD-0008GV-Vx; Fri, 21 Feb 2020 20:15:49 +0000 Received: from muru.com ([72.249.23.125]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j5EiA-0008Aa-No for linux-arm-kernel@lists.infradead.org; Fri, 21 Feb 2020 20:15:48 +0000 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 0EF00807E; Fri, 21 Feb 2020 20:16:29 +0000 (UTC) Date: Fri, 21 Feb 2020 12:15:42 -0800 From: Tony Lindgren To: Arnd Bergmann Subject: Re: [PATCH] ARM: OMAP2+: Fix compile if CONFIG_HAVE_ARM_SMCCC is not set Message-ID: <20200221201542.GB37466@atomide.com> References: <20200221180901.15812-1-tony@atomide.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200221_121546_817041_6EB01E20 X-CRM114-Status: GOOD ( 16.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , kbuild test robot , Aaro Koskinen , Catalin Marinas , "Andrew F . Davis" , Marc Zyngier , Russell King , linux-omap , Will Deacon , Steven Price , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org * Arnd Bergmann [200221 20:06]: > On Fri, Feb 21, 2020 at 7:09 PM Tony Lindgren wrote: > > > > Recent omap changes added runtime checks to use omap_smccc_smc() > > when optee is configured in dts. As the omap-secure code can be > > built for ARMv6 only without ARMv7 and use custom smc calls, we > > now get a build error: > > > > omap-secure.c:(.text+0x94): undefined reference to `__arm_smccc_smc' > > > > Let's just ifdef out omap_smccc_smc() unless the CPU has selected > > CONFIG_HAVE_ARM_SMCCC. The other option discussed was to add an > > inline function to arm-smccc.h, but we'd still also have to add > > ifdef around omap_smccc_smc() to avoid a warning for uninitialized > > value for struct arm_smccc_res in omap_smccc_smc(). And we probably > > should not start initializing values in arm-smccc.h if disabled. > > > > Let's also warn on trying to use omap_smccc_smc() if disabled as > > suggested by Andrew F. Davis . > > > > +#ifdef CONFIG_HAVE_ARM_SMCCC > > void omap_smccc_smc(u32 fn, u32 arg) > > { > > struct arm_smccc_res res; > > @@ -85,6 +86,12 @@ void omap_smccc_smc(u32 fn, u32 arg) > > 0, 0, 0, 0, 0, 0, &res); > > WARN(res.a0, "Secure function call 0x%08x failed\n", fn); > > } > > +#else > > Looking through the callers again, this can and is only called > for ARMv7 CPUs, so can't you just avoid the #else path and > turn it into a link error if we ever get callers on ARMv6-only builds? Hmm yeah maybe. If ARMv6 machines (basically n8x0) is not using omap-smc.S at all, it's unlike it would need omap-secure.c either. Regards, Tony _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel