Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp272770lqj; Wed, 10 Apr 2024 09:58:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWrwx8LSMerAbxJd7q+mcIhLYlKG7UUTb5pwmperbyUlNOTz+lVwQU4lMhRiq2AdB2GhfIeqkWGtfuufDZ5UEUZ3ILIm9pjW5N9Dza1/A== X-Google-Smtp-Source: AGHT+IHuvX+FSI9xDoCmB59nxwIXt5ia9HnaioYQj3eizzhJTHqRq8y8Lp2v0z5s9BXUheVxbVPr X-Received: by 2002:a05:620a:222e:b0:78d:67aa:70d with SMTP id n14-20020a05620a222e00b0078d67aa070dmr3159190qkh.37.1712768288089; Wed, 10 Apr 2024 09:58:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712768288; cv=pass; d=google.com; s=arc-20160816; b=JMGuL964RG2DhmRkcR76uBJYllAgG/6RLxDRzubO9uFCwxeyAUMfyOoyI656hmJ8TU 4AcX31wRFzqEpJZXKUFRBFkOZGANWpr5v5ZucLfohWJf5opCVN6KJUMgY0YO7sWXNzDe HiYpsNm9L40vw8/Bzs/h4ymMZ4D7TtUbrq3vh1Dn6wqlG758cRnZN6dMhphWUzrW17IO PHI9JKDb3An5aaF+I1CXPACwUp04iLOCVUbDy4z52MsCs0Zn1etDmxEb0bJRKHVBFgx9 A36D8V9/O2ZFKh9/z+OkGhBFwFkqTD7klq+TM4Cd7up2rhFNuFQdjXAIZvQpfpL20GFH 4Mhw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=Z/ZgqaypGaV5swi15SPT/jtzv4HSULo1UI0nOqmEKes=; fh=FCR4UmfxQvtnYQIyQVFRwzBXW+h1tOP6L5zMB2Ylht0=; b=rpTxDTJGXGSloeLx2nMN7HtOhtf7px0CvvhuN1C/ICizlFBZoZh5IolyqEr0jAOMBd 9Z1+l9m7IaFi1a0FlXCy7rRk9/bt92+JdCj62YIr3PAMVa8jgkXPqBSTYsWmOjKogpvU GMogNsOJTvpcwZAlHVtO07Eji6VpSu5DwTSDam9QW/XQN3pM64KpyZ9HCVdBe0ijD+Gv ATFBU68iz2CeMhLEIqIDHB3eJhHQdqSqOXybvVWplBuKu30PCvhragKYI8OQUZLa6WQP Vt8MeeCvOXHjadO4FVl4ad23VuFl+wt9d4Xdtp6EzEKUmkcPk5o4P6lezeM7vHofVmDu wIyA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=EiizNN1U; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-139018-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139018-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id dv11-20020a05620a1b8b00b0078d4a6553a7si13751146qkb.268.2024.04.10.09.58.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 09:58:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139018-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=EiizNN1U; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-139018-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139018-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C7E6F1C21F36 for ; Wed, 10 Apr 2024 16:58:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 388F517BB00; Wed, 10 Apr 2024 16:58:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="EiizNN1U"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="L2QjUseu" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E998617B51B; Wed, 10 Apr 2024 16:57:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712768279; cv=none; b=kSPF8ycWlwQEBXbZEmHXRF00+dKfCJjewYBqaY0AH/OHtVuCTCwXh+6if0ZBVKwFmC+kknM3oelJhTXZHttetMns0kSJh1N25VVxHY0lqb2DaEybyovUvJXltJq1wmi5ayjsPeDbn6maRya47EUrnxjU7kRRtl1y1AoYt7TwPqQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712768279; c=relaxed/simple; bh=Z/ZgqaypGaV5swi15SPT/jtzv4HSULo1UI0nOqmEKes=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=bFX8FCdYmCUWPmmtVL7J2Gs8krU1n+NU+8+Q3mGykH7+j8hHo0S0dxs49z1v8OExHKwyX7xQc0yYS5AdzQmhrEIC14hD0mOm6XjBOrGECbA1L4c984MKHKwIHk4BHxiX6EV3Cz3Oe/xJCmU5UdPpQVYm+meM8AAz/O42+SwPQAU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=EiizNN1U; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=L2QjUseu; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712768276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Z/ZgqaypGaV5swi15SPT/jtzv4HSULo1UI0nOqmEKes=; b=EiizNN1UGYKYXzf7NRbZWq2tkmt5yiBlDPHkpDAh9Ri1hi8XJ5nzE99AE4MhnhNBLewiSM wHUwV0D6NYfWxaQjQKHRhhhSOA6SE5J/Agy/1Wy4uomoxh4WOH89ZrMHojmSi1gW3wPY3U jYeA1eHDmfEyrTgBmvPpPjWi+IEwG84JkPhO0S6YDG66RuvF0geKWLM9t+YgftTfCkjM56 2587eF+AcK9qi0/E3Jrc4QvKVKpn6Vcd3VIbyI/5UAcGXBs3n0v0YBaKUTvyFODSIS3fFb 6J1qxOAg2BSKMgku5QHBZ7K71Uopcd8RFnLGC2J5LkeMG/BhRfNLEmGbWyUvAg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712768276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Z/ZgqaypGaV5swi15SPT/jtzv4HSULo1UI0nOqmEKes=; b=L2QjUseufo3EpamzfqlCtxYv+wy8YLexNGrqOW2E5n24SXMLLo33ABn9a/7QKMYA17/ilC N0G5TERtlqRbXYDw== To: Alice Ryhl , Miguel Ojeda , John Stultz , Stephen Boyd Cc: Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?utf-8?Q?Bj=C3=B6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Alice Ryhl Subject: Re: [PATCH v2] rust: time: add Ktime In-Reply-To: <20240322-rust-ktime_ms_delta-v2-1-d98de1f7c282@google.com> References: <20240322-rust-ktime_ms_delta-v2-1-d98de1f7c282@google.com> Date: Wed, 10 Apr 2024 18:57:55 +0200 Message-ID: <87v84p2m0c.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Fri, Mar 22 2024 at 08:59, Alice Ryhl wrote: > Introduce a wrapper around `ktime_t` with a few different useful > methods. > > Rust Binder will use these bindings to compute how many milliseconds a > transaction has been active for when dumping the current state of the > Binder driver. This replicates the logic in C Binder [1]. > > For a usage example in Rust Binder, see [2]. > > The `ktime_get` method cannot be safely called in NMI context. This > requirement is not checked by these abstractions, but it is intended > that klint [3] or a similar tool will be used to check it in the future. > > Link: https://lore.kernel.org/lkml/5ac8c0d09392290be789423f0dd78a520b830fab.1682333709.git.zhangchuang3@xiaomi.com/ [1] > Link: https://r.android.com/3004103 [2] > Link: https://rust-for-linux.com/klint [3] > Signed-off-by: Alice Ryhl Reviewed-by: Thomas Gleixner