[Skiboot] [PATCH 1/2] core/init: Add prlog calls to make use of fwts annotations
Stewart Smith
stewart at linux.vnet.ibm.com
Fri Dec 23 14:55:29 AEDT 2016
Pridhiviraj Paidipeddi <ppaidipe at linux.vnet.ibm.com> writes:
> Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe at linux.vnet.ibm.com>
> ---
> core/init.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/core/init.c b/core/init.c
> index 9d4ab60..c41d634 100644
> --- a/core/init.c
> +++ b/core/init.c
> @@ -675,6 +675,7 @@ static void per_thread_sanity_checks(void)
> * with a non-zero HRMOR and setting it will break some things (e.g
> * XSCOMs) in hard-to-debug ways.
> */
> + prlog(PR_EMERG, "INIT: Non-zero HRMOR found\n");
> assert(mfspr(SPR_HRMOR) == 0);
>
> /**
> @@ -684,6 +685,7 @@ static void per_thread_sanity_checks(void)
> * happen if the HDAT or devicetree reports too few threads or cores for
> * this processor.
> */
> + prlog(PR_EMERG, "INIT: secondary thread called in\n");
> assert(cpu->state != cpu_state_no_cpu);
> }
Hrm... I've been thinking about if adding assert() parsing to
generate-fwts-olog would be a good idea or not.. ultimately, *nobody* is
going to be running fwts on that host, only maybe capturing the log and
throwing it through... plus, assert conditions aren't too useful without
source file/line number, and they're subject to churn a bit over time.
So... on balance, for assert(), I think we should go the other way,
maybe removing the @fwts tags and just leaving the comments there.
Which all makes me not want to merge this patch for those reasons.
However, looking at this I did end up going and adding prerror() parsing
to generate-fwts-olog: https://patchwork.ozlabs.org/patch/708376/
--
Stewart Smith
OPAL Architect, IBM.
More information about the Skiboot
mailing list