From patchwork Thu Apr 28 13:50:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 8971151 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 41D33BF29F for ; Thu, 28 Apr 2016 13:52:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 73982200D6 for ; Thu, 28 Apr 2016 13:52:18 +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 8BB8D2013D for ; Thu, 28 Apr 2016 13:52:17 +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 1avmLM-00014R-EZ; Thu, 28 Apr 2016 13:51:00 +0000 Received: from pandora.arm.linux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1avmLI-0000tO-OS for linux-arm-kernel@lists.infradead.org; Thu, 28 Apr 2016 13:50:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=KiLRHFYI4D1wCN0OMVxosC+ymMaJ9fNWRqtcgQJI4oo=; b=UscpR440b6mh4HN3Jtyi0hkqNnRZ4T2Le9uqUmcsFpma9Z+v/7OAnpzPzABqN+wwmSC3tpo5az0eHfRxS0JRp5T441Op5CxLbl8bjv9cw6NjXO/c2QbrzEnLsRSBcLMG+PnMxXDIfS/bgExcLID1NGXreWf0WSLVFGjO6zS4dQs=; Received: from n2100.arm.linux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]:53746) by pandora.arm.linux.org.uk with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1avmKu-0005to-6o; Thu, 28 Apr 2016 14:50:32 +0100 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1avmKr-0007Ta-4r; Thu, 28 Apr 2016 14:50:29 +0100 Date: Thu, 28 Apr 2016 14:50:28 +0100 From: Russell King - ARM Linux To: Vladimir Murzin Subject: Re: [PATCH 3/3] ARM: domain: move {set, get}_domain under config guard Message-ID: <20160428135028.GE19428@n2100.arm.linux.org.uk> References: <1461325416-29570-1-git-send-email-vladimir.murzin@arm.com> <1461325416-29570-4-git-send-email-vladimir.murzin@arm.com> <20160427104918.GQ19428@n2100.arm.linux.org.uk> <5720AD9D.7020909@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5720AD9D.7020909@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160428_065057_109455_D4ECA8ED X-CRM114-Status: GOOD ( 14.45 ) X-Spam-Score: -5.3 (-----) 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: jean-philippe.brucker@arm.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, 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 On Wed, Apr 27, 2016 at 01:16:29PM +0100, Vladimir Murzin wrote: > I've confused myself that support for CPU_SW_DOMAIN_PAN implies > CONFIG_CPU_USE_DOMAINS, but now I see they are in fact different > features/users of those accessors. > > So something like below should be sufficient to fix my case, right? How about: arch/arm/include/asm/domain.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/include/asm/domain.h b/arch/arm/include/asm/domain.h index fc8ba1663601..4e218993c12d 100644 --- a/arch/arm/include/asm/domain.h +++ b/arch/arm/include/asm/domain.h @@ -84,6 +84,7 @@ #ifndef __ASSEMBLY__ +#ifdef CONFIG_CPU_CP15 static inline unsigned int get_domain(void) { unsigned int domain; @@ -103,6 +104,16 @@ static inline void set_domain(unsigned val) : : "r" (val) : "memory"); isb(); } +#else +static inline unsigned int get_domain(void) +{ + return 0; +} + +static inline void set_domain(unsigned val) +{ +} +#endif #ifdef CONFIG_CPU_USE_DOMAINS #define modify_domain(dom,type) \