From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id D34D0398EC1E for ; Fri, 11 Dec 2020 18:22:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D34D0398EC1E Received: by mail-wm1-x32d.google.com with SMTP id v14so8327555wml.1 for ; Fri, 11 Dec 2020 10:22:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=tAqCh5Od6u+QkKkk73z6TPBIyc7dI4kPyq4+MMVWoR0=; b=PkeJLveDv7vOpLNdXV5aiSX8JG0R4w62pkpbl/TO5dMwV4MaAjSePEZkQmSScBmKWY WfQJkOLeYGnz6Z/PVCdl4U0jjCx84C1jkv7mmQAYOJu9OudLjmPApzl0lPfGtgb65wV0 7g+TAzweBi36HQufrRP5TE4cRyVOTKz0AR4I5bMhvI2wKwsdJlqiu6Dj78CkVnzn6EYi tV47UKzD78gT0t+1A3tYwvRJ3iW1PehRhFFuvAySLwdJ766N1YmnYybjzrxEKEz0AXeZ /WIdxBqecb+P5erw8Ouv1sf8HCHtD2NMYMv4i00H/eNloq99UV12Vq9FPvHbezFiEdJZ WcOA== X-Gm-Message-State: AOAM530yLWPE2t4sh7E4PyuiUCfaMMXQyY6rHQF1unxEsw4/iqfFK7lw geGyadjPnl7+oTBWuMSWfXU= X-Google-Smtp-Source: ABdhPJw0eiftuCsBNABQtJ/QJBOzsCwLrvTwgHNtFf+jhgSzkt5tSlBfST7Lrjg3E2eZV/k6YkAYEQ== X-Received: by 2002:a1c:6484:: with SMTP id y126mr14901116wmb.76.1607710949818; Fri, 11 Dec 2020 10:22:29 -0800 (PST) Received: from [192.168.1.143] ([170.253.51.130]) by smtp.gmail.com with ESMTPSA id z17sm15486910wrh.88.2020.12.11.10.22.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Dec 2020 10:22:29 -0800 (PST) Subject: RFC v3: Re: cacheflush.2 From: "Alejandro Colomar (man-pages)" To: "Michael Kerrisk (man-pages)" , Heinrich Schuchardt , Dave Martin Cc: linux-man@vger.kernel.org, gcc@gcc.gnu.org, cfe-users@lists.llvm.org References: <794cf0d1-d528-4b5a-3ce0-b1b5f588dc6d@gmx.de> <20201210181726.GT6882@arm.com> <747d56e0-c102-ab40-add4-530a48a43a4d@gmx.de> Message-ID: <7284157d-bc09-e5c5-b238-87d7444e682a@gmail.com> Date: Fri, 11 Dec 2020 19:22:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 18:22:34 -0000 Hi all, Please review this text: [ NOTES Unless you need the finer grained control that this system call provides, you probably want to use the GCC built-in function __builtin___clear_cache(), which provides a more portable interface: void __builtin___clear_cache(void *begin, void *end); On platforms that don't require instruction cache flushes, __builtin___clear_cache() has no effect. Note: On some GCC-compatible compilers, such as clang, the prototype for this function uses char * instead of void *. ] Thanks, Alex On 12/11/20 7:02 PM, Alejandro Colomar (man-pages) wrote: > Hi Michael, > > On 12/11/20 9:15 AM, Michael Kerrisk (man-pages) wrote: >> i Alex, >> >> On 12/10/20 9:56 PM, Alejandro Colomar (man-pages) wrote: >>> Hi all, >>> >>> v2: >>> >>> [ >>> NOTES >>> Unless you need the finer grained control that this system >>> call provides, you probably want to use the GCC built-in >>> function __builtin___clear_cache(), which provides a more >>> portable interface: >>> >>> void __builtin___clear_cache(void *begin, void *end); >>> ] >> >> This seems a reasonable text to me, but I think it would be helpful >> to say a little more precisely what kind of portability we are >> talking about here. > Sure. > >> >> Greater ortability across Linux architectures? Greater portability >> across platforms supported by GCC (including non-Linux) platforms? >> Something else? > > '... which provides a portable interface across platforms supported by > GCC:' sounds good. > > Maybe GCC devs have something more to add. > > Thanks, > > Alex > >> >> Thanks, >> >> Michael >> >> > -- Alejandro Colomar Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ http://www.alejandro-colomar.es