19 #ifndef _COBALT_ASM_GENERIC_MACHINE_H
20 #define _COBALT_ASM_GENERIC_MACHINE_H
22 #include <linux/ipipe.h>
23 #include <linux/percpu.h>
24 #include <asm/byteorder.h>
25 #include <asm/xenomai/wrappers.h>
27 struct vm_area_struct;
29 struct xnarch_machdesc {
32 void (*cleanup)(void);
33 void (*prefault)(
struct vm_area_struct *vma);
34 unsigned long (*calibrate)(void);
35 const char *
const *fault_labels;
38 extern struct xnarch_machdesc xnarch_machdesc;
40 struct xnarch_percpu_machdata {
41 unsigned long apc_pending;
42 unsigned long apc_shots[BITS_PER_LONG];
43 unsigned int faults[IPIPE_NR_FAULTS];
46 DECLARE_PER_CPU(
struct xnarch_percpu_machdata, xnarch_percpu_machdata);
48 struct xnarch_machdata {
49 struct ipipe_domain domain;
50 unsigned long timer_freq;
51 unsigned long clock_freq;
52 unsigned int apc_virq;
53 unsigned long apc_map;
54 unsigned int escalate_virq;
56 void (*handler)(
void *cookie);
59 } apc_table[BITS_PER_LONG];
61 cpumask_t supported_cpus;
65 extern struct xnarch_machdata xnarch_machdata;
67 static inline unsigned long xnarch_timer_calibrate(
void)
69 return xnarch_machdesc.calibrate();
72 #ifndef xnarch_cache_aliasing
73 #define xnarch_cache_aliasing() 0