Print this page
5042 stop using deprecated atomic functions

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/sun4u/io/zuluvm.c
          +++ new/usr/src/uts/sun4u/io/zuluvm.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  
  26      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  27      -
  28   26  /*
  29   27   * zuluvm module
  30   28   *
  31   29   * Provides services required by the XVR-4000 graphics accelerator (zulu)
  32   30   * that are not provided by the ddi. See PSARC 2002/231.
  33   31   *
  34   32   * Zulu has 2 dma engines with built in MMUs. zuluvm provides TLB miss
  35   33   * interrupt support obtaining virtual to physical address translations
  36   34   * using the XHAT interface PSARC/2003/517.
  37   35   *
↓ open down ↓ 33 lines elided ↑ open up ↑
  71   69  #include <sys/zulu_hat.h>
  72   70  
  73   71  #define ZULUVM_GET_PAGE(val) \
  74   72          (caddr_t)((uintptr_t)(val) & PAGEMASK)
  75   73  #define ZULUVM_GET_AS   curthread->t_procp->p_as
  76   74  
  77   75  #define ZULUVM_LOCK   mutex_enter(&(zdev->dev_lck))
  78   76  #define ZULUVM_UNLOCK mutex_exit(&(zdev->dev_lck))
  79   77  
  80   78  #define ZULUVM_SET_STATE(_z, b, c) \
  81      -        cas32((uint32_t *)&((_z)->zvm.state), c, b)
       79 +        atomic_cas_32((uint32_t *)&((_z)->zvm.state), c, b)
  82   80  #define ZULUVM_GET_STATE(_z) \
  83   81          (_z)->zvm.state
  84   82  #define ZULUVM_SET_IDLE(_z) \
  85   83          (_z)->zvm.state = ZULUVM_STATE_IDLE;
  86   84  
  87   85  #define ZULUVM_INO_MASK ((1<<INO_SIZE)-1)
  88   86  #define ZULUVM_IGN_MASK ((1<<IGN_SIZE)-1)
  89   87  #define ZULUVM_MONDO(_zdev, _n) \
  90   88          ((ZULUVM_IGN_MASK & _zdev->agentid) << INO_SIZE) | \
  91   89          (ZULUVM_INO_MASK & (_n))
↓ open down ↓ 1406 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX