Print this page
6154 const-ify segment ops structures

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/sun4/io/rootnex.c
          +++ new/usr/src/uts/sun4/io/rootnex.c
↓ open down ↓ 711 lines elided ↑ open up ↑
 712  712   *
 713  713   *      fault in mappings for requestors
 714  714   */
 715  715  
 716  716  /*ARGSUSED*/
 717  717  static int
 718  718  rootnex_map_fault(dev_info_t *dip, dev_info_t *rdip,
 719  719      struct hat *hat, struct seg *seg, caddr_t addr,
 720  720      struct devpage *dp, pfn_t pfn, uint_t prot, uint_t lock)
 721  721  {
 722      -        extern struct seg_ops segdev_ops;
      722 +        extern const struct seg_ops segdev_ops;
 723  723  
 724  724          DPRINTF(ROOTNEX_MAP_DEBUG, ("rootnex_map_fault: address <%p> "
 725  725              "pfn <%lx>", (void *)addr, pfn));
 726  726          DPRINTF(ROOTNEX_MAP_DEBUG, (" Seg <%s>\n",
 727  727              seg->s_ops == &segdev_ops ? "segdev" :
 728  728              seg == &kvseg ? "segkmem" : "NONE!"));
 729  729  
 730  730          /*
 731  731           * This is all terribly broken, but it is a start
 732  732           *
↓ open down ↓ 247 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX