[Skiboot] [PATCH 7/7] Add CONFIG_NPU to optionally skip NPU code

Nicholas Piggin npiggin at gmail.com
Tue Feb 2 19:20:18 AEDT 2021


Excerpts from Stewart Smith's message of January 25, 2021 10:58 am:
> Can save a whopping 39kb of skiboot.lid.xz
> 
> Signed-off-by: Stewart Smith <stewart at flamingspork.com>
> ---
>  Makefile                      |  2 ++
>  core/hmi.c                    |  2 +-
>  core/platform.c               |  1 -
>  hw/Makefile.inc               | 12 +++++++++---
>  hw/npu2.c                     |  1 +
>  include/pci.h                 |  3 +++
>  platforms/astbmc/Makefile.inc | 16 +++++++++++-----
>  7 files changed, 27 insertions(+), 10 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 625f212e..ce61e3af 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -61,6 +61,8 @@ DEAD_CODE_ELIMINATION ?= 0
>  CONFIG_FSP?=1
>  # Try to build without POWER8 support
>  CONFIG_P8?=1
> +# Try and build without any NPU support
> +CONFIG_NPU?=1
>  
>  #
>  # Where is the source directory, must be a full path (no ~)
> diff --git a/core/hmi.c b/core/hmi.c
> index ee4c168e..6d83e060 100644
> --- a/core/hmi.c
> +++ b/core/hmi.c
> @@ -691,7 +691,7 @@ static void find_npu2_checkstop_reason(int flat_chip_id,
>  	npu2_hmi_verbose = true;
>  
>  	if (npu2_hmi_verbose) {
> -		npu2_dump_scoms(flat_chip_id);
> +		phb->ops->dump_debug_data(flat_chip_id);

AFAIKS find_npu2_checkstop_reason could still be called. I would compile 
those out too or guard a missing ops function.

Thanks,
Nick



More information about the Skiboot mailing list