Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp215037rdb; Thu, 19 Oct 2023 02:09:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/FcJsvyzZzfX8CEJCI6kiqMo4P3VvY/9viikH8uUT+HCWOPKEYrJgb6uCIBchHo+9XfJ2 X-Received: by 2002:a05:6359:28c1:b0:168:a18d:da05 with SMTP id qb1-20020a05635928c100b00168a18dda05mr1253129rwb.4.1697706588055; Thu, 19 Oct 2023 02:09:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697706588; cv=none; d=google.com; s=arc-20160816; b=NrqIKZOOlyw/BTN8QLSfx9Gao0T7RzPxV6b3n+8e+rHqyVMcwWzA58pa7t6/mlq+Kd /k/xBs5pMW/ZOkVS0wi6QdCtAHB4kKVxd3Iz4eiB/e2H4zvo+feIiymi6jjV4pLZrR/1 7ez2cSY8Y2NJChoItEFC0l4qGxAwbUwRIeo32DNJQWWwJOCBOSK4JuWhVTWoU9wsk8bg 2c2nqO5UjHf7MIHDUHPwg+7wkJ9VLUe5tiscVy2HHWs4Aagb11Am3gADrj2NrvHx4Vp6 OvlIm3AQrR4L2vvMG7ObPexeuI0iBYqyZoi5unjMgM32MsGxc9QjdoQrv7AOFJL8hkmY O8LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fV1z2k4nSBlPKGMGNKd/maV/mZhDZnPwFRFtW32f3fo=; fh=S7/5y/BGEz+mOJd1ujes2n4AQwqvvnwDwyLSH15u0Zw=; b=esDF9PbX8qAJ1fFN1mm79KPLfIvBRE/PRxsNn0C0DZ5ayfWFFGFwbtv3C/93CLmky5 MV7YqgDKtC9Xw3Mjlr66wFdE2PvTvd0IVW9XoZbJ1b2vhkW1aN3rVZpKFyHAh4RZiZ7m Zykhl0A+V2KLWvsRqjrujZWTbAi5axO/KRQaRqUB3F9wIlorXXANpgaSpVNYdCrtPotm j8CZOPAashjNHX2bK1FZ2n6WreEErAJC72MZcVmHaeItXNQ5w3fKnj/58U2e4OnxCbdP CsWDWuZGBC6gD/CPgvuGcrHj+MDwzJWfwFp2pSqwuB7grHjLapU01Lepst9tFo6djmw5 4emQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=K1b7Hf2L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id n5-20020aa79845000000b006be062e4ecbsi5689034pfq.32.2023.10.19.02.09.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 02:09:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=K1b7Hf2L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 12FC8822CAFD; Thu, 19 Oct 2023 02:09:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232846AbjJSJJp (ORCPT + 99 others); Thu, 19 Oct 2023 05:09:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229830AbjJSJJo (ORCPT ); Thu, 19 Oct 2023 05:09:44 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64CF4FA for ; Thu, 19 Oct 2023 02:09:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fV1z2k4nSBlPKGMGNKd/maV/mZhDZnPwFRFtW32f3fo=; b=K1b7Hf2LhVB6E13z5zda6/keba 4fAwViwwcN4+gapip1teVxU76FP7ZDPa0HhhwIvlnoihNglQON2CGcmSsyyYCiMLxVK2aqDiMQHGI I3NVjMQ2oLhHu0iyiHYSc9bxrOv/Ie2DtU+3o19vw7Y1M0VHxcizpPAD8mYGUO+4FUzjethqdkPH4 Uyo0Ie3innAGpHzHlOZJZQ/LlOeJFvFXl17J1iSqVKaZh/nikebG/Cvj9bVSxRn5+TqqZvMhOpXKf pFfLWgsP6uzwbz//dIcom7RTUc0tphqlCgqWlmkdJft50k6JYjKw3tWt9AF6czalG4lCu4E3QjjI+ zTX+zOjw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qtP09-009kPT-2G; Thu, 19 Oct 2023 09:09:33 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 258C8300392; Thu, 19 Oct 2023 11:07:33 +0200 (CEST) Date: Thu, 19 Oct 2023 11:07:33 +0200 From: Peter Zijlstra To: Linus Torvalds Cc: Uros Bizjak , Nadav Amit , the arch/x86 maintainers , Linux Kernel Mailing List , Andy Lutomirski , Brian Gerst , Denys Vlasenko , "H . Peter Anvin" , Thomas Gleixner , Josh Poimboeuf , Nick Desaulniers Subject: Re: [PATCH v2 -tip] x86/percpu: Use C for arch_raw_cpu_ptr() Message-ID: <20231019090733.GR33217@noisy.programming.kicks-ass.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 19 Oct 2023 02:09:47 -0700 (PDT) On Wed, Oct 18, 2023 at 03:40:05PM -0700, Linus Torvalds wrote: > On Wed, 18 Oct 2023 at 14:40, Uros Bizjak wrote: > > > > The ones in "raw" form are not IRQ safe and these are implemented > > without volatile qualifier. > > You are misreading it. > > Both *are* irq safe - on x86. Stronger, x86 arch code very much relies on them being NMI-safe. Which makes the generic implementation insufficient. They *must* be single RmW instructions on x86.