From 4db0c1e4f67474e1af7e9a391598d2a776485edd Mon Sep 17 00:00:00 2001 From: Ananth N Mavinakayanahalli Date: Thu, 19 Feb 2015 15:38:17 +0530 Subject: OCC/hostservices: Queue pre-preload HBRT lid load requests There is no guarantee that a hostservices lid load request will arrive after we have cached the required lids. For such cases, queue the request and service them after caching. Signed-off-by: Ananth N Mavinakayanahalli Signed-off-by: Stewart Smith --- core/hostservices.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'core/hostservices.c') diff --git a/core/hostservices.c b/core/hostservices.c index 1c41a95..769d6f0 100644 --- a/core/hostservices.c +++ b/core/hostservices.c @@ -394,6 +394,13 @@ struct hbrt_lid { }; static LIST_HEAD(hbrt_lid_list); +static bool hbrt_lid_preload_complete = false; + +bool hservices_lid_preload_complete(void) +{ + return hbrt_lid_preload_complete; +} + /* TODO: Few of the following routines can be generalized */ static int __hservice_lid_load(uint32_t lid, void **buf, size_t *len) { @@ -468,6 +475,9 @@ void hservices_lid_preload(void) /* Currently HBRT needs only one (OCC) lid */ for (i = 0; i < num_lids; i++) __hservice_lid_preload(lid_list[i]); + + hbrt_lid_preload_complete = true; + occ_poke_load_queue(); } static int hservice_lid_load(uint32_t lid, void **buf, size_t *len) -- cgit v1.1