History log of /freebsd/sys/compat/linuxkpi/common/include/linux/rbtree.h (Results 1 – 19 of 19)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# a5cac2e6 26-Jun-2024 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Add rb_add_cached function

rb_add_cached inserts node into the leftmost cached tree

Sponsored by: Serenity CyberSecurity, LLC
MFC after: 1 week
Reviewed by: manu
Differential Revision: ht

LinuxKPI: Add rb_add_cached function

rb_add_cached inserts node into the leftmost cached tree

Sponsored by: Serenity CyberSecurity, LLC
MFC after: 1 week
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D45608

show more ...


Revision tags: release/14.1.0, 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/


Revision tags: release/13.2.0, release/12.4.0
# 4893472c 13-Sep-2022 Doug Moore <dougm@FreeBSD.org>

rb_tree: pass parent to RB_INSERT_COLOR

Change RB_COLOR_INSERT to take a parent parameter, to avoid looking up
a value already available. Make adjustments to a linux rbtree header,
which invokes it.

rb_tree: pass parent to RB_INSERT_COLOR

Change RB_COLOR_INSERT to take a parent parameter, to avoid looking up
a value already available. Make adjustments to a linux rbtree header,
which invokes it.

Reviewed by: alc, hselasky
Differential Revision: https://reviews.freebsd.org/D36114

show more ...


# d0354fa7 08-Sep-2022 Doug Moore <dougm@FreeBSD.org>

rb_tree: reduce duplication in balancing code

Change RB_INSERT_COLOR and RB_REMOVE_COLOR so that the blocks of code
that are identical except for left and right being exchanged are made
only one blo

rb_tree: reduce duplication in balancing code

Change RB_INSERT_COLOR and RB_REMOVE_COLOR so that the blocks of code
that are identical except for left and right being exchanged are made
only one block with a variable to indicate left- or right-handedness.

Rename RB macros so that those not intended for external use begin
with an underscore.

Add comments to the balancing code so that another might understand it.

Reviewed by: alc, kib
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D36393

show more ...


# 02d0c43c 20-Aug-2022 Doug Moore <dougm@FreeBSD.org>

rb_tree: speed-up double rotation

RB_ROTATE_LEFT (and it symmetric twin) modify the rb-tree, adjusting
pointers so that what started as a proper tree ends up a proper
tree. When two consecutive rota

rb_tree: speed-up double rotation

RB_ROTATE_LEFT (and it symmetric twin) modify the rb-tree, adjusting
pointers so that what started as a proper tree ends up a proper
tree. When two consecutive rotations move the same node up the tree,
some of the pointers changed in the first rotation are immediately
changed again in the second - namely, the pointer from the rising node
to its new parent, and the pointer from that parent back to the rising
node. This change removes from RB_ROTATE macros the responsibility for
managing those two pointers, and leaves it to the code that calls for
rotations to fix up those pointers afterward. That drops a comparison
and a pair of assignments from every INSERT_COLOR or REMOVE_COLOR call
that ends in a double rotation.

A side-effect of this change is that the SWAP_CHILD macro must take as
a parameter a pointer to the node that is changing children, where it
is now computed from the old child. Since this macro is called in a
couple of places besides the RB_ROTATE macros, those calls are also
affected.

Reviewed by: alc
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D36266

show more ...


Revision tags: release/13.1.0
# 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
# dbc920bd 06-Nov-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Implement interval_tree

Required by drm-kmod

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


# dd527633 05-Nov-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Import some linux/rbtree.h functions from OpenBSD

Required by drm-kmod

Obtained from: OpenBSD
MFC after: 1 week


Revision tags: release/13.0.0
# ff15f3f1 04-Dec-2020 Hans Petter Selasky <hselasky@FreeBSD.org>

Allow the rbtree header file in the LinuxKPI to be used in standalone code.

MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking


Revision tags: release/12.2.0
# 158c55a5 24-Jun-2020 Doug Moore <dougm@FreeBSD.org>

In r362552, RB_SET_PARENT is defined, and use in parens in
RB_CLEAR_NODE. But it is not an expression, and ought not to be
enclosed in parens. Remove them.

Approved by: markj
Differential Revision

In r362552, RB_SET_PARENT is defined, and use in parens in
RB_CLEAR_NODE. But it is not an expression, and ought not to be
enclosed in parens. Remove them.

Approved by: markj
Differential Revision: https://reviews.freebsd.org/D25421

show more ...


# 4d569800 23-Jun-2020 Doug Moore <dougm@FreeBSD.org>

Define RB_SET_PARENT to do all assignments to rb parent
pointers. Define RB_SWAP_CHILD to replace the child of a parent with
its twin, and use it in 4 places. Use RB_SET in rb_link_node to remove
the

Define RB_SET_PARENT to do all assignments to rb parent
pointers. Define RB_SWAP_CHILD to replace the child of a parent with
its twin, and use it in 4 places. Use RB_SET in rb_link_node to remove
the only linuxkpi reference to color, and then drop color- and
parent-related definitions that are defined and used only in rbtree.h.

This is intended to be entirely cosmetic, with no impact on program
behavior, and leave RB_PARENT and RB_SET_PARENT as the only ways to
read and write rb parent pointers.

Reviewed by: markj, kib
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D25264

show more ...


# 9f1041dc 13-Jun-2020 Doug Moore <dougm@FreeBSD.org>

Linuxkpi uses the rb-tree structures without using their interfaces,
making them break when the representation changes. Revert changes that
eliminated the color field from rb-trees, leaving everythin

Linuxkpi uses the rb-tree structures without using their interfaces,
making them break when the representation changes. Revert changes that
eliminated the color field from rb-trees, leaving everything as it was
before.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D25250

show more ...


# 13dca193 12-Jun-2020 Doug Moore <dougm@FreeBSD.org>

Revert r362108, as it breaks compilation.


# 3159ceca 12-Jun-2020 Doug Moore <dougm@FreeBSD.org>

The linuxkpi code accesses left/right rb tree pointers without using
RB_LEFT or RB_RIGHT, so they aren't stripping off the color bit
encoded there. Strip off that bit for linuxkpi.

Reported by: dch

The linuxkpi code accesses left/right rb tree pointers without using
RB_LEFT or RB_RIGHT, so they aren't stripping off the color bit
encoded there. Strip off that bit for linuxkpi.

Reported by: dch
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D25245

show more ...


Revision tags: release/11.4.0
# 36ba4b39 09-Jun-2020 Doug Moore <dougm@FreeBSD.org>

To reduce the size of an rb_node, drop the color field. Set the least
significant bit in the pointer to the node from its parent to indicate
that the node is red. Have the tree rotation macros leave

To reduce the size of an rb_node, drop the color field. Set the least
significant bit in the pointer to the node from its parent to indicate
that the node is red. Have the tree rotation macros leave the
old-parent/new-child node red and the new-parent/old-child node black.

This change makes RB_LEFT and RB_RIGHT no longer assignable, and
RB_COLOR no longer defined. Any code that modifies the tree or
examines a node color would have to be modified after this change.

Reviewed by: markj
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D25105

show more ...


Revision tags: release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0, release/10.3.0
# b626f5a7 04-Jan-2016 Glen Barber <gjb@FreeBSD.org>

MFH r289384-r293170

Sponsored by: The FreeBSD Foundation


# a5d8944a 19-Nov-2015 Navdeep Parhar <np@FreeBSD.org>

Catch up with head (r291075).


# 3c3feed4 01-Nov-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Merge from head


# 8d59ecb2 29-Oct-2015 Hans Petter Selasky <hselasky@FreeBSD.org>

Finish process of moving the LinuxKPI module into the default kernel build.

- Move all files related to the LinuxKPI into sys/compat/linuxkpi and
its subfolders.
- Update sys/conf/files and some M

Finish process of moving the LinuxKPI module into the default kernel build.

- Move all files related to the LinuxKPI into sys/compat/linuxkpi and
its subfolders.
- Update sys/conf/files and some Makefiles to use new file locations.
- Added description of COMPAT_LINUXKPI to sys/conf/NOTES which in turn
adds the LinuxKPI to all LINT builds.
- The LinuxKPI can be added to the kernel by setting the
COMPAT_LINUXKPI option. The OFED kernel option no longer builds the
LinuxKPI into the kernel. This was done to keep the build rules for
the LinuxKPI in sys/conf/files simple.
- Extend the LinuxKPI module to include support for USB by moving the
Linux USB compat from usb.ko to linuxkpi.ko.
- Bump the FreeBSD_version.
- A universe kernel build has been done.

Reviewed by: np @ (cxgb and cxgbe related changes only)
Sponsored by: Mellanox Technologies

show more ...