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)
Sep 25 2024, 10:32 AM
Unknown Object (File)
Sep 24 2024, 6:13 AM
Unknown Object (File)
Sep 22 2024, 5:44 AM
Unknown Object (File)
Sep 19 2024, 11:50 AM
Unknown Object (File)
Sep 19 2024, 2:44 AM
Unknown Object (File)
Sep 18 2024, 2:58 AM
Unknown Object (File)
Sep 17 2024, 7:55 PM
Unknown Object (File)
Sep 13 2024, 5:54 PM

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.