aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* x86/numa: Add constraints check for nid parametersPetr Holasek2011-12-09
| | | | | | | | | | | | | | | | | | This patch adds constraint checks to the numa_set_distance() function. When the check triggers (this should not happen normally) it emits a warning and avoids a store to a negative index in numa_distance[] array - i.e. avoids memory corruption. Negative ids can be passed when the pxm-to-nids mapping is not properly filled while parsing the SRAT. Signed-off-by: Petr Holasek <pholasek@redhat.com> Acked-by: David Rientjes <rientjes@google.com> Cc: Anton Arapov <anton@redhat.com> Link: http://lkml.kernel.org/r/20111208121640.GA2229@dhcp-27-244.brq.redhat.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
* mm, x86: Remove debug_pagealloc_enabledStanislaw Gruszka2011-12-06
| | | | | | | | | | | | | | | | | | | When (no)bootmem finish operation, it pass pages to buddy allocator. Since debug_pagealloc_enabled is not set, we will do not protect pages, what is not what we want with CONFIG_DEBUG_PAGEALLOC=y. To fix remove debug_pagealloc_enabled. That variable was introduced by commit 12d6f21e "x86: do not PSE on CONFIG_DEBUG_PAGEALLOC=y" to get more CPA (change page attribude) code testing. But currently we have CONFIG_CPA_DEBUG, which test CPA. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Mel Gorman <mgorman@suse.de> Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/1322582711-14571-1-git-send-email-sgruszka@redhat.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86/mm: Initialize high mem before free_all_bootmem()Stanislaw Gruszka2011-12-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | Patch fixes a boot crash with pagealloc debugging enabled: Initializing HighMem for node 0 (000377fe:0003fff0) BUG: unable to handle kernel paging request at f6fefe80 IP: [<c1621ab5>] find_range_array+0x5e/0x69 [...] Call Trace: [<c1622064>] __get_free_all_memory_range+0x39/0xb4 [<c1620dd0>] add_highpages_with_active_regions+0x18/0x9b [<c1621a2e>] set_highmem_pages_init+0x70/0x90 [<c162122b>] mem_init+0x50/0x21b [<c16155bd>] start_kernel+0x1bf/0x31c [<c1615065>] i386_start_kernel+0x65/0x67 The crash happens when memblock wants to allocate big area for temporary "struct range" array and reuses pages from top of low memory, which were already passed to the buddy allocator. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Cc: linux-mm@kvack.org Cc: Mel Gorman <mgorman@suse.de> Link: http://lkml.kernel.org/r/20111206080833.GB3105@redhat.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
* arch/x86/kernel/e820.c: quiet sparse noise about plain integer as NULL pointerH Hartley Sweeten2011-12-05
| | | | | | | | | | | | | The last parameter to sort() is a pointer to the function used to swap items. This parameter should be NULL, not 0, when not used. This quiets the following sparse warning: warning: Using plain integer as NULL pointer Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: hartleys@visionengravers.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
* arch/x86/kernel/e820.c: Eliminate bubble sort from sanitize_e820_map()Mike Ditto2011-12-05
| | | | | | | | | | | | | | | | | | Replace the bubble sort in sanitize_e820_map() with a call to the generic kernel sort function to avoid pathological performance with large maps. On large (thousands of entries) E820 maps, the previous code took minutes to run; with this change it's now milliseconds. Signed-off-by: Mike Ditto <mditto@google.com> Cc: sassmann@kpanic.de Cc: yuenn@google.com Cc: Stefan Assmann <sassmann@kpanic.de> Cc: Nancy Yuen <yuenn@google.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: Fix mmap random address rangeLudwig Nussel2011-12-05
| | | | | | | | | | | | | | | | | | | On x86_32 casting the unsigned int result of get_random_int() to long may result in a negative value. On x86_32 the range of mmap_rnd() therefore was -255 to 255. The 32bit mode on x86_64 used 0 to 255 as intended. The bug was introduced by 675a081 ("x86: unify mmap_{32|64}.c") in January 2008. Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: harvey.harrison@gmail.com Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Link: http://lkml.kernel.org/r/201111152246.pAFMklOB028527@wpaz5.hot.corp.google.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, mm: Unify zone_sizes_init()Pekka Enberg2011-11-11
| | | | | | | | | | | | Now that zone_sizes_init() is identical on 32-bit and 64-bit, move the code to arch/x86/mm/init.c and use it for both architectures. Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Pekka Enberg <penberg@kernel.org> Link: http://lkml.kernel.org/r/1320155902-10424-7-git-send-email-penberg@kernel.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, mm: Prepare zone_sizes_init() for unificationPekka Enberg2011-11-11
| | | | | | | | | | | Make 32-bit and 64-bit zone_sizes_init() identical in preparation for unification. Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Pekka Enberg <penberg@kernel.org> Link: http://lkml.kernel.org/r/1320155902-10424-6-git-send-email-penberg@kernel.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, mm: Use max_low_pfn for ZONE_NORMAL on 64-bitPekka Enberg2011-11-11
| | | | | | | | | | | | 64-bit has no highmem so max_low_pfn is always the same as 'max_pfn'. Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Yinghai Lu <yinghai@kernel.org> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Pekka Enberg <penberg@kernel.org> Link: http://lkml.kernel.org/r/1320155902-10424-5-git-send-email-penberg@kernel.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, mm: Wrap ZONE_DMA32 with CONFIG_ZONE_DMA32Pekka Enberg2011-11-11
| | | | | | | | | | | | | In preparation for unifying 32-bit and 64-bit zone_sizes_init() make sure ZONE_DMA32 is wrapped in CONFIG_ZONE_DMA32. Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Yinghai Lu <yinghai@kernel.org> Acked-by: David Rientjes <rientjes@google.com> Acked-by: Arun Sharma <asharma@fb.com> Signed-off-by: Pekka Enberg <penberg@kernel.org> Link: http://lkml.kernel.org/r/1320155902-10424-4-git-send-email-penberg@kernel.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, mm: Use max_pfn instead of highend_pfnPekka Enberg2011-11-11
| | | | | | | | | | | The 'highend_pfn' variable is always set to 'max_pfn' so just use the latter directly. Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Pekka Enberg <penberg@kernel.org> Link: http://lkml.kernel.org/r/1320155902-10424-3-git-send-email-penberg@kernel.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, mm: Move zone init from paging_init() on 64-bitPekka Enberg2011-11-11
| | | | | | | | | | | | This patch introduces a zone_sizes_init() helper function on 64-bit to make it more similar to 32-bit init. Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Yinghai Lu <yinghai@kernel.org> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Pekka Enberg <penberg@kernel.org> Link: http://lkml.kernel.org/r/1320155902-10424-2-git-send-email-penberg@kernel.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, mm: Use MAX_DMA_PFN for ZONE_DMA on 32-bitPekka Enberg2011-11-11
| | | | | | | | | | | | Use MAX_DMA_PFN which represents the 16 MB ISA DMA limit on 32-bit x86 just like we do on 64-bit. Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Yinghai Lu <yinghai@kernel.org> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Pekka Enberg <penberg@kernel.org> Link: http://lkml.kernel.org/r/1320155902-10424-1-git-send-email-penberg@kernel.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
* Revert "proc: fix races against execve() of /proc/PID/fd**"Linus Torvalds2011-11-09
| | | | | | | | | | | | | This reverts commit aa6afca5bcaba8101f3ea09d5c3e4100b2b9f0e5. It escalates of some of the google-chrome SELinux problems with ptrace ("Check failed: pid_ > 0. Did not find zygote process"), and Andrew says that it is also causing mystery lockdep reports. Reported-by: Alex Villacís Lasso <a_villacis@palosanto.com> Requested-by: James Morris <jmorris@namei.org> Requested-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'for-linus' of ↵Linus Torvalds2011-11-08
|\ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: drivers/media: video/a5k6aa is a module and so needs module.h mfd: fix build failures in recently added ab5500 code hwspinlock/u8500: include linux/module.h MTD: MAPS: bcm963xx-flash.c: explicitly include module.h
| * drivers/media: video/a5k6aa is a module and so needs module.hPaul Gortmaker2011-11-08
| | | | | | | | | | | | | | This file uses core functions like module_init() and module_exit() and so it explicitly needs to include the module.h header. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
| * mfd: fix build failures in recently added ab5500 codePaul Gortmaker2011-11-07
| | | | | | | | | | | | | | | | | | These files had implicit dependencies on modular support which now show up as build failures with the module cleanup work merged to mainline. Reported-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
| * hwspinlock/u8500: include linux/module.hAxel Lin2011-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include module.h to fix below build error: CC drivers/hwspinlock/u8500_hsem.o drivers/hwspinlock/u8500_hsem.c:177: error: 'THIS_MODULE' undeclared here (not in a function) [...] drivers/hwspinlock/u8500_hsem.c:196: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR' drivers/hwspinlock/u8500_hsem.c:196: warning: function declaration isn't a prototype make[2]: *** [drivers/hwspinlock/u8500_hsem.o] Error 1 make[1]: *** [drivers/hwspinlock] Error 2 make: *** [drivers] Error 2 Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
| * MTD: MAPS: bcm963xx-flash.c: explicitly include module.hJonas Gorski2011-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | module.h was previously implicitly included through mtd/mtd.h. Fixes the following build failure after the module.h cleanup: CC drivers/mtd/maps/bcm963xx-flash.o drivers/mtd/maps/bcm963xx-flash.c: In function 'bcm963xx_probe': drivers/mtd/maps/bcm963xx-flash.c:208:29: error: 'THIS_MODULE' undeclared (first use in this function) [...] drivers/mtd/maps/bcm963xx-flash.c:276:1: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR' drivers/mtd/maps/bcm963xx-flash.c:276:15: warning: function declaration isn't a prototype make[7]: *** [drivers/mtd/maps/bcm963xx-flash.o] Error 1 Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* | Merge branch 'for-linus' of git://neil.brown.name/mdLinus Torvalds2011-11-08
|\ \ | | | | | | | | | | | | | | | * 'for-linus' of git://neil.brown.name/md: md/raid5: STRIPE_ACTIVE has lock semantics, add barriers md/raid5: abort any pending parity operations when array fails.
| * | md/raid5: STRIPE_ACTIVE has lock semantics, add barriersDan Williams2011-11-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All updates that occur under STRIPE_ACTIVE should be globally visible when STRIPE_ACTIVE clears. test_and_set_bit() implies a barrier, but clear_bit() does not. This is suitable for 3.1-stable. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: NeilBrown <neilb@suse.de> Cc: stable@kernel.org
| * | md/raid5: abort any pending parity operations when array fails.NeilBrown2011-11-08
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the number of failed devices exceeds the allowed number we must abort any active parity operations (checks or updates) as they are no longer meaningful, and can lead to a BUG_ON in handle_parity_checks6. This bug was introduce by commit 6c0069c0ae9659e3a91b68eaed06a5c6c37f45c8 in 2.6.29. Reported-by: Manish Katiyar <mkatiyar@gmail.com> Tested-by: Manish Katiyar <mkatiyar@gmail.com> Acked-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: NeilBrown <neilb@suse.de> Cc: stable@kernel.org
* | Merge branch 'docs-move' of ↵Linus Torvalds2011-11-08
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs * 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs: (45 commits) DocBook/drm: Clean up a todo-note DocBook/drm: `device aware' -> `device-aware' DocBook/drm: `(device|driver) specific' -> `(device|driver)-specific' DocBook/drm: Clean up the paragraph on framebuffer objects DocBook/drm: Use `; otherwise,' DocBook/drm: Better flow with `, and then' DocBook/drm: Refer to the domain-setting function as a device-specific ioctl DocBook/drm: Improve flow of GPU/CPU coherence sentence DocBook/drm: Use an <itemizelist> for fundamental GEM operations DocBook/drm: Insert a comma DocBook/drm: Use a <variablelist> for vblank ioctls DocBook/drm: Use an itemizedlist for what an encoder needs to provide DocBook/drm: Insert `the' for readability, and change `set' to `setting' DocBook/drm: Remove extraneous commas DocBook/drm: Use a colon DocBook/drm: Clarify `final initialization' via better formatting DocBook/drm: Remove redundancy DocBook/drm: Insert `it' for smooth reading DocBook/drm: The word `so-called'; I do not think it connotes what you think it connotes DocBook/drm: Use a singular subject for grammatical cleanliness ...
| * \ Merge branch 'docs/docbook/drm' of git://github.com/mfwitten/linux into ↵Randy Dunlap2011-11-07
| |\ \ | | | | | | | | | | | | docs-move
| | * | DocBook/drm: Clean up a todo-noteMichael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: `device aware' -> `device-aware'Michael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: `(device|driver) specific' -> `(device|driver)-specific'Michael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: Clean up the paragraph on framebuffer objectsMichael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: Use `; otherwise,'Michael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: Better flow with `, and then'Michael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: Refer to the domain-setting function as a device-specific ioctlMichael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: Improve flow of GPU/CPU coherence sentenceMichael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: Use an <itemizelist> for fundamental GEM operationsMichael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: Insert a commaMichael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: Use a <variablelist> for vblank ioctlsMichael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: Use an itemizedlist for what an encoder needs to provideMichael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: Insert `the' for readability, and change `set' to `setting'Michael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: Remove extraneous commasMichael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: Use a colonMichael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: Clarify `final initialization' via better formattingMichael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: Remove redundancyMichael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: Insert `it' for smooth readingMichael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: The word `so-called'; I do not think it connotes what you think ↵Michael Witten2011-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it connotes From Webster's Revised Unabridged Dictionary (1913) [web1913]: So-called \So"-called`\, a. So named; called by such a name (but perhaps called thus with doubtful propriety). From WordNet (r) 2.0 [wn]: so-called adj : doubtful or suspect; "these so-called experts are no help" [syn: {alleged(a)}, {supposed}] My strong conviction is that widespread use of 'so gennant' or 'sogennant' in German has led to the creeping misuse of 'so-called' in English (especially through technical writings). In English, it would be better to use: what is called or a better translation of 'so gennant': so named Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: Use a singular subject for grammatical cleanlinessMichael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: basic -> coreMichael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: Streamline wording of GEM initializationMichael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: Insert `()' after function nameMichael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: Remove parentheses and unnecessary repetitionMichael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: Insert missing commaMichael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>
| | * | DocBook/drm: , -> :Michael Witten2011-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Michael Witten <mfwitten@gmail.com>