linux_dsm_epyc7002/arch/sparc/include/uapi/asm/oradax.h
Masahiro Yamada d9c5252295 treewide: add "WITH Linux-syscall-note" to SPDX tag of uapi headers
UAPI headers licensed under GPL are supposed to have exception
"WITH Linux-syscall-note" so that they can be included into non-GPL
user space application code.

The exception note is missing in some UAPI headers.

Some of them slipped in by the treewide conversion commit b24413180f
("License cleanup: add SPDX GPL-2.0 license identifier to files with
no license"). Just run:

  $ git show --oneline b24413180f -- arch/x86/include/uapi/asm/

I believe they are not intentional, and should be fixed too.

This patch was generated by the following script:

  git grep -l --not -e Linux-syscall-note --and -e SPDX-License-Identifier \
    -- :arch/*/include/uapi/asm/*.h :include/uapi/ :^*/Kbuild |
  while read file
  do
          sed -i -e '/[[:space:]]OR[[:space:]]/s/\(GPL-[^[:space:]]*\)/(\1 WITH Linux-syscall-note)/g' \
          -e '/[[:space:]]or[[:space:]]/s/\(GPL-[^[:space:]]*\)/(\1 WITH Linux-syscall-note)/g' \
          -e '/[[:space:]]OR[[:space:]]/!{/[[:space:]]or[[:space:]]/!s/\(GPL-[^[:space:]]*\)/\1 WITH Linux-syscall-note/g}' $file
  done

After this patch is applied, there are 5 UAPI headers that do not contain
"WITH Linux-syscall-note". They are kept untouched since this exception
applies only to GPL variants.

  $ git grep --not -e Linux-syscall-note --and -e SPDX-License-Identifier \
    -- :arch/*/include/uapi/asm/*.h :include/uapi/ :^*/Kbuild
  include/uapi/drm/panfrost_drm.h:/* SPDX-License-Identifier: MIT */
  include/uapi/linux/batman_adv.h:/* SPDX-License-Identifier: MIT */
  include/uapi/linux/qemu_fw_cfg.h:/* SPDX-License-Identifier: BSD-3-Clause */
  include/uapi/linux/vbox_err.h:/* SPDX-License-Identifier: MIT */
  include/uapi/linux/virtio_iommu.h:/* SPDX-License-Identifier: BSD-3-Clause */

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-25 11:05:10 +02:00

80 lines
2.0 KiB
C

/* SPDX-License-Identifier: GPL-2.0-or-later WITH Linux-syscall-note */
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Oracle DAX driver API definitions
*/
#ifndef _ORADAX_H
#define _ORADAX_H
#include <linux/types.h>
#define CCB_KILL 0
#define CCB_INFO 1
#define CCB_DEQUEUE 2
struct dax_command {
__u16 command; /* CCB_KILL/INFO/DEQUEUE */
__u16 ca_offset; /* offset into mmapped completion area */
};
struct ccb_kill_result {
__u16 action; /* action taken to kill ccb */
};
struct ccb_info_result {
__u16 state; /* state of enqueued ccb */
__u16 inst_num; /* dax instance number of enqueued ccb */
__u16 q_num; /* queue number of enqueued ccb */
__u16 q_pos; /* ccb position in queue */
};
struct ccb_exec_result {
__u64 status_data; /* additional status data (e.g. bad VA) */
__u32 status; /* one of DAX_SUBMIT_* */
};
union ccb_result {
struct ccb_exec_result exec;
struct ccb_info_result info;
struct ccb_kill_result kill;
};
#define DAX_MMAP_LEN (16 * 1024)
#define DAX_MAX_CCBS 15
#define DAX_CCB_BUF_MAXLEN (DAX_MAX_CCBS * 64)
#define DAX_NAME "oradax"
/* CCB_EXEC status */
#define DAX_SUBMIT_OK 0
#define DAX_SUBMIT_ERR_RETRY 1
#define DAX_SUBMIT_ERR_WOULDBLOCK 2
#define DAX_SUBMIT_ERR_BUSY 3
#define DAX_SUBMIT_ERR_THR_INIT 4
#define DAX_SUBMIT_ERR_ARG_INVAL 5
#define DAX_SUBMIT_ERR_CCB_INVAL 6
#define DAX_SUBMIT_ERR_NO_CA_AVAIL 7
#define DAX_SUBMIT_ERR_CCB_ARR_MMU_MISS 8
#define DAX_SUBMIT_ERR_NOMAP 9
#define DAX_SUBMIT_ERR_NOACCESS 10
#define DAX_SUBMIT_ERR_TOOMANY 11
#define DAX_SUBMIT_ERR_UNAVAIL 12
#define DAX_SUBMIT_ERR_INTERNAL 13
/* CCB_INFO states - must match HV_CCB_STATE_* definitions */
#define DAX_CCB_COMPLETED 0
#define DAX_CCB_ENQUEUED 1
#define DAX_CCB_INPROGRESS 2
#define DAX_CCB_NOTFOUND 3
/* CCB_KILL actions - must match HV_CCB_KILL_* definitions */
#define DAX_KILL_COMPLETED 0
#define DAX_KILL_DEQUEUED 1
#define DAX_KILL_KILLED 2
#define DAX_KILL_NOTFOUND 3
#endif /* _ORADAX_H */