aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/Kbuild1
-rw-r--r--include/linux/cgroup_subsys.h2
-rw-r--r--include/linux/compiler.h6
-rw-r--r--include/linux/delay.h8
-rw-r--r--include/linux/gpio.h95
-rw-r--r--include/linux/iommu-helper.h3
-rw-r--r--include/linux/kprobes.h6
-rw-r--r--include/linux/marker.h8
-rw-r--r--include/linux/memcontrol.h41
-rw-r--r--include/linux/mm_types.h4
-rw-r--r--include/linux/raid/bitmap.h2
-rw-r--r--include/linux/raid/md_k.h1
-rw-r--r--include/linux/sm501-regs.h3
-rw-r--r--include/linux/sm501.h3
14 files changed, 150 insertions, 33 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index aada32fffec2..994df3780007 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -61,6 +61,7 @@ header-y += efs_fs_sb.h
61header-y += elf-fdpic.h 61header-y += elf-fdpic.h
62header-y += elf-em.h 62header-y += elf-em.h
63header-y += fadvise.h 63header-y += fadvise.h
64header-y += falloc.h
64header-y += fd.h 65header-y += fd.h
65header-y += fdreg.h 66header-y += fdreg.h
66header-y += fib_rules.h 67header-y += fib_rules.h
diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h
index ac6aad98b607..1ddebfc52565 100644
--- a/include/linux/cgroup_subsys.h
+++ b/include/linux/cgroup_subsys.h
@@ -37,7 +37,7 @@ SUBSYS(cpuacct)
37 37
38/* */ 38/* */
39 39
40#ifdef CONFIG_CGROUP_MEM_CONT 40#ifdef CONFIG_CGROUP_MEM_RES_CTLR
41SUBSYS(mem_cgroup) 41SUBSYS(mem_cgroup)
42#endif 42#endif
43 43
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index d0e17e1657dc..dcae0c8d97e6 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -138,6 +138,12 @@ extern void __chk_io_ptr(const volatile void __iomem *);
138#define noinline 138#define noinline
139#endif 139#endif
140 140
141/*
142 * Rather then using noinline to prevent stack consumption, use
143 * noinline_for_stack instead. For documentaiton reasons.
144 */
145#define noinline_for_stack noinline
146
141#ifndef __always_inline 147#ifndef __always_inline
142#define __always_inline inline 148#define __always_inline inline
143#endif 149#endif
diff --git a/include/linux/delay.h b/include/linux/delay.h
index 17ddb55430ae..54552d21296e 100644
--- a/include/linux/delay.h
+++ b/include/linux/delay.h
@@ -7,6 +7,8 @@
7 * Delay routines, using a pre-computed "loops_per_jiffy" value. 7 * Delay routines, using a pre-computed "loops_per_jiffy" value.
8 */ 8 */
9 9
10#include <linux/kernel.h>
11
10extern unsigned long loops_per_jiffy; 12extern unsigned long loops_per_jiffy;
11 13
12#include <asm/delay.h> 14#include <asm/delay.h>
@@ -32,7 +34,11 @@ extern unsigned long loops_per_jiffy;
32#endif 34#endif
33 35
34#ifndef ndelay 36#ifndef ndelay
35#define ndelay(x) udelay(((x)+999)/1000) 37static inline void ndelay(unsigned long x)
38{
39 udelay(DIV_ROUND_UP(x, 1000));
40}
41#define ndelay(x) ndelay(x)
36#endif 42#endif
37 43
38void calibrate_delay(void); 44void calibrate_delay(void);
diff --git a/include/linux/gpio.h b/include/linux/gpio.h
new file mode 100644
index 000000000000..4987a84078ef
--- /dev/null
+++ b/include/linux/gpio.h
@@ -0,0 +1,95 @@
1#ifndef __LINUX_GPIO_H
2#define __LINUX_GPIO_H
3
4/* see Documentation/gpio.txt */
5
6#ifdef CONFIG_GENERIC_GPIO
7#include <asm/gpio.h>
8
9#else
10
11/*
12 * Some platforms don't support the GPIO programming interface.
13 *
14 * In case some driver uses it anyway (it should normally have
15 * depended on GENERIC_GPIO), these routines help the compiler
16 * optimize out much GPIO-related code ... or trigger a runtime
17 * warning when something is wrongly called.
18 */
19
20static inline int gpio_is_valid(int number)
21{
22 return 0;
23}
24
25static inline int gpio_request(unsigned gpio, const char *label)
26{
27 return -ENOSYS;
28}
29
30static inline void gpio_free(unsigned gpio)
31{
32 /* GPIO can never have been requested */
33 WARN_ON(1);
34}
35
36static inline int gpio_direction_input(unsigned gpio)
37{
38 return -ENOSYS;
39}
40
41static inline int gpio_direction_output(unsigned gpio, int value)
42{
43 return -ENOSYS;
44}
45
46static inline int gpio_get_value(unsigned gpio)
47{
48 /* GPIO can never have been requested or set as {in,out}put */
49 WARN_ON(1);
50 return 0;
51}
52
53static inline void gpio_set_value(unsigned gpio, int value)
54{
55 /* GPIO can never have been requested or set as output */
56 WARN_ON(1);
57}
58
59static inline int gpio_cansleep(unsigned gpio)
60{
61 /* GPIO can never have been requested or set as {in,out}put */
62 WARN_ON(1);
63 return 0;
64}
65
66static inline int gpio_get_value_cansleep(unsigned gpio)
67{
68 /* GPIO can never have been requested or set as {in,out}put */
69 WARN_ON(1);
70 return 0;
71}
72
73static inline void gpio_set_value_cansleep(unsigned gpio, int value)
74{
75 /* GPIO can never have been requested or set as output */
76 WARN_ON(1);
77}
78
79static inline int gpio_to_irq(unsigned gpio)
80{
81 /* GPIO can never have been requested or set as input */
82 WARN_ON(1);
83 return -EINVAL;
84}
85
86static inline int irq_to_gpio(unsigned irq)
87{
88 /* irq can never have been returned from gpio_to_irq() */
89 WARN_ON(1);
90 return -EINVAL;
91}
92
93#endif
94
95#endif /* __LINUX_GPIO_H */
diff --git a/include/linux/iommu-helper.h b/include/linux/iommu-helper.h
index 4dd4c04ff2f4..c975caf75385 100644
--- a/include/linux/iommu-helper.h
+++ b/include/linux/iommu-helper.h
@@ -1,3 +1,6 @@
1extern int iommu_is_span_boundary(unsigned int index, unsigned int nr,
2 unsigned long shift,
3 unsigned long boundary_size);
1extern unsigned long iommu_area_alloc(unsigned long *map, unsigned long size, 4extern unsigned long iommu_area_alloc(unsigned long *map, unsigned long size,
2 unsigned long start, unsigned int nr, 5 unsigned long start, unsigned int nr,
3 unsigned long shift, 6 unsigned long shift,
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index 4a6ce82ba039..0f28486f6360 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -125,11 +125,11 @@ struct jprobe {
125DECLARE_PER_CPU(struct kprobe *, current_kprobe); 125DECLARE_PER_CPU(struct kprobe *, current_kprobe);
126DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); 126DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
127 127
128#ifdef ARCH_SUPPORTS_KRETPROBES 128#ifdef CONFIG_KRETPROBES
129extern void arch_prepare_kretprobe(struct kretprobe_instance *ri, 129extern void arch_prepare_kretprobe(struct kretprobe_instance *ri,
130 struct pt_regs *regs); 130 struct pt_regs *regs);
131extern int arch_trampoline_kprobe(struct kprobe *p); 131extern int arch_trampoline_kprobe(struct kprobe *p);
132#else /* ARCH_SUPPORTS_KRETPROBES */ 132#else /* CONFIG_KRETPROBES */
133static inline void arch_prepare_kretprobe(struct kretprobe *rp, 133static inline void arch_prepare_kretprobe(struct kretprobe *rp,
134 struct pt_regs *regs) 134 struct pt_regs *regs)
135{ 135{
@@ -138,7 +138,7 @@ static inline int arch_trampoline_kprobe(struct kprobe *p)
138{ 138{
139 return 0; 139 return 0;
140} 140}
141#endif /* ARCH_SUPPORTS_KRETPROBES */ 141#endif /* CONFIG_KRETPROBES */
142/* 142/*
143 * Function-return probe - 143 * Function-return probe -
144 * Note: 144 * Note:
diff --git a/include/linux/marker.h b/include/linux/marker.h
index 5df879dc3776..430f6adf9762 100644
--- a/include/linux/marker.h
+++ b/include/linux/marker.h
@@ -104,10 +104,16 @@ static inline void marker_update_probe_range(struct marker *begin,
104#define MARK_NOARGS " " 104#define MARK_NOARGS " "
105 105
106/* To be used for string format validity checking with gcc */ 106/* To be used for string format validity checking with gcc */
107static inline void __printf(1, 2) __mark_check_format(const char *fmt, ...) 107static inline void __printf(1, 2) ___mark_check_format(const char *fmt, ...)
108{ 108{
109} 109}
110 110
111#define __mark_check_format(format, args...) \
112 do { \
113 if (0) \
114 ___mark_check_format(format, ## args); \
115 } while (0)
116
111extern marker_probe_func __mark_empty_function; 117extern marker_probe_func __mark_empty_function;
112 118
113extern void marker_probe_cb(const struct marker *mdata, 119extern void marker_probe_cb(const struct marker *mdata,
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 04075628cb9a..8b1c4295848b 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -25,18 +25,20 @@ struct page_cgroup;
25struct page; 25struct page;
26struct mm_struct; 26struct mm_struct;
27 27
28#ifdef CONFIG_CGROUP_MEM_CONT 28#ifdef CONFIG_CGROUP_MEM_RES_CTLR
29 29
30extern void mm_init_cgroup(struct mm_struct *mm, struct task_struct *p); 30extern void mm_init_cgroup(struct mm_struct *mm, struct task_struct *p);
31extern void mm_free_cgroup(struct mm_struct *mm); 31extern void mm_free_cgroup(struct mm_struct *mm);
32extern void page_assign_page_cgroup(struct page *page, 32
33 struct page_cgroup *pc); 33#define page_reset_bad_cgroup(page) ((page)->page_cgroup = 0)
34
34extern struct page_cgroup *page_get_page_cgroup(struct page *page); 35extern struct page_cgroup *page_get_page_cgroup(struct page *page);
35extern int mem_cgroup_charge(struct page *page, struct mm_struct *mm, 36extern int mem_cgroup_charge(struct page *page, struct mm_struct *mm,
36 gfp_t gfp_mask); 37 gfp_t gfp_mask);
37extern void mem_cgroup_uncharge(struct page_cgroup *pc); 38extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm,
39 gfp_t gfp_mask);
38extern void mem_cgroup_uncharge_page(struct page *page); 40extern void mem_cgroup_uncharge_page(struct page *page);
39extern void mem_cgroup_move_lists(struct page_cgroup *pc, bool active); 41extern void mem_cgroup_move_lists(struct page *page, bool active);
40extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, 42extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
41 struct list_head *dst, 43 struct list_head *dst,
42 unsigned long *scanned, int order, 44 unsigned long *scanned, int order,
@@ -44,11 +46,9 @@ extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
44 struct mem_cgroup *mem_cont, 46 struct mem_cgroup *mem_cont,
45 int active); 47 int active);
46extern void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask); 48extern void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask);
47extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm,
48 gfp_t gfp_mask);
49int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem); 49int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem);
50 50
51#define vm_match_cgroup(mm, cgroup) \ 51#define mm_match_cgroup(mm, cgroup) \
52 ((cgroup) == rcu_dereference((mm)->mem_cgroup)) 52 ((cgroup) == rcu_dereference((mm)->mem_cgroup))
53 53
54extern int mem_cgroup_prepare_migration(struct page *page); 54extern int mem_cgroup_prepare_migration(struct page *page);
@@ -72,7 +72,7 @@ extern long mem_cgroup_calc_reclaim_active(struct mem_cgroup *mem,
72extern long mem_cgroup_calc_reclaim_inactive(struct mem_cgroup *mem, 72extern long mem_cgroup_calc_reclaim_inactive(struct mem_cgroup *mem,
73 struct zone *zone, int priority); 73 struct zone *zone, int priority);
74 74
75#else /* CONFIG_CGROUP_MEM_CONT */ 75#else /* CONFIG_CGROUP_MEM_RES_CTLR */
76static inline void mm_init_cgroup(struct mm_struct *mm, 76static inline void mm_init_cgroup(struct mm_struct *mm,
77 struct task_struct *p) 77 struct task_struct *p)
78{ 78{
@@ -82,8 +82,7 @@ static inline void mm_free_cgroup(struct mm_struct *mm)
82{ 82{
83} 83}
84 84
85static inline void page_assign_page_cgroup(struct page *page, 85static inline void page_reset_bad_cgroup(struct page *page)
86 struct page_cgroup *pc)
87{ 86{
88} 87}
89 88
@@ -92,33 +91,27 @@ static inline struct page_cgroup *page_get_page_cgroup(struct page *page)
92 return NULL; 91 return NULL;
93} 92}
94 93
95static inline int mem_cgroup_charge(struct page *page, struct mm_struct *mm, 94static inline int mem_cgroup_charge(struct page *page,
96 gfp_t gfp_mask) 95 struct mm_struct *mm, gfp_t gfp_mask)
97{ 96{
98 return 0; 97 return 0;
99} 98}
100 99
101static inline void mem_cgroup_uncharge(struct page_cgroup *pc) 100static inline int mem_cgroup_cache_charge(struct page *page,
101 struct mm_struct *mm, gfp_t gfp_mask)
102{ 102{
103 return 0;
103} 104}
104 105
105static inline void mem_cgroup_uncharge_page(struct page *page) 106static inline void mem_cgroup_uncharge_page(struct page *page)
106{ 107{
107} 108}
108 109
109static inline void mem_cgroup_move_lists(struct page_cgroup *pc, 110static inline void mem_cgroup_move_lists(struct page *page, bool active)
110 bool active)
111{
112}
113
114static inline int mem_cgroup_cache_charge(struct page *page,
115 struct mm_struct *mm,
116 gfp_t gfp_mask)
117{ 111{
118 return 0;
119} 112}
120 113
121static inline int vm_match_cgroup(struct mm_struct *mm, struct mem_cgroup *mem) 114static inline int mm_match_cgroup(struct mm_struct *mm, struct mem_cgroup *mem)
122{ 115{
123 return 1; 116 return 1;
124} 117}
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 34023c65d466..af190ceab971 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -88,7 +88,7 @@ struct page {
88 void *virtual; /* Kernel virtual address (NULL if 88 void *virtual; /* Kernel virtual address (NULL if
89 not kmapped, ie. highmem) */ 89 not kmapped, ie. highmem) */
90#endif /* WANT_PAGE_VIRTUAL */ 90#endif /* WANT_PAGE_VIRTUAL */
91#ifdef CONFIG_CGROUP_MEM_CONT 91#ifdef CONFIG_CGROUP_MEM_RES_CTLR
92 unsigned long page_cgroup; 92 unsigned long page_cgroup;
93#endif 93#endif
94}; 94};
@@ -222,7 +222,7 @@ struct mm_struct {
222 /* aio bits */ 222 /* aio bits */
223 rwlock_t ioctx_list_lock; 223 rwlock_t ioctx_list_lock;
224 struct kioctx *ioctx_list; 224 struct kioctx *ioctx_list;
225#ifdef CONFIG_CGROUP_MEM_CONT 225#ifdef CONFIG_CGROUP_MEM_RES_CTLR
226 struct mem_cgroup *mem_cgroup; 226 struct mem_cgroup *mem_cgroup;
227#endif 227#endif
228}; 228};
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h
index e51b531cd0b2..47fbcba11850 100644
--- a/include/linux/raid/bitmap.h
+++ b/include/linux/raid/bitmap.h
@@ -235,6 +235,8 @@ struct bitmap {
235 235
236 unsigned long flags; 236 unsigned long flags;
237 237
238 int allclean;
239
238 unsigned long max_write_behind; /* write-behind mode */ 240 unsigned long max_write_behind; /* write-behind mode */
239 atomic_t behind_writes; 241 atomic_t behind_writes;
240 242
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index 85a068bab625..7bb6d1abf71e 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -83,6 +83,7 @@ struct mdk_rdev_s
83#define BarriersNotsupp 5 /* BIO_RW_BARRIER is not supported */ 83#define BarriersNotsupp 5 /* BIO_RW_BARRIER is not supported */
84#define AllReserved 6 /* If whole device is reserved for 84#define AllReserved 6 /* If whole device is reserved for
85 * one array */ 85 * one array */
86#define AutoDetected 7 /* added by auto-detect */
86 87
87 int desc_nr; /* descriptor index in the superblock */ 88 int desc_nr; /* descriptor index in the superblock */
88 int raid_disk; /* role of device in array */ 89 int raid_disk; /* role of device in array */
diff --git a/include/linux/sm501-regs.h b/include/linux/sm501-regs.h
index 64236b73c724..d53642d2d899 100644
--- a/include/linux/sm501-regs.h
+++ b/include/linux/sm501-regs.h
@@ -129,11 +129,14 @@
129 129
130#define SM501_DEVICEID_SM501 (0x05010000) 130#define SM501_DEVICEID_SM501 (0x05010000)
131#define SM501_DEVICEID_IDMASK (0xffff0000) 131#define SM501_DEVICEID_IDMASK (0xffff0000)
132#define SM501_DEVICEID_REVMASK (0x000000ff)
132 133
133#define SM501_PLLCLOCK_COUNT (0x000064) 134#define SM501_PLLCLOCK_COUNT (0x000064)
134#define SM501_MISC_TIMING (0x000068) 135#define SM501_MISC_TIMING (0x000068)
135#define SM501_CURRENT_SDRAM_CLOCK (0x00006C) 136#define SM501_CURRENT_SDRAM_CLOCK (0x00006C)
136 137
138#define SM501_PROGRAMMABLE_PLL_CONTROL (0x000074)
139
137/* GPIO base */ 140/* GPIO base */
138#define SM501_GPIO (0x010000) 141#define SM501_GPIO (0x010000)
139#define SM501_GPIO_DATA_LOW (0x00) 142#define SM501_GPIO_DATA_LOW (0x00)
diff --git a/include/linux/sm501.h b/include/linux/sm501.h
index 932a9efee8a5..bca134544700 100644
--- a/include/linux/sm501.h
+++ b/include/linux/sm501.h
@@ -24,7 +24,8 @@ extern int sm501_unit_power(struct device *dev,
24extern unsigned long sm501_set_clock(struct device *dev, 24extern unsigned long sm501_set_clock(struct device *dev,
25 int clksrc, unsigned long freq); 25 int clksrc, unsigned long freq);
26 26
27extern unsigned long sm501_find_clock(int clksrc, unsigned long req_freq); 27extern unsigned long sm501_find_clock(struct device *dev,
28 int clksrc, unsigned long req_freq);
28 29
29/* sm501_misc_control 30/* sm501_misc_control
30 * 31 *