Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1222499rdb; Wed, 24 Jan 2024 08:19:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IFSJtNu86VJ8G7cygtr9y3qhv7RQnuEZj6Ywds3OrsygzXeJALHcuKEMQnT6Xsu7biCe5bF X-Received: by 2002:a17:902:c212:b0:1d6:9bad:ff88 with SMTP id 18-20020a170902c21200b001d69badff88mr805793pll.110.1706113145022; Wed, 24 Jan 2024 08:19:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706113145; cv=pass; d=google.com; s=arc-20160816; b=Vmk50BQ7dRWyJRksnNciqw8mwpftT0Iym833VHgS5tmiG3OlGfhO80hbKtwtZlyFbS G/UcoCKLS19Q95W0VmBf2Gsnn6phCmXvscvTXf76tQqfDLUQXPb/5M/g8MihNO6Jaob1 TsqNm6e4jURwjtWlqcLLX8u4lzuscfSludJzjTmaWVOggV6LeV4SGiN/KXcsjfTJk9DW oGWoOI4Iv/N9yMU2G8iXIWM1dSzxyTs4yJk2LXiqlz6dvNqS3WEbzE8+lfCO+DbGSAyF Qhz+opjvj1qcbdsqWp9B5R/vYdW9anrn77n+qj9AR0/UaVR2oqDwZkc522vAc5vtGnl8 ljdg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=63DTxDIPXoQsormbGpoxOOMjlSGTi4UhI4FxeqViCw0=; fh=LD+wB+vdc1Xkqt2ewkuqG3bsdcpXP7tj9SZ0Am/y5Os=; b=ZWHIsc5IBlbPx2+4zeywR+t0CW4MoP8JmmDP5WdRBFjzPw7RJWAK6qVbZ1hKyS5qeO lKRxt/yIigi7aa2dIrAGkZxd+JxqtF00ovvHTZKGqgr0/djUgo0SgVOCKQDbFNU7THt9 8hm2ShribHZRcKrit7refgkFnvYYuvwRE2z7TEzxb0gHIR8cKvm5k1FDHUMQmDjlR1lc bj6CxUhDBrC9RhMLhNortz2FSyeAXACzKJtcYOcB215ovORNoCW3Cqf+gBGaXdNZCCW4 /v+i50QmEJ2Ru4ottBUvO8ZC66sk6+IiA0Q6yp3mjpZNK7wi5aJAbkCQVTx7OS59mZtJ 8cUg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=rK3w1FWZ; arc=pass (i=1 spf=pass spfdomain=efficios.com dkim=pass dkdomain=efficios.com dmarc=pass fromdomain=efficios.com); spf=pass (google.com: domain of linux-kernel+bounces-37321-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37321-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h6-20020a170902748600b001d76a5d5aa0si3570861pll.607.2024.01.24.08.19.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 08:19:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37321-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=rK3w1FWZ; arc=pass (i=1 spf=pass spfdomain=efficios.com dkim=pass dkdomain=efficios.com dmarc=pass fromdomain=efficios.com); spf=pass (google.com: domain of linux-kernel+bounces-37321-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37321-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A5D8E28DF80 for ; Wed, 24 Jan 2024 16:19:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 646FB7C09A; Wed, 24 Jan 2024 16:18:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="rK3w1FWZ" Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AECAD7CF2E; Wed, 24 Jan 2024 16:18:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=167.114.26.122 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706113113; cv=none; b=tonjrWYx+dhfbesFaQ8IaNL7NVBvmpweqTdv8WXE4L3TWDkaTscAakxP7XotyVGk0c0HmceJQt3BpHqb6Hx+j9g/9ULphbqqPDh9Cu4Oek2SgJ6B2oMQ3jtmoHBS8BL55hrPTL1GF1SYNUQSwC3DDWuNqeZCUp3w1DWMkDYK2/c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706113113; c=relaxed/simple; bh=fdb4Zk8kpS57cz7UQOaWOD8Gc/oHuCpHnm87tMS4JXQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=NiId801Y+yDJb08oIZ3IAs80xcCYxy9D4pfs3SdOSplR0R8dMA3ieK2bw34XlyLemyKJfvaF0llaMZ/o+Y0NdUDFpBtnXnhHR3cjzgH4AXMlZRhgJAPrzZlFevlmhAcUU3oOxgrIA+SUdsMzQEdJum3Nx2RQknypKXtm4nCk7CM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com; spf=pass smtp.mailfrom=efficios.com; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b=rK3w1FWZ; arc=none smtp.client-ip=167.114.26.122 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=efficios.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1706113110; bh=fdb4Zk8kpS57cz7UQOaWOD8Gc/oHuCpHnm87tMS4JXQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=rK3w1FWZECH8ewCqknoAwEohXevMn+PQBx7pEAb01wOihiY3/DfpbEPyknog+SkAg QLMn7tFVyTz8pw96EfO5j6yk6p4o0U6uDWs1mCVPZiBlvJGrvLV7tMrLx9nCBlmzwQ scxJB91Do6jit+Nm4xDCcHMunRlwKYUIqmO5par4mrEKfjAQY2ziQ06cxSxJ4EZDXp kGCODRxkCuQ6Rng7lBEfiZ8mxCP5E52W/GqsXedcKvqMgk7FkmTUeo12L6g9fCrwss K+lPAEyZDvxMLUk/AWq4mPOnVmVFOBEExUSHaSfCyzjhfyIIvl3DEhWpdGjHkpYS2t R72AnGsc8e+Mw== Received: from [172.16.0.134] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4TKpzV2MbBzV72; Wed, 24 Jan 2024 11:18:30 -0500 (EST) Message-ID: Date: Wed, 24 Jan 2024 11:18:30 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 4/4] membarrier: riscv: Provide core serializing command Content-Language: en-US To: Andrea Parri , paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, paulmck@kernel.org, corbet@lwn.net Cc: mmaas@google.com, hboehm@google.com, striker@us.ibm.com, charlie@rivosinc.com, rehn@rivosinc.com, linux-riscv@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240110145533.60234-1-parri.andrea@gmail.com> <20240110145533.60234-5-parri.andrea@gmail.com> From: Mathieu Desnoyers In-Reply-To: <20240110145533.60234-5-parri.andrea@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024-01-10 09:55, Andrea Parri wrote: [...] > > diff --git a/Documentation/features/sched/membarrier-sync-core/arch-support.txt b/Documentation/features/sched/membarrier-sync-core/arch-support.txt > index d96b778b87ed8..a163170fc0f48 100644 > --- a/Documentation/features/sched/membarrier-sync-core/arch-support.txt > +++ b/Documentation/features/sched/membarrier-sync-core/arch-support.txt > @@ -10,6 +10,22 @@ > # Rely on implicit context synchronization as a result of exception return > # when returning from IPI handler, and when returning to user-space. > # > +# * riscv > +# > +# riscv uses xRET as return from interrupt and to return to user-space. > +# > +# Given that xRET is not core serializing, we rely on FENCE.I for providing > +# core serialization: > +# > +# - by calling sync_core_before_usermode() on return from interrupt (cf. > +# ipi_sync_core()), > +# > +# - via switch_mm() and sync_core_before_usermode() (respectively, for > +# uthread->uthread and kthread->uthread transitions) to go back to > +# user-space. I don't quite get the meaning of the sentence above. There seems to be a missing marker before "to go back". Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com