Add processing for IOCTL command ISST_IF_GET_PHY_ID. This converts from the Linux logical CPU to PUNIT CPU numbering scheme.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -36,6 +36,34 @@ struct isst_if_platform_info { · 35 unmodified lines | ||
| 36 | 36 | __u8 mmio_supported; |
| 37 | 37 | }; |
| 38 | 38 | |
| 39 | +/** | |
| 40 | + * struct isst_if_cpu_map - CPU mapping between logical and physical CPU | |
| 41 | + * @logical_cpu: Linux logical CPU number | |
| 42 | + * @physical_cpu: PUNIT CPU number | |
| 43 | + * | |
| 44 | + * Used to convert from Linux logical CPU to PUNIT CPU numbering scheme. | |
| 45 | + * The PUNIT CPU number is different than APIC ID based CPU numbering. | |
| 46 | + */ | |
| 47 | +struct isst_if_cpu_map { | |
| 48 | + __u32 logical_cpu; | |
| 49 | + __u32 physical_cpu; | |
| 50 | +}; | |
| 51 | + | |
| 52 | +/** | |
| 53 | + * struct isst_if_cpu_maps - structure for CPU map IOCTL | |
| 54 | + * @cmd_count: Number of CPU mapping command in cpu_map[] | |
| 55 | + * @cpu_map[]: Holds one or more CPU map data structure | |
| 56 | + * | |
| 57 | + * This structure used with ioctl ISST_IF_GET_PHY_ID to send | |
| 58 | + * one or more CPU mapping commands. Here IOCTL return value indicates | |
| 59 | + * number of commands sent or error number if no commands have been sent. | |
| 60 | + */ | |
| 61 | +struct isst_if_cpu_maps { | |
| 62 | + __u32 cmd_count; | |
| 63 | + struct isst_if_cpu_map cpu_map[1]; | |
| 64 | +}; | |
| 65 | + | |
| 39 | 66 | #define ISST_IF_MAGIC 0xFE |
| 40 | 67 | #define ISST_IF_GET_PLATFORM_INFO _IOR(ISST_IF_MAGIC, 0, struct isst_if_platform_info *) |
| 68 | +#define ISST_IF_GET_PHY_ID _IOWR(ISST_IF_MAGIC, 1, struct isst_if_cpu_map *) | |
| 41 | 69 | #endif |