Print this page
11584 ::xcall would be useful
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/sys/x_call.h
          +++ new/usr/src/uts/i86pc/sys/x_call.h
↓ open down ↓ 14 lines elided ↑ open up ↑
  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  /*
  23   23   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
       25 + * Copyright 2018 Joyent, Inc.
  25   26   */
  26   27  
  27   28  #ifndef _SYS_X_CALL_H
  28   29  #define _SYS_X_CALL_H
  29   30  
  30   31  #ifdef  __cplusplus
  31   32  extern "C" {
  32   33  #endif
  33   34  
  34   35  #ifndef _ASM
  35   36  
       37 +#define XC_MSG_FREE     (0)     /* msg in xc_free queue */
       38 +#define XC_MSG_ASYNC    (1)     /* msg in slave xc_msgbox */
       39 +#define XC_MSG_CALL     (2)     /* msg in slave xc_msgbox */
       40 +#define XC_MSG_SYNC     (3)     /* msg in slave xc_msgbox */
       41 +#define XC_MSG_WAITING  (4)     /* msg in master xc_msgbox or xc_waiters */
       42 +#define XC_MSG_RELEASED (5)     /* msg in slave xc_msgbox */
       43 +#define XC_MSG_DONE     (6)     /* msg in master xc_msgbox */
       44 +
  36   45  typedef uintptr_t xc_arg_t;
  37   46  typedef int (*xc_func_t)(xc_arg_t, xc_arg_t, xc_arg_t);
  38   47  
  39   48  /*
  40   49   * One of these is stored in each CPU's machcpu data, plus one extra for
  41   50   * priority (ie panic) messages
  42   51   */
  43   52  typedef struct xc_data {
  44   53          xc_func_t       xc_func;
  45   54          xc_arg_t        xc_a1;
  46   55          xc_arg_t        xc_a2;
  47   56          xc_arg_t        xc_a3;
  48   57  } xc_data_t;
  49   58  
  50   59  /*
  51   60   * This is kept as small as possible, since for N CPUs we need N * N of them.
  52   61   */
  53   62  typedef struct xc_msg {
  54   63          uint8_t         xc_command;
  55      -#ifdef __amd64
  56   64          uint16_t        xc_master;
  57   65          uint16_t        xc_slave;
  58      -#else
  59      -        uint8_t         xc_master;
  60      -        uint8_t         xc_slave;
  61      -#endif
  62   66          struct xc_msg   *xc_next;
  63   67  } xc_msg_t;
  64   68  
  65   69  /*
  66   70   * Cross-call routines.
  67   71   */
  68   72  #if defined(_KERNEL)
  69   73  
  70   74  extern void     xc_init_cpu(struct cpu *);
  71   75  extern void     xc_fini_cpu(struct cpu *);
↓ open down ↓ 19 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX