History log of /freebsd/sys/compat/linuxkpi/common/include/linux/compiler.h (Results 1 – 25 of 40)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 16672453 15-Oct-2024 Warner Losh <imp@FreeBSD.org>

cdefs: Add __deprecated

Add __deprecated decorator. This is for a deprecated interface. copystr
is tagged with this today in copy(9), but don't actually provide it or
use it. copystr is a #define so

cdefs: Add __deprecated

Add __deprecated decorator. This is for a deprecated interface. copystr
is tagged with this today in copy(9), but don't actually provide it or
use it. copystr is a #define so adding it will have to wait.

LinuxKPI was defining this away completely in compiler.h. Since this is
shared between Linux KPI consumers and OpenZFS, if it's already defined,
use the FreeBSD sys/cdefs.h version, otherwise define it away. For
OpenZFS this will retain it, while for Linux KPI it will tend to drop it
(I think always, but I didn't look at everything).

Sponsored by: Netflix
Reviewed by: jhb, emaste
Differential Revision: https://reviews.freebsd.org/D46137

show more ...


Revision tags: release/13.4.0
# 742088d9 21-Jul-2024 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Add __diag macros

__diag macros turn individual warnings and errors on and off locally,
depending on version of compiler. Add dummy implementation as drm-kmod
set warnings separately for e

LinuxKPI: Add __diag macros

__diag macros turn individual warnings and errors on and off locally,
depending on version of compiler. Add dummy implementation as drm-kmod
set warnings separately for each file.

Sponsored by: Serenity Cyber Security, LLC
MFC after: 1 week
Reviewed by: manu, emaste
Differential Revision: https://reviews.freebsd.org/D45842

show more ...


Revision tags: release/14.1.0
# 2a8c5059 02-Apr-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: add __counted_by() and __nonstring

Add checks for __counted_by(_x) and __nonstring as and depending
on compiler support enable the attribute/feature.

This is needed to make mtk76 and ath1

LinuxKPI: add __counted_by() and __nonstring

Add checks for __counted_by(_x) and __nonstring as and depending
on compiler support enable the attribute/feature.

This is needed to make mtk76 and ath1xk drivers compile.

Sposnored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste, dim
Differential Revision: https://reviews.freebsd.org/D44587

show more ...


# 3208d4ad 08-Apr-2024 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Import vanilla linux/overflow.h

It is dual-licensed (GPLv2 & MIT) and self-contained header file.
No need to reimplement it.

Sponsored by: Serenity CyberSecurity, LLC
Reviewed by: emaste

LinuxKPI: Import vanilla linux/overflow.h

It is dual-licensed (GPLv2 & MIT) and self-contained header file.
No need to reimplement it.

Sponsored by: Serenity CyberSecurity, LLC
Reviewed by: emaste
MFC after: 1 week

show more ...


Revision tags: release/13.3.0, release/14.0.0
# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 046d8d89 13-May-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: fix WRITE_ONCE(), remove ACCESS_ONCE()

Fix a gcc warning: "to be safe all intermediate pointers in cast from
'...' to '...' must be 'const' qualified [-Wcast-qual]".
Doing what is essentia

LinuxKPI: fix WRITE_ONCE(), remove ACCESS_ONCE()

Fix a gcc warning: "to be safe all intermediate pointers in cast from
'...' to '...' must be 'const' qualified [-Wcast-qual]".
Doing what is essentially a __DECONST() adding the uintptr_t gets
rid of the massive amount of warnings we get in LinuxKPI and lets
us see the actual problems a lot better.
This is a follow-up to 74e908b3c63b28de1d590dc42502fbe959a6da2e which
fixed READ_ONCE().
ACCESS_ONCE() seems to be an obsolete KPI these days in Linux and
FreeBSD does not use it either directly so we can entirely remove
it now.

Sponsored by: The FreeBSD Foundation
Suggested by: jhb
Reviewed by: hselasky
MFC after: 10 days
Differential Revision: https://reviews.freebsd.org/D40084

show more ...


# 53d821d6 22-Apr-2023 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Define noinline_for_stack compiler attribute

It is identical to noinline and used for documentation reasons.

Required by: drm-kmod 5.15-lts
Reviewed by: manu
Differential Revision: https:

LinuxKPI: Define noinline_for_stack compiler attribute

It is identical to noinline and used for documentation reasons.

Required by: drm-kmod 5.15-lts
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D39553

show more ...


# 74e908b3 19-Apr-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: fix READ_ONCE() -Wcast-equal warnings

Rather than using ACCESS_ONCE() in READ_ONCE() add a missing cast
to const in order to satisfy -Wcast-equal by gcc.
Sadly we cannot do the same to WRI

LinuxKPI: fix READ_ONCE() -Wcast-equal warnings

Rather than using ACCESS_ONCE() in READ_ONCE() add a missing cast
to const in order to satisfy -Wcast-equal by gcc.
Sadly we cannot do the same to WRITE_ONCE() which still is very
noisy.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D39706

show more ...


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0
# e5b95b22 09-Feb-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: add sizeof_field()

Add sizeof_field() to linux/compiler.h needed by a driver.

MFC after: 3 days
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D34226


# 307f78f3 19-Dec-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Constantly use _LINUXKPI_ prefix in include guards

MFC after: 1 week
Reviewed by: bz, emaste, hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33562


Revision tags: release/12.3.0
# 2fb5be79 04-Jul-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Implement smp_*mb barriers with atomic_thread_fence_*

for x86 and move them to asm/barrier.h

MFC after: 1 week
Reviewed by: bz, hselasky, manu
Differential Revision: https://reviews.freeb

LinuxKPI: Implement smp_*mb barriers with atomic_thread_fence_*

for x86 and move them to asm/barrier.h

MFC after: 1 week
Reviewed by: bz, hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33296

show more ...


# da717031 24-May-2021 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: compiler.h add three more defines

Add fallthrough, ____cacheline_aligned_in_smp, and smp_mb() to
linux/compiler.h.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: hse

LinuxKPI: compiler.h add three more defines

Add fallthrough, ____cacheline_aligned_in_smp, and smp_mb() to
linux/compiler.h.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D30420

show more ...


# 43b4c006 24-May-2021 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: extract stringify() in their own header file

Add linux/stringify.h as directly included by drivers. Remove the
definitions from compiler.h and include the new header in places
where the s

LinuxKPI: extract stringify() in their own header file

Add linux/stringify.h as directly included by drivers. Remove the
definitions from compiler.h and include the new header in places
where the stringify macros are already used without linuxkpi.

I have adjusted the Copyright of the new file according to the commit
originaly adding the macros (99e690772adbcb78c9e8441bedcf1913d72ea72f).

Sposnored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D30440

show more ...


Revision tags: release/13.0.0
# 3b1ecc9f 23-Mar-2021 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: remove < 5.0 version support

We are not aware of any out-of-tree consumers anymore
which would need KPI support for before Linux version 5.
Update the two in-tree consumers to use the new

LinuxKPI: remove < 5.0 version support

We are not aware of any out-of-tree consumers anymore
which would need KPI support for before Linux version 5.
Update the two in-tree consumers to use the new KPI.
This allows us to remove the extra version check and
will also give access to {lower,upper}_32_bits() unconditionally.

Sponsored-by: The FreeBSD Foundation
Reviewed-by: hselasky, rlibby, rstone
MFC-after: 2 weeks
X-MFC: to 13 only
Differential Revision: https://reviews.freebsd.org/D29391

show more ...


Revision tags: release/12.2.0, release/11.4.0
# 93d70cd3 25-May-2020 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: Add __same_type and __must_be_array macros

The same_type macro simply wraps around builtin_types_compatible_p which
exist for both GCC and CLANG, which returns 1 if both types are the same

linuxkpi: Add __same_type and __must_be_array macros

The same_type macro simply wraps around builtin_types_compatible_p which
exist for both GCC and CLANG, which returns 1 if both types are the same.
The __must_be_array macros returns 1 if the argument is an array.

This is needed for DRM v5.3

Sponsored-by: The FreeBSD Foundation
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D24953

show more ...


# 482f0c02 15-Dec-2019 Conrad Meyer <cem@FreeBSD.org>

Revert r355760, r355759

And remove the inline/deprecated attribute use entirely in stdlib.h, from
r355747. The intent was to provide a buildable API transitionary period, but
clearly that was count

Revert r355760, r355759

And remove the inline/deprecated attribute use entirely in stdlib.h, from
r355747. The intent was to provide a buildable API transitionary period, but
clearly that was counter-productive.

Reported by: delphij, imp, others

show more ...


# 9d471059 15-Dec-2019 Conrad Meyer <cem@FreeBSD.org>

linuxkpi: Drop incompatible __deprecated definition

Probably all of these linuxkpi stubs should be '#ifndef' guarded, but maybe
that would prevent people from noticing when they are defined.

Introd

linuxkpi: Drop incompatible __deprecated definition

Probably all of these linuxkpi stubs should be '#ifndef' guarded, but maybe
that would prevent people from noticing when they are defined.

Introduced in r355759. For some reason I only ran a buildworld and not a
kernel. Mea culpa.

Reported by: Mark Millard
X-MFC-with: r355759

show more ...


Revision tags: release/12.1.0, release/11.3.0
# 0269ae4c 06-Jun-2019 Alan Somers <asomers@FreeBSD.org>

MFHead @348740

Sponsored by: The FreeBSD Foundation


# 0bb30b3a 15-May-2019 Johannes Lundberg <johalun@FreeBSD.org>

LinuxKPI: Move {lower|upper}_32_bits macros from port to base.

This patch is part of D19565

Reviewed by: hps
Approved by: imp (mentor), hps
MFC after: 1 week


Revision tags: release/12.0.0, release/11.2.0
# cbea4f29 31-May-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Define __initconst in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies


# 83630517 23-Mar-2018 Ed Maste <emaste@FreeBSD.org>

linuxkpi whitespace cleanup

Reviewed by: hselasky, markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D14807


# dc354b15 04-Mar-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Define noinline and __maybe_unused macros in the LinuxKPI.

MFC after: 1 week
Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks


# 2060ca65 17-Feb-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Add support for __percpu and __weak macros in the LinuxKPI.

MFC after: 1 week
Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies


Revision tags: release/10.4.0
# 531c2d7a 24-Jul-2017 Enji Cooper <ngie@FreeBSD.org>

MFhead@r320180


# bca9d05f 23-Jul-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Merge ^/head r319973 through 321382.


12