[Skiboot] [PATCH 1/1] buddy: Fix warnings when undefining BUDDY_DEBUG
Cédric Le Goater
clg at kaod.org
Mon May 25 17:35:26 AEST 2020
On 5/21/20 9:22 PM, Ryan Grimm wrote:
> In simulation, hundreds of millions of cycles are chewed up in this code
> path:
>
> PC: 0x0000000030033450 -> <.bitmap_tst_bit>+0x18
> LR: 0x000000003003347c -> <.buddy_check_alloc>+0x14
> 0x0000000031c13b30 -> <_ebss>+0x1803b30
> 0x000000003003351c -> <.buddy_check_alloc_down>+0x4c
> 0x00000000300339c4 -> <.buddy_free>+0x7c
> 0x0000000030033be8 -> <.buddy_create>+0xcc
> 0x0000000030089bbc -> <.xive_init>+0xf0
> 0x00000000300157cc -> <.main_cpu_entry>+0x8a0
> 0x000000003000275c -> <boot_entry>+0x1bc
>
> Undefining BUDDY_DEBUG saves 30+ minutes of wall clock time, so fix
> the "warning: unused parameter" messages when compiling.
Sure. The buddy allocator is only used by XIVE, may be we could simply
use DEBUG.
> Signed-off-by: Ryan Grimm <grimm at linux.ibm.com>
Acked-by: Cédric Le Goater <clg at kaod.org>
Thanks,
C.
> ---
> core/buddy.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/core/buddy.c b/core/buddy.c
> index 1f433dd6..b36e407d 100644
> --- a/core/buddy.c
> +++ b/core/buddy.c
> @@ -70,8 +70,8 @@ static void buddy_check_alloc_down(struct buddy *b, unsigned int node)
> }
> }
> #else
> -static inline void buddy_check_alloc(struct buddy *b, unsigned int node) {}
> -static inline void buddy_check_alloc_down(struct buddy *b, unsigned int node) {}
> +static inline void buddy_check_alloc(struct buddy *b __unused, unsigned int node __unused) {}
> +static inline void buddy_check_alloc_down(struct buddy *b __unused, unsigned int node __unused) {}
> #endif
>
> int buddy_alloc(struct buddy *b, unsigned int order)
>
More information about the Skiboot
mailing list