diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-02 19:07:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-02 19:07:27 -0400 |
commit | 092f4c56c1927e4b61a41ee8055005f1cb437009 (patch) | |
tree | 616ceb54b7671ccc13922ae9e002b8b972f6e09e /include | |
parent | 80c2861672bbf000f6af838656959ee937e4ee4d (diff) | |
parent | c1e2ee2dc436574880758b3836fc96935b774c32 (diff) |
Merge branch 'akpm' (Andrew's incoming - part two)
Says Andrew:
"60 patches. That's good enough for -rc1 I guess. I have quite a lot
of detritus to be rechecked, work through maintainers, etc.
- most of the remains of MM
- rtc
- various misc
- cgroups
- memcg
- cpusets
- procfs
- ipc
- rapidio
- sysctl
- pps
- w1
- drivers/misc
- aio"
* akpm: (60 commits)
memcg: replace ss->id_lock with a rwlock
aio: allocate kiocbs in batches
drivers/misc/vmw_balloon.c: fix typo in code comment
drivers/misc/vmw_balloon.c: determine page allocation flag can_sleep outside loop
w1: disable irqs in critical section
drivers/w1/w1_int.c: multiple masters used same init_name
drivers/power/ds2780_battery.c: fix deadlock upon insertion and removal
drivers/power/ds2780_battery.c: add a nolock function to w1 interface
drivers/power/ds2780_battery.c: create central point for calling w1 interface
w1: ds2760 and ds2780, use ida for id and ida_simple_get() to get it
pps gpio client: add missing dependency
pps: new client driver using GPIO
pps: default echo function
include/linux/dma-mapping.h: add dma_zalloc_coherent()
sysctl: make CONFIG_SYSCTL_SYSCALL default to n
sysctl: add support for poll()
RapidIO: documentation update
drivers/net/rionet.c: fix ethernet address macros for LE platforms
RapidIO: fix potential null deref in rio_setup_device()
RapidIO: add mport driver for Tsi721 bridge
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/aio.h | 1 | ||||
-rw-r--r-- | include/linux/cgroup.h | 2 | ||||
-rw-r--r-- | include/linux/dma-mapping.h | 10 | ||||
-rw-r--r-- | include/linux/magic.h | 10 | ||||
-rw-r--r-- | include/linux/memcontrol.h | 44 | ||||
-rw-r--r-- | include/linux/mm.h | 67 | ||||
-rw-r--r-- | include/linux/mm_types.h | 21 | ||||
-rw-r--r-- | include/linux/pps-gpio.h | 32 | ||||
-rw-r--r-- | include/linux/rio_ids.h | 1 | ||||
-rw-r--r-- | include/linux/sem.h | 49 | ||||
-rw-r--r-- | include/linux/sysctl.h | 22 | ||||
-rw-r--r-- | include/linux/utsname.h | 16 |
12 files changed, 168 insertions, 107 deletions
diff --git a/include/linux/aio.h b/include/linux/aio.h index 2dcb72bff4b6..2314ad8b3c9c 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
@@ -117,6 +117,7 @@ struct kiocb { | |||
117 | 117 | ||
118 | struct list_head ki_list; /* the aio core uses this | 118 | struct list_head ki_list; /* the aio core uses this |
119 | * for cancellation */ | 119 | * for cancellation */ |
120 | struct list_head ki_batch; /* batch allocation */ | ||
120 | 121 | ||
121 | /* | 122 | /* |
122 | * If the aio_resfd field of the userspace iocb is not zero, | 123 | * If the aio_resfd field of the userspace iocb is not zero, |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index da7e4bc34e8c..1b7f9d525013 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -516,7 +516,7 @@ struct cgroup_subsys { | |||
516 | struct list_head sibling; | 516 | struct list_head sibling; |
517 | /* used when use_id == true */ | 517 | /* used when use_id == true */ |
518 | struct idr idr; | 518 | struct idr idr; |
519 | spinlock_t id_lock; | 519 | rwlock_t id_lock; |
520 | 520 | ||
521 | /* should be defined only by modular subsystems */ | 521 | /* should be defined only by modular subsystems */ |
522 | struct module *module; | 522 | struct module *module; |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 347fdc32177a..be86ae13893f 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _LINUX_DMA_MAPPING_H | 1 | #ifndef _LINUX_DMA_MAPPING_H |
2 | #define _LINUX_DMA_MAPPING_H | 2 | #define _LINUX_DMA_MAPPING_H |
3 | 3 | ||
4 | #include <linux/string.h> | ||
4 | #include <linux/device.h> | 5 | #include <linux/device.h> |
5 | #include <linux/err.h> | 6 | #include <linux/err.h> |
6 | #include <linux/dma-attrs.h> | 7 | #include <linux/dma-attrs.h> |
@@ -117,6 +118,15 @@ static inline int dma_set_seg_boundary(struct device *dev, unsigned long mask) | |||
117 | return -EIO; | 118 | return -EIO; |
118 | } | 119 | } |
119 | 120 | ||
121 | static inline void *dma_zalloc_coherent(struct device *dev, size_t size, | ||
122 | dma_addr_t *dma_handle, gfp_t flag) | ||
123 | { | ||
124 | void *ret = dma_alloc_coherent(dev, size, dma_handle, flag); | ||
125 | if (ret) | ||
126 | memset(ret, 0, size); | ||
127 | return ret; | ||
128 | } | ||
129 | |||
120 | #ifdef CONFIG_HAS_DMA | 130 | #ifdef CONFIG_HAS_DMA |
121 | static inline int dma_get_cache_alignment(void) | 131 | static inline int dma_get_cache_alignment(void) |
122 | { | 132 | { |
diff --git a/include/linux/magic.h b/include/linux/magic.h index 1e5df2af8d84..2d4beab0d5b7 100644 --- a/include/linux/magic.h +++ b/include/linux/magic.h | |||
@@ -30,11 +30,11 @@ | |||
30 | #define ANON_INODE_FS_MAGIC 0x09041934 | 30 | #define ANON_INODE_FS_MAGIC 0x09041934 |
31 | #define PSTOREFS_MAGIC 0x6165676C | 31 | #define PSTOREFS_MAGIC 0x6165676C |
32 | 32 | ||
33 | #define MINIX_SUPER_MAGIC 0x137F /* original minix fs */ | 33 | #define MINIX_SUPER_MAGIC 0x137F /* minix v1 fs, 14 char names */ |
34 | #define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */ | 34 | #define MINIX_SUPER_MAGIC2 0x138F /* minix v1 fs, 30 char names */ |
35 | #define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */ | 35 | #define MINIX2_SUPER_MAGIC 0x2468 /* minix v2 fs, 14 char names */ |
36 | #define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */ | 36 | #define MINIX2_SUPER_MAGIC2 0x2478 /* minix v2 fs, 30 char names */ |
37 | #define MINIX3_SUPER_MAGIC 0x4d5a /* minix V3 fs */ | 37 | #define MINIX3_SUPER_MAGIC 0x4d5a /* minix v3 fs, 60 char names */ |
38 | 38 | ||
39 | #define MSDOS_SUPER_MAGIC 0x4d44 /* MD */ | 39 | #define MSDOS_SUPER_MAGIC 0x4d44 /* MD */ |
40 | #define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */ | 40 | #define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */ |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index ac797fa03ef8..b87068a1a09e 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -78,8 +78,8 @@ extern void mem_cgroup_uncharge_end(void); | |||
78 | extern void mem_cgroup_uncharge_page(struct page *page); | 78 | extern void mem_cgroup_uncharge_page(struct page *page); |
79 | extern void mem_cgroup_uncharge_cache_page(struct page *page); | 79 | extern void mem_cgroup_uncharge_cache_page(struct page *page); |
80 | 80 | ||
81 | extern void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask); | 81 | extern void mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask); |
82 | int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem); | 82 | int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *memcg); |
83 | 83 | ||
84 | extern struct mem_cgroup *try_get_mem_cgroup_from_page(struct page *page); | 84 | extern struct mem_cgroup *try_get_mem_cgroup_from_page(struct page *page); |
85 | extern struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p); | 85 | extern struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p); |
@@ -88,26 +88,28 @@ extern struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm); | |||
88 | static inline | 88 | static inline |
89 | int mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *cgroup) | 89 | int mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *cgroup) |
90 | { | 90 | { |
91 | struct mem_cgroup *mem; | 91 | struct mem_cgroup *memcg; |
92 | rcu_read_lock(); | 92 | rcu_read_lock(); |
93 | mem = mem_cgroup_from_task(rcu_dereference((mm)->owner)); | 93 | memcg = mem_cgroup_from_task(rcu_dereference((mm)->owner)); |
94 | rcu_read_unlock(); | 94 | rcu_read_unlock(); |
95 | return cgroup == mem; | 95 | return cgroup == memcg; |
96 | } | 96 | } |
97 | 97 | ||
98 | extern struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *mem); | 98 | extern struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *memcg); |
99 | 99 | ||
100 | extern int | 100 | extern int |
101 | mem_cgroup_prepare_migration(struct page *page, | 101 | mem_cgroup_prepare_migration(struct page *page, |
102 | struct page *newpage, struct mem_cgroup **ptr, gfp_t gfp_mask); | 102 | struct page *newpage, struct mem_cgroup **ptr, gfp_t gfp_mask); |
103 | extern void mem_cgroup_end_migration(struct mem_cgroup *mem, | 103 | extern void mem_cgroup_end_migration(struct mem_cgroup *memcg, |
104 | struct page *oldpage, struct page *newpage, bool migration_ok); | 104 | struct page *oldpage, struct page *newpage, bool migration_ok); |
105 | 105 | ||
106 | /* | 106 | /* |
107 | * For memory reclaim. | 107 | * For memory reclaim. |
108 | */ | 108 | */ |
109 | int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg); | 109 | int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg, |
110 | int mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg); | 110 | struct zone *zone); |
111 | int mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg, | ||
112 | struct zone *zone); | ||
111 | int mem_cgroup_select_victim_node(struct mem_cgroup *memcg); | 113 | int mem_cgroup_select_victim_node(struct mem_cgroup *memcg); |
112 | unsigned long mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg, | 114 | unsigned long mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg, |
113 | int nid, int zid, unsigned int lrumask); | 115 | int nid, int zid, unsigned int lrumask); |
@@ -148,7 +150,7 @@ static inline void mem_cgroup_dec_page_stat(struct page *page, | |||
148 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, | 150 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, |
149 | gfp_t gfp_mask, | 151 | gfp_t gfp_mask, |
150 | unsigned long *total_scanned); | 152 | unsigned long *total_scanned); |
151 | u64 mem_cgroup_get_limit(struct mem_cgroup *mem); | 153 | u64 mem_cgroup_get_limit(struct mem_cgroup *memcg); |
152 | 154 | ||
153 | void mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx); | 155 | void mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx); |
154 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 156 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
@@ -244,18 +246,20 @@ static inline struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm | |||
244 | return NULL; | 246 | return NULL; |
245 | } | 247 | } |
246 | 248 | ||
247 | static inline int mm_match_cgroup(struct mm_struct *mm, struct mem_cgroup *mem) | 249 | static inline int mm_match_cgroup(struct mm_struct *mm, |
250 | struct mem_cgroup *memcg) | ||
248 | { | 251 | { |
249 | return 1; | 252 | return 1; |
250 | } | 253 | } |
251 | 254 | ||
252 | static inline int task_in_mem_cgroup(struct task_struct *task, | 255 | static inline int task_in_mem_cgroup(struct task_struct *task, |
253 | const struct mem_cgroup *mem) | 256 | const struct mem_cgroup *memcg) |
254 | { | 257 | { |
255 | return 1; | 258 | return 1; |
256 | } | 259 | } |
257 | 260 | ||
258 | static inline struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *mem) | 261 | static inline struct cgroup_subsys_state |
262 | *mem_cgroup_css(struct mem_cgroup *memcg) | ||
259 | { | 263 | { |
260 | return NULL; | 264 | return NULL; |
261 | } | 265 | } |
@@ -267,22 +271,22 @@ mem_cgroup_prepare_migration(struct page *page, struct page *newpage, | |||
267 | return 0; | 271 | return 0; |
268 | } | 272 | } |
269 | 273 | ||
270 | static inline void mem_cgroup_end_migration(struct mem_cgroup *mem, | 274 | static inline void mem_cgroup_end_migration(struct mem_cgroup *memcg, |
271 | struct page *oldpage, struct page *newpage, bool migration_ok) | 275 | struct page *oldpage, struct page *newpage, bool migration_ok) |
272 | { | 276 | { |
273 | } | 277 | } |
274 | 278 | ||
275 | static inline int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem) | 279 | static inline int mem_cgroup_get_reclaim_priority(struct mem_cgroup *memcg) |
276 | { | 280 | { |
277 | return 0; | 281 | return 0; |
278 | } | 282 | } |
279 | 283 | ||
280 | static inline void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem, | 284 | static inline void mem_cgroup_note_reclaim_priority(struct mem_cgroup *memcg, |
281 | int priority) | 285 | int priority) |
282 | { | 286 | { |
283 | } | 287 | } |
284 | 288 | ||
285 | static inline void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem, | 289 | static inline void mem_cgroup_record_reclaim_priority(struct mem_cgroup *memcg, |
286 | int priority) | 290 | int priority) |
287 | { | 291 | { |
288 | } | 292 | } |
@@ -293,13 +297,13 @@ static inline bool mem_cgroup_disabled(void) | |||
293 | } | 297 | } |
294 | 298 | ||
295 | static inline int | 299 | static inline int |
296 | mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg) | 300 | mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg, struct zone *zone) |
297 | { | 301 | { |
298 | return 1; | 302 | return 1; |
299 | } | 303 | } |
300 | 304 | ||
301 | static inline int | 305 | static inline int |
302 | mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg) | 306 | mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg, struct zone *zone) |
303 | { | 307 | { |
304 | return 1; | 308 | return 1; |
305 | } | 309 | } |
@@ -348,7 +352,7 @@ unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, | |||
348 | } | 352 | } |
349 | 353 | ||
350 | static inline | 354 | static inline |
351 | u64 mem_cgroup_get_limit(struct mem_cgroup *mem) | 355 | u64 mem_cgroup_get_limit(struct mem_cgroup *memcg) |
352 | { | 356 | { |
353 | return 0; | 357 | return 0; |
354 | } | 358 | } |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 3b3e3b8bb706..3dc3a8c2c485 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -356,36 +356,50 @@ static inline struct page *compound_head(struct page *page) | |||
356 | return page; | 356 | return page; |
357 | } | 357 | } |
358 | 358 | ||
359 | /* | ||
360 | * The atomic page->_mapcount, starts from -1: so that transitions | ||
361 | * both from it and to it can be tracked, using atomic_inc_and_test | ||
362 | * and atomic_add_negative(-1). | ||
363 | */ | ||
364 | static inline void reset_page_mapcount(struct page *page) | ||
365 | { | ||
366 | atomic_set(&(page)->_mapcount, -1); | ||
367 | } | ||
368 | |||
369 | static inline int page_mapcount(struct page *page) | ||
370 | { | ||
371 | return atomic_read(&(page)->_mapcount) + 1; | ||
372 | } | ||
373 | |||
359 | static inline int page_count(struct page *page) | 374 | static inline int page_count(struct page *page) |
360 | { | 375 | { |
361 | return atomic_read(&compound_head(page)->_count); | 376 | return atomic_read(&compound_head(page)->_count); |
362 | } | 377 | } |
363 | 378 | ||
379 | static inline void get_huge_page_tail(struct page *page) | ||
380 | { | ||
381 | /* | ||
382 | * __split_huge_page_refcount() cannot run | ||
383 | * from under us. | ||
384 | */ | ||
385 | VM_BUG_ON(page_mapcount(page) < 0); | ||
386 | VM_BUG_ON(atomic_read(&page->_count) != 0); | ||
387 | atomic_inc(&page->_mapcount); | ||
388 | } | ||
389 | |||
390 | extern bool __get_page_tail(struct page *page); | ||
391 | |||
364 | static inline void get_page(struct page *page) | 392 | static inline void get_page(struct page *page) |
365 | { | 393 | { |
394 | if (unlikely(PageTail(page))) | ||
395 | if (likely(__get_page_tail(page))) | ||
396 | return; | ||
366 | /* | 397 | /* |
367 | * Getting a normal page or the head of a compound page | 398 | * Getting a normal page or the head of a compound page |
368 | * requires to already have an elevated page->_count. Only if | 399 | * requires to already have an elevated page->_count. |
369 | * we're getting a tail page, the elevated page->_count is | ||
370 | * required only in the head page, so for tail pages the | ||
371 | * bugcheck only verifies that the page->_count isn't | ||
372 | * negative. | ||
373 | */ | 400 | */ |
374 | VM_BUG_ON(atomic_read(&page->_count) < !PageTail(page)); | 401 | VM_BUG_ON(atomic_read(&page->_count) <= 0); |
375 | atomic_inc(&page->_count); | 402 | atomic_inc(&page->_count); |
376 | /* | ||
377 | * Getting a tail page will elevate both the head and tail | ||
378 | * page->_count(s). | ||
379 | */ | ||
380 | if (unlikely(PageTail(page))) { | ||
381 | /* | ||
382 | * This is safe only because | ||
383 | * __split_huge_page_refcount can't run under | ||
384 | * get_page(). | ||
385 | */ | ||
386 | VM_BUG_ON(atomic_read(&page->first_page->_count) <= 0); | ||
387 | atomic_inc(&page->first_page->_count); | ||
388 | } | ||
389 | } | 403 | } |
390 | 404 | ||
391 | static inline struct page *virt_to_head_page(const void *x) | 405 | static inline struct page *virt_to_head_page(const void *x) |
@@ -804,21 +818,6 @@ static inline pgoff_t page_index(struct page *page) | |||
804 | } | 818 | } |
805 | 819 | ||
806 | /* | 820 | /* |
807 | * The atomic page->_mapcount, like _count, starts from -1: | ||
808 | * so that transitions both from it and to it can be tracked, | ||
809 | * using atomic_inc_and_test and atomic_add_negative(-1). | ||
810 | */ | ||
811 | static inline void reset_page_mapcount(struct page *page) | ||
812 | { | ||
813 | atomic_set(&(page)->_mapcount, -1); | ||
814 | } | ||
815 | |||
816 | static inline int page_mapcount(struct page *page) | ||
817 | { | ||
818 | return atomic_read(&(page)->_mapcount) + 1; | ||
819 | } | ||
820 | |||
821 | /* | ||
822 | * Return true if this page is mapped into pagetables. | 821 | * Return true if this page is mapped into pagetables. |
823 | */ | 822 | */ |
824 | static inline int page_mapped(struct page *page) | 823 | static inline int page_mapped(struct page *page) |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 3e01a19a91e8..5b42f1b34eb7 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -62,10 +62,23 @@ struct page { | |||
62 | struct { | 62 | struct { |
63 | 63 | ||
64 | union { | 64 | union { |
65 | atomic_t _mapcount; /* Count of ptes mapped in mms, | 65 | /* |
66 | * to show when page is mapped | 66 | * Count of ptes mapped in |
67 | * & limit reverse map searches. | 67 | * mms, to show when page is |
68 | */ | 68 | * mapped & limit reverse map |
69 | * searches. | ||
70 | * | ||
71 | * Used also for tail pages | ||
72 | * refcounting instead of | ||
73 | * _count. Tail pages cannot | ||
74 | * be mapped and keeping the | ||
75 | * tail page _count zero at | ||
76 | * all times guarantees | ||
77 | * get_page_unless_zero() will | ||
78 | * never succeed on tail | ||
79 | * pages. | ||
80 | */ | ||
81 | atomic_t _mapcount; | ||
69 | 82 | ||
70 | struct { | 83 | struct { |
71 | unsigned inuse:16; | 84 | unsigned inuse:16; |
diff --git a/include/linux/pps-gpio.h b/include/linux/pps-gpio.h new file mode 100644 index 000000000000..0035abe41b9a --- /dev/null +++ b/include/linux/pps-gpio.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * pps-gpio.h -- PPS client for GPIOs | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 2011 James Nuss <jamesnuss@nanometrics.ca> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
20 | */ | ||
21 | |||
22 | #ifndef _PPS_GPIO_H | ||
23 | #define _PPS_GPIO_H | ||
24 | |||
25 | struct pps_gpio_platform_data { | ||
26 | bool assert_falling_edge; | ||
27 | bool capture_clear; | ||
28 | unsigned int gpio_pin; | ||
29 | const char *gpio_label; | ||
30 | }; | ||
31 | |||
32 | #endif | ||
diff --git a/include/linux/rio_ids.h b/include/linux/rio_ids.h index 0cee0152aca9..b66d13d1bdc0 100644 --- a/include/linux/rio_ids.h +++ b/include/linux/rio_ids.h | |||
@@ -39,5 +39,6 @@ | |||
39 | #define RIO_DID_IDTCPS1616 0x0379 | 39 | #define RIO_DID_IDTCPS1616 0x0379 |
40 | #define RIO_DID_IDTVPS1616 0x0377 | 40 | #define RIO_DID_IDTVPS1616 0x0377 |
41 | #define RIO_DID_IDTSPS1616 0x0378 | 41 | #define RIO_DID_IDTSPS1616 0x0378 |
42 | #define RIO_DID_TSI721 0x80ab | ||
42 | 43 | ||
43 | #endif /* LINUX_RIO_IDS_H */ | 44 | #endif /* LINUX_RIO_IDS_H */ |
diff --git a/include/linux/sem.h b/include/linux/sem.h index 1feb2de2ee57..10d6b226afc5 100644 --- a/include/linux/sem.h +++ b/include/linux/sem.h | |||
@@ -83,13 +83,6 @@ struct seminfo { | |||
83 | 83 | ||
84 | struct task_struct; | 84 | struct task_struct; |
85 | 85 | ||
86 | /* One semaphore structure for each semaphore in the system. */ | ||
87 | struct sem { | ||
88 | int semval; /* current value */ | ||
89 | int sempid; /* pid of last operation */ | ||
90 | struct list_head sem_pending; /* pending single-sop operations */ | ||
91 | }; | ||
92 | |||
93 | /* One sem_array data structure for each set of semaphores in the system. */ | 86 | /* One sem_array data structure for each set of semaphores in the system. */ |
94 | struct sem_array { | 87 | struct sem_array { |
95 | struct kern_ipc_perm ____cacheline_aligned_in_smp | 88 | struct kern_ipc_perm ____cacheline_aligned_in_smp |
@@ -103,51 +96,21 @@ struct sem_array { | |||
103 | int complex_count; /* pending complex operations */ | 96 | int complex_count; /* pending complex operations */ |
104 | }; | 97 | }; |
105 | 98 | ||
106 | /* One queue for each sleeping process in the system. */ | 99 | #ifdef CONFIG_SYSVIPC |
107 | struct sem_queue { | ||
108 | struct list_head simple_list; /* queue of pending operations */ | ||
109 | struct list_head list; /* queue of pending operations */ | ||
110 | struct task_struct *sleeper; /* this process */ | ||
111 | struct sem_undo *undo; /* undo structure */ | ||
112 | int pid; /* process id of requesting process */ | ||
113 | int status; /* completion status of operation */ | ||
114 | struct sembuf *sops; /* array of pending operations */ | ||
115 | int nsops; /* number of operations */ | ||
116 | int alter; /* does the operation alter the array? */ | ||
117 | }; | ||
118 | |||
119 | /* Each task has a list of undo requests. They are executed automatically | ||
120 | * when the process exits. | ||
121 | */ | ||
122 | struct sem_undo { | ||
123 | struct list_head list_proc; /* per-process list: all undos from one process. */ | ||
124 | /* rcu protected */ | ||
125 | struct rcu_head rcu; /* rcu struct for sem_undo() */ | ||
126 | struct sem_undo_list *ulp; /* sem_undo_list for the process */ | ||
127 | struct list_head list_id; /* per semaphore array list: all undos for one array */ | ||
128 | int semid; /* semaphore set identifier */ | ||
129 | short * semadj; /* array of adjustments, one per semaphore */ | ||
130 | }; | ||
131 | |||
132 | /* sem_undo_list controls shared access to the list of sem_undo structures | ||
133 | * that may be shared among all a CLONE_SYSVSEM task group. | ||
134 | */ | ||
135 | struct sem_undo_list { | ||
136 | atomic_t refcnt; | ||
137 | spinlock_t lock; | ||
138 | struct list_head list_proc; | ||
139 | }; | ||
140 | 100 | ||
141 | struct sysv_sem { | 101 | struct sysv_sem { |
142 | struct sem_undo_list *undo_list; | 102 | struct sem_undo_list *undo_list; |
143 | }; | 103 | }; |
144 | 104 | ||
145 | #ifdef CONFIG_SYSVIPC | ||
146 | |||
147 | extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk); | 105 | extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk); |
148 | extern void exit_sem(struct task_struct *tsk); | 106 | extern void exit_sem(struct task_struct *tsk); |
149 | 107 | ||
150 | #else | 108 | #else |
109 | |||
110 | struct sysv_sem { | ||
111 | /* empty */ | ||
112 | }; | ||
113 | |||
151 | static inline int copy_semundo(unsigned long clone_flags, struct task_struct *tsk) | 114 | static inline int copy_semundo(unsigned long clone_flags, struct task_struct *tsk) |
152 | { | 115 | { |
153 | return 0; | 116 | return 0; |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 9a1ec10fd504..703cfa33a3ca 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -931,6 +931,7 @@ enum | |||
931 | #ifdef __KERNEL__ | 931 | #ifdef __KERNEL__ |
932 | #include <linux/list.h> | 932 | #include <linux/list.h> |
933 | #include <linux/rcupdate.h> | 933 | #include <linux/rcupdate.h> |
934 | #include <linux/wait.h> | ||
934 | 935 | ||
935 | /* For the /proc/sys support */ | 936 | /* For the /proc/sys support */ |
936 | struct ctl_table; | 937 | struct ctl_table; |
@@ -1011,6 +1012,26 @@ extern int proc_do_large_bitmap(struct ctl_table *, int, | |||
1011 | * cover common cases. | 1012 | * cover common cases. |
1012 | */ | 1013 | */ |
1013 | 1014 | ||
1015 | /* Support for userspace poll() to watch for changes */ | ||
1016 | struct ctl_table_poll { | ||
1017 | atomic_t event; | ||
1018 | wait_queue_head_t wait; | ||
1019 | }; | ||
1020 | |||
1021 | static inline void *proc_sys_poll_event(struct ctl_table_poll *poll) | ||
1022 | { | ||
1023 | return (void *)(unsigned long)atomic_read(&poll->event); | ||
1024 | } | ||
1025 | |||
1026 | void proc_sys_poll_notify(struct ctl_table_poll *poll); | ||
1027 | |||
1028 | #define __CTL_TABLE_POLL_INITIALIZER(name) { \ | ||
1029 | .event = ATOMIC_INIT(0), \ | ||
1030 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER(name.wait) } | ||
1031 | |||
1032 | #define DEFINE_CTL_TABLE_POLL(name) \ | ||
1033 | struct ctl_table_poll name = __CTL_TABLE_POLL_INITIALIZER(name) | ||
1034 | |||
1014 | /* A sysctl table is an array of struct ctl_table: */ | 1035 | /* A sysctl table is an array of struct ctl_table: */ |
1015 | struct ctl_table | 1036 | struct ctl_table |
1016 | { | 1037 | { |
@@ -1021,6 +1042,7 @@ struct ctl_table | |||
1021 | struct ctl_table *child; | 1042 | struct ctl_table *child; |
1022 | struct ctl_table *parent; /* Automatically set */ | 1043 | struct ctl_table *parent; /* Automatically set */ |
1023 | proc_handler *proc_handler; /* Callback for text formatting */ | 1044 | proc_handler *proc_handler; /* Callback for text formatting */ |
1045 | struct ctl_table_poll *poll; | ||
1024 | void *extra1; | 1046 | void *extra1; |
1025 | void *extra2; | 1047 | void *extra2; |
1026 | }; | 1048 | }; |
diff --git a/include/linux/utsname.h b/include/linux/utsname.h index 4e5b0213fdc1..c714ed75eae2 100644 --- a/include/linux/utsname.h +++ b/include/linux/utsname.h | |||
@@ -37,6 +37,14 @@ struct new_utsname { | |||
37 | #include <linux/nsproxy.h> | 37 | #include <linux/nsproxy.h> |
38 | #include <linux/err.h> | 38 | #include <linux/err.h> |
39 | 39 | ||
40 | enum uts_proc { | ||
41 | UTS_PROC_OSTYPE, | ||
42 | UTS_PROC_OSRELEASE, | ||
43 | UTS_PROC_VERSION, | ||
44 | UTS_PROC_HOSTNAME, | ||
45 | UTS_PROC_DOMAINNAME, | ||
46 | }; | ||
47 | |||
40 | struct user_namespace; | 48 | struct user_namespace; |
41 | extern struct user_namespace init_user_ns; | 49 | extern struct user_namespace init_user_ns; |
42 | 50 | ||
@@ -80,6 +88,14 @@ static inline struct uts_namespace *copy_utsname(unsigned long flags, | |||
80 | } | 88 | } |
81 | #endif | 89 | #endif |
82 | 90 | ||
91 | #ifdef CONFIG_PROC_SYSCTL | ||
92 | extern void uts_proc_notify(enum uts_proc proc); | ||
93 | #else | ||
94 | static inline void uts_proc_notify(enum uts_proc proc) | ||
95 | { | ||
96 | } | ||
97 | #endif | ||
98 | |||
83 | static inline struct new_utsname *utsname(void) | 99 | static inline struct new_utsname *utsname(void) |
84 | { | 100 | { |
85 | return ¤t->nsproxy->uts_ns->name; | 101 | return ¤t->nsproxy->uts_ns->name; |