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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87C0CE9539E for ; Wed, 4 Feb 2026 13:36:59 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4f5hGd2gnhz2xm3; Thu, 05 Feb 2026 00:36:57 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2a00:1450:4864:20::34a" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1770212217; cv=none; b=Lh7VBxYto8+jMhNmFTTNEIXg3Iw0UPYOhqDMw/QvjnRROjfFctt2nthavyy5PXdm9HuecZKU/Zuu1z94YG8X9jwHgdmEClyJqja15u70tcbGTjQSm5YbIwR7eoOKCv/9+k5+O/5nLgnStQbQbdWbZa8lZRygnumVE1VrBeRLYxJdrJFfo3TNwWsk6fCfVBQ9saYrQjlPMjMlvLD96s3htY10zbktoAVyqY2mURBFAvOWaStcYmgeub8PjolJQPOsFs4IZVBo/nL0U8mqxM6cForVuw59JaynG8EU914x3ISqzt1n/B6m1/0EK65HrMa17fZivYTS7TbByZDi4DolfQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1770212217; c=relaxed/relaxed; bh=fIR6EBMCAqXb340DYxL2KRHd/O9FP1A+6HPiKAJmpBg=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=baqrSOwjykvN51Rn1aYlq7qTEOMfqfHZJH8eRLABICKUMARxi+G05cXIDD/8TB6HXjUos3riMkRayctnhSf4kNLxt5CYKD2cE20JH7j0VuEx5KzBWgSPzF6iKuY/O1u2pq7EWjDZ3Kkmq2pdDHc6nEjHlx3BOYUZhBPHP6sEGgmqRzb/7NGSrl2NuwZqInnpPrh0FuhVsEDWUNuQQmQzXu/A8a12eWhPWxXTe0GaNlsyLd8tJFr4DrTs0sziFCAut3L+X6uzZt6JttyP7xCY09ynpfpOljklU3xzylIIZ01AdSmH4w3FHnPx8Lpzyb4txIsKXwFPjVEg0PxOuOo0ug== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=reject dis=none) header.from=google.com; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=uAYMc8pV; dkim-atps=neutral; spf=pass (client-ip=2a00:1450:4864:20::34a; helo=mail-wm1-x34a.google.com; envelope-from=3deudaqkkdgsjurlnahqupxxpun.lxvurwdgyyl-mneurbcb.xiujkb.xap@flex--aliceryhl.bounces.google.com; receiver=lists.ozlabs.org) smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=uAYMc8pV; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=flex--aliceryhl.bounces.google.com (client-ip=2a00:1450:4864:20::34a; helo=mail-wm1-x34a.google.com; envelope-from=3deudaqkkdgsjurlnahqupxxpun.lxvurwdgyyl-mneurbcb.xiujkb.xap@flex--aliceryhl.bounces.google.com; receiver=lists.ozlabs.org) Received: from mail-wm1-x34a.google.com (mail-wm1-x34a.google.com [IPv6:2a00:1450:4864:20::34a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4f5hGc1SQjz2xJ5 for ; Thu, 05 Feb 2026 00:36:55 +1100 (AEDT) Received: by mail-wm1-x34a.google.com with SMTP id 5b1f17b1804b1-4801d21c280so5984975e9.1 for ; Wed, 04 Feb 2026 05:36:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1770212213; x=1770817013; darn=lists.ozlabs.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=fIR6EBMCAqXb340DYxL2KRHd/O9FP1A+6HPiKAJmpBg=; b=uAYMc8pVmB3oiWgQVNXpjp34cbwv4uWmpM2zJb+pprt3GG8j3XTOfo2BLqOxdkCERy IhbyMBjjANmJajfrhjys1PprDes+/RT+OtH9V1x1dEGOun5ONyI1dw6lxSgVJvbIvHQq Quytc3mzhq2RAwLILZXFj3lnO55Tim4xFpAl8Nxx6HfpBcSNUBT7W6Q3KVSppT8F+JMr VMSxJ1p/o/Gk3IeNs66rhpfeoNeCVtJhRu/QuSivOAwNLt0zpsHnDlrlhXXS6A+LFdGx BhLMjb9wJJ+8GQri8btf9oJXIMLcLx2P+TGtuVmzdmBxnhJ2AzRcENSU+Ra8nSmYjmTF Bbcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770212213; x=1770817013; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fIR6EBMCAqXb340DYxL2KRHd/O9FP1A+6HPiKAJmpBg=; b=MDSp/86tUpyfHn1WZ4l/A8Uw09Q45JIs6vjtiNOCZoYriVn2yVerUfLTn2VwQB7ZuW Far53hPN7wHsmDfNYPYMrwpF335E2zOxYtvXHSjtRXaCnbT23GKpoWlKu8bdVsAiVhF9 pmDX4Qan1/2a6AjlJx3w5+UhHwRlPKvSNNMGde827DBMh7W+nBc595dmcy1IBLCrUeaF dz3rkqqJvky7CGAiLtIABYqpXNDNZmTsDOwdYdkLXTMgVGoYxgDk69Sx3SEceGc44L5i Fy+70wRwc9VWibBt+rkwiw+0c6KRZAMGtmYxtt2TvA3DGv9sNJOdcMAvBJIEgbxadu4W KY4A== X-Forwarded-Encrypted: i=1; AJvYcCXpKIO8ggkpCIdnC85Lpf7/ewICxZXDBbNzlEVMSD/v2EZXsvidw2isYHRkTOLX2qaOHleHHxU+5cwAqxY=@lists.ozlabs.org X-Gm-Message-State: AOJu0YxCiB773z7+MspCUpo4D1VoWDZ+Ri5XiStMLvILutUuqdRbt5ud BJQUHyAMeAYC44WqubEcpv5xymAFyCZhUq9IS0e7kk8FHOTDvp2l5MFgj2sqVC63fpe6c9FUFs4 XSVWDX6bD+YYnCapj3g== X-Received: from wmqu6.prod.google.com ([2002:a05:600c:19c6:b0:480:4a03:7b76]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:1c17:b0:480:5951:fc1e with SMTP id 5b1f17b1804b1-4830e930f73mr44864985e9.11.1770212212161; Wed, 04 Feb 2026 05:36:52 -0800 (PST) Date: Wed, 4 Feb 2026 13:36:50 +0000 In-Reply-To: <20260204130653.GH2995752@noisy.programming.kicks-ass.net> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list Mime-Version: 1.0 References: <20260204030507.8203-1-linkmauve@linkmauve.fr> <20260204130653.GH2995752@noisy.programming.kicks-ass.net> Message-ID: Subject: Re: [PATCH] rust: Add PowerPC support From: Alice Ryhl To: Peter Zijlstra Cc: Gary Guo , Link Mauve , rust-for-linux@vger.kernel.org, Miguel Ojeda , Boqun Feng , "=?utf-8?B?QmrDtnJu?= Roy Baron" , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , Jonathan Corbet , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , Josh Poimboeuf , Jason Baron , Steven Rostedt , Ard Biesheuvel , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, llvm@lists.linux.dev, officialTechflashYT@gmail.com, Ash Logan , Roberto Van Eeden , "Jonathan =?utf-8?Q?Neusch=C3=A4fer?=" Content-Type: text/plain; charset="utf-8" On Wed, Feb 04, 2026 at 02:06:53PM +0100, Peter Zijlstra wrote: > On Wed, Feb 04, 2026 at 12:55:17PM +0000, Alice Ryhl wrote: > > > Is there any reason to not make it Rust-only but for all Rust code? > > Making the / operator work seems like it would be a good idea. > > Why would it be a good idea to have it work on non-native types in Rust? > > The reason we don't have them in C is because non-native divisions are > expensive and doing them should be a conscious choice. The very same > argument should be true for Rust code too. I suppose that's fair. Perhaps one way to go about it could be to create a clippy lint for 64-bit divisions telling you to use an explicit division method? This way cases such as `core` that use division can still use the slash operator because the lint is not enabled when building core. And normal kernel code would be told to use the explicit method instead. Or kernel code could explicitly choose to silence the lint on a specific method if they want to perform a lot of divisions and know what they are doing. Alice