diff options
-rw-r--r-- | Documentation/DocBook/Makefile | 2 | ||||
-rw-r--r-- | Documentation/DocBook/uio-howto.tmpl | 90 | ||||
-rw-r--r-- | drivers/base/core.c | 4 | ||||
-rw-r--r-- | drivers/base/power/Makefile | 3 | ||||
-rw-r--r-- | drivers/base/power/main.c | 8 | ||||
-rw-r--r-- | drivers/base/power/power.h | 28 | ||||
-rw-r--r-- | drivers/char/Kconfig | 2 | ||||
-rw-r--r-- | fs/exec.c | 6 | ||||
-rw-r--r-- | fs/sysfs/file.c | 6 | ||||
-rw-r--r-- | include/linux/sched.h | 4 | ||||
-rw-r--r-- | kernel/sched.c | 5 | ||||
-rw-r--r-- | kernel/sched_debug.c | 8 | ||||
-rw-r--r-- | kernel/sched_stats.h | 3 | ||||
-rw-r--r-- | kernel/time/tick-sched.c | 2 | ||||
-rw-r--r-- | lib/kobject.c | 4 | ||||
-rw-r--r-- | mm/page_alloc.c | 1 | ||||
-rw-r--r-- | mm/shmem.c | 5 |
17 files changed, 91 insertions, 90 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 054a7ecf64c6..4953bc258729 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
@@ -11,7 +11,7 @@ DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \ | |||
11 | procfs-guide.xml writing_usb_driver.xml \ | 11 | procfs-guide.xml writing_usb_driver.xml \ |
12 | kernel-api.xml filesystems.xml lsm.xml usb.xml \ | 12 | kernel-api.xml filesystems.xml lsm.xml usb.xml \ |
13 | gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ | 13 | gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ |
14 | genericirq.xml s390-drivers.xml | 14 | genericirq.xml s390-drivers.xml uio-howto.xml |
15 | 15 | ||
16 | ### | 16 | ### |
17 | # The build process is as follows (targets): | 17 | # The build process is as follows (targets): |
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl index c119484258b8..fdd7f4f887b7 100644 --- a/Documentation/DocBook/uio-howto.tmpl +++ b/Documentation/DocBook/uio-howto.tmpl | |||
@@ -30,6 +30,12 @@ | |||
30 | 30 | ||
31 | <revhistory> | 31 | <revhistory> |
32 | <revision> | 32 | <revision> |
33 | <revnumber>0.4</revnumber> | ||
34 | <date>2007-11-26</date> | ||
35 | <authorinitials>hjk</authorinitials> | ||
36 | <revremark>Removed section about uio_dummy.</revremark> | ||
37 | </revision> | ||
38 | <revision> | ||
33 | <revnumber>0.3</revnumber> | 39 | <revnumber>0.3</revnumber> |
34 | <date>2007-04-29</date> | 40 | <date>2007-04-29</date> |
35 | <authorinitials>hjk</authorinitials> | 41 | <authorinitials>hjk</authorinitials> |
@@ -94,6 +100,26 @@ interested in translating it, please email me | |||
94 | user space. This simplifies development and reduces the risk of | 100 | user space. This simplifies development and reduces the risk of |
95 | serious bugs within a kernel module. | 101 | serious bugs within a kernel module. |
96 | </para> | 102 | </para> |
103 | <para> | ||
104 | Please note that UIO is not an universal driver interface. Devices | ||
105 | that are already handled well by other kernel subsystems (like | ||
106 | networking or serial or USB) are no candidates for an UIO driver. | ||
107 | Hardware that is ideally suited for an UIO driver fulfills all of | ||
108 | the following: | ||
109 | </para> | ||
110 | <itemizedlist> | ||
111 | <listitem> | ||
112 | <para>The device has memory that can be mapped. The device can be | ||
113 | controlled completely by writing to this memory.</para> | ||
114 | </listitem> | ||
115 | <listitem> | ||
116 | <para>The device usually generates interrupts.</para> | ||
117 | </listitem> | ||
118 | <listitem> | ||
119 | <para>The device does not fit into one of the standard kernel | ||
120 | subsystems.</para> | ||
121 | </listitem> | ||
122 | </itemizedlist> | ||
97 | </sect1> | 123 | </sect1> |
98 | 124 | ||
99 | <sect1 id="thanks"> | 125 | <sect1 id="thanks"> |
@@ -174,8 +200,9 @@ interested in translating it, please email me | |||
174 | For cards that don't generate interrupts but need to be | 200 | For cards that don't generate interrupts but need to be |
175 | polled, there is the possibility to set up a timer that | 201 | polled, there is the possibility to set up a timer that |
176 | triggers the interrupt handler at configurable time intervals. | 202 | triggers the interrupt handler at configurable time intervals. |
177 | See <filename>drivers/uio/uio_dummy.c</filename> for an | 203 | This interrupt simulation is done by calling |
178 | example of this technique. | 204 | <function>uio_event_notify()</function> |
205 | from the timer's event handler. | ||
179 | </para> | 206 | </para> |
180 | 207 | ||
181 | <para> | 208 | <para> |
@@ -263,63 +290,11 @@ offset = N * getpagesize(); | |||
263 | </sect1> | 290 | </sect1> |
264 | </chapter> | 291 | </chapter> |
265 | 292 | ||
266 | <chapter id="using-uio_dummy" xreflabel="Using uio_dummy"> | ||
267 | <?dbhtml filename="using-uio_dummy.html"?> | ||
268 | <title>Using uio_dummy</title> | ||
269 | <para> | ||
270 | Well, there is no real use for uio_dummy. Its only purpose is | ||
271 | to test most parts of the UIO system (everything except | ||
272 | hardware interrupts), and to serve as an example for the | ||
273 | kernel module that you will have to write yourself. | ||
274 | </para> | ||
275 | |||
276 | <sect1 id="what_uio_dummy_does"> | ||
277 | <title>What uio_dummy does</title> | ||
278 | <para> | ||
279 | The kernel module <filename>uio_dummy.ko</filename> creates a | ||
280 | device that uses a timer to generate periodic interrupts. The | ||
281 | interrupt handler does nothing but increment a counter. The | ||
282 | driver adds two custom attributes, <varname>count</varname> | ||
283 | and <varname>freq</varname>, that appear under | ||
284 | <filename>/sys/devices/platform/uio_dummy/</filename>. | ||
285 | </para> | ||
286 | |||
287 | <para> | ||
288 | The attribute <varname>count</varname> can be read and | ||
289 | written. The associated file | ||
290 | <filename>/sys/devices/platform/uio_dummy/count</filename> | ||
291 | appears as a normal text file and contains the total number of | ||
292 | timer interrupts. If you look at it (e.g. using | ||
293 | <function>cat</function>), you'll notice it is slowly counting | ||
294 | up. | ||
295 | </para> | ||
296 | |||
297 | <para> | ||
298 | The attribute <varname>freq</varname> can be read and written. | ||
299 | The content of | ||
300 | <filename>/sys/devices/platform/uio_dummy/freq</filename> | ||
301 | represents the number of system timer ticks between two timer | ||
302 | interrupts. The default value of <varname>freq</varname> is | ||
303 | the value of the kernel variable <varname>HZ</varname>, which | ||
304 | gives you an interval of one second. Lower values will | ||
305 | increase the frequency. Try the following: | ||
306 | </para> | ||
307 | <programlisting format="linespecific"> | ||
308 | cd /sys/devices/platform/uio_dummy/ | ||
309 | echo 100 > freq | ||
310 | </programlisting> | ||
311 | <para> | ||
312 | Use <function>cat count</function> to see how the interrupt | ||
313 | frequency changes. | ||
314 | </para> | ||
315 | </sect1> | ||
316 | </chapter> | ||
317 | |||
318 | <chapter id="custom_kernel_module" xreflabel="Writing your own kernel module"> | 293 | <chapter id="custom_kernel_module" xreflabel="Writing your own kernel module"> |
319 | <?dbhtml filename="custom_kernel_module.html"?> | 294 | <?dbhtml filename="custom_kernel_module.html"?> |
320 | <title>Writing your own kernel module</title> | 295 | <title>Writing your own kernel module</title> |
321 | <para> | 296 | <para> |
322 | Please have a look at <filename>uio_dummy.c</filename> as an | 297 | Please have a look at <filename>uio_cif.c</filename> as an |
323 | example. The following paragraphs explain the different | 298 | example. The following paragraphs explain the different |
324 | sections of this file. | 299 | sections of this file. |
325 | </para> | 300 | </para> |
@@ -354,9 +329,8 @@ See the description below for details. | |||
354 | interrupt, it's your modules task to determine the irq number during | 329 | interrupt, it's your modules task to determine the irq number during |
355 | initialization. If you don't have a hardware generated interrupt but | 330 | initialization. If you don't have a hardware generated interrupt but |
356 | want to trigger the interrupt handler in some other way, set | 331 | want to trigger the interrupt handler in some other way, set |
357 | <varname>irq</varname> to <varname>UIO_IRQ_CUSTOM</varname>. The | 332 | <varname>irq</varname> to <varname>UIO_IRQ_CUSTOM</varname>. |
358 | uio_dummy module does this as it triggers the event mechanism in a timer | 333 | If you had no interrupt at all, you could set |
359 | routine. If you had no interrupt at all, you could set | ||
360 | <varname>irq</varname> to <varname>UIO_IRQ_NONE</varname>, though this | 334 | <varname>irq</varname> to <varname>UIO_IRQ_NONE</varname>, though this |
361 | rarely makes sense. | 335 | rarely makes sense. |
362 | </para></listitem> | 336 | </para></listitem> |
diff --git a/drivers/base/core.c b/drivers/base/core.c index 3f4d6aa13990..2683eac30c68 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -770,9 +770,10 @@ int device_add(struct device *dev) | |||
770 | error = device_add_attrs(dev); | 770 | error = device_add_attrs(dev); |
771 | if (error) | 771 | if (error) |
772 | goto AttrsError; | 772 | goto AttrsError; |
773 | error = device_pm_add(dev); | 773 | error = dpm_sysfs_add(dev); |
774 | if (error) | 774 | if (error) |
775 | goto PMError; | 775 | goto PMError; |
776 | device_pm_add(dev); | ||
776 | error = bus_add_device(dev); | 777 | error = bus_add_device(dev); |
777 | if (error) | 778 | if (error) |
778 | goto BusError; | 779 | goto BusError; |
@@ -797,6 +798,7 @@ int device_add(struct device *dev) | |||
797 | return error; | 798 | return error; |
798 | BusError: | 799 | BusError: |
799 | device_pm_remove(dev); | 800 | device_pm_remove(dev); |
801 | dpm_sysfs_remove(dev); | ||
800 | PMError: | 802 | PMError: |
801 | if (dev->bus) | 803 | if (dev->bus) |
802 | blocking_notifier_call_chain(&dev->bus->bus_notifier, | 804 | blocking_notifier_call_chain(&dev->bus->bus_notifier, |
diff --git a/drivers/base/power/Makefile b/drivers/base/power/Makefile index a803733c839e..44504e6618fb 100644 --- a/drivers/base/power/Makefile +++ b/drivers/base/power/Makefile | |||
@@ -1,5 +1,6 @@ | |||
1 | obj-y := shutdown.o | 1 | obj-y := shutdown.o |
2 | obj-$(CONFIG_PM_SLEEP) += main.o sysfs.o | 2 | obj-$(CONFIG_PM) += sysfs.o |
3 | obj-$(CONFIG_PM_SLEEP) += main.o | ||
3 | obj-$(CONFIG_PM_TRACE) += trace.o | 4 | obj-$(CONFIG_PM_TRACE) += trace.o |
4 | 5 | ||
5 | ifeq ($(CONFIG_DEBUG_DRIVER),y) | 6 | ifeq ($(CONFIG_DEBUG_DRIVER),y) |
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 0ab4ab21f564..691ffb64cc37 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
@@ -38,20 +38,14 @@ static DEFINE_MUTEX(dpm_list_mtx); | |||
38 | int (*platform_enable_wakeup)(struct device *dev, int is_on); | 38 | int (*platform_enable_wakeup)(struct device *dev, int is_on); |
39 | 39 | ||
40 | 40 | ||
41 | int device_pm_add(struct device *dev) | 41 | void device_pm_add(struct device *dev) |
42 | { | 42 | { |
43 | int error; | ||
44 | |||
45 | pr_debug("PM: Adding info for %s:%s\n", | 43 | pr_debug("PM: Adding info for %s:%s\n", |
46 | dev->bus ? dev->bus->name : "No Bus", | 44 | dev->bus ? dev->bus->name : "No Bus", |
47 | kobject_name(&dev->kobj)); | 45 | kobject_name(&dev->kobj)); |
48 | mutex_lock(&dpm_list_mtx); | 46 | mutex_lock(&dpm_list_mtx); |
49 | list_add_tail(&dev->power.entry, &dpm_active); | 47 | list_add_tail(&dev->power.entry, &dpm_active); |
50 | error = dpm_sysfs_add(dev); | ||
51 | if (error) | ||
52 | list_del(&dev->power.entry); | ||
53 | mutex_unlock(&dpm_list_mtx); | 48 | mutex_unlock(&dpm_list_mtx); |
54 | return error; | ||
55 | } | 49 | } |
56 | 50 | ||
57 | void device_pm_remove(struct device *dev) | 51 | void device_pm_remove(struct device *dev) |
diff --git a/drivers/base/power/power.h b/drivers/base/power/power.h index 5c4efd493fa5..379da4e958e0 100644 --- a/drivers/base/power/power.h +++ b/drivers/base/power/power.h | |||
@@ -13,14 +13,29 @@ extern void device_shutdown(void); | |||
13 | 13 | ||
14 | extern struct list_head dpm_active; /* The active device list */ | 14 | extern struct list_head dpm_active; /* The active device list */ |
15 | 15 | ||
16 | static inline struct device * to_device(struct list_head * entry) | 16 | static inline struct device *to_device(struct list_head *entry) |
17 | { | 17 | { |
18 | return container_of(entry, struct device, power.entry); | 18 | return container_of(entry, struct device, power.entry); |
19 | } | 19 | } |
20 | 20 | ||
21 | extern int device_pm_add(struct device *); | 21 | extern void device_pm_add(struct device *); |
22 | extern void device_pm_remove(struct device *); | 22 | extern void device_pm_remove(struct device *); |
23 | 23 | ||
24 | #else /* CONFIG_PM_SLEEP */ | ||
25 | |||
26 | |||
27 | static inline void device_pm_add(struct device *dev) | ||
28 | { | ||
29 | } | ||
30 | |||
31 | static inline void device_pm_remove(struct device *dev) | ||
32 | { | ||
33 | } | ||
34 | |||
35 | #endif | ||
36 | |||
37 | #ifdef CONFIG_PM | ||
38 | |||
24 | /* | 39 | /* |
25 | * sysfs.c | 40 | * sysfs.c |
26 | */ | 41 | */ |
@@ -28,16 +43,15 @@ extern void device_pm_remove(struct device *); | |||
28 | extern int dpm_sysfs_add(struct device *); | 43 | extern int dpm_sysfs_add(struct device *); |
29 | extern void dpm_sysfs_remove(struct device *); | 44 | extern void dpm_sysfs_remove(struct device *); |
30 | 45 | ||
31 | #else /* CONFIG_PM_SLEEP */ | 46 | #else /* CONFIG_PM */ |
32 | |||
33 | 47 | ||
34 | static inline int device_pm_add(struct device * dev) | 48 | static inline int dpm_sysfs_add(struct device *dev) |
35 | { | 49 | { |
36 | return 0; | 50 | return 0; |
37 | } | 51 | } |
38 | static inline void device_pm_remove(struct device * dev) | ||
39 | { | ||
40 | 52 | ||
53 | static inline void dpm_sysfs_remove(struct device *dev) | ||
54 | { | ||
41 | } | 55 | } |
42 | 56 | ||
43 | #endif | 57 | #endif |
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index bf18d757b876..a509b8d79781 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig | |||
@@ -457,7 +457,7 @@ config LEGACY_PTYS | |||
457 | config LEGACY_PTY_COUNT | 457 | config LEGACY_PTY_COUNT |
458 | int "Maximum number of legacy PTY in use" | 458 | int "Maximum number of legacy PTY in use" |
459 | depends on LEGACY_PTYS | 459 | depends on LEGACY_PTYS |
460 | range 1 256 | 460 | range 0 256 |
461 | default "256" | 461 | default "256" |
462 | ---help--- | 462 | ---help--- |
463 | The maximum number of legacy PTYs that can be used at any one time. | 463 | The maximum number of legacy PTYs that can be used at any one time. |
@@ -1780,6 +1780,12 @@ int do_coredump(long signr, int exit_code, struct pt_regs * regs) | |||
1780 | but keep the previous behaviour for now. */ | 1780 | but keep the previous behaviour for now. */ |
1781 | if (!ispipe && !S_ISREG(inode->i_mode)) | 1781 | if (!ispipe && !S_ISREG(inode->i_mode)) |
1782 | goto close_fail; | 1782 | goto close_fail; |
1783 | /* | ||
1784 | * Dont allow local users get cute and trick others to coredump | ||
1785 | * into their pre-created files: | ||
1786 | */ | ||
1787 | if (inode->i_uid != current->fsuid) | ||
1788 | goto close_fail; | ||
1783 | if (!file->f_op) | 1789 | if (!file->f_op) |
1784 | goto close_fail; | 1790 | goto close_fail; |
1785 | if (!file->f_op->write) | 1791 | if (!file->f_op->write) |
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index 27d1785b7644..4045bdcc4b33 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c | |||
@@ -119,7 +119,11 @@ static int fill_read_buffer(struct dentry * dentry, struct sysfs_buffer * buffer | |||
119 | 119 | ||
120 | sysfs_put_active_two(attr_sd); | 120 | sysfs_put_active_two(attr_sd); |
121 | 121 | ||
122 | BUG_ON(count > (ssize_t)PAGE_SIZE); | 122 | /* |
123 | * The code works fine with PAGE_SIZE return but it's likely to | ||
124 | * indicate truncated result or overflow in normal use cases. | ||
125 | */ | ||
126 | BUG_ON(count >= (ssize_t)PAGE_SIZE); | ||
123 | if (count >= 0) { | 127 | if (count >= 0) { |
124 | buffer->needs_read_fill = 0; | 128 | buffer->needs_read_fill = 0; |
125 | buffer->count = count; | 129 | buffer->count = count; |
diff --git a/include/linux/sched.h b/include/linux/sched.h index ee800e7a70de..ac3d496fbd20 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -282,6 +282,10 @@ static inline void touch_all_softlockup_watchdogs(void) | |||
282 | 282 | ||
283 | /* Attach to any functions which should be ignored in wchan output. */ | 283 | /* Attach to any functions which should be ignored in wchan output. */ |
284 | #define __sched __attribute__((__section__(".sched.text"))) | 284 | #define __sched __attribute__((__section__(".sched.text"))) |
285 | |||
286 | /* Linker adds these: start and end of __sched functions */ | ||
287 | extern char __sched_text_start[], __sched_text_end[]; | ||
288 | |||
285 | /* Is this address in the __sched functions? */ | 289 | /* Is this address in the __sched functions? */ |
286 | extern int in_sched_functions(unsigned long addr); | 290 | extern int in_sched_functions(unsigned long addr); |
287 | 291 | ||
diff --git a/kernel/sched.c b/kernel/sched.c index 38933cafea8a..98dcdf272db3 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -5466,7 +5466,7 @@ sd_alloc_ctl_domain_table(struct sched_domain *sd) | |||
5466 | return table; | 5466 | return table; |
5467 | } | 5467 | } |
5468 | 5468 | ||
5469 | static ctl_table * sd_alloc_ctl_cpu_table(int cpu) | 5469 | static ctl_table *sd_alloc_ctl_cpu_table(int cpu) |
5470 | { | 5470 | { |
5471 | struct ctl_table *entry, *table; | 5471 | struct ctl_table *entry, *table; |
5472 | struct sched_domain *sd; | 5472 | struct sched_domain *sd; |
@@ -6708,9 +6708,6 @@ void __init sched_init_smp(void) | |||
6708 | 6708 | ||
6709 | int in_sched_functions(unsigned long addr) | 6709 | int in_sched_functions(unsigned long addr) |
6710 | { | 6710 | { |
6711 | /* Linker adds these: start and end of __sched functions */ | ||
6712 | extern char __sched_text_start[], __sched_text_end[]; | ||
6713 | |||
6714 | return in_lock_functions(addr) || | 6711 | return in_lock_functions(addr) || |
6715 | (addr >= (unsigned long)__sched_text_start | 6712 | (addr >= (unsigned long)__sched_text_start |
6716 | && addr < (unsigned long)__sched_text_end); | 6713 | && addr < (unsigned long)__sched_text_end); |
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c index 5d0d623a5465..d30467b47ddd 100644 --- a/kernel/sched_debug.c +++ b/kernel/sched_debug.c | |||
@@ -327,10 +327,12 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m) | |||
327 | avg_atom = -1LL; | 327 | avg_atom = -1LL; |
328 | 328 | ||
329 | avg_per_cpu = p->se.sum_exec_runtime; | 329 | avg_per_cpu = p->se.sum_exec_runtime; |
330 | if (p->se.nr_migrations) | 330 | if (p->se.nr_migrations) { |
331 | avg_per_cpu = div64_64(avg_per_cpu, p->se.nr_migrations); | 331 | avg_per_cpu = div64_64(avg_per_cpu, |
332 | else | 332 | p->se.nr_migrations); |
333 | } else { | ||
333 | avg_per_cpu = -1LL; | 334 | avg_per_cpu = -1LL; |
335 | } | ||
334 | 336 | ||
335 | __PN(avg_atom); | 337 | __PN(avg_atom); |
336 | __PN(avg_per_cpu); | 338 | __PN(avg_per_cpu); |
diff --git a/kernel/sched_stats.h b/kernel/sched_stats.h index 630178e53bb6..5b32433e7ee5 100644 --- a/kernel/sched_stats.h +++ b/kernel/sched_stats.h | |||
@@ -52,7 +52,8 @@ static int show_schedstat(struct seq_file *seq, void *v) | |||
52 | sd->lb_nobusyq[itype], | 52 | sd->lb_nobusyq[itype], |
53 | sd->lb_nobusyg[itype]); | 53 | sd->lb_nobusyg[itype]); |
54 | } | 54 | } |
55 | seq_printf(seq, " %u %u %u %u %u %u %u %u %u %u %u %u\n", | 55 | seq_printf(seq, |
56 | " %u %u %u %u %u %u %u %u %u %u %u %u\n", | ||
56 | sd->alb_count, sd->alb_failed, sd->alb_pushed, | 57 | sd->alb_count, sd->alb_failed, sd->alb_pushed, |
57 | sd->sbe_count, sd->sbe_balanced, sd->sbe_pushed, | 58 | sd->sbe_count, sd->sbe_balanced, sd->sbe_pushed, |
58 | sd->sbf_count, sd->sbf_balanced, sd->sbf_pushed, | 59 | sd->sbf_count, sd->sbf_balanced, sd->sbf_pushed, |
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 27a2338deb4a..cb89fa8db110 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c | |||
@@ -133,6 +133,8 @@ void tick_nohz_update_jiffies(void) | |||
133 | if (!ts->tick_stopped) | 133 | if (!ts->tick_stopped) |
134 | return; | 134 | return; |
135 | 135 | ||
136 | touch_softlockup_watchdog(); | ||
137 | |||
136 | cpu_clear(cpu, nohz_cpu_mask); | 138 | cpu_clear(cpu, nohz_cpu_mask); |
137 | now = ktime_get(); | 139 | now = ktime_get(); |
138 | 140 | ||
diff --git a/lib/kobject.c b/lib/kobject.c index a7e3bf4d3c70..b52e9f4ef371 100644 --- a/lib/kobject.c +++ b/lib/kobject.c | |||
@@ -313,8 +313,8 @@ int kobject_rename(struct kobject * kobj, const char *new_name) | |||
313 | struct kobject *temp_kobj; | 313 | struct kobject *temp_kobj; |
314 | temp_kobj = kset_find_obj(kobj->kset, new_name); | 314 | temp_kobj = kset_find_obj(kobj->kset, new_name); |
315 | if (temp_kobj) { | 315 | if (temp_kobj) { |
316 | printk(KERN_WARNING "kobject '%s' can not be renamed " | 316 | printk(KERN_WARNING "kobject '%s' cannot be renamed " |
317 | "to '%s' as '%s' is already in existance.\n", | 317 | "to '%s' as '%s' is already in existence.\n", |
318 | kobject_name(kobj), new_name, new_name); | 318 | kobject_name(kobj), new_name, new_name); |
319 | kobject_put(temp_kobj); | 319 | kobject_put(temp_kobj); |
320 | return -EINVAL; | 320 | return -EINVAL; |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 12376ae3f733..4ffed1cd158b 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -305,7 +305,6 @@ static inline void prep_zero_page(struct page *page, int order, gfp_t gfp_flags) | |||
305 | { | 305 | { |
306 | int i; | 306 | int i; |
307 | 307 | ||
308 | VM_BUG_ON((gfp_flags & (__GFP_WAIT | __GFP_HIGHMEM)) == __GFP_HIGHMEM); | ||
309 | /* | 308 | /* |
310 | * clear_highpage() will use KM_USER0, so it's a bug to use __GFP_ZERO | 309 | * clear_highpage() will use KM_USER0, so it's a bug to use __GFP_ZERO |
311 | * and __GFP_HIGHMEM from hard or soft interrupt context. | 310 | * and __GFP_HIGHMEM from hard or soft interrupt context. |
diff --git a/mm/shmem.c b/mm/shmem.c index 253d205914ba..51b3d6ccddab 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -1072,7 +1072,7 @@ shmem_alloc_page(gfp_t gfp, struct shmem_inode_info *info, | |||
1072 | pvma.vm_policy = mpol_shared_policy_lookup(&info->policy, idx); | 1072 | pvma.vm_policy = mpol_shared_policy_lookup(&info->policy, idx); |
1073 | pvma.vm_pgoff = idx; | 1073 | pvma.vm_pgoff = idx; |
1074 | pvma.vm_end = PAGE_SIZE; | 1074 | pvma.vm_end = PAGE_SIZE; |
1075 | page = alloc_page_vma(gfp | __GFP_ZERO, &pvma, 0); | 1075 | page = alloc_page_vma(gfp, &pvma, 0); |
1076 | mpol_free(pvma.vm_policy); | 1076 | mpol_free(pvma.vm_policy); |
1077 | return page; | 1077 | return page; |
1078 | } | 1078 | } |
@@ -1093,7 +1093,7 @@ shmem_swapin(struct shmem_inode_info *info,swp_entry_t entry,unsigned long idx) | |||
1093 | static inline struct page * | 1093 | static inline struct page * |
1094 | shmem_alloc_page(gfp_t gfp,struct shmem_inode_info *info, unsigned long idx) | 1094 | shmem_alloc_page(gfp_t gfp,struct shmem_inode_info *info, unsigned long idx) |
1095 | { | 1095 | { |
1096 | return alloc_page(gfp | __GFP_ZERO); | 1096 | return alloc_page(gfp); |
1097 | } | 1097 | } |
1098 | #endif | 1098 | #endif |
1099 | 1099 | ||
@@ -1306,6 +1306,7 @@ repeat: | |||
1306 | 1306 | ||
1307 | info->alloced++; | 1307 | info->alloced++; |
1308 | spin_unlock(&info->lock); | 1308 | spin_unlock(&info->lock); |
1309 | clear_highpage(filepage); | ||
1309 | flush_dcache_page(filepage); | 1310 | flush_dcache_page(filepage); |
1310 | SetPageUptodate(filepage); | 1311 | SetPageUptodate(filepage); |
1311 | } | 1312 | } |