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 X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9B10C4361B for ; Mon, 14 Dec 2020 11:44:01 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 6B83120798 for ; Mon, 14 Dec 2020 11:44:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B83120798 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org 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-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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org Reported-by: Heinrich Schuchardt Signed-off-by: Alejandro Colomar --- 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 -- 2.29.2 _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc