Print this page
de-linting of .s files

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/sparc/v9/ml/ddi_v9_asm.s
          +++ new/usr/src/uts/sparc/v9/ml/ddi_v9_asm.s
↓ 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  #include <sys/asi.h>
  29   27  #include <sys/asm_linkage.h>
  30   28  #include <sys/machthread.h>
  31   29  #include <sys/privregs.h>
  32   30  #include <sys/ontrap.h>
  33   31  #include <sys/dditypes.h>
  34   32  
  35      -#ifndef lint
  36   33  #include "assym.h"
  37      -#endif
  38   34  
  39      -#if defined(lint)
  40      -#include <sys/isa_defs.h>
  41      -#include <sys/types.h>
  42      -#include <sys/sunddi.h>
  43      -#endif  /* lint */
  44      -
  45   35  /*
  46   36   * This file implements the following ddi common access 
  47   37   * functions:
  48   38   *
  49   39   *      ddi_get{8,16,32,64}
  50   40   *      ddi_put{8,16,32,64}
  51   41   *
  52   42   * and the underlying "trivial" implementations
  53   43   *
  54   44   *      i_ddi_{get,put}{8,16,32,64}
  55   45   *
  56   46   * which assume that there is no need to check the access handle -
  57   47   * byte swapping will be done by the mmu and the address is always
  58   48   * accessible via ld/st instructions.
  59   49   */
  60   50  
  61      -#if defined(lint)
  62      -
  63      -/*ARGSUSED*/
  64      -uint8_t
  65      -ddi_get8(ddi_acc_handle_t handle, uint8_t *addr)
  66      -{
  67      -        return (0);
  68      -}
  69      -
  70      -/*ARGSUSED*/
  71      -uint8_t
  72      -ddi_mem_get8(ddi_acc_handle_t handle, uint8_t *addr)
  73      -{
  74      -        return (0);
  75      -}
  76      -
  77      -/*ARGSUSED*/
  78      -uint8_t
  79      -ddi_io_get8(ddi_acc_handle_t handle, uint8_t *dev_addr)
  80      -{
  81      -        return (0);
  82      -}
  83      -
  84      -/*ARGSUSED*/
  85      -uint16_t
  86      -ddi_get16(ddi_acc_handle_t handle, uint16_t *addr)
  87      -{
  88      -        return (0);
  89      -}
  90      -
  91      -/*ARGSUSED*/
  92      -uint16_t
  93      -ddi_mem_get16(ddi_acc_handle_t handle, uint16_t *addr)
  94      -{
  95      -        return (0);
  96      -}
  97      -
  98      -/*ARGSUSED*/
  99      -uint16_t
 100      -ddi_io_get16(ddi_acc_handle_t handle, uint16_t *dev_addr)
 101      -{
 102      -        return (0);
 103      -}
 104      -
 105      -/*ARGSUSED*/
 106      -uint32_t
 107      -ddi_get32(ddi_acc_handle_t handle, uint32_t *addr)
 108      -{
 109      -        return (0);
 110      -}
 111      -
 112      -/*ARGSUSED*/
 113      -uint32_t
 114      -ddi_mem_get32(ddi_acc_handle_t handle, uint32_t *addr)
 115      -{
 116      -        return (0);
 117      -}
 118      -
 119      -/*ARGSUSED*/
 120      -uint32_t
 121      -ddi_io_get32(ddi_acc_handle_t handle, uint32_t *dev_addr)
 122      -{
 123      -        return (0);
 124      -}
 125      -
 126      -/*ARGSUSED*/
 127      -uint64_t
 128      -ddi_get64(ddi_acc_handle_t handle, uint64_t *addr)
 129      -{
 130      -        return (0);
 131      -}
 132      -
 133      -/*ARGSUSED*/
 134      -uint64_t
 135      -ddi_mem_get64(ddi_acc_handle_t handle, uint64_t *addr)
 136      -{
 137      -        return (0);
 138      -}
 139      -
 140      -/*ARGSUSED*/
 141      -void
 142      -ddi_put8(ddi_acc_handle_t handle, uint8_t *addr, uint8_t value) {}
 143      -
 144      -/*ARGSUSED*/
 145      -void
 146      -ddi_mem_put8(ddi_acc_handle_t handle, uint8_t *dev_addr, uint8_t value) {}
 147      -
 148      -/*ARGSUSED*/
 149      -void
 150      -ddi_io_put8(ddi_acc_handle_t handle, uint8_t *dev_addr, uint8_t value) {}
 151      -
 152      -/*ARGSUSED*/
 153      -void
 154      -ddi_put16(ddi_acc_handle_t handle, uint16_t *addr, uint16_t value) {}
 155      -
 156      -/*ARGSUSED*/
 157      -void
 158      -ddi_mem_put16(ddi_acc_handle_t handle, uint16_t *dev_addr, uint16_t value) {}
 159      -
 160      -/*ARGSUSED*/
 161      -void
 162      -ddi_io_put16(ddi_acc_handle_t handle, uint16_t *dev_addr, uint16_t value) {}
 163      -
 164      -/*ARGSUSED*/
 165      -void
 166      -ddi_put32(ddi_acc_handle_t handle, uint32_t *addr, uint32_t value) {}
 167      -
 168      -/*ARGSUSED*/
 169      -void
 170      -ddi_mem_put32(ddi_acc_handle_t handle, uint32_t *dev_addr, uint32_t value) {}
 171      -
 172      -/*ARGSUSED*/
 173      -void
 174      -ddi_io_put32(ddi_acc_handle_t handle, uint32_t *dev_addr, uint32_t value) {}
 175      -
 176      -/*ARGSUSED*/
 177      -void
 178      -ddi_put64(ddi_acc_handle_t handle, uint64_t *addr, uint64_t value) {}
 179      -
 180      -/*ARGSUSED*/
 181      -void
 182      -ddi_mem_put64(ddi_acc_handle_t handle, uint64_t *dev_addr, uint64_t value) {}
 183      -
 184      -/*ARGSUSED*/
 185      -void
 186      -ddi_rep_get8(ddi_acc_handle_t handle, uint8_t *host_addr, uint8_t *dev_addr,
 187      -        size_t repcount, uint_t flags)
 188      -{
 189      -}
 190      -
 191      -/*ARGSUSED*/
 192      -void
 193      -ddi_rep_get16(ddi_acc_handle_t handle, uint16_t *host_addr, uint16_t *dev_addr,
 194      -        size_t repcount, uint_t flags)
 195      -{
 196      -}
 197      -
 198      -/*ARGSUSED*/
 199      -void
 200      -ddi_rep_get32(ddi_acc_handle_t handle, uint32_t *host_addr, uint32_t *dev_addr,
 201      -        size_t repcount, uint_t flags)
 202      -{
 203      -}
 204      -
 205      -/*ARGSUSED*/
 206      -void
 207      -ddi_rep_get64(ddi_acc_handle_t handle, uint64_t *host_addr, uint64_t *dev_addr,
 208      -        size_t repcount, uint_t flags)
 209      -{
 210      -}
 211      -
 212      -/*ARGSUSED*/
 213      -void
 214      -ddi_rep_put8(ddi_acc_handle_t handle, uint8_t *host_addr, uint8_t *dev_addr,
 215      -        size_t repcount, uint_t flags)
 216      -{
 217      -}
 218      -
 219      -/*ARGSUSED*/
 220      -void
 221      -ddi_rep_put16(ddi_acc_handle_t handle, uint16_t *host_addr, uint16_t *dev_addr,
 222      -        size_t repcount, uint_t flags)
 223      -{
 224      -}
 225      -
 226      -/*ARGSUSED*/
 227      -void
 228      -ddi_rep_put32(ddi_acc_handle_t handle, uint32_t *host_addr, uint32_t *dev_addr,
 229      -        size_t repcount, uint_t flags)
 230      -{
 231      -}
 232      -
 233      -/*ARGSUSED*/
 234      -void
 235      -ddi_rep_put64(ddi_acc_handle_t handle, uint64_t *host_addr, uint64_t *dev_addr,
 236      -        size_t repcount, uint_t flags)
 237      -{
 238      -}
 239      -
 240      -/*ARGSUSED*/
 241      -void
 242      -ddi_mem_rep_get8(ddi_acc_handle_t handle, uint8_t *host_addr,
 243      -        uint8_t *dev_addr, size_t repcount, uint_t flags)
 244      -{
 245      -}
 246      -
 247      -/*ARGSUSED*/
 248      -void
 249      -ddi_mem_rep_get16(ddi_acc_handle_t handle, uint16_t *host_addr,
 250      -        uint16_t *dev_addr, size_t repcount, uint_t flags)
 251      -{
 252      -}
 253      -
 254      -/*ARGSUSED*/
 255      -void
 256      -ddi_mem_rep_get32(ddi_acc_handle_t handle, uint32_t *host_addr,
 257      -        uint32_t *dev_addr, size_t repcount, uint_t flags)
 258      -{
 259      -}
 260      -
 261      -/*ARGSUSED*/
 262      -void
 263      -ddi_mem_rep_get64(ddi_acc_handle_t handle, uint64_t *host_addr,
 264      -        uint64_t *dev_addr, size_t repcount, uint_t flags)
 265      -{
 266      -}
 267      -
 268      -/*ARGSUSED*/
 269      -void
 270      -ddi_mem_rep_put8(ddi_acc_handle_t handle, uint8_t *host_addr,
 271      -        uint8_t *dev_addr, size_t repcount, uint_t flags)
 272      -{
 273      -}
 274      -
 275      -/*ARGSUSED*/
 276      -void
 277      -ddi_mem_rep_put16(ddi_acc_handle_t handle, uint16_t *host_addr,
 278      -        uint16_t *dev_addr, size_t repcount, uint_t flags)
 279      -{
 280      -}
 281      -
 282      -/*ARGSUSED*/
 283      -void
 284      -ddi_mem_rep_put32(ddi_acc_handle_t handle, uint32_t *host_addr,
 285      -        uint32_t *dev_addr, size_t repcount, uint_t flags)
 286      -{
 287      -}
 288      -
 289      -/*ARGSUSED*/
 290      -void
 291      -ddi_mem_rep_put64(ddi_acc_handle_t handle, uint64_t *host_addr,
 292      -        uint64_t *dev_addr, size_t repcount, uint_t flags)
 293      -{
 294      -}
 295      -
 296      -/*ARGSUSED*/
 297      -void
 298      -ddi_io_rep_get8(ddi_acc_handle_t handle,
 299      -        uint8_t *host_addr, uint8_t *dev_addr, size_t repcount) {}
 300      - 
 301      -/*ARGSUSED*/
 302      -void
 303      -ddi_io_rep_get16(ddi_acc_handle_t handle,
 304      -        uint16_t *host_addr, uint16_t *dev_addr, size_t repcount) {}
 305      - 
 306      -/*ARGSUSED*/
 307      -void
 308      -ddi_io_rep_get32(ddi_acc_handle_t handle,
 309      -        uint32_t *host_addr, uint32_t *dev_addr, size_t repcount) {}
 310      - 
 311      -/*ARGSUSED*/
 312      -void
 313      -ddi_io_rep_put8(ddi_acc_handle_t handle,
 314      -        uint8_t *host_addr, uint8_t *dev_addr, size_t repcount) {}
 315      - 
 316      -/*ARGSUSED*/
 317      -void
 318      -ddi_io_rep_put16(ddi_acc_handle_t handle,
 319      -        uint16_t *host_addr, uint16_t *dev_addr, size_t repcount) {}
 320      - 
 321      -
 322      -/*ARGSUSED*/
 323      -void
 324      -ddi_io_rep_put32(ddi_acc_handle_t handle,
 325      -        uint32_t *host_addr, uint32_t *dev_addr, size_t repcount) {}
 326      -
 327      -/*ARGSUSED*/
 328      -uint8_t
 329      -i_ddi_get8(ddi_acc_impl_t *hdlp, uint8_t *addr) 
 330      -{
 331      -        return (0);
 332      -}
 333      -
 334      -/*ARGSUSED*/
 335      -uint16_t
 336      -i_ddi_get16(ddi_acc_impl_t *hdlp, uint16_t *addr)
 337      -{
 338      -        return (0);
 339      -}
 340      -
 341      -/*ARGSUSED*/
 342      -uint32_t
 343      -i_ddi_get32(ddi_acc_impl_t *hdlp, uint32_t *addr)
 344      -{
 345      -        return (0);
 346      -}
 347      -
 348      -/*ARGSUSED*/
 349      -uint64_t
 350      -i_ddi_get64(ddi_acc_impl_t *hdlp, uint64_t *addr)
 351      -{
 352      -        return (0);
 353      -}
 354      -
 355      -/*ARGSUSED*/
 356      -void
 357      -i_ddi_put8(ddi_acc_impl_t *hdlp, uint8_t *addr, uint8_t value) {}
 358      -
 359      -/*ARGSUSED*/
 360      -void
 361      -i_ddi_put16(ddi_acc_impl_t *hdlp, uint16_t *addr, uint16_t value) {}
 362      -
 363      -/*ARGSUSED*/
 364      -void
 365      -i_ddi_put32(ddi_acc_impl_t *hdlp, uint32_t *addr, uint32_t value) {}
 366      -
 367      -/*ARGSUSED*/
 368      -void
 369      -i_ddi_put64(ddi_acc_impl_t *hdlp, uint64_t *addr, uint64_t value) {}
 370      -
 371      -/*ARGSUSED*/
 372      -void
 373      -i_ddi_rep_get8(ddi_acc_impl_t *hdlp, uint8_t *host_addr, uint8_t *dev_addr,
 374      -        size_t repcount, uint_t flags)
 375      -{
 376      -}
 377      -
 378      -/*ARGSUSED*/
 379      -void
 380      -i_ddi_rep_get16(ddi_acc_impl_t *hdlp, uint16_t *host_addr, 
 381      -        uint16_t *dev_addr, size_t repcount, uint_t flags)
 382      -{
 383      -}
 384      -
 385      -/*ARGSUSED*/
 386      -void
 387      -i_ddi_rep_get32(ddi_acc_impl_t *hdlp, uint32_t *host_addr, 
 388      -        uint32_t *dev_addr, size_t repcount, uint_t flags)
 389      -{
 390      -}
 391      -
 392      -/*ARGSUSED*/
 393      -void
 394      -i_ddi_rep_get64(ddi_acc_impl_t *hdlp, uint64_t *host_addr, 
 395      -        uint64_t *dev_addr, size_t repcount, uint_t flags)
 396      -{
 397      -}
 398      -
 399      -/*ARGSUSED*/
 400      -void
 401      -i_ddi_rep_put8(ddi_acc_impl_t *hdlp, uint8_t *host_addr, uint8_t *dev_addr,
 402      -        size_t repcount, uint_t flags)
 403      -{
 404      -}
 405      -
 406      -/*ARGSUSED*/
 407      -void
 408      -i_ddi_rep_put16(ddi_acc_impl_t *hdlp, uint16_t *host_addr, 
 409      -        uint16_t *dev_addr, size_t repcount, uint_t flags)
 410      -{
 411      -}
 412      -
 413      -/*ARGSUSED*/
 414      -void
 415      -i_ddi_rep_put32(ddi_acc_impl_t *hdlp, uint32_t *host_addr, 
 416      -        uint32_t *dev_addr, size_t repcount, uint_t flags)
 417      -{
 418      -}
 419      -
 420      -/*ARGSUSED*/
 421      -void
 422      -i_ddi_rep_put64(ddi_acc_impl_t *hdlp, uint64_t *host_addr, 
 423      -        uint64_t *dev_addr, size_t repcount, uint_t flags)
 424      -{
 425      -}
 426      -
 427      -/*ARGSUSED*/
 428      -uint8_t
 429      -i_ddi_prot_get8(ddi_acc_impl_t *hdlp, uint8_t *addr) 
 430      -{
 431      -        return (0);
 432      -}
 433      -
 434      -/*ARGSUSED*/
 435      -uint16_t
 436      -i_ddi_prot_get16(ddi_acc_impl_t *hdlp, uint16_t *addr)
 437      -{
 438      -        return (0);
 439      -}
 440      -
 441      -/*ARGSUSED*/
 442      -uint32_t
 443      -i_ddi_prot_get32(ddi_acc_impl_t *hdlp, uint32_t *addr)
 444      -{
 445      -        return (0);
 446      -}
 447      -
 448      -/*ARGSUSED*/
 449      -uint64_t
 450      -i_ddi_prot_get64(ddi_acc_impl_t *hdlp, uint64_t *addr)
 451      -{
 452      -        return (0);
 453      -}
 454      -
 455      -/*ARGSUSED*/
 456      -void
 457      -i_ddi_prot_put8(ddi_acc_impl_t *hdlp, uint8_t *addr, uint8_t value) {}
 458      -
 459      -/*ARGSUSED*/
 460      -void
 461      -i_ddi_prot_put16(ddi_acc_impl_t *hdlp, uint16_t *addr, uint16_t value) {}
 462      -
 463      -/*ARGSUSED*/
 464      -void
 465      -i_ddi_prot_put32(ddi_acc_impl_t *hdlp, uint32_t *addr, uint32_t value) {}
 466      -
 467      -/*ARGSUSED*/
 468      -void
 469      -i_ddi_prot_put64(ddi_acc_impl_t *hdlp, uint64_t *addr, uint64_t value) {}
 470      -
 471      -/*ARGSUSED*/
 472      -void
 473      -i_ddi_prot_rep_get8(ddi_acc_impl_t *hdlp, uint8_t *host_addr, uint8_t *dev_addr,
 474      -        size_t repcount, uint_t flags)
 475      -{
 476      -}
 477      -
 478      -/*ARGSUSED*/
 479      -void
 480      -i_ddi_prot_rep_get16(ddi_acc_impl_t *hdlp, uint16_t *host_addr, 
 481      -        uint16_t *dev_addr, size_t repcount, uint_t flags)
 482      -{
 483      -}
 484      -
 485      -/*ARGSUSED*/
 486      -void
 487      -i_ddi_prot_rep_get32(ddi_acc_impl_t *hdlp, uint32_t *host_addr, 
 488      -        uint32_t *dev_addr, size_t repcount, uint_t flags)
 489      -{
 490      -}
 491      -
 492      -/*ARGSUSED*/
 493      -void
 494      -i_ddi_prot_rep_get64(ddi_acc_impl_t *hdlp, uint64_t *host_addr, 
 495      -        uint64_t *dev_addr, size_t repcount, uint_t flags)
 496      -{
 497      -}
 498      -
 499      -/*ARGSUSED*/
 500      -void
 501      -i_ddi_prot_rep_put8(ddi_acc_impl_t *hdlp, uint8_t *host_addr, uint8_t *dev_addr,
 502      -        size_t repcount, uint_t flags)
 503      -{
 504      -}
 505      -
 506      -/*ARGSUSED*/
 507      -void
 508      -i_ddi_prot_rep_put16(ddi_acc_impl_t *hdlp, uint16_t *host_addr, 
 509      -        uint16_t *dev_addr, size_t repcount, uint_t flags)
 510      -{
 511      -}
 512      -
 513      -/*ARGSUSED*/
 514      -void
 515      -i_ddi_prot_rep_put32(ddi_acc_impl_t *hdlp, uint32_t *host_addr, 
 516      -        uint32_t *dev_addr, size_t repcount, uint_t flags)
 517      -{
 518      -}
 519      -
 520      -/*ARGSUSED*/
 521      -void
 522      -i_ddi_prot_rep_put64(ddi_acc_impl_t *hdlp, uint64_t *host_addr, 
 523      -        uint64_t *dev_addr, size_t repcount, uint_t flags)
 524      -{
 525      -}
 526      -
 527      -/*ARGSUSED*/
 528      -int
 529      -i_ddi_ontrap(ddi_acc_handle_t handle)
 530      -{
 531      -        return (0);
 532      -}
 533      -
 534      -/*ARGSUSED*/
 535      -void
 536      -i_ddi_notrap(ddi_acc_handle_t handle)
 537      -{
 538      -}
 539      -
 540      -/*ARGSUSED*/
 541      -void
 542      -i_ddi_caut_get(size_t getsz, void *addr, void *value)
 543      -{
 544      -}
 545      -
 546      -#else
 547      -
 548   51  /*
 549   52   * The functionality of each of the ddi_get/put routines is performed by
 550   53   * the respective indirect function defined in the access handle.  Use of
 551   54   * the access handle functions provides compatibility across platforms for
 552   55   * drivers.
 553   56   * 
 554   57   * By default, the indirect access handle functions are initialized to the
 555   58   * i_ddi_get/put routines to perform memory mapped IO.  If memory mapped IO
 556   59   * is not possible or desired, the access handle must be intialized to another
 557   60   * valid routine to perform the sepcified IO operation.
↓ open down ↓ 990 lines elided ↑ open up ↑
1548 1051          rdpr    %pstate, %o3    ! check&enable ints
1549 1052          andcc   %o3, PSTATE_IE, %g0
1550 1053          bnz,a   cautdone
1551 1054          nop
1552 1055          wrpr    %o3, PSTATE_IE, %pstate
1553 1056  cautdone:
1554 1057          retl
1555 1058          nop
1556 1059          SET_SIZE(i_ddi_caut_get)
1557 1060  
1558      -#endif  /* lint */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX