26 Oct, 2007
1 commit
-
The __deprecated marker is quite useful in highlighting the remnants of
old APIs that want removing.However, it is quite normal for one or more years to pass, before the
(usually ancient, bitrotten) code in question is either updated or
deleted.Thus, like __must_check, add a Kconfig option that permits the silencing
of this compiler warning.This change mimics the ifdef-ery and Kconfig defaults of MUST_CHECK as
closely as possible.Signed-off-by: Jeff Garzik
Signed-off-by: Linus Torvalds
23 Oct, 2007
3 commits
-
* git://git.infradead.org/mtd-2.6:
[MTD] [NOR] Fix deadlock in Intel chip driver caused by get_chip recursion
[JFFS2] Fix return value from jffs2_write_end()
[MTD] [OneNAND] Fix wrong free the static address in onenand_sim
[MTD] [NAND] Replace -1 with -EBADMSG in nand error correction code
[RSLIB] BUG() when passing illegal parameters to decode_rs8() or decode_rs16()
[MTD] [NAND] treat any negative return value from correct() as an error
[MTD] [NAND] nandsim: bugfix in initialization
[MTD] Fix typo in Alauda config option help text.
[MTD] [NAND] add s3c2440-specific read_buf/write_buf
[MTD] [OneNAND] onenand-sim: fix kernel-doc and typos
[JFFS2] Tidy up fix for ACL/permissions problem. -
Add a Kconfig entry which will toggle some sanity checks on the sg
entry and tables.Signed-off-by: Jens Axboe
-
Signed-off-by: Jens Axboe
21 Oct, 2007
2 commits
-
Magic numerical values are just bad style. Particularly so when
undocumented.Signed-off-by: Jörn Engel
Signed-off-by: David Woodhouse -
Returning -ERANGE should never happen.
Signed-off-by: Jörn Engel
Signed-off-by: David Woodhouse
20 Oct, 2007
8 commits
-
Spelling fix in lib/.
Signed-off-by: Simon Arlott
Signed-off-by: Adrian Bunk -
Replace an irrelevant include of bug.h with the more appropriate
includes of slab.h and module.h.it's not as if the original inclusion is an error, it's simply not
related to the contents of that source file, while the other two are.compile-tested on i386.
Signed-off-by: Robert P. J. Day
Signed-off-by: Adrian Bunk -
Fix the various misspellings of "system", controller", "interrupt" and
"[un]necessary".Signed-off-by: Robert P. J. Day
Signed-off-by: Adrian Bunk -
Begin infrastructure for kernel code samples in the samples/ directory.
Add its Kconfig and Kbuild files.
Source its Kconfig file in all arch/ Kconfigs.Signed-off-by: Randy Dunlap
Signed-off-by: Mathieu Desnoyers
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Some of the per-cpu counters and thus their locks are accessed from IRQ
contexts. This can cause a deadlock if it interrupts a cpu-offline thread
which is transferring a dead-cpu's counts to the global counter.Add appropriate IRQ protection in the cpu-hotplug callback path.
Signed-off-by: Gautham R Shenoy
Cc: KAMEZAWA Hiroyuki
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The task_struct->pid member is going to be deprecated, so start
using the helpers (task_pid_nr/task_pid_vnr/task_pid_nr_ns) in
the kernel.The first thing to start with is the pid, printed to dmesg - in
this case we may safely use task_pid_nr(). Besides, printks produce
more (much more) than a half of all the explicit pid usage.[akpm@linux-foundation.org: git-drm went and changed lots of stuff]
Signed-off-by: Pavel Emelyanov
Cc: Dave Airlie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
remove asm/bitops.h includes
including asm/bitops directly may cause compile errors. don't include it
and include linux/bitops instead. next patch will deny including asm header
directly.Cc: Adrian Bunk
Signed-off-by: Jiri Slaby
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Cause writes to cpuset "cpus" file to update cpus_allowed for member tasks:
- collect batches of tasks under tasklist_lock and then call
set_cpus_allowed() on them outside the lock (since this can sleep).- add a simple generic priority heap type to allow efficient collection
of batches of tasks to be processed without duplicating or missing any
tasks in subsequent batches.- make "cpus" file update a no-op if the mask hasn't changed
- fix race between update_cpumask() and sched_setaffinity() by making
sched_setaffinity() post-check that it's not running on any cpus outside
cpuset_cpus_allowed().[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Paul Menage
Cc: Paul Jackson
Cc: David Rientjes
Cc: Nick Piggin
Cc: Peter Zijlstra
Cc: Balbir Singh
Cc: Cedric Le Goater
Cc: "Eric W. Biederman"
Cc: Serge Hallyn
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
19 Oct, 2007
1 commit
-
To be consistent with the use of attributes in the rest of the kernel
replace all use of __attribute_pure__ with __pure and delete the definition
of __attribute_pure__.Signed-off-by: Ralf Baechle
Cc: Russell King
Acked-by: Mauro Carvalho Chehab
Cc: Bryan Wu
Cc: Paul Mackerras
Cc: Benjamin Herrenschmidt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
18 Oct, 2007
1 commit
-
* 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block:
[SCSI] Remove full sg table memset()
[SCSI] ide-scsi: remove usage of sg_last()
Fix loop terminating conditions in fill_sg().
[BLOCK] Clear sg entry before filling in blk_rq_map_sg()
IA64: iommu uses sg_next with an invalid sg element
cciss: disable DMA refetch on Smart Array P600
swiotlb: fix map_sg failure handling
SPARC64: fix iommu sg chaining
[SCSI] ide-scsi: use scsi_sg_count() instead of ->use_sg
17 Oct, 2007
23 commits
-
Be explicit about printing hex.
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Negative shifts are not allowed in C (the result is undefined). Same thing
with full-width shifts.It works on most platforms but not on the VAX with gcc 4.0.1 (it results in an
"operand reserved" fault).Shifting by more than the width of the value on the left is also not
allowed. I think the extra '>> 1' tacked on at the end in the original
code was an attempt to work around that. Getting rid of that is an extra
feature of this patch.Here's the chapter and verse, taken from the final draft of the C99
standard ("6.5.7 Bitwise shift operators", paragraph 3):"The integer promotions are performed on each of the operands. The
type of the result is that of the promoted left operand. If the
value of the right operand is negative or is greater than or equal
to the width of the promoted left operand, the behavior is
undefined."Thank you to Jan-Benedict Glaw, Christoph Hellwig, Maciej Rozycki, Pekka
Enberg, Andreas Schwab, and Christoph Lameter for review. Special thanks
to Andreas for spotting that my fix only removed half the undefined
behaviour.Signed-off-by: Peter Lund
Christoph Lameter
Cc: Christoph Hellwig
Cc: "Maciej W. Rozycki"
Cc: Pekka Enberg
Cc: Andreas Schwab
Cc: Nick Piggin
Cc: WU Fengguang
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Various architectures may call bust_spinlocks() recursively; the function
itself, however, doesn't appear to be meant to be called in this manner.
Nevertheless, this doesn't appear to be a problem as long as
bust_spinlocks(0) doesn't get called twice in a row (otherwise,
unblank_screen() may enter the scheduler). However, at least on i386 die()
has been capable of returning (and on other architectures this should
really be that way, too) when notify_die() returns NOTIFY_STOP.Short of getting a reply to a respective query, this patch makes
bust_spinlocks() increment/decrement oops_in_progress, and wake klogd only
when the count drops back to zero.Signed-off-by: Jan Beulich
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Hello, I fixed and tested a small bug in lib/sort.c file, heap sort
function.The fix avoids unnecessary swap of contents when i is 0 (saves few loads
and stores), which happens every time sort function is called. I felt the
fix is worth bringing it to your attention given the importance and
frequent use of the sort function.Acked-by: Matt Mackall
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Every file should include the headers containing the prototypes for its global
functions (in this case ioremap_page_range()).Signed-off-by: Adrian Bunk
Acked-by: Haavard Skinnemoen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
It would be nice if the argv_split library function could gracefully handle
a NULL pointer in the argcp parameter, so as to allow functions using it
that did not care about the value of argc to not have to declare a useless
variable. This patch accomplishes that. Tested by me, with successful
results.Signed-off-by: Neil Horman
Acked-by: Jeremy Fitzhardinge
Cc: Satyam Sharma
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Slab constructors currently have a flags parameter that is never used. And
the order of the arguments is opposite to other slab functions. The object
pointer is placed before the kmem_cache pointer.Convert
ctor(void *object, struct kmem_cache *s, unsigned long flags)
to
ctor(struct kmem_cache *s, void *object)
throughout the kernel
[akpm@linux-foundation.org: coupla fixes]
Signed-off-by: Christoph Lameter
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Given a set of objects, floating proportions aims to efficiently give the
proportional 'activity' of a single item as compared to the whole set. Where
'activity' is a measure of a temporal property of the items.It is efficient in that it need not inspect any other items of the set
in order to provide the answer. It is not even needed to know how many
other items there are.It has one parameter, and that is the period of 'time' over which the
'activity' is measured.Signed-off-by: Peter Zijlstra
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
provide a way to tell lockdep about percpu_counters that are supposed to be
used from irq safe contexts.Signed-off-by: Peter Zijlstra
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
alloc_percpu can fail, propagate that error.
Signed-off-by: Peter Zijlstra
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Provide an accurate version of percpu_counter_read.
Signed-off-by: Peter Zijlstra
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
s/percpu_counter_sum/&_positive/
Because its consitent with percpu_counter_read*
Signed-off-by: Peter Zijlstra
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Provide a method to set a percpu counter to a specified value.
Signed-off-by: Peter Zijlstra
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
percpu_counter is a s64 counter, make _add consitent.
Signed-off-by: Peter Zijlstra
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Because the current batch setup has an quadric error bound on the counter,
allow for an alternative setup.Signed-off-by: Peter Zijlstra
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
s/percpu_counter_mod/percpu_counter_add/
Because its a better name, _mod implies modulo.
Signed-off-by: Peter Zijlstra
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
sg list elements might not be continuous.
Signed-off-by: FUJITA Tomonori
Signed-off-by: Jens Axboe -
* 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block: (63 commits)
Fix memory leak in dm-crypt
SPARC64: sg chaining support
SPARC: sg chaining support
PPC: sg chaining support
PS3: sg chaining support
IA64: sg chaining support
x86-64: enable sg chaining
x86-64: update pci-gart iommu to sg helpers
x86-64: update nommu to sg helpers
x86-64: update calgary iommu to sg helpers
swiotlb: sg chaining support
i386: enable sg chaining
i386 dma_map_sg: convert to using sg helpers
mmc: need to zero sglist on init
Panic in blk_rq_map_sg() from CCISS driver
remove sglist_len
remove blk_queue_max_phys_segments in libata
revert sg segment size ifdefs
Fixup u14-34f ENABLE_SG_CHAINING
qla1280: enable use_sg_chaining option
... -
This patch marks a number of allocations that are either short-lived such as
network buffers or are reclaimable such as inode allocations. When something
like updatedb is called, long-lived and unmovable kernel allocations tend to
be spread throughout the address space which increases fragmentation.This patch groups these allocations together as much as possible by adding a
new MIGRATE_TYPE. The MIGRATE_RECLAIMABLE type is for allocations that can be
reclaimed on demand, but not moved. i.e. they can be migrated by deleting
them and re-reading the information from elsewhere.Signed-off-by: Mel Gorman
Cc: Andy Whitcroft
Cc: Christoph Lameter
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
A while back, Nick Piggin introduced a patch to reduce the node memory
usage for small files (commit cfd9b7df4abd3257c9e381b0e445817b26a51c0c):-#define RADIX_TREE_MAP_SHIFT 6
+#define RADIX_TREE_MAP_SHIFT (CONFIG_BASE_SMALL ? 4 : 6)Unfortunately, he didn't take into account the fact that the
calculation of the maximum path was based on an assumption of having
to round up:#define RADIX_TREE_MAX_PATH (RADIX_TREE_INDEX_BITS/RADIX_TREE_MAP_SHIFT + 2)
So, if CONFIG_BASE_SMALL is set, you will end up with a
RADIX_TREE_MAX_PATH that is one greater than necessary. The practical
upshot of this is just a bit of wasted memory (one long in the
height_to_maxindex array, an extra pre-allocated radix tree node per
cpu, and extra stack usage in a couple of functions), but it seems
worth getting right.It's also worth noting that I never build with CONFIG_BASE_SMALL.
What I did to test this was duplicate the code in a small user-space
program and check the results of the calculations for max path and the
contents of the height_to_maxindex array.Signed-off-by: Jeff Moyer
Acked-by: Nick Piggin
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Rather than sign direct radix-tree pointers with a special bit, sign the
indirect one that hangs off the root. This means that, given a lookup_slot
operation, the invalid result will be differentiated from the valid
(previously, valid results could have the bit either set or clear).This does not affect slot lookups which occur under lock -- they can never
return an invalid result. Is needed in future for lockless pagecache.Signed-off-by: Nick Piggin
Acked-by: Peter Zijlstra
Cc: Hugh Dickins
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Introduce radix_tree_next_hole(root, index, max_scan) to scan radix tree for
the first hole. It will be used in interleaved readahead.The implementation is dumb and obviously correct. It can help debug(and
document) the possible smart one in future.Cc: Nick Piggin
Signed-off-by: Fengguang Wu
Cc: Rusty Russell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Optionally add a boot delay after each kernel printk() call, crudely
measured in milliseconds, with a maximum delay of 10 seconds per printk.Enable CONFIG_BOOT_PRINTK_DELAY=y and then add (e.g.):
"lpj=loops_per_jiffy boot_delay=100"
to the kernel command line.It has been useful in cases like "during boot, my machine just reboots or the
screen goes black" by slowing down printk, (and adding initcall_debug), we can
usually see the last thing that happened before the lights went out which is
usually a valuable clue.[akpm@linux-foundation.org: not all architectures implement CONFIG_HZ]
[akpm@linux-foundation.org: fix lots of stuff]
[bunk@stusta.de: kernel/printk.c: make 2 variables static]
[heiko.carstens@de.ibm.com: fix slow down printk on boot compile error]
Signed-off-by: Randy Dunlap
Signed-off-by: Dave Jones
Signed-off-by: Adrian Bunk
Signed-off-by: Heiko Carstens
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
16 Oct, 2007
1 commit
-
Signed-off-by: Jens Axboe