aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-05-07mm/vmalloc.c: add vfree commentAndrew Morton1-0/+2
Cc: Al Viro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-05-07remove unused random32() and srandom32()Akinobu Mita1-7/+0
After finishing a naming transition, remove unused backward compatibility wrapper macros Signed-off-by: Akinobu Mita <[email protected]> Cc: "Theodore Ts'o" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-05-07drivers/infiniband/hw: rename random32() to prandom_u32()Andrew Morton4-6/+6
Use preferable function name which implies using a pseudo-random number generator. Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-05-07drivers/net: rename random32() to prandom_u32()Akinobu Mita7-9/+9
Use preferable function name which implies using a pseudo-random number generator. [[email protected]: convert team_mode_random.c] Signed-off-by: Akinobu Mita <[email protected]> Acked-by: Thomas Sailer <[email protected]> Acked-by: Bing Zhao <[email protected]> [mwifiex] Cc: "David S. Miller" <[email protected]> Cc: Michael Chan <[email protected]> Cc: Thomas Sailer <[email protected]> Cc: Jean-Paul Roubelat <[email protected]> Cc: Bing Zhao <[email protected]> Cc: Brett Rudley <[email protected]> Cc: Arend van Spriel <[email protected]> Cc: "Franky (Zhenhui) Lin" <[email protected]> Cc: Hante Meuleman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-05-07hugetlbfs: fix mmap failure in unaligned size requestNaoya Horiguchi4-22/+34
The current kernel returns -EINVAL unless a given mmap length is "almost" hugepage aligned. This is because in sys_mmap_pgoff() the given length is passed to vm_mmap_pgoff() as it is without being aligned with hugepage boundary. This is a regression introduced in commit 40716e29243d ("hugetlbfs: fix alignment of huge page requests"), where alignment code is pushed into hugetlb_file_setup() and the variable len in caller side is not changed. To fix this, this patch partially reverts that commit, and adds alignment code in caller side. And it also introduces hstate_sizelog() in order to get proper hstate to specified hugepage size. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=56881 [[email protected]: fix warning when CONFIG_HUGETLB_PAGE=n] Signed-off-by: Naoya Horiguchi <[email protected]> Signed-off-by: Johannes Weiner <[email protected]> Reported-by: <[email protected]> Cc: Steven Truelove <[email protected]> Cc: Jianguo Wu <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-05-07parisc: remove the second argument of kmap_atomic()Zhao Hongjiang1-3/+3
kmap_atomic() requires only one argument now. Signed-off-by: Zhao Hongjiang <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: Helge Deller <[email protected]> Cc: Rolf Eike Beer <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-05-07drivers/rtc/rtc-rs5c372.c: add R2221T/L variant to the driverLucas Stach1-0/+5
Register layout is the same, so just add the variant to the appropriate places. Signed-off-by: Lucas Stach <[email protected]> Signed-off-by: Jan Luebbe <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-05-07include/linux/mm.h: complete the mm_walk definitionAndrew Morton1-7/+13
That nameless-function-arguments thing drives me batty. Fix. Cc: Dave Hansen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-05-07mm, memcg: add rss_huge stat to memory.statDavid Rientjes2-11/+29
This exports the amount of anonymous transparent hugepages for each memcg via the new "rss_huge" stat in memory.stat. The units are in bytes. This is helpful to determine the hugepage utilization for individual jobs on the system in comparison to rss and opportunities where MADV_HUGEPAGE may be helpful. The amount of anonymous transparent hugepages is also included in "rss" for backwards compatibility. Signed-off-by: David Rientjes <[email protected]> Acked-by: Michal Hocko <[email protected]> Acked-by: Johannes Weiner <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-05-07mm/SPARC: use common help functions to free reserved pagesJiang Liu3-68/+12
Use common help functions to free reserved pages. Signed-off-by: Jiang Liu <[email protected]> Acked-by: David S. Miller <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-05-07arm: fix mismerge of arch/arm/mach-omap2/timer.cLinus Torvalds1-0/+4
I badly screwed up the merge in commit 6fa52ed33bea ("Merge tag 'drivers-for-linus' of git://git.kernel.org/pub/.../arm-soc") by incorrectly taking the arch/arm/mach-omap2/* data fully from the merge target because the 'drivers-for-linus' branch seemed to be a proper superset of the duplicate ARM commits. That was bogus: commit ff931c821bab ("ARM: OMAP: clocks: Delay clk inits atleast until slab is initialized") only existed in head, and the changes to arch/arm/mach-omap2/timer.c from that commit got list. Re-doing the merge more carefully, I do think this part was the only thing I screwed up. Knock wood. Reported-by: Tony Lindgren <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Olof Johansson <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-05-07xfs: fallback to vmalloc for large buffers in xfs_compat_attrlist_by_handleEric Sandeen1-4/+10
Shamelessly copied from dchinner's: ad650f5b xfs: fallback to vmalloc for large buffers in xfs_attrmulti_attr_get xfsdump uses a large buffer for extended attributes, which has a kmalloc'd shadow buffer in the kernel. This can fail after the system has been running for some time as it is a high order allocation. Add a fallback to vmalloc so that it doesn't require contiguous memory and so won't randomly fail while xfsdump is running. This was done for xfs_attrlist_by_handle but xfs_compat_attrlist_by_handle (the 32-bit version) needs the same attention. Signed-off-by: Eric Sandeen <[email protected]> Reviewed-by: Mark Tinguely <[email protected]> Signed-off-by: Ben Myers <[email protected]>
2013-05-07xfs: fallback to vmalloc for large buffers in xfs_attrlist_by_handleEric Sandeen1-4/+10
Shamelessly copied from dchinner's: ad650f5b xfs: fallback to vmalloc for large buffers in xfs_attrmulti_attr_get xfsdump uses for a large buffer for extended attributes, which has a kmalloc'd shadow buffer in the kernel. This can fail after the system has been running for some time as it is a high order allocation. Add a fallback to vmalloc so that it doesn't require contiguous memory and so won't randomly fail while xfsdump is running. Signed-off-by: Eric Sandeen <[email protected]> Reviewed-by: Mark Tinguely <[email protected]> Signed-off-by: Ben Myers <[email protected]>
2013-05-07xfs: introduce CONFIG_XFS_WARNDave Chinner13-24/+63
Running a CONFIG_XFS_DEBUG kernel in production environments is not the best idea as it introduces significant overhead, can change the behaviour of algorithms (such as allocation) to improve test coverage, and (most importantly) panic the machine on non-fatal errors. There are many cases where all we want to do is run a kernel with more bounds checking enabled, such as is provided by the ASSERT() statements throughout the code, but without all the potential overhead and drawbacks. This patch converts all the ASSERT statements to evaluate as WARN_ON(1) statements and hence if they fail dump a warning and a stack trace to the log. This has minimal overhead and does not change any algorithms, and will allow us to find strange "out of bounds" problems more easily on production machines. There are a few places where assert statements contain debug only code. These are converted to be debug-or-warn only code so that we still get all the assert checks in the code. Signed-off-by: Dave Chinner <[email protected]> Reviewed-by: Brian Foster <[email protected]> Signed-off-by: Ben Myers <[email protected]>
2013-05-08Merge branch 'mips-next-3.10' of ↵Ralf Baechle1267-7643/+15312
git://git.linux-mips.org/pub/scm/john/linux-john into mips-for-linux-next
2013-05-08MIPS: BCM63XX: add missing clocks for BCM6328 and BCM6362Jonas Gorski1-8/+25
Add some mosty unused, but missing clocks for BCM6328 and BCM6362. This also fixes PCIe init on BCM6362. Signed-off-by: Jonas Gorski <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5200/ Acked-by: John Crispin <[email protected]>
2013-05-08MIPS: ath79: make use of the new memory detection codeJohn Crispin1-15/+1
There is now a generic function for detecting memory size. Use this instead of the one found in the ath79 support. Signed-off-by: John Crispin <[email protected]> Acked-by: Gabor Juhos <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5149/
2013-05-08MIPS: ralink: make use of the new memory detection codeJohn Crispin1-0/+9
Call detect_memory_region() from plat_mem_setup() unless the size was already read from the system controller. Signed-off-by: John Crispin <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5184/
2013-05-08MIPS: ralink: add memory definition for MT7620John Crispin2-0/+28
Populate struct soc_info with the data that describes our RAM window. Signed-off-by: John Crispin <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5183/
2013-05-08MIPS: ralink: add memory definition for RT3883John Crispin2-0/+8
Populate struct soc_info with the data that describes our RAM window. Signed-off-by: John Crispin <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5182/
2013-05-08MIPS: ralink: add memory definition for RT2880John Crispin2-0/+8
Populate struct soc_info with the data that describes our RAM window. Signed-off-by: John Crispin <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5181/
2013-05-08MIPS: ralink: add memory definition for RT305xJohn Crispin2-0/+51
Populate struct soc_info with the data that describes our RAM window. As memory detection fails on RT5350 we read the amount of available memory from the system controller. Signed-off-by: John Crispin <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5180/
2013-05-08MIPS: ralink: add memory definition to struct ralink_soc_infoJohn Crispin1-0/+5
Depending on the actual SoC we have a different base address as well as minimum and maximum size for RAM. Add these fields to the per SoC structure. Signed-off-by: John Crispin <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5179/
2013-05-08MIPS: add detect_memory_region()John Crispin2-0/+23
Add a generic way of detecting the available RAM. This function is based on the implementation already used by ath79. Signed-off-by: John Crispin <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5178/
2013-05-08DT: MIPS: ralink: add MT7620A dts filesJohn Crispin4-0/+79
Add a dtsi file for MT7620A SoC and a sample dts file. Signed-off-by: John Crispin <[email protected]> Acked-by: Grant Likely <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5190/
2013-05-08DT: MIPS: ralink: add RT3883 dts filesJohn Crispin4-0/+79
Add a dtsi file for RT3883 SoC and a sample dts file. Signed-off-by: John Crispin <[email protected]> Acked-by: Grant Likely <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5189/
2013-05-08DT: MIPS: ralink: add RT2880 dts filesJohn Crispin4-0/+109
Add a dtsi file for RT2880 SoC and a sample dts file. Signed-off-by: John Crispin <[email protected]> Acked-by: Grant Likely <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5188/
2013-05-08DT: MIPS: ralink: clean up RT3050 dtsi and dts fileJohn Crispin2-58/+4
* remove nodes for cores whose drivers are not upstream yet * add compat string for an additional soc * fix a whitespace error Signed-off-by: John Crispin <[email protected]> Acked-by: Grant Likely <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5186/
2013-05-08DT: add documentation for the Ralink MIPS SoCsGabor Juhos1-0/+17
This patch adds binding documentation for the compatible values of the Ralink MIPS SoCs. Signed-off-by: Gabor Juhos <[email protected]> Signed-off-by: John Crispin <[email protected]> Acked-by: Grant Likely <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5187/
2013-05-08DT: add vendor prefixes for RalinkJohn Crispin1-0/+1
Signed-off-by: John Crispin <[email protected]> Acked-by: Grant Likely <[email protected]>
2013-05-08MIPS: ralink: add cpu-feature-overrides.hGabor Juhos4-0/+170
Add cpu-feature-overrides.h for RT288x, RT305x and RT3883. Signed-off-by: Gabor Juhos <[email protected]> Signed-off-by: John Crispin <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5175/
2013-05-08MIPS: ralink: adds support for MT7620 SoC familyJohn Crispin5-0/+299
Add support code for mt7620 SOC. The code detects the SoC and registers the clk / pinmux settings. Signed-off-by: John Crispin <[email protected]> Acked-by: Gabor Juhos <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5177/
2013-05-08MIPS: ralink: adds support for RT3883 SoC familyJohn Crispin5-0/+501
Add support code for rt3883 SOC. The code detects the SoC and registers the clk / pinmux settings. Signed-off-by: John Crispin <[email protected]> Signed-off-by: Gabor Juhos <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5185/
2013-05-08MIPS: ralink: adds support for RT2880 SoC familyJohn Crispin6-1/+198
Add support code for rt2880 SOC. The code detects the SoC and registers the clk / pinmux settings. Signed-off-by: John Crispin <[email protected]> Signed-off-by: Gabor Juhos <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5176/
2013-05-08MIPS: ralink: add uart mask to struct ralink_pinmuxJohn Crispin2-2/+4
Add a field for the uart muxing mask and set it inside the rt305x setup code. Signed-off-by: John Crispin <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5744/
2013-05-08MIPS: ralink: add pci group to struct ralink_pinmuxGabor Juhos1-0/+3
This will be used for RT3662/RT3883. Signed-off-by: Gabor Juhos <[email protected]> Acked-by: John Crispin <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5173/
2013-05-08MIPS: ralink: make the RT305x pinmuxing structure staticJohn Crispin1-3/+3
These structures are exported via struct ralink_pinmux rt_gpio_pinmux and can hence be static. Signed-off-by: John Crispin <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5172/
2013-05-08MIPS: ralink: rename gpio_pinmux to rt_gpio_pinmuxJohn Crispin2-2/+2
Add proper namespacing to the variable. Signed-off-by: John Crispin <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5171/
2013-05-08MIPS: ralink: make early_printk work on RT2880John Crispin1-0/+4
RT2880 has a different location for the early serial port. Signed-off-by: John Crispin <[email protected]> Acked-by: Gabor Juhos <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5170/
2013-05-08MIPS: ralink: add RT5350 sdram register definesJohn Crispin1-0/+8
Add a few missing defines that are needed to make memory detection work on the RT5350. Signed-off-by: John Crispin <[email protected]> Acked-by: Gabor Juhos <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5169/
2013-05-08MIPS: ralink: add missing comment in irq driverJohn Crispin1-0/+1
Trivial patch that adds a comment that makes the code more readable. Signed-off-by: John Crispin <[email protected]> Acked-by: Gabor Juhos <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5168/
2013-05-08MIPS: ralink: fix RT305x clock setupJohn Crispin1-0/+12
Add a few missing clocks. Signed-off-by: John Crispin <[email protected]> Acked-by: Gabor Juhos <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5167/
2013-05-08MIPS: ralink: add RT3352 register definesJohn Crispin1-0/+13
Add a few missing defines that are needed to make USB and clock detection work on the RT3352. Signed-off-by: John Crispin <[email protected]> Acked-by: Gabor Juhos <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5166/
2013-05-08MIPS: ralink: add PCI IRQ handlingGabor Juhos1-0/+4
The Ralink IRQ code was not handling the PCI IRQ yet. Add this functionaility to make PCI work on rt3883. Signed-off-by: John Crispin <[email protected]> Signed-off-by: Gabor Juhos <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5165/
2013-05-08MIPS: move mips_{set,get}_machine_name() to a more generic placeJohn Crispin6-29/+39
Previously this functionality was only available to users of the mips_machine api. Moving the code to prom.c allows us to also add a OF wrapper. Signed-off-by: John Crispin <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5164/
2013-05-08MIPS: octeon: Fix GPIO number in IRQ chip private dataAlexander Sverdlin1-3/+2
Current GPIO chip implementation in octeon-irq is still broken, even after upstream commit 87161ccdc61862c8b49e75c21209d7f79dc758e9 (MIPS: Octeon: Fix broken interrupt controller code). It works for GPIO IRQs that have reset-default configuration, but not for edge-triggered ones. The problem is in octeon_irq_gpio_map_common(), which passes modified "hw" variable (which has range of possible values 16..31) as "gpio_line" parameter to octeon_irq_set_ciu_mapping(), which saves it in private data of the IRQ chip. Later, neither octeon_irq_gpio_setup() is able to re-configure GPIOs (cvmx_write_csr() is writing to non-existent CVMX_GPIO_BIT_CFGX), nor octeon_irq_ciu_gpio_ack() is able to acknowledge such IRQ, because "mask" is incorrect. Fix is trivial and has been tested on Cavium Octeon II -based board, including both level-triggered and edge-triggered GPIO IRQs. Signed-off-by: Alexander Sverdlin <[email protected]> Cc: David Daney <[email protected]> Acked-by: David Daney <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/4980/ Acked-by: John Crispin <[email protected]>
2013-05-08MIPS: pci: convert to devm_ioremap_resource()Silviu-Mihai Popescu2-12/+12
Convert all uses of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() which provides more consistent error handling. Signed-off-by: Silviu-Mihai Popescu <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/4986/ Acked-by: John Crispin <[email protected]>
2013-05-08MIPS: Remove unneeded volatile from arch/mips/lib/bitops.cDavid Daney1-7/+7
The operations on the bitmap pointers are protected by "memory" clobbering raw_local_irq_{save,restore}(), so there is no need for volatile here. By removing the volatile we get better code generation out of the compiler. Signed-off-by: David Daney <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/4966/ Acked-by: John Crispin <[email protected]>
2013-05-08MIPS: Init new mmu_context for each possible CPU to avoid memory corruptionHuacai Chen1-1/+1
Currently, init_new_context() only for each online CPU, this may cause memory corruption when CPU hotplug and fork() happens at the same time. To avoid this, we make init_new_context() cover each possible CPU. Scenario: 1, CPU#1 is being offline; 2, On CPU#0, do_fork() call dup_mm() and copy a mm_struct to the child; 3, On CPU#0, dup_mm() call init_new_context(), since CPU#1 is offline and init_new_context() only covers the online CPUs, child has the same asid as its parent on CPU#1 (however, child's asid should be 0); 4, CPU#1 is being online; 5, Now, if both parent and child run on CPU#1, memory corruption (e.g. segfault, bus error, etc.) will occur. Signed-off-by: Huacai Chen <[email protected]> Acked-by: David Daney <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/4995/ Acked-by: John Crispin <[email protected]>
2013-05-08MIPS: Build uasm-generated code only once to avoid CPU Hotplug problemHuacai Chen4-2/+22
This and the next patch resolve memory corruption problems while CPU hotplug. Without these patches, memory corruption can triggered easily as below: On a quad-core MIPS platform, use "spawn" of UnixBench-5.1.3 (http:// code.google.com/p/byte-unixbench/) and a CPU hotplug script like this (hotplug.sh): while true; do echo 0 >/sys/devices/system/cpu/cpu1/online echo 0 >/sys/devices/system/cpu/cpu2/online echo 0 >/sys/devices/system/cpu/cpu3/online sleep 1 echo 1 >/sys/devices/system/cpu/cpu1/online echo 1 >/sys/devices/system/cpu/cpu2/online echo 1 >/sys/devices/system/cpu/cpu3/online sleep 1 done Run "hotplug.sh" and then run "spawn 10000", spawn will get segfault after a few minutes. This patch: Currently, clear_page()/copy_page() are generated by Micro-assembler dynamically. But they are unavailable until uasm_resolve_relocs() has finished because jump labels are illegal before that. Since these functions are shared by every CPU, we only call build_clear_page()/ build_copy_page() only once at boot time. Without this patch, programs will get random memory corruption (segmentation fault, bus error, etc.) while CPU Hotplug (e.g. one CPU is using clear_page() while another is generating it in cpu_cache_init()). For similar reasons we modify build_tlb_refill_handler()'s invocation. V2: 1, Rework the code to make CPU#0 can be online/offline. 2, Introduce cpu_has_local_ebase feature since some types of MIPS CPU need a per-CPU tlb_refill_handler(). Signed-off-by: Huacai Chen <[email protected]> Signed-off-by: Hongbing Hu <[email protected]> Acked-by: David Daney <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/4994/ Acked-by: John Crispin <[email protected]>