aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* Merge branch 'devel' of ↵Linus Torvalds2010-10-24
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/edac * 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/edac: (25 commits) i7300_edac: Properly initialize per-csrow memory size V4L/DVB: i7300_edac: better initialize page counts MAINTAINERS: Add maintainer for i7300-edac driver i7300-edac: CodingStyle cleanup i7300_edac: Improve comments i7300_edac: Cleanup: reorganize the file contents i7300_edac: Properly detect channel on CE errors i7300_edac: enrich FBD error info for corrected errors i7300_edac: enrich FBD error info for fatal errors i7300_edac: pre-allocate a buffer used to prepare err messages i7300_edac: Fix MTR x4/x8 detection logic i7300_edac: Make the debug messages coherent with the others i7300_edac: Cleanup: remove get_error_info logic i7300_edac: Add a code to cleanup error registers i7300_edac: Add support for reporting FBD errors i7300_edac: Properly detect the type of error correction i7300_edac: Detect if the device is on single mode i7300_edac: Adds detection for enhanced scrub mode on x8 i7300_edac: Clear the error bit after reading i7300_edac: Add error detection code for global errors ...
| * i7300_edac: Properly initialize per-csrow memory sizeMauro Carvalho Chehab2010-09-24
| | | | | | | | | | | | | | | | | | Due to the current edac-core limits, we cannot represent a per-channel memory size, for FB-DIMM drivers. So, we need to sum-up all values for each slot, in order to properly represent the total amount of memory found by the i7300 driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB: i7300_edac: better initialize page countsMauro Carvalho Chehab2010-09-24
| | | | | | | | | | | | | | | | It is still somewhat fake, as the pages may not be on this exact order, and may even be used in mirror mode, but this is a best guess than the other random fake values. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * MAINTAINERS: Add maintainer for i7300-edac driverMauro Carvalho Chehab2010-09-22
| | | | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300-edac: CodingStyle cleanupMauro Carvalho Chehab2010-08-30
| | | | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: Improve commentsMauro Carvalho Chehab2010-08-30
| | | | | | | | | | | | | | | | | | This is basically a cleanup patch, improving the comments for each function. While here, do a few cleanups. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: Cleanup: reorganize the file contentsMauro Carvalho Chehab2010-08-30
| | | | | | | | | | | | | | | | This change should do no functional change. It just rearranges the contents of the c file, in order to make easier to understand and maintain it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: Properly detect channel on CE errorsMauro Carvalho Chehab2010-08-30
| | | | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: enrich FBD error info for corrected errorsMauro Carvalho Chehab2010-08-30
| | | | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: enrich FBD error info for fatal errorsMauro Carvalho Chehab2010-08-30
| | | | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: pre-allocate a buffer used to prepare err messagesMauro Carvalho Chehab2010-08-30
| | | | | | | | | | | | | | | | | | Instead of dynamically allocating a buffer for it where needed, just allocate it once. As we'll use the same buffer also during fatal and non-fatal errors, is is very risky to dynamically allocate it during an error. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: Fix MTR x4/x8 detection logicMauro Carvalho Chehab2010-08-30
| | | | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: Make the debug messages coherent with the othersMauro Carvalho Chehab2010-08-30
| | | | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: Cleanup: remove get_error_info logicMauro Carvalho Chehab2010-08-30
| | | | | | | | | | | | | | | | As the error logic in this driver came from i5400 driver, it were using one function to get errors, and another to display. Let's make it simpler and avoid doing it into two steps. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: Add a code to cleanup error registersMauro Carvalho Chehab2010-08-30
| | | | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: Add support for reporting FBD errorsMauro Carvalho Chehab2010-08-30
| | | | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: Properly detect the type of error correctionMauro Carvalho Chehab2010-08-30
| | | | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: Detect if the device is on single modeMauro Carvalho Chehab2010-08-30
| | | | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: Adds detection for enhanced scrub mode on x8Mauro Carvalho Chehab2010-08-30
| | | | | | | | | | | | | | While here, do some cleanup by adding some macros to check for device features. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: Clear the error bit after readingMauro Carvalho Chehab2010-08-30
| | | | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: Add error detection code for global errorsMauro Carvalho Chehab2010-08-30
| | | | | | | | | | | | | | | | There's no mention at the datasheet about how to enable global error reporting. So, I'm assuming that those errors are always enabled. Maybe I'm plain wrong about that ;) Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: Better name PCI devicesMauro Carvalho Chehab2010-08-30
| | | | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: Add a FIXME note about the error correction typeMauro Carvalho Chehab2010-08-30
| | | | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: add global error registersMauro Carvalho Chehab2010-08-30
| | | | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: display info if ECC is enabled or notMauro Carvalho Chehab2010-08-30
| | | | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i7300_edac: start a driver for i7300 chipset (Clarksboro)Mauro Carvalho Chehab2010-08-30
| | | | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | Merge branch 'for-linus' of ↵Linus Torvalds2010-10-24
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6: (27 commits) SLUB: Fix memory hotplug with !NUMA slub: Move functions to reduce #ifdefs slub: Enable sysfs support for !CONFIG_SLUB_DEBUG SLUB: Optimize slab_free() debug check slub: Move NUMA-related functions under CONFIG_NUMA slub: Add lock release annotation slub: Fix signedness warnings slub: extract common code to remove objects from partial list without locking SLUB: Pass active and inactive redzone flags instead of boolean to debug functions slub: reduce differences between SMP and NUMA Revert "Slub: UP bandaid" percpu: clear memory allocated with the km allocator percpu: use percpu allocator on UP too percpu: reduce PCPU_MIN_UNIT_SIZE to 32k vmalloc: pcpu_get/free_vm_areas() aren't needed on UP SLUB: Fix merged slab cache names Slub: UP bandaid slub: fix SLUB_RESILIENCY_TEST for dynamic kmalloc caches slub: Fix up missing kmalloc_cache -> kmem_cache_node case for memoryhotplug slub: Add dummy functions for the !SLUB_DEBUG case ...
| * \ Merge branch 'master' into for-linusPekka Enberg2010-10-24
| |\ \ | | | | | | | | | | | | | | | | | | | | Conflicts: include/linux/percpu.h mm/percpu.c
| * | | SLUB: Fix memory hotplug with !NUMAPekka Enberg2010-10-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following build breakage when memory hotplug is enabled on UMA configurations: /home/test/linux-2.6/mm/slub.c: In function 'kmem_cache_init': /home/test/linux-2.6/mm/slub.c:3031:2: error: 'slab_memory_callback' undeclared (first use in this function) /home/test/linux-2.6/mm/slub.c:3031:2: note: each undeclared identifier is reported only once for each function it appears in make[2]: *** [mm/slub.o] Error 1 make[1]: *** [mm] Error 2 make: *** [sub-make] Error 2 Reported-by: Zimny Lech <napohybelskurwysynom2010@gmail.com> Acked-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
| * | | slub: Move functions to reduce #ifdefsChristoph Lameter2010-10-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a lot of #ifdef/#endifs that can be avoided if functions would be in different places. Move them around and reduce #ifdef. Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
| * | | slub: Enable sysfs support for !CONFIG_SLUB_DEBUGChristoph Lameter2010-10-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently disabling CONFIG_SLUB_DEBUG also disabled SYSFS support meaning that the slabs cannot be tuned without DEBUG. Make SYSFS support independent of CONFIG_SLUB_DEBUG Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
| * | | SLUB: Optimize slab_free() debug checkPekka Enberg2010-10-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch optimizes slab_free() debug check to use "c->node != NUMA_NO_NODE" instead of "c->node >= 0" because the former generates smaller code on x86-64: Before: 4736: 48 39 70 08 cmp %rsi,0x8(%rax) 473a: 75 26 jne 4762 <kfree+0xa2> 473c: 44 8b 48 10 mov 0x10(%rax),%r9d 4740: 45 85 c9 test %r9d,%r9d 4743: 78 1d js 4762 <kfree+0xa2> After: 4736: 48 39 70 08 cmp %rsi,0x8(%rax) 473a: 75 23 jne 475f <kfree+0x9f> 473c: 83 78 10 ff cmpl $0xffffffffffffffff,0x10(%rax) 4740: 74 1d je 475f <kfree+0x9f> This patch also cleans up __slab_alloc() to use NUMA_NO_NODE instead of "-1" for enabling debugging for a per-CPU cache. Acked-by: Christoph Lameter <cl@linux.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
| * | | slub: Move NUMA-related functions under CONFIG_NUMANamhyung Kim2010-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make kmalloc_cache_alloc_node_notrace(), kmalloc_large_node() and __kmalloc_node_track_caller() to be compiled only when CONFIG_NUMA is selected. Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
| * | | slub: Add lock release annotationNamhyung Kim2010-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unfreeze_slab() releases page's PG_locked bit but was missing proper annotation. The deactivate_slab() needs to be marked also since it calls unfreeze_slab() without grabbing the lock. Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
| * | | slub: Fix signedness warningsNamhyung Kim2010-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bit-ops routines require its arg to be a pointer to unsigned long. This leads sparse to complain about different signedness as follows: mm/slub.c:2425:49: warning: incorrect type in argument 2 (different signedness) mm/slub.c:2425:49: expected unsigned long volatile *addr mm/slub.c:2425:49: got long *map Acked-by: Christoph Lameter <cl@linux.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
| * | | slub: extract common code to remove objects from partial list without lockingChristoph Lameter2010-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a couple of places where repeat the same statements when removing a page from the partial list. Consolidate that into __remove_partial(). Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
| * | | SLUB: Pass active and inactive redzone flags instead of boolean to debug ↵Christoph Lameter2010-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functions Pass the actual values used for inactive and active redzoning to the functions that check the objects. Avoids a lot of the ? : things to lookup the values in the functions. Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
| * | | slub: reduce differences between SMP and NUMAChristoph Lameter2010-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce the #ifdefs and simplify bootstrap by making SMP and NUMA as much alike as possible. This means that there will be an additional indirection to get to the kmem_cache_node field under SMP. Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
| * | | Revert "Slub: UP bandaid"Pekka Enberg2010-10-02
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5249d039500f05a5ab379286b1d23ab9b04d3f2c. It's not needed after commit bbddff0545878a8649c091a9dd7c43ce91516734 ("percpu: use percpu allocator on UP too").
| * | | percpu: clear memory allocated with the km allocatorTejun Heo2010-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Percpu allocator should clear memory before returning it but the km allocator forgot to do it. Fix it. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Peter Zijlstra <peterz@infradead.org>
| * | | percpu: use percpu allocator on UP tooTejun Heo2010-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On UP, percpu allocations were redirected to kmalloc. This has the following problems. * For certain amount of allocations (determined by PERCPU_DYNAMIC_EARLY_SLOTS and PERCPU_DYNAMIC_EARLY_SIZE), percpu allocator can be used before the usual kernel memory allocator is brought online. On SMP, this is used to initialize the kernel memory allocator. * percpu allocator honors alignment upto PAGE_SIZE but kmalloc() doesn't. For example, workqueue makes use of larger alignments for cpu_workqueues. Currently, users of percpu allocators need to handle UP differently, which is somewhat fragile and ugly. Other than small amount of memory, there isn't much to lose by enabling percpu allocator on UP. It can simply use kernel memory based chunk allocation which was added for SMP archs w/o MMUs. This patch removes mm/percpu_up.c, builds mm/percpu.c on UP too and makes UP build use percpu-km. As percpu addresses and kernel addresses are always identity mapped and static percpu variables don't need any special treatment, nothing is arch dependent and mm/percpu.c implements generic setup_per_cpu_areas() for UP. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Pekka Enberg <penberg@cs.helsinki.fi>
| * | | percpu: reduce PCPU_MIN_UNIT_SIZE to 32kTejun Heo2010-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation of enabling percpu allocator for UP, reduce PCPU_MIN_UNIT_SIZE to 32k. On UP, the first chunk doesn't have to include static percpu variables and chunk size can be smaller which is important as UP percpu allocator will use contiguous kernel memory to populate chunks. PCPU_MIN_UNIT_SIZE also determines the maximum supported allocation size but 32k should still be enough. Signed-off-by: Tejun Heo <tj@kernel.org>
| * | | vmalloc: pcpu_get/free_vm_areas() aren't needed on UPTejun Heo2010-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These functions are used only by percpu memory allocator on SMP. Don't build them on UP. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Nick Piggin <npiggin@kernel.dk>
| * | | SLUB: Fix merged slab cache namesPekka Enberg2010-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As explained by Linus "I'm Proud to be an American" Torvalds: Looking at the merging code, I actually think it's totally buggy. If you have something like this: - load module A: create slab cache A - load module B: create slab cache B that can merge with A - unload module A - "cat /proc/slabinfo": BOOM. Oops. exactly because the name is not handled correctly, and you'll have module B holding open a slab cache that has a name pointer that points to module A that no longer exists. This patch fixes the problem by using kstrdup() to allocate dynamic memory for ->name of "struct kmem_cache" as suggested by Christoph Lameter. Acked-by: Christoph Lameter <cl@linux.com> Cc: David Rientjes <rientjes@google.com> Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Pekka Enberg <penberg@kernel.org> Conflicts: mm/slub.c
| * | | Slub: UP bandaidChristoph Lameter2010-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the percpu allocator does not provide early allocation in UP mode (only in SMP configurations) use __get_free_page() to improvise a compound page allocation that can be later freed via kfree(). Compound pages will be released when the cpu caches are resized. Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
| * | | slub: fix SLUB_RESILIENCY_TEST for dynamic kmalloc cachesDavid Rientjes2010-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the kmalloc_caches array is dynamically allocated at boot, SLUB_RESILIENCY_TEST needs to be fixed to pass the correct type. Acked-by: Christoph Lameter <cl@linux.com> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
| * | | slub: Fix up missing kmalloc_cache -> kmem_cache_node case for memoryhotplugChristoph Lameter2010-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Memory hotplug allocates and frees per node structures. Use the correct name. Acked-by: David Rientjes <rientjes@google.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
| * | | slub: Add dummy functions for the !SLUB_DEBUG caseChristoph Lameter2010-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Wed, 25 Aug 2010, Randy Dunlap wrote: > mm/slub.c:1732: error: implicit declaration of function 'slab_pre_alloc_hook' > mm/slub.c:1751: error: implicit declaration of function 'slab_post_alloc_hook' > mm/slub.c:1881: error: implicit declaration of function 'slab_free_hook' > mm/slub.c:1886: error: implicit declaration of function 'slab_free_hook_irq' Empty functions are missing if the runtime debuggability option is compiled out. Provide the fall back functions to empty hooks if SLUB_DEBUG is not set. Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
| * | | slob: fix gfp flags for order-0 page allocationsDavid Rientjes2010-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kmalloc_node() may allocate higher order slob pages, but the __GFP_COMP bit is only passed to the page allocator and not represented in the tracepoint event. The bit should be passed to trace_kmalloc_node() as well. Acked-by: Matt Mackall <mpm@selenic.com> Reviewed-by: Christoph Lameter <cl@linux.com> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
| * | | slub: Move gfpflag masking out of the hotpathChristoph Lameter2010-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the gfpflags masking into the hooks for checkers and into the slowpaths. gfpflag masking requires access to a global variable and thus adds an additional cacheline reference to the hotpaths. If no hooks are active then the gfpflag masking will result in code that the compiler can toss out. Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: Pekka Enberg <penberg@kernel.org>