Switch kernel header parsing to python libclang
Replace the tokenizer in cpp.py with libclang. Bug: 18937958 Change-Id: I27630904c6d2849418cd5ca3d3c612ec3078686d
This commit is contained in:
@@ -19,51 +19,51 @@
|
||||
#ifndef __MIC_COMMON_H_
|
||||
#define __MIC_COMMON_H_
|
||||
#include <linux/virtio_ring.h>
|
||||
#define __mic_align(a, x) (((a) + (x) - 1) & ~((x) - 1))
|
||||
#define __mic_align(a,x) (((a) + (x) - 1) & ~((x) - 1))
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
struct mic_device_desc {
|
||||
__s8 type;
|
||||
__u8 num_vq;
|
||||
__u8 feature_len;
|
||||
__s8 type;
|
||||
__u8 num_vq;
|
||||
__u8 feature_len;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
__u8 config_len;
|
||||
__u8 status;
|
||||
__le64 config[0];
|
||||
} __attribute__ ((aligned(8)));
|
||||
__u8 config_len;
|
||||
__u8 status;
|
||||
__le64 config[0];
|
||||
} __attribute__((aligned(8)));
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
struct mic_device_ctrl {
|
||||
__le64 vdev;
|
||||
__u8 config_change;
|
||||
__u8 vdev_reset;
|
||||
__le64 vdev;
|
||||
__u8 config_change;
|
||||
__u8 vdev_reset;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
__u8 guest_ack;
|
||||
__u8 host_ack;
|
||||
__u8 used_address_updated;
|
||||
__s8 c2h_vdev_db;
|
||||
__u8 guest_ack;
|
||||
__u8 host_ack;
|
||||
__u8 used_address_updated;
|
||||
__s8 c2h_vdev_db;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
__s8 h2c_vdev_db;
|
||||
} __attribute__ ((aligned(8)));
|
||||
__s8 h2c_vdev_db;
|
||||
} __attribute__((aligned(8)));
|
||||
struct mic_bootparam {
|
||||
__le32 magic;
|
||||
__le32 magic;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
__s8 c2h_shutdown_db;
|
||||
__s8 h2c_shutdown_db;
|
||||
__s8 h2c_config_db;
|
||||
__u8 shutdown_status;
|
||||
__s8 c2h_shutdown_db;
|
||||
__s8 h2c_shutdown_db;
|
||||
__s8 h2c_config_db;
|
||||
__u8 shutdown_status;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
__u8 shutdown_card;
|
||||
} __attribute__ ((aligned(8)));
|
||||
__u8 shutdown_card;
|
||||
} __attribute__((aligned(8)));
|
||||
struct mic_device_page {
|
||||
struct mic_bootparam bootparam;
|
||||
struct mic_bootparam bootparam;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
struct mic_device_desc desc[0];
|
||||
struct mic_device_desc desc[0];
|
||||
};
|
||||
struct mic_vqconfig {
|
||||
__le64 address;
|
||||
__le64 address;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
__le64 used_address;
|
||||
__le16 num;
|
||||
} __attribute__ ((aligned(8)));
|
||||
__le64 used_address;
|
||||
__le16 num;
|
||||
} __attribute__((aligned(8)));
|
||||
#define MIC_VIRTIO_RING_ALIGN 4096
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
#define MIC_MAX_VRINGS 4
|
||||
@@ -72,16 +72,16 @@ struct mic_vqconfig {
|
||||
#define MIC_MAX_DESC_BLK_SIZE 256
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
struct _mic_vring_info {
|
||||
__u16 avail_idx;
|
||||
__le32 magic;
|
||||
__u16 avail_idx;
|
||||
__le32 magic;
|
||||
};
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
struct mic_vring {
|
||||
struct vring vr;
|
||||
struct _mic_vring_info *info;
|
||||
void *va;
|
||||
struct vring vr;
|
||||
struct _mic_vring_info * info;
|
||||
void * va;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
int len;
|
||||
int len;
|
||||
};
|
||||
#define mic_aligned_desc_size(d) __mic_align(mic_desc_size(d), 8)
|
||||
#ifndef INTEL_MIC_CARD
|
||||
@@ -91,24 +91,24 @@ struct mic_vring {
|
||||
#define MIC_MAGIC 0xc0ffee00
|
||||
enum mic_states {
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
MIC_OFFLINE = 0,
|
||||
MIC_ONLINE,
|
||||
MIC_SHUTTING_DOWN,
|
||||
MIC_RESET_FAILED,
|
||||
MIC_OFFLINE = 0,
|
||||
MIC_ONLINE,
|
||||
MIC_SHUTTING_DOWN,
|
||||
MIC_RESET_FAILED,
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
MIC_SUSPENDING,
|
||||
MIC_SUSPENDED,
|
||||
MIC_LAST
|
||||
MIC_SUSPENDING,
|
||||
MIC_SUSPENDED,
|
||||
MIC_LAST
|
||||
};
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
enum mic_status {
|
||||
MIC_NOP = 0,
|
||||
MIC_CRASHED,
|
||||
MIC_HALTED,
|
||||
MIC_NOP = 0,
|
||||
MIC_CRASHED,
|
||||
MIC_HALTED,
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
MIC_POWER_OFF,
|
||||
MIC_RESTART,
|
||||
MIC_STATUS_LAST
|
||||
MIC_POWER_OFF,
|
||||
MIC_RESTART,
|
||||
MIC_STATUS_LAST
|
||||
};
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user