Werner Zeh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31544
Change subject: lib: Add Bubble sort algorithm ......................................................................
lib: Add Bubble sort algorithm
Add an implementation for Bubble sort. For now, only Integers can be sorted in an ascending or descending order. It can be later simply extended to cover other datasets like strings if needed.
Change-Id: I2c5e0b5685a907243b58ebe6682078272d316bf6 Signed-off-by: Werner Zeh werner.zeh@siemens.com --- A src/include/sort.h M src/lib/Makefile.inc A src/lib/sort.c 3 files changed, 83 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/31544/1
diff --git a/src/include/sort.h b/src/include/sort.h new file mode 100644 index 0000000..0117d66 --- /dev/null +++ b/src/include/sort.h @@ -0,0 +1,27 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2019 Siemens AG + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +#ifndef SORT_H_ +#define SORT_H_ + +#include <stddef.h> + +typedef enum{ + NUM_ASCENDING, + NUM_DESCENDING +} sort_order_t; + +void bubblesort(int *v, size_t num_entries, sort_order_t order); + +#endif /* SORT_H_ */ diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index fa1ff8b..33f68d2 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -150,6 +150,7 @@ ramstage-$(CONFIG_FLATTENED_DEVICE_TREE) += device_tree.c ramstage-$(CONFIG_PAYLOAD_FIT_SUPPORT) += fit.c ramstage-$(CONFIG_PAYLOAD_FIT_SUPPORT) += fit_payload.c +ramstage-y += sort.c
romstage-y += cbmem_common.c romstage-y += imd_cbmem.c diff --git a/src/lib/sort.c b/src/lib/sort.c new file mode 100644 index 0000000..48802c1 --- /dev/null +++ b/src/lib/sort.c @@ -0,0 +1,55 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2019 Siemens AG + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <sort.h> + +static void swap(int *v1, int *v2) +{ + int tmp = *v1; + + *v1 = *v2; + *v2 = tmp; +} + +static int is_bigger(int v1, int v2) +{ + return v1 > v2 ? 1 : 0; +} +/* Implement a simple Bubble sort algorithm. Reduce the needed number of + * iterations by taking care of already sorted entries in the list. */ +void bubblesort(int *v, size_t num_entries, sort_order_t order) +{ + size_t len = num_entries, idx, i; + + do { + idx = 1; + for (i = 0; i < (len - 1); ++i) { + switch (order) { + case NUM_ASCENDING: + if (is_bigger(v[i], v[i + 1])) + swap(&v[i], &v[i + 1]); + break; + case NUM_DESCENDING: + if (is_bigger(v[i + 1], v[i])) + swap(&v[i], &v[i + 1]); + break; + default: + return; + } + idx = i + 1; + } + len = idx; + } while (len > 1); +}
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31544 )
Change subject: lib: Add Bubble sort algorithm ......................................................................
Patch Set 1:
Please add it under commonlib and use qsort.
Werner Zeh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31544 )
Change subject: lib: Add Bubble sort algorithm ......................................................................
Patch Set 1:
Patch Set 1:
Please add it under commonlib and use qsort.
I agree with the commonlib-part, will move it to this location. Regarding the algorithm itself I would like tostick with bubblesort for the following reasons: -it is simple -it might turn out that there is a need for a stable sorting algo. Qsort is not stable while bubble sort is -The amount of data to sort in this given case (acpi MADT) is short (up to MAX_CPUS). There is no benefit in qsort vs. bubblesort on this data set -bubblesort does not need to stay the only algo in sort.c. It is more meant as a general location for different sorting algos, which can be added on demand there.
Hello build bot (Jenkins), Aaron Durbin, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31544
to look at the new patch set (#2).
Change subject: commonlib: Add Bubble sort algorithm ......................................................................
commonlib: Add Bubble sort algorithm
Add an implementation for Bubble sort. For now, only Integers can be sorted in an ascending or descending order. It can be later simply extended to cover other datasets like strings if needed.
The reasons for choosing bubble sort are: * it is a simple algorithm * bubble sort is stable, i.e. it does not exchange entries which are not need to be sorted as they are already in order
Change-Id: I2c5e0b5685a907243b58ebe6682078272d316bf6 Signed-off-by: Werner Zeh werner.zeh@siemens.com --- M src/commonlib/Makefile.inc A src/commonlib/include/commonlib/sort.h A src/commonlib/sort.c 3 files changed, 84 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/31544/2
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31544 )
Change subject: commonlib: Add Bubble sort algorithm ......................................................................
Patch Set 2:
https://gitlab.gnome.org/GNOME/libxml2/blob/master/timsort.h might be overkill, but it's a fast, stable, suitably licensed sort algo ;-)
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31544 )
Change subject: commonlib: Add Bubble sort algorithm ......................................................................
Patch Set 2: Code-Review+1
(5 comments)
https://review.coreboot.org/#/c/31544/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/31544/2//COMMIT_MSG@9 PS2, Line 9: Integers integers
https://review.coreboot.org/#/c/31544/2//COMMIT_MSG@13 PS2, Line 13: sort are Just one space.
https://review.coreboot.org/#/c/31544/2//COMMIT_MSG@16 PS2, Line 16: need needed
https://review.coreboot.org/#/c/31544/2/src/commonlib/include/commonlib/sort... File src/commonlib/include/commonlib/sort.h:
https://review.coreboot.org/#/c/31544/2/src/commonlib/include/commonlib/sort... PS2, Line 20: typedef enum{ Add a space before {?
https://review.coreboot.org/#/c/31544/2/src/commonlib/sort.c File src/commonlib/sort.c:
https://review.coreboot.org/#/c/31544/2/src/commonlib/sort.c@30 PS2, Line 30: /* Implement a simple Bubble sort algorithm. Reduce the needed number of Please use the allowed comment style. (No idea if clang-format would help.)
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31544 )
Change subject: commonlib: Add Bubble sort algorithm ......................................................................
Patch Set 2:
(4 comments)
https://review.coreboot.org/#/c/31544/2/src/commonlib/sort.c File src/commonlib/sort.c:
https://review.coreboot.org/#/c/31544/2/src/commonlib/sort.c@18 PS2, Line 18: static void swap(int *v1, int *v2) Should this maybe be a macro (using typeof()) in some header to be more widely useful?
https://review.coreboot.org/#/c/31544/2/src/commonlib/sort.c@26 PS2, Line 26: static int is_bigger(int v1, int v2) This... seems a bit overkill?
https://review.coreboot.org/#/c/31544/2/src/commonlib/sort.c@51 PS2, Line 51: idx = i + 1; I don't get the point of the idx variable. This is updated on every loop iteration but doesn't actually affect the loop. Why don't you just say len = i at the end (or len-- which would be equivalent)?
Really, this whole function seems to be a very unobvious way to write
for (j = 0; j < num_entries - 1; j++) for (i = 0; i < num_entries - 1 - j; i++)
https://review.coreboot.org/#/c/31544/2/src/commonlib/sort.c@54 PS2, Line 54: } while (len > 1); You should include an early abort case for when no swaps were made during a whole outer loop iteration. If we're using bubblesort, we should at least make sure we can benefit from one of its biggest advantages (O(n) on close-to-already-sorted data).
Werner Zeh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31544 )
Change subject: commonlib: Add Bubble sort algorithm ......................................................................
Patch Set 2:
(8 comments)
https://review.coreboot.org/#/c/31544/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/31544/2//COMMIT_MSG@9 PS2, Line 9: Integers
integers
Ack
https://review.coreboot.org/#/c/31544/2//COMMIT_MSG@13 PS2, Line 13: sort are
Just one space.
Ack
https://review.coreboot.org/#/c/31544/2//COMMIT_MSG@16 PS2, Line 16: need
needed
Ack
https://review.coreboot.org/#/c/31544/2/src/commonlib/include/commonlib/sort... File src/commonlib/include/commonlib/sort.h:
https://review.coreboot.org/#/c/31544/2/src/commonlib/include/commonlib/sort... PS2, Line 20: typedef enum{
Add a space before {?
Yes, how has it slipped in using checkpatch? Will add.
https://review.coreboot.org/#/c/31544/2/src/commonlib/sort.c File src/commonlib/sort.c:
https://review.coreboot.org/#/c/31544/2/src/commonlib/sort.c@18 PS2, Line 18: static void swap(int *v1, int *v2)
Should this maybe be a macro (using typeof()) in some header to be more widely useful?
I had a macro with typeof() here in the first run and was not sure. Will switch back to the macro.
https://review.coreboot.org/#/c/31544/2/src/commonlib/sort.c@26 PS2, Line 26: static int is_bigger(int v1, int v2)
This... […]
Agree, will move comparison into the code below.
https://review.coreboot.org/#/c/31544/2/src/commonlib/sort.c@30 PS2, Line 30: /* Implement a simple Bubble sort algorithm. Reduce the needed number of
Please use the allowed comment style. (No idea if clang-format would help. […]
Yes, will do.
https://review.coreboot.org/#/c/31544/2/src/commonlib/sort.c@51 PS2, Line 51: idx = i + 1;
I don't get the point of the idx variable. […]
Will improve.
Hello Paul Menzel, build bot (Jenkins), Aaron Durbin, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31544
to look at the new patch set (#3).
Change subject: commonlib: Add Bubble sort algorithm ......................................................................
commonlib: Add Bubble sort algorithm
Add an implementation for Bubble sort. For now, only integers can be sorted in an ascending or descending order. It can be later simply extended to cover other datasets like strings if needed.
The reasons for choosing bubble sort are: * it is a simple algorithm * bubble sort is stable, i.e. it does not exchange entries which are not needed to be sorted as they are already in order
Change-Id: I2c5e0b5685a907243b58ebe6682078272d316bf6 Signed-off-by: Werner Zeh werner.zeh@siemens.com --- M src/commonlib/Makefile.inc A src/commonlib/include/commonlib/sort.h A src/commonlib/sort.c M src/include/stdlib.h 4 files changed, 84 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/31544/3
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31544 )
Change subject: commonlib: Add Bubble sort algorithm ......................................................................
Patch Set 3: Code-Review+2
Will wait for Julius' verdict, but it looks to me like all the open items are covered?
Werner Zeh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31544 )
Change subject: commonlib: Add Bubble sort algorithm ......................................................................
Patch Set 3:
Patch Set 4: Code-Review+1
(1 comment)
Patch Set 3:
Patch Set 3:
(1 comment)
Does this have a time penalty?
I am pretty sure it is the one the sorting algorithm has, and it surely depends on the number of CPUs.
It's bound by CONFIG_MAX_CPUS which (AFAICS) is at most 48 in our tree, in serengeti_cheetah_fam10. That would mean ~2500 swaps at most in highly localized code and data.
I guess we can deal with that when it becomes an issue? I have the suspicion that using timsort (another stable sort) won't fare much better on our data set because of setup and copying costs (whereas bubble sort works in-place).
Yes, it highly depends on CONFIG_MAX_CPUS. Even if we hit the worst case (O(n²)) this would mean 2304 swaps. I guess on modern CPUs this should not be an issue and we can deal with it once it will become an issue. The benefit of having bubble sort is as you mentioned that it works in-place. No need to copy data while sorting. And with the added abort condition real-life runtime shouldn't be that bad.
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31544 )
Change subject: commonlib: Add Bubble sort algorithm ......................................................................
Patch Set 3: Code-Review+1
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31544 )
Change subject: commonlib: Add Bubble sort algorithm ......................................................................
Patch Set 3:
(3 comments)
https://review.coreboot.org/#/c/31544/3/src/commonlib/include/commonlib/sort... File src/commonlib/include/commonlib/sort.h:
https://review.coreboot.org/#/c/31544/3/src/commonlib/include/commonlib/sort... PS3, Line 16: SORT_H_ nit: _COMMONLIB_SORT_H_?
https://review.coreboot.org/#/c/31544/3/src/include/stdlib.h File src/include/stdlib.h:
https://review.coreboot.org/#/c/31544/3/src/include/stdlib.h@9 PS3, Line 9: #define swap(a, b) do { \ This needs to be in commonlib if the function using it is in commonlib (probably commonlib/helpers.h... that's auto-included from here).
https://review.coreboot.org/#/c/31544/3/src/include/stdlib.h@13 PS3, Line 13: } while (0) Uhhh... not sure how I feel about this. Using lvalues in macros is commonly frowned upon. Using pointers would make it easier to read the macro "like a function". But then again maybe I'm overreacting and swap is exactly the kind of use case where lvalues in a macros are perfectly reasonable.
(If you do decide to change it, please also add extra helper variables to prevent double evaluation.)
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31544 )
Change subject: commonlib: Add Bubble sort algorithm ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/#/c/31544/3/src/include/stdlib.h File src/include/stdlib.h:
https://review.coreboot.org/#/c/31544/3/src/include/stdlib.h@13 PS3, Line 13: } while (0)
Uhhh... not sure how I feel about this. Using lvalues in macros is commonly frowned upon. […]
edit: Actually, if you do decide to leave it like this, maybe call it SWAP() because then it's clearly not (and not treatable like) a function.
Werner Zeh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31544 )
Change subject: commonlib: Add Bubble sort algorithm ......................................................................
Patch Set 3:
(3 comments)
https://review.coreboot.org/#/c/31544/3/src/commonlib/include/commonlib/sort... File src/commonlib/include/commonlib/sort.h:
https://review.coreboot.org/#/c/31544/3/src/commonlib/include/commonlib/sort... PS3, Line 16: SORT_H_
nit: _COMMONLIB_SORT_H_?
Ack
https://review.coreboot.org/#/c/31544/3/src/include/stdlib.h File src/include/stdlib.h:
https://review.coreboot.org/#/c/31544/3/src/include/stdlib.h@9 PS3, Line 9: #define swap(a, b) do { \
This needs to be in commonlib if the function using it is in commonlib (probably commonlib/helpers. […]
Agree, will move to commonlib/helpers.h
https://review.coreboot.org/#/c/31544/3/src/include/stdlib.h@13 PS3, Line 13: } while (0)
edit: Actually, if you do decide to leave it like this, maybe call it SWAP() because then it's clear […]
In my point of view a macro can deal with lvalue pretty fine in this case. So if you are not totally against it I would like to keep it. I agree though to change it to uppercase, that will align better with existing macros like MIN, MAX and the like in helpers.h.
Hello Paul Menzel, build bot (Jenkins), Aaron Durbin, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31544
to look at the new patch set (#4).
Change subject: commonlib: Add Bubble sort algorithm ......................................................................
commonlib: Add Bubble sort algorithm
Add an implementation for Bubble sort. For now, only integers can be sorted in an ascending or descending order. It can be later simply extended to cover other datasets like strings if needed.
The reasons for choosing bubble sort are: * it is a simple algorithm * bubble sort is stable, i.e. it does not exchange entries which are not needed to be sorted as they are already in order
Change-Id: I2c5e0b5685a907243b58ebe6682078272d316bf6 Signed-off-by: Werner Zeh werner.zeh@siemens.com --- M src/commonlib/Makefile.inc M src/commonlib/include/commonlib/helpers.h A src/commonlib/include/commonlib/sort.h A src/commonlib/sort.c 4 files changed, 83 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/31544/4
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31544 )
Change subject: commonlib: Add Bubble sort algorithm ......................................................................
Patch Set 4: Code-Review+2
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/31544 )
Change subject: commonlib: Add Bubble sort algorithm ......................................................................
commonlib: Add Bubble sort algorithm
Add an implementation for Bubble sort. For now, only integers can be sorted in an ascending or descending order. It can be later simply extended to cover other datasets like strings if needed.
The reasons for choosing bubble sort are: * it is a simple algorithm * bubble sort is stable, i.e. it does not exchange entries which are not needed to be sorted as they are already in order
Change-Id: I2c5e0b5685a907243b58ebe6682078272d316bf6 Signed-off-by: Werner Zeh werner.zeh@siemens.com Reviewed-on: https://review.coreboot.org/c/31544 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Julius Werner jwerner@chromium.org --- M src/commonlib/Makefile.inc M src/commonlib/include/commonlib/helpers.h A src/commonlib/include/commonlib/sort.h A src/commonlib/sort.c 4 files changed, 83 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Julius Werner: Looks good to me, approved
diff --git a/src/commonlib/Makefile.inc b/src/commonlib/Makefile.inc index 4d89c48..b6e8913 100644 --- a/src/commonlib/Makefile.inc +++ b/src/commonlib/Makefile.inc @@ -36,3 +36,5 @@ romstage-y += lz4_wrapper.c ramstage-y += lz4_wrapper.c postcar-y += lz4_wrapper.c + +ramstage-y += sort.c diff --git a/src/commonlib/include/commonlib/helpers.h b/src/commonlib/include/commonlib/helpers.h index 03f4306..adc43ca 100644 --- a/src/commonlib/include/commonlib/helpers.h +++ b/src/commonlib/include/commonlib/helpers.h @@ -38,6 +38,11 @@ #define ABS(a) (((a) < 0) ? (-(a)) : (a)) #define IS_POWER_OF_2(x) (((x) & ((x) - 1)) == 0) #define DIV_ROUND_UP(x, y) (((x) + (y) - 1) / (y)) +#define SWAP(a, b) do { \ + typeof(a) tmp = a; \ + a = (typeof(a)) b; \ + b = (typeof(b)) tmp; \ + } while (0) /* * Divide positive or negative dividend by positive divisor and round * to closest integer. Result is undefined for negative divisors and diff --git a/src/commonlib/include/commonlib/sort.h b/src/commonlib/include/commonlib/sort.h new file mode 100644 index 0000000..3d94d25 --- /dev/null +++ b/src/commonlib/include/commonlib/sort.h @@ -0,0 +1,27 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2019 Siemens AG + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +#ifndef _COMMONLIB_SORT_H_ +#define _COMMONLIB_SORT_H_ + +#include <stddef.h> + +typedef enum { + NUM_ASCENDING, + NUM_DESCENDING +} sort_order_t; + +void bubblesort(int *v, size_t num_entries, sort_order_t order); + +#endif /* _COMMONLIB_SORT_H_ */ diff --git a/src/commonlib/sort.c b/src/commonlib/sort.c new file mode 100644 index 0000000..4099939 --- /dev/null +++ b/src/commonlib/sort.c @@ -0,0 +1,49 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2019 Siemens AG + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <commonlib/helpers.h> +#include <commonlib/sort.h> + +/* Implement a simple Bubble sort algorithm. Reduce the needed number of + iterations by taking care of already sorted entries in the list. */ +void bubblesort(int *v, size_t num_entries, sort_order_t order) +{ + size_t i, j; + int swapped; + + for (j = 0; j < num_entries - 1; j++) { + swapped = 0; + for (i = 0; i < num_entries - j - 1; i++) { + switch (order) { + case NUM_ASCENDING: + if (v[i] > v[i + 1]) { + SWAP(v[i], v[i + 1]); + swapped = 1; + } + break; + case NUM_DESCENDING: + if (v[i] < v[i + 1]) { + SWAP(v[i], v[i + 1]); + swapped = 1; + } + break; + default: + return; + } + } + if (!swapped) + break; + } +}
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31544 )
Change subject: commonlib: Add Bubble sort algorithm ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/#/c/31544/5/src/commonlib/sort.c File src/commonlib/sort.c:
https://review.coreboot.org/#/c/31544/5/src/commonlib/sort.c@21 PS5, Line 21: num_entries needs to be checked if > 0
Werner Zeh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31544 )
Change subject: commonlib: Add Bubble sort algorithm ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/#/c/31544/5/src/commonlib/sort.c File src/commonlib/sort.c:
https://review.coreboot.org/#/c/31544/5/src/commonlib/sort.c@21 PS5, Line 21: num_entries
needs to be checked if > 0
See https://review.coreboot.org/c/coreboot/+/31853
Werner Zeh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31544 )
Change subject: commonlib: Add Bubble sort algorithm ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/#/c/31544/5/src/commonlib/sort.c File src/commonlib/sort.c:
https://review.coreboot.org/#/c/31544/5/src/commonlib/sort.c@21 PS5, Line 21: num_entries
See https://review.coreboot. […]
Sorry, I meant https://review.coreboot.org/c/coreboot/+/31854