Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1640546pxj; Fri, 18 Jun 2021 11:27:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWjenLRAoRrlGSadT360+/AGxR6RaZfDmkw581XP/vRwCJdrzbq9OGqjorCX2ceW83dp24 X-Received: by 2002:a5e:840c:: with SMTP id h12mr9294807ioj.104.1624040854030; Fri, 18 Jun 2021 11:27:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624040854; cv=none; d=google.com; s=arc-20160816; b=Jq2+Ysmh8dPNBt9t4snYyAHvK3RUXrCLEiRzF39VtYKe7YTt/yFdo7TGoBx5vWBuqH h0oHuJwBxkTqRFZklJPHFZbjw3aw8tQpXjWwRYWuMrSecVUbSVzjZs9UKrDhY4Nyunss Zwc5/zuTGrsBswi/1++4O6HxVutfDX4Wy/6LitOUmvAlLhGN0jGepA3axpOUMrI85StA Nq+l/o3hCb40WrbNVnP27x7EjPLG0EpruZbXjj1tAvaqX3vZVLv4Y9Xcy2bIy916T+He Av8V8P/4eSQPSY8gPS8CL4IJUwBJSUPtzDxbHfGlCnrh9VaKc3HCHbr8oDwKH9TUeO/Y PyfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=DNBMu4VEXexssWB9CXd/o9PiHkhiZ8vMkEN5Y50R0/c=; b=JrsfZWQzBv3PRNv7WFSNSOQ5atvk6qDpGxbf5dL+ZkLubnFLThiZ02HIbNK2bqb23Q ivEOzBr6yZrNxymy5dO6GzjSpZKIGLXv/cs+cCxoRF/3aeapeQWiDlaeFBFYsHHweqtd 758CJSOTjsWD7rY0QFJhPPvhXNRczZKcJwbqgI1vc05ibIB1fnyA5ROQuL38IgbMxpRf GQMCl37Vkyvx/gDX+2sp90R9m4aMk5WhlXeDqqKhuL0bZddD8K6O4JKMof2Iz9I1qPFB ST46GQoPMPAaCDL4wHhe6KEOKRmi2PNqEgbhFXMzGxRJ2UntWN7N+jE/P/uF6uCtpo4D 4yfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l15si10513238jaj.27.2021.06.18.11.27.22; Fri, 18 Jun 2021 11:27:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235522AbhFRPab (ORCPT + 99 others); Fri, 18 Jun 2021 11:30:31 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:49705 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235749AbhFRP3i (ORCPT ); Fri, 18 Jun 2021 11:29:38 -0400 Received: from localhost (mailhub3.si.c-s.fr [192.168.12.233]) by localhost (Postfix) with ESMTP id 4G62q23V0dzBCLV; Fri, 18 Jun 2021 17:27:26 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id agQHzAYYeUsd; Fri, 18 Jun 2021 17:27:26 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4G62q12wtwzBCL9; Fri, 18 Jun 2021 17:27:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 5059F8B84B; Fri, 18 Jun 2021 17:27:25 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 9CJLhPmF_CRb; Fri, 18 Jun 2021 17:27:25 +0200 (CEST) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 814148B84A; Fri, 18 Jun 2021 17:27:24 +0200 (CEST) Subject: Re: [PATCH 8/8] membarrier: Rewrite sync_core_before_usermode() and improve documentation To: Andy Lutomirski , Nicholas Piggin , x86@kernel.org Cc: Will Deacon , linux-mm@kvack.org, Peter Zijlstra , LKML , stable@vger.kernel.org, Dave Hansen , Mathieu Desnoyers , Catalin Marinas , Paul Mackerras , Andrew Morton , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org References: <07a8b963002cb955b7516e61bad19514a3acaa82.1623813516.git.luto@kernel.org> <1623818343.eko1v01gvr.astroid@bobo.none> <1e248763-9372-6e4e-5dea-cda999000aeb@kernel.org> From: Christophe Leroy Message-ID: Date: Fri, 18 Jun 2021 17:27:21 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <1e248763-9372-6e4e-5dea-cda999000aeb@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 16/06/2021 à 20:52, Andy Lutomirski a écrit : > On 6/15/21 9:45 PM, Nicholas Piggin wrote: >> Excerpts from Andy Lutomirski's message of June 16, 2021 1:21 pm: >>> The old sync_core_before_usermode() comments suggested that a non-icache-syncing >>> return-to-usermode instruction is x86-specific and that all other >>> architectures automatically notice cross-modified code on return to >>> userspace. > >>> +/* >>> + * XXX: can a powerpc person put an appropriate comment here? >>> + */ >>> +static inline void membarrier_sync_core_before_usermode(void) >>> +{ >>> +} >>> + >>> +#endif /* _ASM_POWERPC_SYNC_CORE_H */ >> >> powerpc's can just go in asm/membarrier.h > > $ ls arch/powerpc/include/asm/membarrier.h > ls: cannot access 'arch/powerpc/include/asm/membarrier.h': No such file > or directory https://github.com/torvalds/linux/blob/master/arch/powerpc/include/asm/membarrier.h Was added by https://github.com/torvalds/linux/commit/3ccfebedd8cf54e291c809c838d8ad5cc00f5688 > > >> >> /* >> * The RFI family of instructions are context synchronising, and >> * that is how we return to userspace, so nothing is required here. >> */ > > Thanks! >