From patchwork Mon Dec 14 11:43:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1415911 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=Yh3W792r; 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=pB9wTxjZ; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cvfg8126xz9sS8 for ; Mon, 14 Dec 2020 22:44:04 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6A9utqbp/JSkGOIB93uOSARuhEJzbfN+NsFviJVb080=; b=Yh3W792retC9AjUJhiEXDSLK3 vHVI2YOnrT02WFDsfgF99vblsE1R7sWk8soC5R8Kn7nBJfM9bcNCiKOkFUNk7+olm6gH6fJCKoe/7 mFx5LO0BQYFdnJc6x8dZecr65kLuRJIfLEZ4nr7xnOH2PQPsMdaQDEo2qN5aQV1FC1GOCy9SpCwuV AtuuH3T/AiUIirhFCE7CBmZpHn5ft4SBP1hJ6Plt6MOsHnpogJkl176HLiKRAiy0A6ULMYC2IKuKW ylqk+HwUp02nFfTaS4NLKosdNaCwbvSrWCBCOa0o+AaNhjAUEyip+4KVTbneAeBOuB9oTyNppsyRn Xqa+xP1WA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1komGm-0003xf-Qf; Mon, 14 Dec 2020 11:44:00 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1komGl-0003x7-Dn for linux-snps-arc@lists.infradead.org; Mon, 14 Dec 2020 11:44:00 +0000 Received: by mail-wr1-x443.google.com with SMTP id w5so12420039wrm.11 for ; Mon, 14 Dec 2020 03:43:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Duu0tFo0BYN5uj6dURuetdL16PH4j+9j2ppt0P47uAQ=; b=pB9wTxjZ7/mVFcG7DEye1eerxxcC4ixF6IXGpSf6sVJ0MNqfl5c03LarhNR+9Rb2wn 3pUbhdPn6nInHo0E+Pf0mVki3C3Zr8fzOwKjpmZ2FX+BoX5rSfJQc9pDUK21jbtX5km8 9hRb5LbE1+MlqnR9s/G3R2MfzK7J+xYgG1eIiWgMh82BZtIgop2XPtldp0Th0azQFyRY KDdJSgiOHjte4z7WP35RrewVVvovSMtgDYj0loZslXUF9lmzklXkN7xOHqLOQd3sA/J0 Zj2Diw5iZ7iWLGyaA+9LP0oyg8BDFKWESTaXBUyl0ml60gLMafwZ0samI25t67EX/iUA HCgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Duu0tFo0BYN5uj6dURuetdL16PH4j+9j2ppt0P47uAQ=; b=RNu3JNDZddJxYyv8ub1RoEh5bVdzlvf+Itq0SOzCVI8BPrhJpOfunOdyQZf/fy6SAg G/n/xJsPbgc0S0w7+iGMit0o5bGwrtruH6VkobAt2imZzMeNFPdQCU/PptxOzGrqhljw aJApYMmu09ywaHmvKECK8yLNLWBuDL/dCImJWld3n4PYqhyeGo6niawLg9d1fYyK2j8D u/VgXEAz33Yve+KJ0IeX70jvVAo/dztdAy8WMBBIAugLfJ30Z9PB7Qjothnk2xZNGEdQ awji28SLTbi4yta8UVInOPDaj1qUXSN0JkhqguZ5YTIK6ztx/EGTgZAT+GXP2aBepo8y N1jA== X-Gm-Message-State: AOAM531NIOenYyTa+Fh2UAOQpgWMI81BTCY7Q9x9Vph67OcYyeTVl7jI WgI8DpmORARY2sg838SpfE8= X-Google-Smtp-Source: ABdhPJxsLEA1x2BvX2Vfv0PWw5ZALM5wpjW+lZrR3OZvh23vfIoL8ABymDaKKnKOm5kmY/zsMlVxdQ== X-Received: by 2002:a5d:4d02:: with SMTP id z2mr29370287wrt.109.1607946236907; Mon, 14 Dec 2020 03:43:56 -0800 (PST) Received: from debian.vlc ([170.253.51.130]) by smtp.gmail.com with ESMTPSA id w18sm11738403wrn.2.2020.12.14.03.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Dec 2020 03:43:56 -0800 (PST) From: Alejandro Colomar To: Michael Kerrisk , Dave Martin , Heinrich Schuchardt , linux-man@vger.kernel.org Subject: [PATCH v5] cacheflush.2: Document __builtin___clear_cache() as a more portable alternative Date: Mon, 14 Dec 2020 12:43:07 +0100 Message-Id: <20201214114306.10784-1-alx.manpages@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201214_064359_491756_F0229972 X-CRM114-Status: GOOD ( 10.46 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:443 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [alx.manpages[at]gmail.com] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alejandro Colomar , Thomas Bogendoerfer , Vincent Chen , Nick Hu , Vineet Gupta , linux-mips@vger.kernel.org, linux-csky@vger.kernel.org, Guo Ren , Greentime Hu , gcc-patches@gcc.gnu.org, linux-snps-arc@lists.infradead.org, cfe-users@lists.llvm.org, cfe-dev@lists.llvm.org Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Reported-by: Heinrich Schuchardt Signed-off-by: Alejandro Colomar Reviewed-by: Heinrich Schuchardt --- man2/cacheflush.2 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/man2/cacheflush.2 b/man2/cacheflush.2 index aba625721..7a2eed506 100644 --- a/man2/cacheflush.2 +++ b/man2/cacheflush.2 @@ -86,6 +86,30 @@ On Linux, this call first appeared on the MIPS architecture, but nowadays, Linux provides a .BR cacheflush () system call on some other architectures, but with different arguments. +.SH NOTES +Unless you need the finer grained control that this system call provides, +you probably want to use the GCC built-in function +.BR __builtin___clear_cache (), +which provides a portable interface +across platforms supported by GCC and compatible compilers: +.PP +.in +4n +.EX +.BI "void __builtin___clear_cache(void *" begin ", void *" end ); +.EE +.in +.PP +On platforms that don't require instruction cache flushes, +.BR __builtin___clear_cache () +has no effect. +.PP +.IR Note : +Until GCC 9.1.0, +the prototype for this built-in function used +.I char * +instead of +.I void * +for the parameters. .SH BUGS Linux kernels older than version 2.6.11 ignore the .I addr