Print this page
segspt_ops can be static
There is nothing that needs access to this structure outside of the spt
segment driver itself.

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/vm/seg_spt.c
          +++ new/usr/src/uts/common/vm/seg_spt.c
↓ open down ↓ 68 lines elided ↑ open up ↑
  69   69   * the system) they can patch the segspt_minfree to smaller number.
  70   70   */
  71   71  pgcnt_t segspt_minfree = 0;
  72   72  
  73   73  static int segspt_create(struct seg *seg, caddr_t argsp);
  74   74  static int segspt_unmap(struct seg *seg, caddr_t raddr, size_t ssize);
  75   75  static void segspt_free(struct seg *seg);
  76   76  static void segspt_free_pages(struct seg *seg, caddr_t addr, size_t len);
  77   77  static lgrp_mem_policy_info_t *segspt_getpolicy(struct seg *seg, caddr_t addr);
  78   78  
  79      -const struct seg_ops segspt_ops = {
       79 +static const struct seg_ops segspt_ops = {
  80   80          .unmap          = segspt_unmap,
  81   81          .free           = segspt_free,
  82   82          .getpolicy      = segspt_getpolicy,
  83   83  };
  84   84  
  85   85  static int segspt_shmdup(struct seg *seg, struct seg *newseg);
  86   86  static int segspt_shmunmap(struct seg *seg, caddr_t raddr, size_t ssize);
  87   87  static void segspt_shmfree(struct seg *seg);
  88   88  static faultcode_t segspt_shmfault(struct hat *hat, struct seg *seg,
  89   89                  caddr_t addr, size_t len, enum fault_type type, enum seg_rw rw);
↓ open down ↓ 2949 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX