Print this page
de-linting of .s files


  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  24  */
  25 
  26 
  27 /*
  28  * Assembly language support for pci config space access on sun4v
  29  */
  30 
  31 #include <sys/asm_linkage.h>
  32 #include <sys/hypervisor_api.h>
  33 #include <sys/dditypes.h>
  34 #include <sys/pci_cfgacc.h>
  35 #include <io/px/px_ioapi.h>
  36 #include <io/px/px_lib4v.h>
  37 
  38 #if defined(lint) || defined(__lint)
  39 
  40 /*ARGSUSED*/
  41 uint64_t
  42 hvio_config_get(devhandle_t dev_hdl, pci_device_t bdf, pci_config_offset_t off, 
  43     pci_config_size_t size, pci_cfg_data_t *data_p)
  44 { return (0); }
  45 
  46 /*ARGSUSED*/
  47 uint64_t
  48 hvio_config_put(devhandle_t dev_hdl, pci_device_t bdf, pci_config_offset_t off, 
  49     pci_config_size_t size, pci_cfg_data_t data)
  50 { return (0); }
  51 
  52 #else   /* lint || __lint */
  53 
  54         /*
  55          * arg0 - devhandle
  56          * arg1 - pci_device
  57          * arg2 - pci_config_offset
  58          * arg3 - pci_config_size (1, 2 or 4 byte)
  59          *
  60          * ret0 - status
  61          * ret1 - error_flag
  62          * ret2 - pci_cfg_data
  63          */
  64         ENTRY(hvio_config_get)
  65         mov     HVIO_CONFIG_GET, %o5
  66         ta      FAST_TRAP
  67         sllx    %o1, 32, %o1
  68         or      %o0, %o1, %o0
  69         movrnz  %o1, -1, %o2
  70         stx     %o2, [%o4]
  71         retl
  72         nop
  73         SET_SIZE(hvio_config_get)
  74 
  75         /*
  76          * arg0 - devhandle
  77          * arg1 - pci_device
  78          * arg2 - pci_config_offset
  79          * arg3 - pci_config_size (1, 2 or 4 byte)
  80          * arg4 - pci_cfg_data
  81          *
  82          * ret0 - status
  83          * ret1 - error_flag
  84          */
  85         ENTRY(hvio_config_put)
  86         mov     HVIO_CONFIG_PUT, %o5
  87         ta      FAST_TRAP
  88         sllx    %o1, 32, %o1
  89         or      %o0, %o1, %o0
  90         retl
  91         nop
  92         SET_SIZE(hvio_config_put)
  93 #endif


  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  24  */
  25 
  26 
  27 /*
  28  * Assembly language support for pci config space access on sun4v
  29  */
  30 
  31 #include <sys/asm_linkage.h>
  32 #include <sys/hypervisor_api.h>
  33 #include <sys/dditypes.h>
  34 #include <sys/pci_cfgacc.h>
  35 #include <io/px/px_ioapi.h>
  36 #include <io/px/px_lib4v.h>
  37 
















  38         /*
  39          * arg0 - devhandle
  40          * arg1 - pci_device
  41          * arg2 - pci_config_offset
  42          * arg3 - pci_config_size (1, 2 or 4 byte)
  43          *
  44          * ret0 - status
  45          * ret1 - error_flag
  46          * ret2 - pci_cfg_data
  47          */
  48         ENTRY(hvio_config_get)
  49         mov     HVIO_CONFIG_GET, %o5
  50         ta      FAST_TRAP
  51         sllx    %o1, 32, %o1
  52         or      %o0, %o1, %o0
  53         movrnz  %o1, -1, %o2
  54         stx     %o2, [%o4]
  55         retl
  56         nop
  57         SET_SIZE(hvio_config_get)
  58 
  59         /*
  60          * arg0 - devhandle
  61          * arg1 - pci_device
  62          * arg2 - pci_config_offset
  63          * arg3 - pci_config_size (1, 2 or 4 byte)
  64          * arg4 - pci_cfg_data
  65          *
  66          * ret0 - status
  67          * ret1 - error_flag
  68          */
  69         ENTRY(hvio_config_put)
  70         mov     HVIO_CONFIG_PUT, %o5
  71         ta      FAST_TRAP
  72         sllx    %o1, 32, %o1
  73         or      %o0, %o1, %o0
  74         retl
  75         nop
  76         SET_SIZE(hvio_config_put)