Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp336426rdg; Tue, 10 Oct 2023 11:38:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHKZkBvIiYd7qsf+YFDhlKf12mmerGaf07fJsftu7EiO+e0Odit260npr0brQ8YIsHEypUR X-Received: by 2002:a05:6808:3c1:b0:3ae:24bb:3825 with SMTP id o1-20020a05680803c100b003ae24bb3825mr17876637oie.8.1696963091728; Tue, 10 Oct 2023 11:38:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696963091; cv=none; d=google.com; s=arc-20160816; b=fuHOw5qcJNqfKse3QerupOiqlUDre1lW0zakMNRAAJTP+7bhvLRQRw2kMKHd9zrR0p YSBnYKw1zUfM66mXVP3KTXxbVdi3tpYPys0muRH9hodcBZI52A6XhkTEYvkt8MRdRHPH ZfC45hzDsfa1KYVDUZAuy629fZBLZWIL1cycJJkiDHUtwSz+zv36YHT68TkxMrrRuTQ/ cVLqhFkW8/ntCCtvJKOQjW4Kzzvqy2ZHJEr8iJCqABTBo+4rk2Tx3NZYX4NQ5ROcqSrb jejGHAc4AF21J2wY8pVPpvejaNtInQa4vENBeNhUyCeBsx9lUI2Nej6szYRwaZDlnlrB 0s6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=rhSNL7cMHw4PLYbCPBTl1LNULSkwojpVoNBfxMTdOrU=; fh=7KUfrZGZf/EAj3r522dEJiH1mntVxCNU0xlLCVeoX68=; b=C6IOerKpwWvcPN/XQSLOMMHCDG9PDt2XAH16fym4mKXQqwmdGuW82xaC+AQbKmOf8l JCeBMghOlPF3zQMODOsh+5Eyg1GDoZgafetY/ju6Fu3iiEEnBUzm1Lgu5IGLUovuYD80 OuEE1pL4yRlzK6WOAnMsJ1aGSjT8PxCfGaaNSnoumZFAQxspIn1m2TtjqczLo6kasqWm tA+APlnBqs9K8fKkxrgYuJ3ay8fxTV5K2OKR/XmBAMtu65TSG8E9joygd+wuhrl0AqSf qqTsyYMkiDM16XH3OzXHoUDfsjkHAVPBVNN1k5FGypKwAV77ZSyrxCUTPI7W9fM+RvoB UeYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=KvHPqaDB; 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 m5-20020a633f05000000b0059e3335125esi412087pga.839.2023.10.10.11.38.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 11:38:11 -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=@linux-foundation.org header.s=google header.b=KvHPqaDB; 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 CAB74804F603; Tue, 10 Oct 2023 11:38:10 -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 S1343536AbjJJSiI (ORCPT + 99 others); Tue, 10 Oct 2023 14:38:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233538AbjJJSiH (ORCPT ); Tue, 10 Oct 2023 14:38:07 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15B37A7 for ; Tue, 10 Oct 2023 11:38:03 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-5033918c09eso7611891e87.2 for ; Tue, 10 Oct 2023 11:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1696963081; x=1697567881; 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=rhSNL7cMHw4PLYbCPBTl1LNULSkwojpVoNBfxMTdOrU=; b=KvHPqaDBTif73ykZWtb1IfGgNecFk+27EonAEWvzrh3BBA1t015n4+st9fWO2PWZOC k5H3cYmlGD9F66sAm4GvU+q1UYp3YEQHBgMe1nbdMRH/hz/6pZ0G1h0zFyJFofRDxaF2 Ma+T5zXqa0og9ipI5xY5FM00MF7EgPJ9mdhCw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696963081; x=1697567881; 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=rhSNL7cMHw4PLYbCPBTl1LNULSkwojpVoNBfxMTdOrU=; b=uBFvhKKvYgm8W9L584K6Ozv6fStKM3nrx+4CZK270xb0vPNY+FMYXI20UuUl5cyTso 7Cxl1DShWiQ/z8JpDtV4D6sxk8iKEuHxh5a9ZcUTRCRjhPyxFexJbgWxcjSBK1Q/V7mJ +7eWGsLK4atmAPRM4i51N65No7EeeBsVV9r6S+kX6+DGqshjZqvcUgiyGzWyZu4yZH0J Q26JJSXSCiHm9JilSVP19SdwWytB5yUYn5SaZcEBQ4rBhAyXyU/cujYD+34WktdeKKNZ pJWCBpMKuo01lwHyTR2+n9bbpSp2dTpLMf92DVLhj9dojMUoEASiw/K5VCGm2bTZL70j bK0A== X-Gm-Message-State: AOJu0YxLSf242kMuh94gP6wgSQwIjdX8wUEFSfG5828P3ec0Ip9dxj6s t2L8J5O1Ih1qk/A2kp0ucpJH6JgTjzW54GujKcOiHYLJ X-Received: by 2002:a05:6512:3a83:b0:505:7360:6023 with SMTP id q3-20020a0565123a8300b0050573606023mr20036977lfu.39.1696963081028; Tue, 10 Oct 2023 11:38:01 -0700 (PDT) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com. [209.85.167.47]) by smtp.gmail.com with ESMTPSA id b12-20020ac2410c000000b0050296ee046csm1924792lfi.69.2023.10.10.11.38.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Oct 2023 11:38:00 -0700 (PDT) Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-5033918c09eso7611865e87.2 for ; Tue, 10 Oct 2023 11:38:00 -0700 (PDT) X-Received: by 2002:a19:ad4b:0:b0:503:182e:1def with SMTP id s11-20020a19ad4b000000b00503182e1defmr15121375lfd.69.1696963080129; Tue, 10 Oct 2023 11:38:00 -0700 (PDT) MIME-Version: 1.0 References: <20231010164234.140750-1-ubizjak@gmail.com> In-Reply-To: From: Linus Torvalds Date: Tue, 10 Oct 2023 11:37:43 -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: x86@kernel.org, linux-kernel@vger.kernel.org, Nadav Amit , Andy Lutomirski , Brian Gerst , Denys Vlasenko , "H . Peter Anvin" , Peter Zijlstra , Thomas Gleixner , Josh Poimboeuf Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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]); Tue, 10 Oct 2023 11:38:10 -0700 (PDT) On Tue, 10 Oct 2023 at 11:22, Uros Bizjak wrote: > > Please note that besides propagation of the addition into address, the > patch also exposes memory load to the compiler, with the anticipation > that the compiler CSEs the load from this_cpu_off from eventual > multiple addresses. For this to work, we have to get rid of the asms. I actually checked that the inline asm gets combined, the same way the this_cpu_read_stable cases do (which we use for 'current'). Linus