aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-01-06clk: mvebu: Remove inappropriate __init taggingJoshua Coombs1-1/+1
If the Orion WDT driver is built as a module, an opps occurs during clk lookup when calling mvebu_clk_gating_get_src(). Remove the inappropriate __init tag so the function is available for modules after kernel init. Signed-off-by: Joshua Coombs <[email protected]> Signed-off-by: Andrew Lunn <[email protected]> Signed-off-by: Jason Cooper <[email protected]>
2013-01-06ARM: Kirkwood: Use fixed-regulator instead of board gpio callAndrew Lunn2-4/+17
With the change to a DT based pinctrl/gpio driver, using gpio API calls in board-*.c files no longer works, a dereferenced NULL pointer exception occurs instead. By converting the GPIO code into a fixed-regulator which gets probed later once pinctrl/gpio is available, we avoid the exception. Signed-off-by: Andrew Lunn <[email protected]> Tested-by: Stefan Peter <s.peter@mplch> Signed-off-by: Jason Cooper <[email protected]>
2013-01-06ARM: Kirkwood: Fix missing sdio clockAndrew Lunn1-0/+4
We moved to declaring clk gates in DT. However, device which do not yet have a DT binding need to have a clkdev alias. This was missing for SDIO. Signed-off-by: Andrew Lunn <[email protected]> Tested-by: Stefan Peter <s.peter@mplch> Signed-off-by: Jason Cooper <[email protected]>
2013-01-06ARM: Kirkwood: Switch TWSI1 of 88f6282 to DT clock providersNobuhiro Iwamatsu1-0/+1
Clock Management of kirkwood has moved to DT clock providers. However, TWSI1 has not yet been done. This switches TWSI1 of 88f6282 to DT clock providers. Signed-off-by: Nobuhiro Iwamatsu <[email protected]> Signed-off-by: Andrew Lunn <[email protected]> Signed-off-by: Jason Cooper <[email protected]>
2013-01-06Power: gpio-poweroff: Fix documentation and gpio_is_validAndrew Lunn2-21/+32
Improve the documentation to clarify level vs edge triggered power off. Improve the comments for level vs edge triggered power off. Make use of gpio_is_valid(). Reported-by: Stephen Warren <[email protected]> Signed-off-by: Andrew Lunn <[email protected]> Signed-off-by: Jason Cooper <[email protected]>
2013-01-06ARM: Kirkwood: Fix missing clk for USB device.Andrew Lunn1-0/+1
Without the clock being held by a driver, it gets turned off at a bad time causing the SoC to lockup. This is often during reboot. Signed-off-by: Andrew Lunn <[email protected]> Tested-by: Stefan Peter <[email protected]> Signed-off-by: Jason Cooper <[email protected]>
2013-01-06arm: mvebu: Use dw-apb-uart instead of ns16650 as UART driverGregory CLEMENT3-7/+9
The UART controller used in the Armada 370 and Armada XP SoCs is the Synopsys DesignWare 8250 (aka Synopsys DesignWare ABP UART). The improper use of the ns16550 can lead to a kernel oops during boot if a character is sent to the UART before the initialization of the driver. The DW APB has an extra interrupt that gets raised when writing to the LCR when busy. This explains why we need to use dw-apb-uart driver to handle this. Signed-off-by: Gregory CLEMENT <[email protected]> Signed-off-by: Jason Cooper <[email protected]>
2013-01-05signals: set_current_blocked() can use __set_current_blocked()Oleg Nesterov1-6/+2
Cleanup. And I think we need more cleanups, in particular __set_current_blocked() and sigprocmask() should die. Nobody should ever block SIGKILL or SIGSTOP. - Change set_current_blocked() to use __set_current_blocked() - Change sys_sigprocmask() to use set_current_blocked(), this way it should not worry about SIGKILL/SIGSTOP. Signed-off-by: Oleg Nesterov <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-05signals: sys_ssetmask() uses uninitialized newmaskOleg Nesterov1-0/+1
Commit 77097ae503b1 ("most of set_current_blocked() callers want SIGKILL/SIGSTOP removed from set") removed the initialization of newmask by accident, causing ltp to complain like this: ssetmask01 1 TFAIL : sgetmask() failed: TEST_ERRNO=???(0): Success Restore the proper initialization. Reported-and-tested-by: CAI Qian <[email protected]> Signed-off-by: Oleg Nesterov <[email protected]> Cc: [email protected] # v3.5+ Signed-off-by: Linus Torvalds <[email protected]>
2013-01-06Merge branch 'pm-sleep'Rafael J. Wysocki2-9/+9
* pm-sleep: PM: Move disabling/enabling runtime PM to late suspend/early resume
2013-01-06PM: Move disabling/enabling runtime PM to late suspend/early resumeRafael J. Wysocki2-9/+9
Currently, the PM core disables runtime PM for all devices right after executing subsystem/driver .suspend() callbacks for them and re-enables it right before executing subsystem/driver .resume() callbacks for them. This may lead to problems when there are two devices such that the .suspend() callback executed for one of them depends on runtime PM working for the other. In that case, if runtime PM has already been disabled for the second device, the first one's .suspend() won't work correctly (and analogously for resume). To make those issues go away, make the PM core disable runtime PM for devices right before executing subsystem/driver .suspend_late() callbacks for them and enable runtime PM for them right after executing subsystem/driver .resume_early() callbacks for them. This way the potential conflitcs between .suspend_late()/.resume_early() and their runtime PM counterparts are still prevented from happening, but the subtle ordering issues related to disabling/enabling runtime PM for devices during system suspend/resume are much easier to avoid. Reported-and-tested-by: Jan-Matthias Braun <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Ulf Hansson <[email protected]> Reviewed-by: Kevin Hilman <[email protected]> Cc: 3.4+ <[email protected]>
2013-01-06Merge branch 'pm-qos'Rafael J. Wysocki1-5/+5
* pm-qos: PM / QoS: Rename local variable in dev_pm_qos_add_ancestor_request()
2013-01-06PM / QoS: Rename local variable in dev_pm_qos_add_ancestor_request()Rafael J. Wysocki1-5/+5
Local variable 'error' in dev_pm_qos_add_ancestor_request() need not contain error codes only, so rename it to 'ret'. Signed-off-by: Rafael J. Wysocki <[email protected]>
2013-01-05nfs: avoid dereferencing null pointer in initiate_bulk_drainingNickolai Zeldovich1-1/+1
Fix an inverted null pointer check in initiate_bulk_draining(). Signed-off-by: Nickolai Zeldovich <[email protected]> Signed-off-by: Trond Myklebust <[email protected]> Cc: [email protected] [>= 3.7]
2013-01-05ARM: EXYNOS: skip the clock initialization for exynos5440Kukjin Kim1-0/+7
Since exynos5440 can support only common clk stuff, so this patch skips legacy exynos5 clock initialization. Signed-off-by: Kukjin Kim <[email protected]>
2013-01-04printk: fix incorrect length from print_time() when seconds > 99999Roland Dreier1-2/+3
print_prefix() passes a NULL buf to print_time() to get the length of the time prefix; when printk times are enabled, the current code just returns the constant 15, which matches the format "[%5lu.%06lu] " used to print the time value. However, this is obviously incorrect when the whole seconds part of the time gets beyond 5 digits (100000 seconds is a bit more than a day of uptime). The simple fix is to use snprintf(NULL, 0, ...) to calculate the actual length of the time prefix. This could be micro-optimized but it seems better to have simpler, more readable code here. The bug leads to the syslog system call miscomputing which messages fit into the userspace buffer. If there are enough messages to fill log_buf_len and some have a timestamp >= 100000, dmesg may fail with: # dmesg klogctl: Bad address When this happens, strace shows that the failure is indeed EFAULT due to the kernel mistakenly accessing past the end of dmesg's buffer, since dmesg asks the kernel how big a buffer it needs, allocates a bit more, and then gets an error when it asks the kernel to fill it: syslog(0xa, 0, 0) = 1048576 mmap(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa4d25d2000 syslog(0x3, 0x7fa4d25d2010, 0x100008) = -1 EFAULT (Bad address) As far as I can see, the bug has been there as long as print_time(), which comes from commit 084681d14e42 ("printk: flush continuation lines immediately to console") in 3.5-rc5. Signed-off-by: Roland Dreier <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Cc: Joe Perches <[email protected]> Cc: Sylvain Munaut <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04drivers/rtc/rtc-vt8500.c: fix handling of data passed in struct rtc_timeTony Prisk1-3/+4
tm_mon is 0..11, whereas vt8500 expects 1..12 for the month field, causing invalid date errors for January, and causing the day field to roll over incorrectly. The century flag is only handled in vt8500_rtc_read_time, but not set in vt8500_rtc_set_time. This patch corrects the behaviour of the century flag. Signed-off-by: Edgar Toernig <[email protected]> Signed-off-by: Tony Prisk <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04drivers/rtc/rtc-vt8500.c: correct handling of CR_24H bitfieldTony Prisk1-2/+2
Control register bitfield for 12H/24H mode is handled incorrectly. Setting CR_24H actually enables 12H mode. This patch renames the define and changes the initialization code to correctly set 24H mode. Signed-off-by: Tony Prisk <[email protected]> Cc: Edgar Toernig <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04rtc: add RTC driver for TPS6586xLaxman Dewangan3-0/+365
Add an RTC driver for TPS6586X chips by TI. This driver supports: - Setting and getting time and date. - Setting and reading alarm time. - Alarm and interrupt functionlity. [[email protected]: remove stray semicolons] [[email protected]: start epoch in 2009] Signed-off-by: Laxman Dewangan <[email protected]> Tested-by: Marc Dietrich <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: fix drivers/staging/sm7xx/Cesar Eduardo Barros1-1/+1
This directory was moved to drivers/staging/sm7xxfb/ by commit 925aa6600cee ("staging: sm7xxfb: sm7xx becomes sm7xxfb"). Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Teddy Wang <[email protected]> Acked-by: Javier Muñoz <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: remove include/linux/of_pwm.hCesar Eduardo Barros1-1/+0
Added by commit 200efedd8766 ("pwm: Take over maintainership of the PWM subsystem"), but I could not find any trace of that file being ever added to the repository. Signed-off-by: Cesar Eduardo Barros <[email protected]> Acked-by: Thierry Reding <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: remove arch/*/lib/perf_event*.cCesar Eduardo Barros1-1/+0
This pattern only matched arch/frv/lib/perf_event.c, which was removed by commit e360adbe2924 ("irq_work: Add generic hardirq context callbacks"). Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: remove drivers/mmc/host/imxmmc.*Cesar Eduardo Barros1-6/+0
This driver was removed by commit 6187fee46f4b ("mmc: remove imxmmc driver"). Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Sascha Hauer <[email protected]> Acked-by: Pavel Pisa <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: fix Documentation/mei/Cesar Eduardo Barros1-1/+1
The documentation was moved to Documentation/misc-devices/mei/ instead. Signed-off-by: Cesar Eduardo Barros <[email protected]> Acked-by: Tomas Winkler <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: remove arch/x86/platform/mrst/pmu.*Cesar Eduardo Barros1-6/+0
These files were removed by commit 1a8359e411eb ("x86/mid: Remove Intel Moorestown"). Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Alan Cox <[email protected]> Cc: Len Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: remove firmware/isci/Cesar Eduardo Barros1-1/+0
This directory was removed by commit 7d99b3abaf84 ("isci, firmware: Remove isci fallback parameter blob and generator"). Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Ben Hutchings <[email protected]> Cc: Dan Williams <[email protected]> Cc: James Bottomley <[email protected]> Cc: Intel SCU Linux support <[email protected]> Cc: Lukasz Dorau <[email protected]> Cc: Maciej Patelczyk <[email protected]> Cc: Dave Jiang <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: fix drivers/ieee802154/Cesar Eduardo Barros1-1/+1
This directory was moved to drivers/net/ieee802154/ by commit 31d178bffcff ("drivers/ieee802154: move ieee802154 drivers to net folder"). Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Alexander Smirnov <[email protected]> Cc: Dmitry Eremin-Solenikov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: fix .../plat-mxc/include/mach/imxfb.hCesar Eduardo Barros1-1/+1
This file was moved to include/linux/platform_data/video-imxfb.h by commit 82906b13a6f4 ("ARM: imx: move platform_data definitions"). Signed-off-by: Cesar Eduardo Barros <[email protected]> Acked-by: Sascha Hauer <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: remove drivers/video/epson1355fb.cCesar Eduardo Barros1-6/+0
This driver was removed by commit 1c3a918f78b7 ("ARM: clps711x: Remove board support for CEIVA"). Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Christopher Hoover <[email protected]> Cc: Christopher Hoover <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: fix drivers/media/usb/dvb-usb/cxusb*Cesar Eduardo Barros1-1/+1
This driver was never at dvb-usb-v2, as far as I could see. Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Michael Krufky <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: adjust for UAPICesar Eduardo Barros1-41/+115
Several headers were moved or split to uapi/. Signed-off-by: Cesar Eduardo Barros <[email protected]> Acked-by: David Howells <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: fix drivers/media/platform/atmel-isi.cCesar Eduardo Barros1-1/+1
This file was moved to drivers/media/platform/soc_camera/atmel-isi.c by commit b47ff4a3ed42 ("[media] move soc_camera to its own directory"). Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: Josh Wu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: fix arch/arm/mach-at91/include/mach/at_hdmac.hCesar Eduardo Barros1-1/+1
This file was moved to include/linux/platform_data/dma-atmel.h by commit 7cdc39eeadf1 ("ARM: at91: move platform_data definitions"). Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Nicolas Ferre <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: fix drivers/rtc/rtc-vt8500.cCesar Eduardo Barros1-1/+1
Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Tony Prisk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: remove arch/arm/plat-s5p/Cesar Eduardo Barros1-3/+1
These files were merged into plat-samsung. Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Ben Dooks <[email protected]> Acked-by: Kukjin Kim <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: remove arch/arm/common/time-acorn.cCesar Eduardo Barros1-1/+0
This file was moved to arch/arm/mach-rpc/time.c by commit a1be5d649699 ("ARM: riscpc: move time-acorn.c to mach-rpc"), and the pattern for arch/arm/mach-rpc/ already exists. Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Russell King <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: remove drivers/platform/msm/Cesar Eduardo Barros1-1/+0
This subdirectory entry was added by commit 8a5700cd6754 ("MAINTAINERS: add drivers/platform/msm to MSM subsystem") back in 2011, but I could not find any trace of that directory being ever added to the repository. Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Kenneth Heitke <[email protected]> Acked-by: David Brown <[email protected]> Cc: Daniel Walker <[email protected]> Cc: Bryan Huntsman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04mm: limit mmu_gather batching to fix soft lockups on !CONFIG_PREEMPTMichal Hocko2-0/+14
Since commit e303297e6c3a ("mm: extended batches for generic mmu_gather") we are batching pages to be freed until either tlb_next_batch cannot allocate a new batch or we are done. This works just fine most of the time but we can get in troubles with non-preemptible kernel (CONFIG_PREEMPT_NONE or CONFIG_PREEMPT_VOLUNTARY) on large machines where too aggressive batching might lead to soft lockups during process exit path (exit_mmap) because there are no scheduling points down the free_pages_and_swap_cache path and so the freeing can take long enough to trigger the soft lockup. The lockup is harmless except when the system is setup to panic on softlockup which is not that unusual. The simplest way to work around this issue is to limit the maximum number of batches in a single mmu_gather. 10k of collected pages should be safe to prevent from soft lockups (we would have 2ms for one) even if they are all freed without an explicit scheduling point. This patch doesn't add any new explicit scheduling points because it relies on zap_pmd_range during page tables zapping which calls cond_resched per PMD. The following lockup has been reported for 3.0 kernel with a huge process (in order of hundreds gigs but I do know any more details). BUG: soft lockup - CPU#56 stuck for 22s! [kernel:31053] Modules linked in: af_packet nfs lockd fscache auth_rpcgss nfs_acl sunrpc mptctl mptbase autofs4 binfmt_misc dm_round_robin dm_multipath bonding cpufreq_conservative cpufreq_userspace cpufreq_powersave pcc_cpufreq mperf microcode fuse loop osst sg sd_mod crc_t10dif st qla2xxx scsi_transport_fc scsi_tgt netxen_nic i7core_edac iTCO_wdt joydev e1000e serio_raw pcspkr edac_core iTCO_vendor_support acpi_power_meter rtc_cmos hpwdt hpilo button container usbhid hid dm_mirror dm_region_hash dm_log linear uhci_hcd ehci_hcd usbcore usb_common scsi_dh_emc scsi_dh_alua scsi_dh_hp_sw scsi_dh_rdac scsi_dh dm_snapshot pcnet32 mii edd dm_mod raid1 ext3 mbcache jbd fan thermal processor thermal_sys hwmon cciss scsi_mod Supported: Yes CPU 56 Pid: 31053, comm: kernel Not tainted 3.0.31-0.9-default #1 HP ProLiant DL580 G7 RIP: 0010: _raw_spin_unlock_irqrestore+0x8/0x10 RSP: 0018:ffff883ec1037af0 EFLAGS: 00000206 RAX: 0000000000000e00 RBX: ffffea01a0817e28 RCX: ffff88803ffd9e80 RDX: 0000000000000200 RSI: 0000000000000206 RDI: 0000000000000206 RBP: 0000000000000002 R08: 0000000000000001 R09: ffff887ec724a400 R10: 0000000000000000 R11: dead000000200200 R12: ffffffff8144c26e R13: 0000000000000030 R14: 0000000000000297 R15: 000000000000000e FS: 00007ed834282700(0000) GS:ffff88c03f200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 000000000068b240 CR3: 0000003ec13c5000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process kernel (pid: 31053, threadinfo ffff883ec1036000, task ffff883ebd5d4100) Call Trace: release_pages+0xc5/0x260 free_pages_and_swap_cache+0x9d/0xc0 tlb_flush_mmu+0x5c/0x80 tlb_finish_mmu+0xe/0x50 exit_mmap+0xbd/0x120 mmput+0x49/0x120 exit_mm+0x122/0x160 do_exit+0x17a/0x430 do_group_exit+0x3d/0xb0 get_signal_to_deliver+0x247/0x480 do_signal+0x71/0x1b0 do_notify_resume+0x98/0xb0 int_signal+0x12/0x17 DWARF2 unwinder stuck at int_signal+0x12/0x17 Signed-off-by: Michal Hocko <[email protected]> Cc: <[email protected]> [3.0+] Cc: Mel Gorman <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Peter Zijlstra <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04mm: fix zone_watermark_ok_safe() accounting of isolated pagesBartlomiej Zolnierkiewicz3-59/+2
Commit 702d1a6e0766 ("memory-hotplug: fix kswapd looping forever problem") added an isolated pageblocks counter (nr_pageblock_isolate in struct zone) and used it to adjust free pages counter in zone_watermark_ok_safe() to prevent kswapd looping forever problem. Then later, commit 2139cbe627b8 ("cma: fix counting of isolated pages") fixed accounting of isolated pages in global free pages counter. It made the previous zone_watermark_ok_safe() fix unnecessary and potentially harmful (cause now isolated pages may be accounted twice making free pages counter incorrect). This patch removes the special isolated pageblocks counter altogether which fixes zone_watermark_ok_safe() free pages check. Reported-by: Tomasz Stanislawski <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Cc: Minchan Kim <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Aaditya Kumar <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Marek Szyprowski <[email protected]> Cc: Michal Nazarewicz <[email protected]> Cc: Hugh Dickins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04Documentation/sysctl/kernel.txt: document /proc/sys/shmallCarlos Alberto Lopez Perez1-0/+13
Signed-off-by: Carlos Alberto Lopez Perez <[email protected]> Cc: Rob Landley <[email protected]> Cc: Larry Finger <[email protected]> Cc: Neil Horman <[email protected]> Cc: Mitsuo Hayasaka <[email protected]> Cc: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04ipc: add more comments to message copying related codeStanislav Kinsbursky1-0/+8
Signed-off-by: Stanislav Kinsbursky <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: James Morris <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04ipc: simplify message copyingStanislav Kinsbursky2-16/+14
Remove the redundant and confusing fill_copy(). Also add copy_msg() check for error. In this case exit from the function have to be done instead of break, because further code interprets any error as EAGAIN. Also define copy_msg() for the case when CONFIG_CHECKPOINT_RESTORE is disabled. Signed-off-by: Stanislav Kinsbursky <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: James Morris <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04ipc: convert prepare_copy() from macro to functionStanislav Kinsbursky1-2/+9
This code works if CONFIG_CHECKPOINT_RESTORE is disabled. [[email protected]: remove __maybe_unused] Signed-off-by: Stanislav Kinsbursky <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: James Morris <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04ipc: simplify free_copy() callStanislav Kinsbursky1-6/+8
Passing and checking of msgflg to free_copy() is redundant. This patch sets copy to NULL on declaration instead and checks for non-NULL in free_copy(). Note: in case of copy allocation failure, error is returned immediately. So no need to check for IS_ERR() in free_copy(). Signed-off-by: Stanislav Kinsbursky <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: James Morris <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04selftests: IPC message queue copy feature testStanislav Kinsbursky4-2/+275
This test can be used to check wheither kernel supports IPC message queue copy and restore features (required by CRIU project). Signed-off-by: Stanislav Kinsbursky <[email protected]> Cc: Serge Hallyn <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Pavel Emelyanov <[email protected]> Cc: Al Viro <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Michael Kerrisk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04ipc: introduce message queue copy featureStanislav Kinsbursky4-2/+102
This patch is required for checkpoint/restore in userspace. c/r requires some way to get all pending IPC messages without deleting them from the queue (checkpoint can fail and in this case tasks will be resumed, so queue have to be valid). To achive this, new operation flag MSG_COPY for sys_msgrcv() system call was introduced. If this flag was specified, then mtype is interpreted as number of the message to copy. If MSG_COPY is set, then kernel will allocate dummy message with passed size, and then use new copy_msg() helper function to copy desired message (instead of unlinking it from the queue). Notes: 1) Return -ENOSYS if MSG_COPY is specified, but CONFIG_CHECKPOINT_RESTORE is not set. Signed-off-by: Stanislav Kinsbursky <[email protected]> Cc: Serge Hallyn <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Pavel Emelyanov <[email protected]> Cc: Al Viro <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Michael Kerrisk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04ipc: message queue receive cleanupStanislav Kinsbursky3-49/+45
Move all message related manipulation into one function msg_fill(). Actually, two functions because of the compat one. [[email protected]: checkpatch fixes] Signed-off-by: Stanislav Kinsbursky <[email protected]> Cc: Serge Hallyn <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Pavel Emelyanov <[email protected]> Cc: Al Viro <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Michael Kerrisk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04ipc: add sysctl to specify desired next object idStanislav Kinsbursky5-4/+65
Add 3 new variables and sysctls to tune them (by one "next_id" variable for messages, semaphores and shared memory respectively). This variable can be used to set desired id for next allocated IPC object. By default it's equal to -1 and old behaviour is preserved. If this variable is non-negative, then desired idr will be extracted from it and used as a start value to search for free IDR slot. Notes: 1) this patch doesn't guarantee that the new object will have desired id. So it's up to user space how to handle new object with wrong id. 2) After a sucessful id allocation attempt, "next_id" will be set back to -1 (if it was non-negative). [[email protected]: checkpatch fixes] Signed-off-by: Stanislav Kinsbursky <[email protected]> Cc: Serge Hallyn <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Pavel Emelyanov <[email protected]> Cc: Al Viro <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Michael Kerrisk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04ipc: remove forced assignment of selected messageStanislav Kinsbursky1-4/+1
This is a cleanup patch. The assignment is redundant. Signed-off-by: Stanislav Kinsbursky <[email protected]> Cc: Serge Hallyn <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Pavel Emelyanov <[email protected]> Cc: Al Viro <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Michael Kerrisk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04drivers/rtc/rtc-tegra.c: convert to DT driverJoseph Lo1-0/+7
After Kernel 3.7, the Tegra device will only support booting with DT. The legacy Tegra RTC platform driver will not work anymore. This patch converts the driver to support DT. Signed-off-by: Joseph Lo <[email protected]> Cc: Stephen Warren <[email protected]> Cc: Joseph Lo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>