summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/isst_if.h
diff options
context:
space:
mode:
authorSrinivas Pandruvada2019-06-27 00:38:45 +0200
committerAndy Shevchenko2019-07-02 17:41:16 +0200
commitfb5b36a413b9f30fba573fc2a596ab7142dfaf12 (patch)
tree0e295d34f12f1d82dbf3d35e99fecb61900dadae /include/uapi/linux/isst_if.h
parentplatform/x86: ISST: Store per CPU information (diff)
downloadkernel-qcow2-linux-fb5b36a413b9f30fba573fc2a596ab7142dfaf12.tar.gz
kernel-qcow2-linux-fb5b36a413b9f30fba573fc2a596ab7142dfaf12.tar.xz
kernel-qcow2-linux-fb5b36a413b9f30fba573fc2a596ab7142dfaf12.zip
platform/x86: ISST: Add IOCTL to Translate Linux logical CPU to PUNIT CPU number
Add processing for IOCTL command ISST_IF_GET_PHY_ID. This converts from the Linux logical CPU to PUNIT CPU numbering scheme. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'include/uapi/linux/isst_if.h')
-rw-r--r--include/uapi/linux/isst_if.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/uapi/linux/isst_if.h b/include/uapi/linux/isst_if.h
index fa94480b5f74..15d1f286a830 100644
--- a/include/uapi/linux/isst_if.h
+++ b/include/uapi/linux/isst_if.h
@@ -36,6 +36,34 @@ struct isst_if_platform_info {
__u8 mmio_supported;
};
+/**
+ * struct isst_if_cpu_map - CPU mapping between logical and physical CPU
+ * @logical_cpu: Linux logical CPU number
+ * @physical_cpu: PUNIT CPU number
+ *
+ * Used to convert from Linux logical CPU to PUNIT CPU numbering scheme.
+ * The PUNIT CPU number is different than APIC ID based CPU numbering.
+ */
+struct isst_if_cpu_map {
+ __u32 logical_cpu;
+ __u32 physical_cpu;
+};
+
+/**
+ * struct isst_if_cpu_maps - structure for CPU map IOCTL
+ * @cmd_count: Number of CPU mapping command in cpu_map[]
+ * @cpu_map[]: Holds one or more CPU map data structure
+ *
+ * This structure used with ioctl ISST_IF_GET_PHY_ID to send
+ * one or more CPU mapping commands. Here IOCTL return value indicates
+ * number of commands sent or error number if no commands have been sent.
+ */
+struct isst_if_cpu_maps {
+ __u32 cmd_count;
+ struct isst_if_cpu_map cpu_map[1];
+};
+
#define ISST_IF_MAGIC 0xFE
#define ISST_IF_GET_PLATFORM_INFO _IOR(ISST_IF_MAGIC, 0, struct isst_if_platform_info *)
+#define ISST_IF_GET_PHY_ID _IOWR(ISST_IF_MAGIC, 1, struct isst_if_cpu_map *)
#endif