Page MenuHomeFreeBSD

linuxkpi: Add linux/stackdepot.h
ClosedPublic

Authored by manu on Aug 10 2022, 6:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 11 2024, 9:26 PM
Unknown Object (File)
Dec 22 2023, 9:21 PM
Unknown Object (File)
Dec 12 2023, 12:03 PM
Unknown Object (File)
Nov 24 2023, 3:23 AM
Unknown Object (File)
Nov 7 2023, 6:46 PM
Unknown Object (File)
Oct 6 2023, 5:38 PM
Unknown Object (File)
Sep 5 2023, 8:14 AM
Unknown Object (File)
Apr 26 2023, 4:25 AM

Details

Summary

With a typedef needed by drm-kmod.

Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

manu requested review of this revision.Aug 10 2022, 6:48 AM

From the use in drm __topology_ref_save it seems it could be more than one value as it loops over them and compares them to find an entry? So not sure if "bool" is correct?

In D36105#819924, @bz wrote:

From the use in drm __topology_ref_save it seems it could be more than one value as it loops over them and compares them to find an entry? So not sure if "bool" is correct?

It doesn't loop over the backtrace var, also this code isn't compiled in (none of the code using stack* is). This is really just to satify the build.

In D36105#820345, @manu wrote:
In D36105#819924, @bz wrote:

From the use in drm __topology_ref_save it seems it could be more than one value as it loops over them and compares them to find an entry? So not sure if "bool" is correct?

It doesn't loop over the backtrace var, also this code isn't compiled in (none of the code using stack* is). This is really just to satify the build.

1575         n = stack_trace_save(stack_entries, ARRAY_SIZE(stack_entries), 1);
1576         backtrace = stack_depot_save(stack_entries, n, GFP_KERNEL);
1577         if (!backtrace)
1578                 return;
1579
1580         /* Try to find an existing entry for this backtrace */
1581         for (i = 0; i < history->len; i++) {
1582                 if (history->entries[i].backtrace == backtrace) {
1583                         entry = &history->entries[i];
1584                         break;
1585                 }
1586         }

It seems to compare the return value from stack_depot_save with a list; I thus doubted that it just looks for the one bool there.

This revision is now accepted and ready to land.Aug 11 2022, 11:29 AM
This revision was automatically updated to reflect the committed changes.