Print this page
patch as-lock-macro-simplification

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/sun4/io/rootnex.c
          +++ new/usr/src/uts/sun4/io/rootnex.c
↓ open down ↓ 738 lines elided ↑ open up ↑
 739  739                      (struct segdev_data *)seg->s_data;
 740  740  
 741  741                  if (hat == NULL) {
 742  742                          /*
 743  743                           * This is one plausible interpretation of
 744  744                           * a null hat i.e. use the first hat on the
 745  745                           * address space hat list which by convention is
 746  746                           * the hat of the system MMU.  At alternative
 747  747                           * would be to panic .. this might well be better ..
 748  748                           */
 749      -                        ASSERT(AS_READ_HELD(seg->s_as, &seg->s_as->a_lock));
      749 +                        ASSERT(AS_READ_HELD(seg->s_as));
 750  750                          hat = seg->s_as->a_hat;
 751  751                          cmn_err(CE_NOTE, "rootnex_map_fault: nil hat");
 752  752                  }
 753  753                  hat_devload(hat, addr, MMU_PAGESIZE, pfn, prot | sdp->hat_attr,
 754  754                      (lock ? HAT_LOAD_LOCK : HAT_LOAD));
 755  755          } else if (seg == &kvseg && dp == (struct devpage *)0) {
 756  756                  hat_devload(kas.a_hat, addr, MMU_PAGESIZE, pfn, prot,
 757  757                      HAT_LOAD_LOCK);
 758  758          } else
 759  759                  return (DDI_FAILURE);
↓ open down ↓ 220 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX