Print this page
missed one
de-linting of .s files

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/brand/common/brand_solaris.s
          +++ new/usr/src/uts/intel/brand/common/brand_solaris.s
↓ open down ↓ 24 lines elided ↑ open up ↑
  25   25  
  26   26  /*
  27   27   * This is an assembly file that gets #include-ed into the brand-specific
  28   28   * assembly files (e.g. sn1_brand_asm.s) for Solaris-derived brands.
  29   29   * We can't make these into functions since in the trap context there's
  30   30   * no easy place to save the extra parameters that would be required, so
  31   31   * each brand module needs its own copy of this code.  We #include this and
  32   32   * use brand-specific #defines to replace the XXX_brand_... definitions.
  33   33   */
  34   34  
  35      -#ifdef lint
  36      -
  37      -#include <sys/systm.h>
  38      -
  39      -#else /* !lint */
  40      -
  41   35  #include <sys/asm_linkage.h>
  42   36  #include <sys/privregs.h>
  43   37  #include <sys/segments.h>
  44   38  #include "assym.h"
  45   39  #include "brand_asm.h"
  46   40  
  47      -#endif  /* !lint */
  48      -
  49      -#ifdef  lint
  50      -
  51      -void
  52      -XXX_brand_sysenter_callback(void)
  53      -{
  54      -}
  55      -
  56      -void
  57      -XXX_brand_syscall_callback(void)
  58      -{
  59      -}
  60      -
  61      -#if defined(__amd64)
  62      -void
  63      -XXX_brand_syscall32_callback(void)
  64      -{
  65      -}
  66      -#endif  /* amd64 */
  67      -
  68      -void
  69      -XXX_brand_int91_callback(void)
  70      -{
  71      -}
  72      -
  73      -#else   /* !lint */
  74      -
  75   41  #ifdef _ASM     /* The remainder of this file is only for assembly files */
  76   42  
  77      -#if defined(__amd64)
  78      -
  79   43  /*
  80   44   * syscall handler for 32-bit user processes:
  81   45   * See "64-BIT INTERPOSITION STACK" in brand_asm.h.
  82   46   * To 'return' to our user-space handler, we just need to place its address
  83   47   * into %rcx.  The original return address is passed back in SYSCALL_REG.
  84   48   */
  85   49  ENTRY(XXX_brand_syscall32_callback)
  86   50          CALLBACK_PROLOGUE(XXX_emulation_table, SPD_HANDLER, SYSCALL_REG,
  87   51              SCR_REG, SCR_REGB);
  88   52          CALC_TABLE_ADDR(SCR_REG, SPD_HANDLER);
↓ open down ↓ 59 lines elided ↑ open up ↑
 148  112          mov     SCR_REG, SYSCALL_REG;   /* place new ret addr in syscallreg */
 149  113          mov     %gs:CPU_RTMP_R15, SCR_REG; /* restore scratch register */
 150  114          mov     V_SSP(SP_REG), SP_REG;  /* restore intr stack pointer */
 151  115          /*CSTYLED*/
 152  116          xchg    (SP_REG), SYSCALL_REG   /* swap new and orig. return addrs */
 153  117          jmp     sys_sysint_swapgs_iret
 154  118  9:
 155  119          retq
 156  120  SET_SIZE(XXX_brand_int91_callback)
 157  121  
 158      -#else   /* !__amd64 */
 159      -
 160      -/*
 161      - * To 'return' to our user-space handler, we need to replace the iret target
 162      - * address.  The original return address is passed back in %eax.
 163      - * See "32-BIT INTERPOSITION STACK" and "32-BIT INT STACK" in brand_asm.h.
 164      - */
 165      -ENTRY(XXX_brand_syscall_callback)
 166      -        CALLBACK_PROLOGUE(XXX_emulation_table, SPD_HANDLER, SYSCALL_REG,
 167      -            SCR_REG, SCR_REGB);
 168      -        CALC_TABLE_ADDR(SCR_REG, SPD_HANDLER); /* new ret addr is in scratch */
 169      -        mov     SCR_REG, SYSCALL_REG;   /* place new ret addr in syscallreg */
 170      -        GET_V(SP_REG, 0, V_U_EBX, SCR_REG); /* restore scratch register */
 171      -        add     $V_END, SP_REG;         /* restore intr stack pointer */
 172      -        /*CSTYLED*/
 173      -        xchg    (SP_REG), SYSCALL_REG   /* swap new and orig. return addrs */
 174      -        jmp     nopop_sys_rtt_syscall
 175      -9:
 176      -        ret
 177      -SET_SIZE(XXX_brand_syscall_callback)
 178      -
 179      -/*
 180      - * To 'return' to our user-space handler, we just need to place its address
 181      - * into %edx.  The original return address is passed back in SYSCALL_REG.
 182      - * See "32-BIT INTERPOSITION STACK" in brand_asm.h.
 183      - */
 184      -ENTRY(XXX_brand_sysenter_callback)
 185      -        CALLBACK_PROLOGUE(XXX_emulation_table, SPD_HANDLER, SYSCALL_REG,
 186      -            SCR_REG, SCR_REGB);
 187      -        mov     %edx, SCR_REG;  /* save orig return addr in scr reg */
 188      -        CALC_TABLE_ADDR(%edx, SPD_HANDLER); /* new return addr is in %edx */
 189      -        mov     SCR_REG, SYSCALL_REG;   /* save orig return addr in %eax */
 190      -        GET_V(SP_REG, 0, V_U_EBX, SCR_REG) /* restore scratch register */
 191      -        sysexit
 192      -9:
 193      -        ret
 194      -SET_SIZE(XXX_brand_sysenter_callback)
 195      -
 196      -#endif  /* !__amd64 */
 197  122  #endif  /* _ASM */
 198      -#endif  /* !lint */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX