# HG changeset patch # User jm22469 # Date 1189638859 25200 # Node ID 8571b83c9ad0078390d5a5332405d8f8fcef3fda # Parent 7c6859eb3dd02ae378324b19cfaf225006f7b5a0 6589682 IO-DOMAIN-RESET (Ontario-AA): kern_postprom panic on tavor-pcix configuration (reboot) diff -r 7c6859eb3dd0 -r 8571b83c9ad0 usr/src/uts/sun4v/promif/promif_prop.c --- a/usr/src/uts/sun4v/promif/promif_prop.c Wed Sep 12 15:45:31 2007 -0700 +++ b/usr/src/uts/sun4v/promif/promif_prop.c Wed Sep 12 16:14:19 2007 -0700 @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -191,6 +191,12 @@ else return (-1); + /* + * Since we are emulating OBP, we must comply with the promif + * infrastructure and execute only on the originating cpu. + */ + thread_affinity_set(curthread, CPU_CURRENT); + req = kmem_zalloc(sizeof (var_config_hdr_t) + paylen, KM_SLEEP); req->var_config_cmd = VAR_CONFIG_SET_REQ; setp = &req->var_config_set; @@ -201,17 +207,12 @@ sizeof (var_config_hdr_t) + paylen)) != 0) { cmn_err(CE_WARN, "%s: ds_cap_send failed: %d", me, rv); kmem_free(req, sizeof (var_config_hdr_t) + paylen); + thread_affinity_clear(curthread); return (-1); } kmem_free(req, sizeof (var_config_hdr_t) + paylen); - /* - * Since we are emulating OBP, we must comply with the promif - * infrastructure and execute only on the originating cpu. - */ - thread_affinity_set(curthread, CPU_CURRENT); - mutex_enter(&promif_prop_lock); if (cv_timedwait(&promif_prop_cv, &promif_prop_lock, lbolt + PROMIF_DS_TIMEOUT_SEC * hz) == -1) {