[Skiboot] [PATCH] OCC: Do not call occ_do_load if hostservice LID load is not complete

Vaidyanathan Srinivasan svaidy at linux.vnet.ibm.com
Mon Mar 9 17:39:15 AEDT 2015


* Vasant Hegde <hegdevasant at linux.vnet.ibm.com> [2015-03-09 11:56:53]:

> Commit 4db0c1e4f introduced occ_load_req queue. With that changes we queue
> the occ load request if hostservice LID load is not complete. And we have
> callback function (occ_poke_load_queue)...which takes care of calling
> __occ_do_load().
> 
> But current code proceeds and calls __occ_do_load() after queueing....which
> is not correct. So just return if we queue the occ load request.
> 
> Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
> cc: Ananth N Mavinakayanahalli <ananth at in.ibm.com>

Reviewed-by: Vaidyanathan Srinivasan <svaidy at linux.vnet.ibm.com>


> ---
>  hw/occ.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/occ.c b/hw/occ.c
> index cc2d4b7..34d6de5 100644
> --- a/hw/occ.c
> +++ b/hw/occ.c
> @@ -458,8 +458,10 @@ static void occ_do_load(u8 scope, u32 dbob_id __unused, u32 seq_id)
>  	 * Check if hostservices lid caching is complete. If not, queue
>  	 * the load request.
>  	 */
> -	if (!hservices_lid_preload_complete())
> +	if (!hservices_lid_preload_complete()) {
>  		occ_queue_load(scope, dbob_id, seq_id);
> +		return;
> +	}

We should not proceed to call host services until the lid is
preloaded.

>  
>  	__occ_do_load(scope, dbob_id, seq_id);

This will get called from occ_poke_load_queue() after lid preload is
complete.

In addition to this fix, 

hservice_lid_load()
        if (list_empty(&hbrt_lid_list))	/* Should not happen */
		hservices_lid_preload(); <<, Change to abort()

If we come back via hostservices and find lid not preloaded, then we
abort. The preload should happen first and also be preserved for any
runtime reload.

--Vaidy



More information about the Skiboot mailing list