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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25F76CDB483 for ; Wed, 18 Oct 2023 18:16:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344738AbjJRSQZ (ORCPT ); Wed, 18 Oct 2023 14:16:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229947AbjJRSQX (ORCPT ); Wed, 18 Oct 2023 14:16:23 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AA52B6 for ; Wed, 18 Oct 2023 11:16:20 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2c501bd6ff1so85355721fa.3 for ; Wed, 18 Oct 2023 11:16:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1697652978; x=1698257778; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=rwRonke7ZPJesfb6lkAk8Jef9jxQLTB9Ut1BCrObTy4=; b=Q8QC5EFGy3idAI8OotHJpH82GnEvRxnZbrGKVZtJoEt2ET9cgChsMKQSuR7yDzbdOC WtsFtdVNwww1TBKTm+YdqUtZrX8Ylqv1sBw3sjlicegQXp4qUM4GrZ6y5/qqHI59iJVM B6Ay2jl7KQO8YHyztLCZvghzooYKmI++hXs+8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697652978; x=1698257778; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rwRonke7ZPJesfb6lkAk8Jef9jxQLTB9Ut1BCrObTy4=; b=JXsA+Qsqwd+2bNsWKI0LdcG10C9t7BR5XuLBhRLoGPw3m1OF5sPqCo+zfD2UJW6Ouv ZvopyGyziX7Q9BdkUzM25GIF73q5/bjAs2EAz9eHGHnCW1YqTz8K4SECghbOgZDsxONQ duEvIT+BA/tkiyoYtXuJCink24i5QXUXLd8fXtRpqL/oTQMckX7DRxW7STqU9q6G9RnO rN94TYvHMJFKhTy0r6MP8rMNYNz5Hs/7fidnxWN26qdtxcB79wKwI8ZvROfskQHN7ESq 9RXNMaqM6PBqOUyZqGnwUMeyKUExVRSuvcFpw03AAwDxrH6HomGPnnAe2mRCCfFmVLjH 5iXQ== X-Gm-Message-State: AOJu0YwMZ13SVcYBXbKl8PTTlRUXsu3N77weBLvnvRuSdFBL4tPz6mgO anpN9eO/BUnZtuDKj82EjC0l4c54qS8lADHSKKCClEXR X-Google-Smtp-Source: AGHT+IHhV2I1DTRlV2iu/7aSj9C3/fZoL2MdKbOPSd8t2zbIObxjGPTvqVw65P0MUoZPx20p7CoT8Q== X-Received: by 2002:a2e:9d0f:0:b0:2c5:27ca:4784 with SMTP id t15-20020a2e9d0f000000b002c527ca4784mr4317986lji.4.1697652977999; Wed, 18 Oct 2023 11:16:17 -0700 (PDT) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com. [209.85.167.43]) by smtp.gmail.com with ESMTPSA id q18-20020a2e9692000000b002b6da7e01d3sm802114lji.31.2023.10.18.11.16.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Oct 2023 11:16:17 -0700 (PDT) Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-507a0907896so6510526e87.2 for ; Wed, 18 Oct 2023 11:16:17 -0700 (PDT) X-Received: by 2002:ac2:483a:0:b0:505:7896:18de with SMTP id 26-20020ac2483a000000b00505789618demr4333579lft.45.1697652977179; Wed, 18 Oct 2023 11:16:17 -0700 (PDT) MIME-Version: 1.0 References: <20231010164234.140750-1-ubizjak@gmail.com> <0617BB2F-D08F-410F-A6EE-4135BB03863C@vmware.com> <7D77A452-E61E-4B8B-B49C-949E1C8E257C@vmware.com> <9F926586-20D9-4979-AB7A-71124BBAABD3@vmware.com> <3F9D776E-AD7E-4814-9E3C-508550AD9287@vmware.com> <28B9471C-4FB0-4AB0-81DD-4885C3645E95@vmware.com> In-Reply-To: From: Linus Torvalds Date: Wed, 18 Oct 2023 11:15:59 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 -tip] x86/percpu: Use C for arch_raw_cpu_ptr() To: Uros Bizjak Cc: Nadav Amit , "the arch/x86 maintainers" , Linux Kernel Mailing List , Andy Lutomirski , Brian Gerst , Denys Vlasenko , "H . Peter Anvin" , Peter Zijlstra , Thomas Gleixner , Josh Poimboeuf , Nick Desaulniers Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 18 Oct 2023 at 11:08, Uros Bizjak wrote: > > But loads from non-const memory work like the above. Yes, I'm certainly ok with the move to use plain loads from __seg_gs for the percpu accesses. If they didn't honor the memory clobber, we could never use it at all. I was just saying that the 'const' alias trick isn't useful for anything else than 'current', because everything else needs to at least honor our existing barriers. (And yes, there's the other user of this_cpu_read_stable() - 'top_of_stack', but as mentioned that doesn't really matter). Linus