types.h 1.07 KB
Newer Older
arjanvandeven's avatar
arjanvandeven committed
1 2 3 4 5 6 7 8 9 10 11 12
#ifndef _INCLUDE_GUARD_TYPES_H
#define _INCLUDE_GUARD_TYPES_H

#include <glib.h>

#include "cpumask.h"

#define	BALANCE_NONE		0
#define BALANCE_PACKAGE 	1
#define BALANCE_CACHE		2
#define BALANCE_CORE		3

13 14 15
/*
 * IRQ Classes
 */
arjanvandeven's avatar
arjanvandeven committed
16 17 18 19 20 21
#define IRQ_OTHER       0
#define IRQ_LEGACY      1
#define IRQ_SCSI        2
#define IRQ_TIMER       3
#define IRQ_ETH         4

22 23 24 25 26 27 28
/*
 * IRQ Types
 */
#define IRQ_TYPE_LEGACY 0
#define IRQ_TYPE_MSI	1
#define IRQ_TYPE_MSIX	2

29 30 31 32 33 34 35
enum obj_type_e {
	OBJ_TYPE_CPU,
	OBJ_TYPE_CACHE,
	OBJ_TYPE_PACKAGE,
	OBJ_TYPE_NODE
};

36
struct topo_obj {
37
	uint64_t load;
Neil Horman's avatar
Neil Horman committed
38
	uint64_t last_load;
39
	enum obj_type_e obj_type;
40
	int number;
Neil Horman's avatar
Neil Horman committed
41
	int powersave_mode;
42 43
	cpumask_t mask;
	GList *interrupts;
44
	struct topo_obj *parent;
45
	GList *children;
46
	GList **obj_type_list;
arjanvandeven's avatar
arjanvandeven committed
47 48
};

49 50 51 52 53
struct irq_info {
        int irq;
        int class;
        int type;
	int level;
54
        struct topo_obj *numa_node;
55 56 57 58
        cpumask_t cpumask;
        cpumask_t affinity_hint;
        uint64_t irq_count;
        uint64_t last_irq_count;
59
	uint64_t load;
60
        int moved;
61
        struct topo_obj *assigned_obj;
arjanvandeven's avatar
arjanvandeven committed
62 63 64
};

#endif