Print this page
acpica-unix2-20130823
PANKOVs restructure

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/sys/acpi/platform/acsolaris.h
          +++ new/usr/src/common/acpica/include/platform/acsolaris.h
↓ open down ↓ 10 lines elided ↑ open up ↑
  11   11   * and limitations under the License.
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  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 2011 Nexenta Systems, Inc.  All rights reserved.
  23   23   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
       25 + * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  25   26   */
  26   27  
  27   28  #ifndef _ACSOLARIS_H_
  28   29  #define _ACSOLARIS_H_
  29   30  
  30   31  #ifdef __cplusplus
  31   32  extern "C" {
  32   33  #endif
  33   34  
       35 +#ifdef _KERNEL
  34   36  #include <sys/types.h>
  35   37  #include <sys/sunddi.h>
  36   38  #include <sys/varargs.h>
  37   39  #include <sys/cpu.h>
  38   40  #include <sys/thread.h>
       41 +#else
       42 +#include <ctype.h>
       43 +#include <stdarg.h>
       44 +#include <stdlib.h>
       45 +#include <string.h>
       46 +#include <unistd.h>
       47 +#endif
  39   48  
       49 +#ifdef __GNUC__
       50 +#include "acgcc.h"
       51 +#else
  40   52  /* Function name used for debug output. */
  41   53  #define ACPI_GET_FUNCTION_NAME  __func__
       54 +#define ACPI_UNUSED_VAR
       55 +#endif
  42   56  
  43   57  uint32_t __acpi_acquire_global_lock(void *);
  44   58  uint32_t __acpi_release_global_lock(void *);
  45   59  void     __acpi_wbinvd(void);
  46   60  
  47   61  #ifdef  _ILP32
  48   62  #define ACPI_MACHINE_WIDTH      32
  49   63  #elif   defined(_LP64)
  50   64  #define ACPI_MACHINE_WIDTH      64
  51   65  #endif
  52   66  
  53   67  #define COMPILER_DEPENDENT_INT64        int64_t
  54   68  #define COMPILER_DEPENDENT_UINT64       uint64_t
  55   69  
  56   70  #define ACPI_CAST_PTHREAD_T(pthread)    ((ACPI_THREAD_ID) (pthread))
  57   71  
  58   72  #define ACPI_PRINTF_LIKE_FUNC
  59      -#define ACPI_UNUSED_VAR
       73 +
  60   74  #define ACPI_USE_NATIVE_DIVIDE
  61   75  #define ACPI_FLUSH_CPU_CACHE()  (__acpi_wbinvd())
  62   76  
       77 +#ifdef DEBUG
       78 +#define ACPI_DEBUG_OUTPUT
  63   79  #define ACPI_DISASSEMBLER
       80 +#endif
       81 +
  64   82  #define ACPI_PACKED_POINTERS_NOT_SUPPORTED
  65   83  
  66   84  /*
  67   85   * Calling conventions:
  68   86   *
  69   87   * ACPI_SYSTEM_XFACE        - Interfaces to host OS (handlers, threads)
  70   88   * ACPI_EXTERNAL_XFACE      - External ACPI interfaces
  71   89   * ACPI_INTERNAL_XFACE      - Internal ACPI interfaces
  72   90   * ACPI_INTERNAL_VAR_XFACE  - Internal variable-parameter list interfaces
  73   91   */
↓ open down ↓ 20 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX