Re: [PATCH v2 04/11] gunyah: Common types and error codes for Gunyah hypercalls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 8/2/2022 12:51 AM, Dmitry Baryshkov wrote:
On 02/08/2022 00:12, Elliot Berman wrote:
Add architecture-independent standard error codes, types, and macros for
Gunyah hypercalls.

Signed-off-by: Elliot Berman <quic_eberman@xxxxxxxxxxx>
---
  MAINTAINERS            |  1 +
  include/linux/gunyah.h | 75 ++++++++++++++++++++++++++++++++++++++++++
  2 files changed, 76 insertions(+)
  create mode 100644 include/linux/gunyah.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 02f97ac90cdf..2e4f1d9ed47b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8744,6 +8744,7 @@ S:    Maintained
  F:    Documentation/devicetree/bindings/firmware/gunyah-hypervisor.yaml
  F:    Documentation/virt/gunyah/
  F:    arch/arm64/include/asm/gunyah.h
+F:    include/linux/gunyah.h
  HABANALABS PCI DRIVER
  M:    Oded Gabbay <ogabbay@xxxxxxxxxx>
diff --git a/include/linux/gunyah.h b/include/linux/gunyah.h
new file mode 100644
index 000000000000..69931a0f5736
--- /dev/null
+++ b/include/linux/gunyah.h
@@ -0,0 +1,75 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#ifndef _GUNYAH_H
+#define _GUNYAH_H
+
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <asm/gunyah.h>
+
+typedef u64 gh_capid_t;

I think there was a rule on typedefs? Maybe I'm mistaken, couldn't find one. Why do you need it in the first place? Just use u64. Or 'enum gh_capid'.


The rules are in Documentation/process/coding-style.rst. gh_capid_it is totally opaque to Linux, but I will switch to use u64 throughout.

+
+/* Common Gunyah macros */
+#define GH_CAPID_INVAL    U64_MAX
+






[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux