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 A23ECCDB465 for ; Thu, 19 Oct 2023 09:09:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344949AbjJSJJq (ORCPT ); Thu, 19 Oct 2023 05:09:46 -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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.