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: 32887 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 564B320672 for ; Tue, 1 Jul 2014 12:06:09 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id f10sf23229281yha.7 for ; Tue, 01 Jul 2014 05:06:09 -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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=wM8Qayu0f/8fl6kfx4vpKvfHCtaotPlqn8eP/dRP+tM=; b=gQ4inn4CUWYDgbLE4FqXIYsKl1uNbeaIsHFS/jvRexHksrHPJNc+0WC5e0xSOY1nJf XCd6qMS+2mkHJCP8QtS+x0Tlc5i7UAU1FInOi7PonHuYXP5F5krAcS+j6z8tyu3t6KKu 7x9p99ruGdhff9gWF1PR18A4GokEtFuFYTCVMYKG4AF7g6NTUV9jcePr6s3y7c+VfUbC PRWmR1rgxqWsRtkRelgheHNGRtEGSjbIlsCqSc5GmTaY0Y/YBsjaR9XxlRoNIVN1gxis Z4ZIat/HO7y2AZoJ1qYrWeUNzmWLXICKDhZucFhwtO3Ce7VEY0e4ndM0B3c+x6IXAl7w vrVA== X-Gm-Message-State: ALoCoQkvLo388fNNjKqzwcLDcEd5rk71j/EFFb6IA/cKGrFLW9TXyp2pru37zKXrPRdKg3Q69EmP X-Received: by 10.236.124.100 with SMTP id w64mr3381690yhh.57.1404216369193; Tue, 01 Jul 2014 05:06:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.25.196 with SMTP id 62ls1274721qgt.45.gmail; Tue, 01 Jul 2014 05:06:09 -0700 (PDT) X-Received: by 10.58.19.10 with SMTP id a10mr44737774vee.1.1404216369079; Tue, 01 Jul 2014 05:06:09 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id xx2si11288560vdc.54.2014.07.01.05.06.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 01 Jul 2014 05:06:09 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id hy10so8818274vcb.31 for ; Tue, 01 Jul 2014 05:06:09 -0700 (PDT) X-Received: by 10.221.20.199 with SMTP id qp7mr43586641vcb.24.1404216368970; Tue, 01 Jul 2014 05:06:08 -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.221.37.5 with SMTP id tc5csp209627vcb; Tue, 1 Jul 2014 05:06:08 -0700 (PDT) X-Received: by 10.68.90.68 with SMTP id bu4mr60109663pbb.5.1404216368217; Tue, 01 Jul 2014 05:06:08 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qq9si26792101pbc.26.2014.07.01.05.06.07; Tue, 01 Jul 2014 05:06:07 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752025AbaGAMFp (ORCPT + 27 others); Tue, 1 Jul 2014 08:05:45 -0400 Received: from mail-ig0-f174.google.com ([209.85.213.174]:51249 "EHLO mail-ig0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751225AbaGAMFo (ORCPT ); Tue, 1 Jul 2014 08:05:44 -0400 Received: by mail-ig0-f174.google.com with SMTP id l13so5406407iga.1 for ; Tue, 01 Jul 2014 05:05:44 -0700 (PDT) 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 Cc: behanw@converseincode.com, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.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 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: elder@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) 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: , 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")