From patchwork Mon Oct 12 02:51:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 1380641 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.helo=coreboot.org (client-ip=78.46.105.101; helo=coreboot.org; envelope-from=flashrom-bounces@flashrom.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ZUM4gOsE; dkim-atps=neutral Received: from coreboot.org (coreboot.org [78.46.105.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C8pcl1JX5z9sSs for ; Mon, 12 Oct 2020 17:27:19 +1100 (AEDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id D809610C0080; Mon, 12 Oct 2020 06:27:13 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id E66A710C0039 for ; Mon, 12 Oct 2020 02:51:32 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) for ; Sun, 11 Oct 2020 19:51:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=QkgtxWJnI4+N1x83r1+rvZivxsaoJH9uhrxAOjXDQos=; b=ZUM4gOsE9H+XmWq0JMphyBcP56Owremrf3BWdFldQSatle430LXFoxH6rKu6ag73ka flIoMCg8P6hamsOnwKrWvOSdCCiJyFs/Eu65Xb/WHIgUDD/t6d5gf59m2ZJdi3omlsMI fxXCMyCGsOudTM8UMXYTS2HUCCz6TQDzGXZLMOoaJ0rswLr6IAkhWsDpr4LVyv6QcjBK vU6qAB2jB+fANiykUT1WDG4HSR9o0+qUuvYfr7+5niaT4briIunenjOsd3ZQIleoVOsZ 3K0B8lxTEIpGiTrKpYNqIrIGG3TPEHhy6CIEVe/SRu8ol7xE0F4HCQeUJ4Vg0TXIRj1+ YX1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=QkgtxWJnI4+N1x83r1+rvZivxsaoJH9uhrxAOjXDQos=; b=CA05KyGjszGXbjPZi05VmvfmVHa7oPmBS5FFAONqQtkcqixBkjgJRvs8U2Wp6lLlcg JITvlLPFfedeERV6RxhK7CIS6UugbvKyV1i00egUQT/1JXQjH04rkt/5A7sSQpBeNH+E nu+u82xtOy9XYtislZc7fmG615VHsNxER5iphkmXaseeohumNNdsPSG0JlN47kF7+rM0 /AGViGo+A7pST1fIfnRGmn7yKARb2GK5MlLKlDXTT0VIiBs+1orwFZN4WU9zFyJgbE96 g78XJLlMBio7wWvjxfxog9SRwCob0WIgR2PrDlAgX7uTJghFxbfesP14Go6wRLsZKuzH U8Dw== X-Gm-Message-State: AOAM533zFLcK5b/5Z9IOUgaDfm570xyW5DSFkPM/EaA7UW2Ky96mJrx1 bKA4FRL6u8Fbl8VuO4R7cY51M68HO5DQwg== X-Google-Smtp-Source: ABdhPJzenEHBPIozkgi4hfE8p7bN+dOE0GYnb5v4NZOmkcIRbSpQL2luUOTNkCYkKfpZa+88X350Dg== X-Received: by 2002:a65:45cb:: with SMTP id m11mr11591094pgr.75.1602471091080; Sun, 11 Oct 2020 19:51:31 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by smtp.gmail.com with ESMTPSA id a9sm22960579pjm.40.2020.10.11.19.51.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 19:51:30 -0700 (PDT) From: Rosen Penev To: flashrom@flashrom.org Date: Sun, 11 Oct 2020 19:51:29 -0700 Message-Id: <20201012025129.19805-1-rosenp@gmail.com> MIME-Version: 1.0 X-MailFrom: rosenp@gmail.com X-Mailman-Rule-Hits: member-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address Message-ID-Hash: TFV7DYJIZZJEFQ3ACQ6U2CWOSISSXBI7 X-Message-ID-Hash: TFV7DYJIZZJEFQ3ACQ6U2CWOSISSXBI7 X-Mailman-Approved-At: Mon, 12 Oct 2020 06:26:56 +0000 X-Mailman-Version: 3.3.2b1 Precedence: list Subject: [flashrom] [PATCH] hwaccess: use __asm__ as is done elsewhere List-Id: flashrom discussion and development mailing list Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=flashrom-bounces@flashrom.org X-Spamd-Bar: / Fixes compilation under powerpc platform. Made the change for the SPARC platform as well. ../hwaccess.c: In function 'sync_primitive': ../hwaccess.c:74:2: warning: implicit declaration of function 'asm' [-Wimplicit-function-declaration] 74 | asm("eieio" : : : "memory"); | ^~~ ../hwaccess.c:74:13: error: expected ')' before ':' token 74 | asm("eieio" : : : "memory"); Signed-off-by: Rosen Penev --- hwaccess.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hwaccess.c b/hwaccess.c index 48ccb34..2a39989 100644 --- a/hwaccess.c +++ b/hwaccess.c @@ -71,18 +71,18 @@ static inline void sync_primitive(void) * See also https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/memory-barriers.txt */ #if IS_PPC // cf. http://lxr.free-electrons.com/source/arch/powerpc/include/asm/barrier.h - asm("eieio" : : : "memory"); + __asm__ ("eieio" : : : "memory"); #elif IS_SPARC #if defined(__sparc_v9__) || defined(__sparcv9) /* Sparc V9 CPUs support three different memory orderings that range from x86-like TSO to PowerPC-like * RMO. The modes can be switched at runtime thus to make sure we maintain the right order of access we * use the strongest hardware memory barriers that exist on Sparc V9. */ - asm volatile ("membar #Sync" ::: "memory"); + __asm__ volatile ("membar #Sync" ::: "memory"); #elif defined(__sparc_v8__) || defined(__sparcv8) /* On SPARC V8 there is no RMO just PSO and that does not apply to I/O accesses... but if V8 code is run * on V9 CPUs it might apply... or not... we issue a write barrier anyway. That's the most suitable * operation in the V8 instruction set anyway. If you know better then please tell us. */ - asm volatile ("stbar"); + __asm__ volatile ("stbar"); #else #error Unknown and/or unsupported SPARC instruction set version detected. #endif