From patchwork Fri Feb 24 07:59:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Asahi Lina X-Patchwork-Id: 5815 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp767809wrd; Fri, 24 Feb 2023 00:03:35 -0800 (PST) X-Google-Smtp-Source: AK7set/yBAnsgcjMc8FrAHEzjHO7FHfnEkCrWO5A9iuY4JRyayINUtONyicjlRNkfVgUL8X7Y0vf X-Received: by 2002:a05:6a20:7343:b0:cc:3da8:63b2 with SMTP id v3-20020a056a20734300b000cc3da863b2mr3980984pzc.14.1677225815538; Fri, 24 Feb 2023 00:03:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677225815; cv=none; d=google.com; s=arc-20160816; b=cCf5EdGakON4YpXfFi0wtb1UVZfP3MUGLzxxkiQv8fByJe4FFXCX1wnin1tBfkv1td 9lWgmiCoTnjm/ktb66IfYcRPqAwcARacsoYbu2JhpVVHgQ91gBA2uiStEKlnP9el48kP QriEa9QHfI6F+jJLSoRWUIeIu5YCGwZWe7X8EG8nTt/BHFlJdXAd/zCKFkJPuXbH0B61 JvP1i2AoNhkoAaGDl0gFLuJctX6Qyy6/+92SpScy93dgboW04zOJ9Ut3d8fWFH2aAarF SxlkKciboflFPgNxtOhH+WdKPCvgGwsMbpaV+QjHl6Bky3KXD+lvYK0RoxffBNqot9S/ gKFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=4Xb30j5BCPemU991rhrzGrcL/BTB+b+bO2drWVkzww4=; b=JbkDCEDqzmvk1B0/ml0e1A/3iHq0n5TemR9sVR9AWSxpn3VwqKD4OcViroAVkVuP79 AtMj50ih2Jsut08/sbx9RhCACWwZ0oKes5tFEUm+txMyW2J/iN7uW2mRt/8r/5AbIVDz 3kCxMnB0FnuqpIFpxBVQsC2fS65OTXNp8qB+NODYUJlW9MJJBaCC8dMh87Va1FyVLmJR lXP1n0B9sAjnXEHLcqR+2H1nZSB4dM66uFTjXoUD+MxuUw7/LE03tJZTqugLimSFxf7p sd4zDY7RLaC7PaCp1nAI9peFiTmhGiaqd6V1ZIftkiyr3iw9ggm7sVFrnOn37z39FdFp xJOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@asahilina.net header.s=default header.b=azST5eqx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=asahilina.net Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v26-20020a63465a000000b004fc1fe750fasi4151671pgk.689.2023.02.24.00.03.15; Fri, 24 Feb 2023 00:03:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@asahilina.net header.s=default header.b=azST5eqx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=asahilina.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229604AbjBXIAK (ORCPT + 99 others); Fri, 24 Feb 2023 03:00:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjBXIAH (ORCPT ); Fri, 24 Feb 2023 03:00:07 -0500 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 024AC22797; Fri, 24 Feb 2023 00:00:03 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: linasend@asahilina.net) by mail.marcansoft.com (Postfix) with ESMTPSA id AC7E9424B9; Fri, 24 Feb 2023 07:59:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=asahilina.net; s=default; t=1677225602; bh=0OwJlzst8QnGBgBcQk6fTLszxJcN7zyR3Uch+1IED3Y=; h=From:Subject:Date:To:Cc; b=azST5eqx5b7QMLR8ATMAy34kmbqzXch0+Izv5mG1EgncDMCGkErboRH25vcweteIG AZJyBCb7qlgUZDiUZ7BlogzLevTk8RqaXRUt56Ix2atp22x7bQOGHA8zl/PErmMbz1 lGFmV8w/D5ii9hcnVm5fnUIGL+lCUUK6lIQaPMQLavp5H+VT3JAr0jSr59w3I4B16V hHOhPuVS4P4vy6AjigLEEiiuAwK4qsr64pLR/xR8ANts0/2MCtr+7KknxNbEHJeHD+ KUdzagkuyPXsB53DMxFni6bnubHrBETiUHASNBKkQwkKFiZ9w4EOndrUAGreQoOEgF PmxWnEe7YK1VA== From: Asahi Lina Subject: [PATCH 0/2] rust: sync: Arc: Any downcasting and assume_init() Date: Fri, 24 Feb 2023 16:59:32 +0900 Message-Id: <20230224-rust-arc-v1-0-568eea613a41@asahilina.net> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAGVu+GMC/x2NMQ6DQAwEv4Jcx4IYRMFXIgrfYcDNgeyAIiH+n jvK2Z3VXuBiKg5DdYHJqa5byvB+VRBXTougTpmBGmobog7t8C+yRQzcRupl6qRnyHpgFwzGKa5 lsOxH/bglL/1uMuvvufqM9/0H5guVzXoAAAA= To: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, asahi@lists.linux.dev, Asahi Lina X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1677225599; l=718; i=lina@asahilina.net; s=20230221; h=from:subject:message-id; bh=0OwJlzst8QnGBgBcQk6fTLszxJcN7zyR3Uch+1IED3Y=; b=MsH7fCaHou7xPAAUUnI0ciXy7xK6obm6TD3QPM7GG2vtUQLay6AChAR9KGhsHWG9rlpAgb/C3 8nkD+GkApjUAVK46Lr2bMjadiDcAr0BbXD7zGYEgc9FzOi7nINvuGkg X-Developer-Key: i=lina@asahilina.net; a=ed25519; pk=Qn8jZuOtR1m5GaiDfTrAoQ4NE1XoYVZ/wmt5YtXWFC4= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758698736570406162?= X-GMAIL-MSGID: =?utf-8?q?1758698736570406162?= Hi everyone, This short series is part of the set of dependencies for the drm/asahi Apple M1/M2 GPU driver. The two patches simply add two missing features to the kernel Arc implementation which are present in the Rust std version: `Any` downcasting and `assume_init()`. Signed-off-by: Asahi Lina --- Asahi Lina (2): rust: sync: arc: implement Arc::downcast() rust: sync: arc: Add UniqueArc::assume_init() rust/kernel/sync/arc.rs | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) --- base-commit: 83f978b63fa7ad474ca22d7e2772c5988101c9bd change-id: 20230224-rust-arc-ba3c26ed4e6a Thank you, ~~ Lina