History log of /kvmtool/include/linux/bitops.h (Results 1 – 4 of 4)
Revision Date Author Comments
# 0592f8f8 01-Aug-2024 Andre Przywara <andre.przywara@arm.com>

remove wordsize.h inclusion (for musl compatibility)

The wordsize.h header file and the __WORDSIZE definition do not seem
to be universal, the musl libc for instance has the definition in a
differen

remove wordsize.h inclusion (for musl compatibility)

The wordsize.h header file and the __WORDSIZE definition do not seem
to be universal, the musl libc for instance has the definition in a
different header file. This breaks compilation of kvmtool against musl.

The two leading underscores suggest a compiler-internal symbol anyway, so
let's just remove that particular macro usage entirely, and replace it
with the number we really want: the size of a "long" type.

Reported-by: J. Neuschäfer <j.neuschaefer@gmx.net>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Link: https://lore.kernel.org/r/20240801111054.818765-1-andre.przywara@arm.com
Signed-off-by: Will Deacon <will@kernel.org>

show more ...


# 0febaae0 12-Apr-2022 Alexandru Elisei <alexandru.elisei@arm.com>

Add cpumask functions

Add a handful of cpumask functions, some of which will be used when
dealing with different PMUs on heterogeneous systems.

The maximum number of CPUs in a system, NR_CPUS, whic

Add cpumask functions

Add a handful of cpumask functions, some of which will be used when
dealing with different PMUs on heterogeneous systems.

The maximum number of CPUs in a system, NR_CPUS, which dictates the size of
the cpumask, has been taken from the Kconfig file for each architecture,
from Linux version 5.16.

Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Link: https://lore.kernel.org/r/20220412133231.35355-9-alexandru.elisei@arm.com
Signed-off-by: Will Deacon <will@kernel.org>

show more ...


# d9b64eb6 12-Apr-2022 Alexandru Elisei <alexandru.elisei@arm.com>

linux/bitops.h: Include wordsize.h to provide the __WORDSIZE define

Trying to build a source file which included bitops.h, but didn't also
bring in the definition for __WORDSIZE (by including limits

linux/bitops.h: Include wordsize.h to provide the __WORDSIZE define

Trying to build a source file which included bitops.h, but didn't also
bring in the definition for __WORDSIZE (by including limits.h, for example)
would result in the following error:

include/linux/bitops.h:8:23: error: ‘__WORDSIZE’ undeclared (first use in this function)
8 | #define BITS_PER_LONG __WORDSIZE
| ^~~~~~~~~~

The symbol is defined in the bits/wordsize.h header file, include it.

Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Link: https://lore.kernel.org/r/20220412133231.35355-3-alexandru.elisei@arm.com
Signed-off-by: Will Deacon <will@kernel.org>

show more ...


# 2caa836d 05-May-2011 Ingo Molnar <mingo@elte.hu>

kvm tools: Fix 32-bit build of the asm/system.h include

Provide wrappers and other environmental dependencies that the
asm/system.h header file from hell needs to build fine in user-space.

Sidenote

kvm tools: Fix 32-bit build of the asm/system.h include

Provide wrappers and other environmental dependencies that the
asm/system.h header file from hell needs to build fine in user-space.

Sidenote: right now alternative() defaults to the compatible, slightly
slower barrier instructions that work on all x86 systems.

If this ever shows up in profiles then kvm could provide an alternatives
patching machinery as well. Right now those instructions are emitted
into special sections and then discarded by the linker harmlessly.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...