<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/include/linux/math64.h, branch rust-fixes-6.10</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=rust-fixes-6.10</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=rust-fixes-6.10'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2024-04-08T13:03:07Z</updated>
<entry>
<title>vdso, math64: Provide mul_u64_u32_add_u64_shr()</title>
<updated>2024-04-08T13:03:07Z</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2024-03-25T06:40:09Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=1beb35ec615f676d49d68b6dc23c7418ba8ff145'/>
<id>urn:sha1:1beb35ec615f676d49d68b6dc23c7418ba8ff145</id>
<content type='text'>
Provide mul_u64_u32_add_u64_shr() which is a calculation that will be used
by timekeeping and VDSO.

Place #include &lt;vdso/math64.h&gt; after #include &lt;asm/div64.h&gt; to allow
architecture-specific overrides, at least for the kernel.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://lore.kernel.org/r/20240325064023.2997-6-adrian.hunter@intel.com

</content>
</entry>
<entry>
<title>math64: Tidy up mul_u64_u32_shr()</title>
<updated>2024-04-08T13:03:06Z</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2024-03-25T06:40:08Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=5e5e51422cd189bc1b627f619f0f99324e6e4de9'/>
<id>urn:sha1:5e5e51422cd189bc1b627f619f0f99324e6e4de9</id>
<content type='text'>
Put together declaration and initialization of local variables.

Suggested-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://lore.kernel.org/r/20240325064023.2997-5-adrian.hunter@intel.com

</content>
</entry>
<entry>
<title>math64: Always inline u128 version of mul_u64_u64_shr()</title>
<updated>2023-06-05T19:11:06Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2023-05-19T10:21:05Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=fc4a0db4149afcdae2527f0d8c376accca34adc9'/>
<id>urn:sha1:fc4a0db4149afcdae2527f0d8c376accca34adc9</id>
<content type='text'>
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"
      : "+&amp;a" (a)
      : "c" shift, [mul] "r" (mul)
      : "d");

Which is silly not to inline, but it happens.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Tested-by: Michael Kelley &lt;mikelley@microsoft.com&gt;  # Hyper-V
Link: https://lore.kernel.org/r/20230519102715.637420396@infradead.org
</content>
</entry>
<entry>
<title>sched/clock/x86: Mark sched_clock() noinstr</title>
<updated>2023-01-31T14:01:47Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2023-01-26T15:08:36Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=8739c6811572b087decd561f96382087402cc343'/>
<id>urn:sha1:8739c6811572b087decd561f96382087402cc343</id>
<content type='text'>
In order to use sched_clock() from noinstr code, mark it and all it's
implenentations noinstr.

The whole pvclock thing (used by KVM/Xen) is a bit of a pain,
since it calls out to watchdogs, create a
pvclock_clocksource_read_nowd() variant doesn't do that and can be
noinstr.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/20230126151323.702003578@infradead.org
</content>
</entry>
<entry>
<title>math64: fix kernel-doc return value warnings</title>
<updated>2022-11-21T21:30:54Z</updated>
<author>
<name>Liam Beguin</name>
<email>liambeguin@gmail.com</email>
</author>
<published>2022-11-18T18:23:09Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=a898db21cc8ff4205784253355d330517983bbbb'/>
<id>urn:sha1:a898db21cc8ff4205784253355d330517983bbbb</id>
<content type='text'>
Fix the following kernel-doc warnings by adding a description for return
values of div_[us]64.

	math64.h:126: warning: No description found for return value of 'div_u64'
	math64.h:139: warning: No description found for return value of 'div_s64'

Signed-off-by: Liam Beguin &lt;liambeguin@gmail.com&gt;
Link: https://lore.kernel.org/r/20221118182309.3824530-3-liambeguin@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>math64: add kernel-doc for DIV64_U64_ROUND_UP</title>
<updated>2022-11-21T21:30:54Z</updated>
<author>
<name>Liam Beguin</name>
<email>liambeguin@gmail.com</email>
</author>
<published>2022-11-18T18:23:08Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=090f13cac84d618d8d391e72646bea462aae9486'/>
<id>urn:sha1:090f13cac84d618d8d391e72646bea462aae9486</id>
<content type='text'>
Add kernel-doc for DIV64_U64_ROUND_UP so that it appears in the
documentation.

Signed-off-by: Liam Beguin &lt;liambeguin@gmail.com&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Link: https://lore.kernel.org/r/20221118182309.3824530-2-liambeguin@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>math64: favor kernel-doc from header files</title>
<updated>2022-11-21T21:30:53Z</updated>
<author>
<name>Liam Beguin</name>
<email>liambeguin@gmail.com</email>
</author>
<published>2022-11-18T18:23:07Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=d28a1de5d1128d6caef15fdc04d3f6484dc7264b'/>
<id>urn:sha1:d28a1de5d1128d6caef15fdc04d3f6484dc7264b</id>
<content type='text'>
Fix the kernel-doc markings for div64 functions to point to the header
file instead of the lib/ directory.  This avoids having implementation
specific comments in generic documentation.  Furthermore, given that
some kernel-doc comments are identical, drop them from lib/math64 and
only keep there comments that add implementation details.

Signed-off-by: Liam Beguin &lt;liambeguin@gmail.com&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Link: https://lore.kernel.org/r/20221118182309.3824530-1-liambeguin@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>math64: New DIV_U64_ROUND_CLOSEST helper</title>
<updated>2022-02-25T09:27:57Z</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2022-02-19T15:28:13Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=2c861b73a23b1237bdd054b6023bb27f6747c2b9'/>
<id>urn:sha1:2c861b73a23b1237bdd054b6023bb27f6747c2b9</id>
<content type='text'>
Provide DIV_U64_ROUND_CLOSEST helper which uses div_u64 to perform
division rounded to the closest integer using unsigned 64bit
dividend and unsigned 32bit divisor.

Reviewed-by: Marek Behún &lt;kabel@kernel.org&gt;
Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Signed-off-by: Marek Behún &lt;kabel@kernel.org&gt;
Link: https://lore.kernel.org/r/20220219152818.4319-2-kabel@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>math64.h: Add mul_s64_u64_shr()</title>
<updated>2021-06-17T17:09:27Z</updated>
<author>
<name>Ilias Stamatis</name>
<email>ilstam@amazon.com</email>
</author>
<published>2021-05-26T18:44:08Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=605a140a49099effc069f0fd509db34d91f48496'/>
<id>urn:sha1:605a140a49099effc069f0fd509db34d91f48496</id>
<content type='text'>
This function is needed for KVM's nested virtualization. The nested TSC
scaling implementation requires multiplying the signed TSC offset with
the unsigned TSC multiplier.

Signed-off-by: Ilias Stamatis &lt;ilstam@amazon.com&gt;
Reviewed-by: Maxim Levitsky &lt;mlevitsk@redhat.com&gt;
Message-Id: &lt;20210526184418.28881-2-ilstam@amazon.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>math64.h: kernel-docs: Convert some markups into normal comments</title>
<updated>2020-10-15T05:49:46Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2020-09-28T13:25:17Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=c2a9a645591f11761fdbe3c7f45c0ad32af97eb4'/>
<id>urn:sha1:c2a9a645591f11761fdbe3c7f45c0ad32af97eb4</id>
<content type='text'>
There are several functions at math64.h that are also
defined at div64.c. As both are included at kernel-api.rst,
Sphinx 3.x complains about symbol duplication:

	./lib/math/div64.c:73: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'.
	Declaration is 'div_s64_rem'.
	./lib/math/div64.c:104: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'.
	Declaration is 'div64_u64_rem'.
	./lib/math/div64.c:144: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'.
	Declaration is 'div64_u64'.
	./lib/math/div64.c:172: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'.
	Declaration is 'div64_s64'.

In order to avoid Sphinx warnings about duplication, change the kernel-doc
markups to just comments at math64.h.

Reviewed-by: Vincenzo Frascino &lt;vincenzo.frascino@arm.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
</feed>
