Message ID | 168599257757.404.12337040567990260583.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2907633vqr; Mon, 5 Jun 2023 12:29:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6/gMI1WeE1zNh5v8AyyVvUmMxaXDEioc78KhDiA9jh/lpG42oESHgqZzLHPjF2b1SCSWvv X-Received: by 2002:a92:d7cd:0:b0:33c:fd3b:1cca with SMTP id g13-20020a92d7cd000000b0033cfd3b1ccamr640476ilq.30.1685993348243; Mon, 05 Jun 2023 12:29:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685993348; cv=none; d=google.com; s=arc-20160816; b=mwKb+njSs/+/Xdmy1Kggxsu/DM9wnZkg+VSXB6m6aV/JV+hSd+4RoJadJefowEMNYs e6vR13iBGljFuQ4CWi7Inx8idRtu/jExvgcpB2dXTXVwoDo2POzsnhgsn8WMW7Zi1S3t qjTv/glOfqYUCoCCWgrW1sg5aGHx9X2ewG3on5CMAX9Zr1S6YP4G2IC/ihbgRDGH73VZ xj8KE4v68ZpGIHs2TXTxkgU5jRyVNdQQ7oYW9MKZoeUp1xgdRO0kA36CytPtil1zZ3QL S9KveWAiIknOb14KS/AkHS6OX7d7WOOaYVLJs0A7rU5el1mV2oCD5BQRiLc0Z8cz+sQj LPHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=Xp5ZrpVKkqVRxduNNdNRC5w/LcOkwOaKJ54Z44eyCTk=; b=g9i9ot5UqvCIQ9KcN6w5lxk8snI+OZ43zDqFgvQnzLSVcRP5TMiyBQkhzriaHbjeAi w18RWx5RAgJrSEzcxY/V8d2Y0HLXmu9zR2K+xPYGj676gdb1KPzT55kYHAWQGBP9SNdl LWMJwVpJvUpWCsidE5A6Zl+cu7Z6v9zS2utFC2qAFckjJ5W57dV2J5kxLhKfdpwQVrk8 AEualThIpfMBbqUXsawcJCeaSWrPaIfihm6KmcpDheaWEPfSAAJdHGrUBUFy+3Xgc8zv daz4QL2m4wL/pKvpQGd/iYFB9hFZvi8GY4jSRp6jPQskZIE2xMfALQ0+25ZQB2DmjqoU v0TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ofq6Bgly; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=JS7vp8n7; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s21-20020a632c15000000b00543e3449f28si285244pgs.616.2023.06.05.12.28.54; Mon, 05 Jun 2023 12:29:08 -0700 (PDT) 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=@linutronix.de header.s=2020 header.b=ofq6Bgly; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=JS7vp8n7; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235529AbjFETQf (ORCPT <rfc822;xxoosimple@gmail.com> + 99 others); Mon, 5 Jun 2023 15:16:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235365AbjFETQW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 5 Jun 2023 15:16:22 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E68D120; Mon, 5 Jun 2023 12:16:20 -0700 (PDT) Date: Mon, 05 Jun 2023 19:16:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1685992578; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xp5ZrpVKkqVRxduNNdNRC5w/LcOkwOaKJ54Z44eyCTk=; b=ofq6BglyqVuKR8V85QYJ1knwkDr74U/21MYNw0BXKKncRco417ugmriHHwlLJ5n2MZe1xu xXfl14kilyBESNoUvdPDbwptQ2cXWIebY6FGl+JxOKU/vE6ahINJJGM79revPo9fbtrb2g /gnl1TL4Yn2T65cfDfVucUBB0XzThTC8DxqWm7g1XpaRspN+nY/WSJyjouBA/huQPQahnO 3ckwpgW4FwGtfyBdPIYLyyfe3RShFHSyeewJX0iwjomU8N/ABr+qe5qjbOVIPjqN4gAiMx RhqonS1buPJzt+zwRrM5u0JnmvKbfpcobQMmZoGoJ8BWHd274v2UTIgd8y5bkQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1685992578; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xp5ZrpVKkqVRxduNNdNRC5w/LcOkwOaKJ54Z44eyCTk=; b=JS7vp8n7aoBRBvp0NlA8zp94uD5IL7obJ/7rgvYjA4zL27nV6n/Ef1rMtoNd3wBErOylFK eGp3hkMUrXrU7qBw== From: "tip-bot2 for Peter Zijlstra" <tip-bot2@linutronix.de> Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] math64: Always inline u128 version of mul_u64_u64_shr() Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>, Michael Kelley <mikelley@microsoft.com>, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230519102715.637420396@infradead.org> References: <20230519102715.637420396@infradead.org> MIME-Version: 1.0 Message-ID: <168599257757.404.12337040567990260583.tip-bot2@tip-bot2> Robot-ID: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766318520787855224?= X-GMAIL-MSGID: =?utf-8?q?1767892161252960355?= |
Series |
[tip:,sched/core] math64: Always inline u128 version of mul_u64_u64_shr()
|
|
Commit Message
tip-bot2 for Thomas Gleixner
June 5, 2023, 7:16 p.m. UTC
The following commit has been merged into the sched/core branch of tip: Commit-ID: fc4a0db4149afcdae2527f0d8c376accca34adc9 Gitweb: https://git.kernel.org/tip/fc4a0db4149afcdae2527f0d8c376accca34adc9 Author: Peter Zijlstra <peterz@infradead.org> AuthorDate: Fri, 19 May 2023 12:21:05 +02:00 Committer: Peter Zijlstra <peterz@infradead.org> CommitterDate: Mon, 05 Jun 2023 21:11:06 +02:00 math64: Always inline u128 version of mul_u64_u64_shr() In order to prevent the following complaint from happening, always inline the u128 variant of mul_u64_u64_shr() -- which is what x86_64 will use. vmlinux.o: warning: objtool: read_hv_sched_clock_tsc+0x5a: call to mul_u64_u64_shr.constprop.0() leaves .noinstr.text section It should compile into something like: asm("mul %[mul];" "shrd %rdx, %rax, %cl" : "+&a" (a) : "c" shift, [mul] "r" (mul) : "d"); Which is silly not to inline, but it happens. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Michael Kelley <mikelley@microsoft.com> # Hyper-V Link: https://lore.kernel.org/r/20230519102715.637420396@infradead.org --- include/linux/math64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/math64.h b/include/linux/math64.h index 8b9191a..bf74478 100644 --- a/include/linux/math64.h +++ b/include/linux/math64.h @@ -168,7 +168,7 @@ static __always_inline u64 mul_u64_u32_shr(u64 a, u32 mul, unsigned int shift) #endif /* mul_u64_u32_shr */ #ifndef mul_u64_u64_shr -static inline u64 mul_u64_u64_shr(u64 a, u64 mul, unsigned int shift) +static __always_inline u64 mul_u64_u64_shr(u64 a, u64 mul, unsigned int shift) { return (u64)(((unsigned __int128)a * mul) >> shift); }