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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0F15C433EF for ; Fri, 15 Oct 2021 18:01:28 +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 BEF176120A for ; Fri, 15 Oct 2021 18:01:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BEF176120A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=FkKMcw7VW0SDtOASgSbAcqwVOrmwx6vCO8rk62rRsBI=; b=zn/R5kJj1Ey/Fu j8EvrOXKmL3mD6qpwNSwl5yDUrv5CzZbh+209aiINQ7Vc1+5oi6DHPV8mW/fzBqCIoR9fX6P/tiLO iS8irZ0Q98etIWpZmg3TeIjXWQJlNvZh0OaOYznFpeVFkr/JU7BPutJTTZbIGsW7uHHCkGbo/TUxp JIZg0VWjP5nJdIZ2ASh80WB0+0nTN+g0XUcRnPj/vJG88ELZNCJw+87LeUe69wp409FwG4lYB3y31 WFH0C+YnvcIlKtdmx9jtdjJtDcjok8WF/Z1QMtB8avZT8ePiczsasa+rMJsAFkXDRbAfT39lzRItK O6U6Risb92huZKbPvmFw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbRV2-008No9-4h; Fri, 15 Oct 2021 18:00:08 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbRUy-008NnK-FL for linux-arm-kernel@lists.infradead.org; Fri, 15 Oct 2021 18:00:05 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2116361212; Fri, 15 Oct 2021 18:00:01 +0000 (UTC) Date: Fri, 15 Oct 2021 18:59:58 +0100 From: Catalin Marinas To: Xiongfeng Wang Cc: mark.rutland@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, moyufeng@huawei.com Subject: Re: [RFC PATCH v2] arm64: barrier: add macro dgh() to control memory accesses merging Message-ID: References: <20211015090511.92421-1-wangxiongfeng2@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211015090511.92421-1-wangxiongfeng2@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211015_110004_558214_EA725180 X-CRM114-Status: GOOD ( 12.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Oct 15, 2021 at 05:05:11PM +0800, Xiongfeng Wang wrote: > diff --git a/arch/arm64/include/asm/barrier.h b/arch/arm64/include/asm/barrier.h > index 451e11e5fd23..d71a7457d619 100644 > --- a/arch/arm64/include/asm/barrier.h > +++ b/arch/arm64/include/asm/barrier.h > @@ -18,6 +18,14 @@ > #define wfe() asm volatile("wfe" : : : "memory") > #define wfi() asm volatile("wfi" : : : "memory") > > +/* > + * Data Gathering Hint: > + * This instruction prohibits merging memory accesses with Normal-NC or > + * Device-GRE attributes before the hint instruction with any memory accesses > + * appearing after the hint instruction. > + */ > +#define dgh() asm volatile("hint #6" : : : "memory") On its own, this patch doesn't do anything. It's more interesting to see how it will be used and maybe come up with a common name that other architectures would share (or just implement as no-opp). I'm not sure there was any conclusion last time we discussed this. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel