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 cobalt_machine {
32 int (*late_init)(void);
33 void (*cleanup)(void);
34 void (*prefault)(
struct vm_area_struct *vma);
35 unsigned long (*calibrate)(void);
36 const char *
const *fault_labels;
39 extern struct cobalt_machine cobalt_machine;
41 struct cobalt_machine_cpudata {
42 unsigned long apc_pending;
43 unsigned long apc_shots[BITS_PER_LONG];
44 unsigned int faults[IPIPE_NR_FAULTS];
47 DECLARE_PER_CPU(
struct cobalt_machine_cpudata, cobalt_machine_cpudata);
49 struct cobalt_pipeline {
50 struct ipipe_domain domain;
51 unsigned long timer_freq;
52 unsigned long clock_freq;
53 unsigned int apc_virq;
54 unsigned long apc_map;
55 unsigned int escalate_virq;
57 void (*handler)(
void *cookie);
60 } apc_table[BITS_PER_LONG];
62 cpumask_t supported_cpus;
66 extern struct cobalt_pipeline cobalt_pipeline;
68 static inline unsigned long xnarch_timer_calibrate(
void)
70 return cobalt_machine.calibrate();
73 #ifndef xnarch_cache_aliasing 74 #define xnarch_cache_aliasing() 0