Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1320468rdb; Wed, 24 Jan 2024 11:13:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IGI+UW2XSdY11YbiBKMSdP09k5sqM9LaB8i/coGJnrkw9bs+no4SEdn/gekCIapv1Ppq4q6 X-Received: by 2002:aa7:8e84:0:b0:6dd:86b2:a4a5 with SMTP id a4-20020aa78e84000000b006dd86b2a4a5mr26806pfr.5.1706123627240; Wed, 24 Jan 2024 11:13:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706123627; cv=pass; d=google.com; s=arc-20160816; b=w1pS68qfVTDZwSIM0cemJu0XOKZG+NeckPBcdqKfs77nxb49yaKvbQF0KvSeWhaomZ C+BKd5Ks+DhpxJVBQhJl9Qb6IsRcgZfVwDU94A2s6Z7znYx31NYPw+wAS1tg7MLICtOY AIe6u03lMZm1UrSTVhoMODf87cnFJIJeZPChfAecjK3aamwj4TosIFIRYNTowJd3P9sr nvtqDDbUh+BIKAV/swDbzeMJJB3YPpEcYzqTaD7VSBQLh8YkbDWVFcJcqa7DpLIGEJnL pVPGgkdXorGVFPOdarSEHsxFlbYNqNMPD/Ab01CAqf8BeVXEiTMtJlbT+yPhRjpH2Z8Z zCRg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9ZKG+8C20f7hivz53jJBSHChuZfiFBOGPLHSUtSSkGc=; fh=51NlhudCQH0030Y8sIMbfrSc9q5CNcS+1NFx/ltDvXY=; b=p0kpHU2c3gqjDTqsFQ7jEQHXqaTZwyn8z3NXP8hVkAPgpcRXfx6Fcxf/G3RxOofRa9 k8nA0Xa5/6sLnxVSxTTZaCUitcwdThQTEQL2DEzElv/2LrKElRjPoGRvD8Foiet4NHsh 4FpH2dotd918+5znZhWyg+NOL+pmNAP5Jgr7AHnH50MIs/Vhs0tDHuJ0K0wrCS/Sd7x7 u/aExOVJzkLdMIP6gjF1Jsg4KgMR9X6ICBZ8fe8sxgiAPIu5XCFDNKx1cIqt6msFMz+L D0sAiHNkMmi6d4F3wubhsJAidooX9ITZutZNzZOK95RFkewn/+5ccVij8fD+CKNZsrnv ZpHg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=b2XCrRu8; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-37535-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37535-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id z19-20020a62d113000000b006dd8732edaasi2015164pfg.164.2024.01.24.11.13.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 11:13:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37535-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=b2XCrRu8; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-37535-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37535-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A5B20B22591 for ; Wed, 24 Jan 2024 18:44:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A8E2A13174F; Wed, 24 Jan 2024 18:44:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="b2XCrRu8" Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 541738002E; Wed, 24 Jan 2024 18:44:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706121866; cv=none; b=vCGRpdK4EkXivcCDOXrjJiDu/mrHSVBQ9D95l2hvmGDL8q6ekeMSigQHlLq8g/TVfEj/K5lEZ0UgMshso2r1BKsixD0RbN+NqN8JIx7prlhQu6jvN6GnsJLtBDdZN7lCjqoMKUWJwq0smsp1OsJqowW0m66hkhhlbBwMGPp3EBM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706121866; c=relaxed/simple; bh=oFA54oYHb3NBKTrc3qXkHGy/1hhpChhcaRdit+EJ/1k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DpJ0A7HgxiCVZzfMV/ckHlpZyVcggaY7uPdEok6FbzJ6bBCZkzahyjNXiKwV30NTQv23P5J/ORSyiDQpianHl/3qdeWhK0Ubl//UC4EoipzQRqgkmaeoTaEntgmWjhveaF5KH+TvrfLB/m9/HD6cvvtcK3SEqk3vzxbG8Cbal1I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=b2XCrRu8; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a3150c9568bso45104566b.1; Wed, 24 Jan 2024 10:44:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706121863; x=1706726663; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=9ZKG+8C20f7hivz53jJBSHChuZfiFBOGPLHSUtSSkGc=; b=b2XCrRu8nsr+SNNbfEeVLEZi1brAAJ2Q3E2uwT66EY3gU5DKg/G3t7MJ0Xbt/K9zdK lXOznfnCDLWK/3kLqohwZ4a4+HxvgGYR2BWsqw84owKbadLBFxi7H99JfenPT1xEKhhA xM82SufQ/OlhgY45MruUUd1ccYvyLPISM/qAjUCB7bcu8C0V2KhFoeIKkIaYF9f90p7i IT+FzYoIhn/8YEiZ21sTDEMQy+Dkoy0e78UghVDZUGUSVm1QmzafMNd+IchH9JfhVkIX b10+WrgQxskDduaWvlNtMDAmfTCKL7Ha3PCHBl4HthVQtY8B6uajuH2bbZqp+TuwYgjT NYKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706121863; x=1706726663; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=9ZKG+8C20f7hivz53jJBSHChuZfiFBOGPLHSUtSSkGc=; b=kyJYjy2R3E5Y4lcN/r8KH/kKOba5RAvMj0BwLTChYG8cA3NuDkXzW/ScFFCY8RKRZL MLlKzrN6JEDOjv+M8bR8Za+8ne+YUtLhVMdZO+Zyr+BVY3GUD/aKFCIRM02fHhSU46dN 8blOtKXBn4OxjWezOD9O3+EgoK1Vkt3k565EncFLbSS5pBXOyzr6kEzsR/P/vUs0/ljM 8FZOv4c0l9tLOvj6S75+Z5NevHNX8exYAjSBylVGj0mzrGguRujv/japEtVJqF8ygGbb R6sMhjXlc8nV2XJIC80i3YZoAwOvIsNlTwgazhaGbSMJlLV2cN8os4RnjcSpK1YX20Ys O6Dg== X-Gm-Message-State: AOJu0YwRBXeCrANw9ithDds5qqd17DYEvZIxShjvrWHbSsVsBk+7UcS+ hLFv5YdzatKPoOLtxa0UiHK74aLWtDK1CVUZ15Azp3AzMBdaUTAc X-Received: by 2002:a17:907:d402:b0:a2f:c8f5:f706 with SMTP id vi2-20020a170907d40200b00a2fc8f5f706mr983785ejc.232.1706121863206; Wed, 24 Jan 2024 10:44:23 -0800 (PST) Received: from andrea ([31.189.8.91]) by smtp.gmail.com with ESMTPSA id qo4-20020a170907874400b00a2689e28445sm151657ejc.106.2024.01.24.10.44.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 10:44:22 -0800 (PST) Date: Wed, 24 Jan 2024 19:44:20 +0100 From: Andrea Parri To: Mathieu Desnoyers Cc: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, paulmck@kernel.org, corbet@lwn.net, 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 Subject: Re: [PATCH v3 4/4] membarrier: riscv: Provide core serializing command Message-ID: References: <20240110145533.60234-1-parri.andrea@gmail.com> <20240110145533.60234-5-parri.andrea@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: > > +# 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". Let's see. Without the round brackets, the last part becomes: - via switch_mm() and sync_core_before_usermode() to go back to user-space. This is indeed what I meant to say. What am I missing? Andrea