1
2
3
4
5
6
7
8
9
10
11#include <linux/types.h>
12
13#ifndef __ASSEMBLY__
14#include <linux/reboot.h>
15
16struct tag;
17struct pt_regs;
18struct smp_operations;
19#ifdef CONFIG_SMP
20#define smp_ops(ops) (&(ops))
21#define smp_init_ops(ops) (&(ops))
22#else
23#define smp_ops(ops) (struct smp_operations *)NULL
24#define smp_init_ops(ops) (bool (*)(void))NULL
25#endif
26
27struct machine_desc {
28 unsigned int nr;
29 const char *name;
30 unsigned long atag_offset;
31 const char *const *dt_compat;
32
33
34 unsigned int nr_irqs;
35
36#ifdef CONFIG_ZONE_DMA
37 phys_addr_t dma_zone_size;
38#endif
39
40 unsigned int video_start;
41 unsigned int video_end;
42
43 unsigned char reserve_lp0 :1;
44 unsigned char reserve_lp1 :1;
45 unsigned char reserve_lp2 :1;
46 enum reboot_mode reboot_mode;
47 unsigned l2c_aux_val;
48 unsigned l2c_aux_mask;
49 void (*l2c_write_sec)(unsigned long, unsigned);
50 const struct smp_operations *smp;
51 bool (*smp_init)(void);
52 void (*fixup)(struct tag *, char **);
53 void (*dt_fixup)(void);
54 long long (*pv_fixup)(void);
55 void (*reserve)(void);
56 void (*map_io)(void);
57 void (*init_early)(void);
58 void (*init_irq)(void);
59 void (*init_time)(void);
60 void (*init_machine)(void);
61 void (*init_late)(void);
62#ifdef CONFIG_MULTI_IRQ_HANDLER
63 void (*handle_irq)(struct pt_regs *);
64#endif
65 void (*restart)(enum reboot_mode, const char *);
66};
67
68
69
70
71extern const struct machine_desc *machine_desc;
72
73
74
75
76extern const struct machine_desc __arch_info_begin[], __arch_info_end[];
77#define for_each_machine_desc(p) \
78 for (p = __arch_info_begin; p < __arch_info_end; p++)
79
80
81
82
83
84#define MACHINE_START(_type,_name) \
85static const struct machine_desc __mach_desc_##_type \
86 __used \
87 __attribute__((__section__(".arch.info.init"))) = { \
88 .nr = MACH_TYPE_##_type, \
89 .name = _name,
90
91#define MACHINE_END \
92};
93
94#define DT_MACHINE_START(_name, _namestr) \
95static const struct machine_desc __mach_desc_##_name \
96 __used \
97 __attribute__((__section__(".arch.info.init"))) = { \
98 .nr = ~0, \
99 .name = _namestr,
100
101#endif
102