From patchwork Tue Jul 1 12:05:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 4458361 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 8CFDF9F39B for ; Tue, 1 Jul 2014 12:08:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B3471203DA for ; Tue, 1 Jul 2014 12:08:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A5152202E5 for ; Tue, 1 Jul 2014 12:08:39 +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 1X1wpa-0006hr-EA; Tue, 01 Jul 2014 12:06:38 +0000 Received: from mail-ig0-f173.google.com ([209.85.213.173]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X1wp2-0005V4-Mq for linux-arm-kernel@lists.infradead.org; Tue, 01 Jul 2014 12:06:05 +0000 Received: by mail-ig0-f173.google.com with SMTP id uq10so5399287igb.6 for ; Tue, 01 Jul 2014 05:05:43 -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; bh=pnZIEgwij7o91xX0+KT7uVZBEbsZGnah9tAic3yl4no=; b=a9lM2NfQG8UkEAB1ToR2TNl+yUljsfzY8XQu2dTVMpsAhwIiKSkRsthhmyIkdc/PF9 SIj8QV1hMDbLvYVFSXGd9MudtgBDifuFCRC7G/CfYVVIMcTkP06PnRsfu74ZorQFL3qQ wAGXYbrMUrb1sqoY5pTPQl3UGKOT6xX8jVnOZMs3ZbwF2Sq8BjCJFzcxLMZLo1+NaODy hfSj7ezLbuohzI0bYAVOOEy8IIbcFBad0QDWG0qx52GqHoz9EqKN3ifCwJMlH6n61hPM b4TxMZY2PA3SPPGSHj9EFK0MZgaI8uM1xc6Kc+kqVf9Itkvswk7rELTDD4WRh1lB8RG5 x0nQ== X-Gm-Message-State: ALoCoQllg7JGmE9L0H07mgpmnHh6KP/STN4oaY5qLbmCveGatIqHr5yS7efvoLrVsFOpygL31zCi X-Received: by 10.50.126.7 with SMTP id mu7mr40582650igb.20.1404216343890; Tue, 01 Jul 2014 05:05:43 -0700 (PDT) Received: from localhost.localdomain (c-71-195-31-37.hsd1.mn.comcast.net. [71.195.31.37]) by mx.google.com with ESMTPSA id qa4sm33669094igb.10.2014.07.01.05.05.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 01 Jul 2014 05:05:43 -0700 (PDT) From: Alex Elder To: bcm@fixthebug.org, mporter@linaro.org Subject: [PATCH] mach-bcm SMC: address clang inline asm incompatibility Date: Tue, 1 Jul 2014 07:05:39 -0500 Message-Id: <1404216339-6480-1-git-send-email-elder@linaro.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140701_050604_800019_EECBBD43 X-CRM114-Status: GOOD ( 10.46 ) X-Spam-Score: -0.7 (/) Cc: bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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=-1.9 required=5.0 tests=BAYES_00, T_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 My GCC-based build environment likes to call register r12 by the name "ip" in inline asm. Behan Webster informed me that his Clang- based build environment likes "r12" instead. Try to make them both happy. Signed-off-by: Alex Elder Signed-off-by: Behan Webster --- arch/arm/mach-bcm/bcm_kona_smc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-bcm/bcm_kona_smc.c b/arch/arm/mach-bcm/bcm_kona_smc.c index a55a7ec..3937bd5 100644 --- a/arch/arm/mach-bcm/bcm_kona_smc.c +++ b/arch/arm/mach-bcm/bcm_kona_smc.c @@ -106,9 +106,14 @@ int __init bcm_kona_smc_init(void) * request result appropriately. This result value is found in r0 * when the "smc" request completes. */ +#ifdef __clang__ +#define R12 "r12" +#else /* !__clang__ */ +#define R12 "ip" /* gcc calls r12 "ip" */ +#endif /* !__clang__ */ static int bcm_kona_do_smc(u32 service_id, u32 buffer_phys) { - register u32 ip asm("ip"); /* Also called r12 */ + register u32 ip asm(R12); /* Also called r12 */ register u32 r0 asm("r0"); register u32 r4 asm("r4"); register u32 r5 asm("r5"); @@ -120,7 +125,7 @@ static int bcm_kona_do_smc(u32 service_id, u32 buffer_phys) asm volatile ( /* Make sure we got the registers we want */ - __asmeq("%0", "ip") + __asmeq("%0", R12) __asmeq("%1", "r0") __asmeq("%2", "r4") __asmeq("%3", "r5")