summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* sysctl: don't use own implementation of hex_to_bin()Andy Shevchenko2010-05-251-6/+3
| | | | | | | | | Remove own implementation of hex_to_bin(). Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> Cc: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* usb: atm: speedtch: use new hex_to_bin() methodAndy Shevchenko2010-05-251-3/+2
| | | | | | | | | | | Instead of using own implementation which potentialy has bugs involve hex_to_bin() function. It requires to have hex_to_bin() implementation introduced by starter patch in series. Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> Cc: Duncan Sands <duncan.sands@free.fr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drivers: isdn: use new hex_to_bin() methodAndy Shevchenko2010-05-251-12/+1
| | | | | | | | | Remove own implementation of hex_to_bin(). Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> Acked-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* lib: introduce common method to convert hex digitsAndy Shevchenko2010-05-252-0/+20
| | | | | | | | | | | | | | | | | | | hex_to_bin() is a little method which converts hex digit to its actual value. There are plenty of places where such functionality is needed. [akpm@linux-foundation.org: use tolower(), saving 3 bytes, test the more common case first - it's quicker] [akpm@linux-foundation.org: relocate tolower to make it even faster! (Joe)] Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> Cc: Tilman Schmidt <tilman@imap.cc> Cc: Duncan Sands <duncan.sands@free.fr> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: "Richard Russon (FlatCap)" <ldm@flatcap.org> Cc: John W. Linville <linville@tuxdriver.com> Cc: Len Brown <lenb@kernel.org> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* lib/hexdump.c: reduce stack variable size and cleanupsJoe Perches2010-05-251-17/+19
| | | | | | | | | | | | | | | | | | | Reduce char linebuf[200] to the actual size required., which is 32 * 3 + 2 + 32 + 1, ie: linebuf[131]. Change examples to use bool true not int 1. Align multiline argument indentation to open parenthesis. Use temporary for ptr[j] so trigraph fits on single line. Convert printk ptr from %*p, (int)(2 * sizeof(void *)) to %p as %p uses the same calculation for size. Signed-off-by: Joe Perches <joe@perches.com> Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* DYNAMIC_DEBUG: fix documentation errorsFlorian Ragwitz2010-05-252-9/+9
| | | | | | | | [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Florian Ragwitz <rafl@debian.org> Cc: Jason Baron <jbaron@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* dynamic_debug: small cleanup in ddebug_proc_write()Dan Carpenter2010-05-251-1/+1
| | | | | | | | | | | This doesn't change behavior at all. In the original code, if nwords was zero then ddebug_parse_query() would return -EINVAL, now we just do it earlier. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* scripts/get_maintainer.pl: default to not include unspecified tagsFlorian Mickler2010-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the default of the option --git-all-signature-types to be disabled by default. The effect being, that only certain (currently Signed-Off-By:, Acked-by: and Reviewed-By:) tags are used to get adresses of potential maintainers. Motivated is this change by the desire to not 'spam' people unnecessary: A Tested-By or a Reported-By is not ment as a hint that those people want to/are able to review patches to the code in question. In a quest to find resilient statistics for this i came up with this: I produced a list of all the tag-signers not already covered with a signed-off/acked/reviewed tag somewhere in the last year of git history. Those were 650 addresses of "assumed non-developers". And to check if those "assumed non-developers" are professional testers/reporters worth cc'ing, i then counted their total appearences in the git log: 469 were mentioned only once. 123 were mentioned twice. 38 three times 8 four times 5 six times 5 five times 1 eight times 1 fourteen times I believe this supports my thesis, that the ''non-maintainer-tags'' are not actively useful for patch-review. (except probably the guy mentioned fourteen times...) But of course one could also find arguments to poke holes in this statistics, for example does this statistic not include code-locality: A tested-by on a patch that touches some specific piece of code can be more worth than a signed-off in another part of the tree. But... let's play it safe and let's err on the "safe" side meaning to not spam those people when in doubt. We already have the signed-off's and Maintainers file. So this should be ok. And if need be, the maintainers can always forward the patch. [i probably could make a diploma thesis out of this changelog :)] Signed-off-by: Florian Mickler <florian@mickler.org> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Joe Perches <joe@perches.com> Cc: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* scripts/get_maintainer.pl: add .get_maintainer.conf default options fileJoe Perches2010-05-251-1/+30
| | | | | | | | | | | | | | | | | | Allow the use of a .get_maintainer.conf file to control the default options applied when scripts/get_maintainer.pl is run. .get_maintainer.conf can contain any valid command-line argument. File contents are prepended to any additional command line arguments. Multiple lines may be used, blank lines ignored, # is a comment. Updated scripts/get_maintainer.pl version to 0.24 Signed-off-by: Joe Perches <joe@perches.com> Reviewed-by: Florian Mickler <florian@mickler.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* scripts/get_maintainer.pl: optionally ignore non-maintainer signaturesJoe Perches2010-05-251-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using --git to determine who to send a patch to, get_maintainers will currently include all signatures. This can include signers that simply report an issue or test a patch. Signers that use this tag are not necessarily good candidates to review new patches. This patch allows get_maintainers to optionally restrict output to only signatures that use Signed-off-by:, Acked-by:, or Reviewed-by:. Signed-off-by: is included because those are people who are responsible for the code. Acked-by: is questionable, but as signers that use this tag tend to be active linux gatekeepers, false positives are tolerable. Reviewed-by: is included because signers responsible for the code thought that the review feedback for a changeset by that signer was valuable. This patch has been modified from Florian's original submission to change the supported signature types to the canonical forms and use slightly different spacing. A couple of spacing issues were also corrected in the original source. The command line argument was also renamed. Original-patch-by: Florian Mickler <florian@mickler.org> Signed-off-by: Florian Mickler <florian@mickler.org> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* vsprintf.c: use noinline_for_stackJoe Perches2010-05-251-25/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark static functions with noinline_for_stack Before: akpm:/usr/src/25> objdump -d lib/vsprintf.o | perl scripts/checkstack.pl 0x00000e82 pointer [vsprintf.o]: 344 0x0000198c pointer [vsprintf.o]: 344 0x000025d6 scnprintf [vsprintf.o]: 216 0x00002648 scnprintf [vsprintf.o]: 216 0x00002565 snprintf [vsprintf.o]: 208 0x0000267c sprintf [vsprintf.o]: 208 0x000030a3 bprintf [vsprintf.o]: 208 0x00003b1e sscanf [vsprintf.o]: 208 0x00000608 number [vsprintf.o]: 136 0x00000937 number [vsprintf.o]: 136 After: akpm:/usr/src/25> objdump -d lib/vsprintf.o | perl scripts/checkstack.pl 0x00000a7c symbol_string [vsprintf.o]: 248 0x00000ae8 symbol_string [vsprintf.o]: 248 0x00002310 scnprintf [vsprintf.o]: 216 0x00002382 scnprintf [vsprintf.o]: 216 0x0000229f snprintf [vsprintf.o]: 208 0x000023b6 sprintf [vsprintf.o]: 208 0x00002ddd bprintf [vsprintf.o]: 208 0x00003858 sscanf [vsprintf.o]: 208 0x00000625 number [vsprintf.o]: 136 0x00000954 number [vsprintf.o]: 136 Signed-off-by: Joe Perches <joe@perches.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ad525x_dpot: add support for one time programmable potsMichael Hennerich2010-05-254-20/+150
| | | | | | | | | | New parts supported: AD5170, AD5171, AD5172, AD5173, AD5273 Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ad525x_dpot: add support for ADN2860 and AD528x potsMichael Hennerich2010-05-254-14/+26
| | | | | | | | | | New parts supported: AD5280, AD5282, ADN2860 Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ad525x_dpot: add support for AD524x potsMichael Hennerich2010-05-254-96/+175
| | | | | | | | | | New parts supported: AD5241, AD5242, AD5243, AD5245, AD5246, AD5247, AD5248 Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ad525x_dpot: add support for SPI partsMichael Hennerich2010-05-256-319/+806
| | | | | | | | | | | | | | | | | | Split the bus logic out into separate files so that we can handle I2C and SPI busses independently. The new SPI bus logic brings in support for a lot more parts: AD5160, AD5161, AD5162, AD5165, AD5200, AD5201, AD5203, AD5204, AD5206, AD5207, AD5231, AD5232, AD5233, AD5235, AD5260, AD5262, AD5263, AD5290, AD5291, AD5292, AD5293, AD7376, AD8400, AD8402, AD8403, ADN2850 [randy.dunlap@oracle.com: fix ad525X_dpot build] Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ad525x_dpot: extend write argument to 16bitsMichael Hennerich2010-05-251-2/+2
| | | | | | | | | The possible output data is 16bits, not 8bits, so don't truncate it. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ad525x_dpot: simplify duplicated sysfs definesMichael Hennerich2010-05-251-195/+43
| | | | | | | | | Macro away the duplication to make maintenance easier. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* module: remove duplicate declaration of __ksymtab_gpl_futureWenji Huang2010-05-251-2/+0
| | | | | | | | Minor cleanup on duplicate __{start/stop}__ksymtab_gpl_future. Signed-off-by: Wenji Huang <wenji.huang@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* fatfs: ratelimit corruption reportOGAWA Hirofumi2010-05-254-18/+31
| | | | | | Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ratelimit: add ratelimit_state_init()OGAWA Hirofumi2010-05-251-1/+12
| | | | | | | | | | | | | For now, all users of ratelimit_state allocates it statically, so DEFINE_RATELIMIT_STATE() is enough. But, I want to use ratelimit_state for fs, i.e. per super_block to suppress too many error reports. So, this adds ratelimit_state_init() to initialize ratelimite_state which is dynamically allocated, instead of opencoding. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* printk_ratelimited(): fix uninitialized spinlockOGAWA Hirofumi2010-05-251-8/+7
| | | | | | | | | | | ratelimit_state initialization of printk_ratelimited() seems broken. This fixes it by using DEFINE_RATELIMIT_STATE() to initialize spinlock properly. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drivers: misc: pass miscdevice pointer via file private dataSamu Onkalo2010-05-251-0/+1
| | | | | | | | | | | | | For misc devices, inode->i_cdev doesn't point to the device drivers own data. Link between file operations and device driver internal data is lost. Pass pointer to misc device struct via file private data for driver open function use. Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* include/asm-generic/kmap_types.h: add helpful reminderAndrew Morton2010-05-251-0/+3
| | | | | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* asm-generic: don't warn that atomic_t is only 24 bitPeter Fritzsche2010-05-251-6/+2
| | | | | | | | | | | | | | | | | | | 32-bit Sparc used to only allow usage of 24-bit of it's atomic_t type. This was corrected with linux 2.6.3 when Keith M Wesolowski changed the implementation to use the parisc approach of having an array of spinlocks to protect the atomic_t. These warnings were also removed from the sparc implementation when the new implementation was merged in BKrev:402e4949VThdc6D3iaosSFUgabMfvw, but the warning still remained in some other places without any 24-bit-only atomic_t implementation inside the kernel. We should remove these warnings to allow users to rely on the full 32-bit range of atomic_t. Signed-off-by: Peter Fritzsche <peter.fritzsche@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* kernel.h: add pr_warn for symmetry to dev_warn, netdev_warnJoe Perches2010-05-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current logging macros are pr_<level>, dev_<level>, netdev_<level>, and netif_<level>. pr_ uses warning, the other use warn. Standardize these logging macros a bit more by adding pr_warn and pr_warn_ratelimited. Right now, there are: $ for level in emerg alert crit err warn warning notice info ; do \ for prefix in pr dev netdev netif ; do \ echo -n "${prefix}_${level}: `git grep -w "${prefix}_${level}" | wc -l` " ; \ done ; \ echo ; \ done pr_emerg: 45 dev_emerg: 4 netdev_emerg: 1 netif_emerg: 4 pr_alert: 24 dev_alert: 36 netdev_alert: 1 netif_alert: 6 pr_crit: 24 dev_crit: 22 netdev_crit: 1 netif_crit: 4 pr_err: 2013 dev_err: 8467 netdev_err: 267 netif_err: 240 pr_warn: 0 dev_warn: 1818 netdev_warn: 126 netif_warn: 23 pr_warning: 773 dev_warning: 0 netdev_warning: 0 netif_warning: 0 pr_notice: 148 dev_notice: 111 netdev_notice: 9 netif_notice: 3 pr_info: 1717 dev_info: 3007 netdev_info: 101 netif_info: 85 Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ntfs: use add_to_page_cache_lru()Minchan Kim2010-05-251-15/+4
| | | | | | | | | | | | | | | | | | Quote from Nick piggin's about btrfs patch - http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg04472.html. "add_to_page_cache_lru is exported, so it should be used. Benefits over using a private pagevec: neater code, 128 bytes fewer stack used, percpu lru ordering is preserved, and finally don't need to flush pagevec before returning so batching may be shared with other LRU insertions." Let's use it instead of private pagevec in ntfs, too. Signed-off-by: Minchan Kim <minchan.kim@gmail.com> Acked-by: Anton Altaparmakov <aia21@cantab.net> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ntfs: clean up ntfs_attr_extend_initializedMinchan Kim2010-05-251-7/+2
| | | | | | | | | cached_page and lru_pvec have not been used. Let's remove the arguments. Signed-off-by: Minchan Kim <minchan.kim@gmail.com> Acked-by: Anton Altaparmakov <aia21@cantab.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sunrpc: use formatting of module name in SUNRPCAlex Riesen2010-05-251-4/+1
| | | | | | | | | | | | | gcc-4.3.3 produces the warning: "format not a string literal and no format arguments" Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Cc: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: Chuck Lever <cel@citi.umich.edu> Cc: David S. Miller <davem@davemloft.net> Acked-by: Tom Talpey <tmtalpey@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* hvsi: fix messed up error checking getting state namePhil Carmody2010-05-251-4/+2
| | | | | | | | | | | | Handle out-of-range indices before reading what they refer to. And don't access the one-past-the-end element of the array either. Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Roel Kluin <roel.kluin@gmail.com> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* kernel-wide: replace USHORT_MAX, SHORT_MAX and SHORT_MIN with USHRT_MAX, ↵Alexey Dobriyan2010-05-2521-41/+41
| | | | | | | | | | | | | | | | SHRT_MAX and SHRT_MIN - C99 knows about USHRT_MAX/SHRT_MAX/SHRT_MIN, not USHORT_MAX/SHORT_MAX/SHORT_MIN. - Make SHRT_MIN of type s16, not int, for consistency. [akpm@linux-foundation.org: fix drivers/dma/timb_dma.c] [akpm@linux-foundation.org: fix security/keys/keyring.c] Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* hangcheck-timer: fix x86_32 bugsYury Polyanskiy2010-05-251-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | drivers/char/hangcheck-timer.c is doubly broken. When the overflown value of TIMER_FREQ is abnormally low, it spams the syslog with KERN_CRIT messages "Hangcheck: hangcheck value past margin!" But whether it happens or not depends on HZ and lpj in a complex way. People have hit it occasionally as far as google search can tell. First, the following line overflows unsigned long: # define TIMER_FREQ (HZ*loops_per_jiffy) Second, and more importantly, loops_per_jiffy has little to do with the con= version from the the time scale of get_cycles() (aka rdtsc) to the time scale of jiffies. The attached patch resolves both of the problems. Acked-by: Joel Becker <joel.becker@oracle.com> Cc: john stultz <johnstul@us.ibm.com> Cc: Jan Glauber <jan.glauber@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* endian: #define __BYTE_ORDERJoakim Tjernlund2010-05-259-31/+8
| | | | | | | | | | | | | | | | | Linux does not define __BYTE_ORDER in its endian header files which makes some header files bend backwards to get at the current endian. Lets #define __BYTE_ORDER in big_endian.h/litte_endian.h to make it easier for header files that are used in user space too. In userspace the convention is that 1. _both_ __LITTLE_ENDIAN and __BIG_ENDIAN are defined, 2. you have to test for e.g. __BYTE_ORDER == __BIG_ENDIAN. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* err.h: add __must_check to error pointer handlersJani Nikula2010-05-251-5/+5
| | | | | | | | | | | | | | | | | | | Add __must_check to error pointer handlers to have the compiler warn about mistakes like: if (err) ERR_PTR(err); It found two bugs: Mar 12 Nikula Jani [PATCH] enclosure: fix error path - actually return ERR_PTR() on error Mar 12 Nikula Jani [PATCH] sunrpc: fix error path - actually return ERR_PTR() on error Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Cc: Phil Carmody <ext-phil.2.carmody@nokia.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cpuidle: add a repeating pattern detector to the menu governorArjan van de Ven2010-05-251-1/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the menu governor uses the (corrected) next timer as key item for predicting the idle duration. It turns out that there are specific cases where this breaks down: There are cases where we have a very repetitive pattern of idle durations, where the idle period is pretty much the same, for reasons completely unrelated to the next timer event. Examples of such repeating patterns are network loads with irq mitigation, the mouse moving but in theory also the wifi beacons. This patch adds a relatively simple detector for such repeating patterns, where the standard deviation of the last 8 idle periods is compared to a threshold. With this extra predictor in place, measurements show that the DECAY factor can now be increased (the decaying average will now decay slower) to get an even more stable result. [arjan@infradead.org: fix bug identified by Frank] Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Cc: Corrado Zoccolo <czoccolo@gmail.com> Cc: Frank Rowand <frank.rowand@am.sony.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mn10300: set ARCH_KMALLOC_MINALIGNFUJITA Tomonori2010-05-251-0/+2
| | | | | | | | | | | | | | Architectures that handle DMA-non-coherent memory need to set ARCH_KMALLOC_MINALIGN to make sure that kmalloc'ed buffer is DMA-safe: the buffer doesn't share a cache with the others. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: David Howells <dhowells@redhat.com> Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mn10300: use generic atomic.hMathieu Desnoyers2010-05-251-157/+1
| | | | | | | | | | | | | | | | | | | | | asm-generic/atomic.h has been derived from the mn10300 implementation. Remove the now duplicated mn10300 implementation by including the generic version instead. This adds cmpxchg_local() and cmpxchg64_local() for free to the architecture, as they are implemented in asm-generic/atomic.h. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Acked-by: David Howells <dhowells@redhat.com> Acked-by: Peter Fritzsche <peter.fritzsche@gmx.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Cc: Jamie Lokier <jamie@shareable.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Keith M Wesolowski <wesolows@foobazco.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* m68knommu: fix broken use of BUAD_TABLE_SIZE in 68328serial driverGreg Ungerer2010-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | Commit 8b505ca8e2600eb9e7dd2d6b2682a81717671374 ("serial: 68328serial.c: remove BAUD_TABLE_SIZE macro") misses one use of BAUD_TABLE_SIZE. So the resulting 68328serial.c does not compile: drivers/serial/68328serial.c: In function `m68328_console_setup': drivers/serial/68328serial.c:1439: error: `BAUD_TABLE_SIZE' undeclared (first use in this function) drivers/serial/68328serial.c:1439: error: (Each undeclared identifier is reported only once drivers/serial/68328serial.c:1439: error: for each function it appears in.) Fix that last use of it. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Cc: Thiago Farina <tfransosi@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* frv: set ARCH_KMALLOC_MINALIGNFUJITA Tomonori2010-05-251-0/+2
| | | | | | | | | | | | | Architectures that handle DMA-non-coherent memory need to set ARCH_KMALLOC_MINALIGN to make sure that kmalloc'ed buffer is DMA-safe: the buffer doesn't share a cache with the others. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: David Howells <dhowells@redhat.com> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* frv: extend gdbstub to support more features of gdbDavid Howells2010-05-253-2/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend gdbstub to support more features of gdb remote protocol to keep gdb-7 and emacs gud mode happy: (*) The D command. Detach debugger. (*) The H command. Handle setting the target thread by ignoring it. (*) The qAttached command. Indicate we 'attached' to an existing process. (*) The qC command. Indicate that the current thread ID is 0. (*) The qOffsets command. Indicate that no relocation has been done. (*) The qSymbol:: command. Indicate that we're not interested in looking up any symbol addresses. (*) The qSupported command. Indicate the maximum packet size and the fact that reverse step and continue aren't supported. (*) The vCont? command. Indicate that we don't support any of its variants. Also make it possible to trace the commands and replies without tracing the individual character I/O. [akpm@linux-foundation.org: make gdbstub_handle_query() static] Signed-off-by: David Howells <dhowells@redhat.com> Cc: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mm: make lowmem_page_address() use PFN_PHYS() for improved portabilityChris Metcalf2010-05-251-1/+2
| | | | | | | | | | This ensures that platforms with lowmem PAs above 32 bits work correctly by avoiding truncating the PA during a left shift. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Cc: Barry Song <21cnbao@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mem-hotplug: fix potential race while building zonelist for new populated zoneHaicheng Li2010-05-254-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add global mutex zonelists_mutex to fix the possible race: CPU0 CPU1 CPU2 (1) zone->present_pages += online_pages; (2) build_all_zonelists(); (3) alloc_page(); (4) free_page(); (5) build_all_zonelists(); (6) __build_all_zonelists(); (7) zone->pageset = alloc_percpu(); In step (3,4), zone->pageset still points to boot_pageset, so bad things may happen if 2+ nodes are in this state. Even if only 1 node is accessing the boot_pageset, (3) may still consume too much memory to fail the memory allocations in step (7). Besides, atomic operation ensures alloc_percpu() in step (7) will never fail since there is a new fresh memory block added in step(6). [haicheng.li@linux.intel.com: hold zonelists_mutex when build_all_zonelists] Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Reviewed-by: Andi Kleen <andi.kleen@intel.com> Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mem-hotplug: avoid multiple zones sharing same boot strapping boot_pagesetHaicheng Li2010-05-255-12/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For each new populated zone of hotadded node, need to update its pagesets with dynamically allocated per_cpu_pageset struct for all possible CPUs: 1) Detach zone->pageset from the shared boot_pageset at end of __build_all_zonelists(). 2) Use mutex to protect zone->pageset when it's still shared in onlined_pages() Otherwises, multiple zones of different nodes would share same boot strapping boot_pageset for same CPU, which will finally cause below kernel panic: ------------[ cut here ]------------ kernel BUG at mm/page_alloc.c:1239! invalid opcode: 0000 [#1] SMP ... Call Trace: [<ffffffff811300c1>] __alloc_pages_nodemask+0x131/0x7b0 [<ffffffff81162e67>] alloc_pages_current+0x87/0xd0 [<ffffffff81128407>] __page_cache_alloc+0x67/0x70 [<ffffffff811325f0>] __do_page_cache_readahead+0x120/0x260 [<ffffffff81132751>] ra_submit+0x21/0x30 [<ffffffff811329c6>] ondemand_readahead+0x166/0x2c0 [<ffffffff81132ba0>] page_cache_async_readahead+0x80/0xa0 [<ffffffff8112a0e4>] generic_file_aio_read+0x364/0x670 [<ffffffff81266cfa>] nfs_file_read+0xca/0x130 [<ffffffff8117b20a>] do_sync_read+0xfa/0x140 [<ffffffff8117bf75>] vfs_read+0xb5/0x1a0 [<ffffffff8117c151>] sys_read+0x51/0x80 [<ffffffff8103c032>] system_call_fastpath+0x16/0x1b RIP [<ffffffff8112ff13>] get_page_from_freelist+0x883/0x900 RSP <ffff88000d1e78a8> ---[ end trace 4bda28328b9990db ] [akpm@linux-foundation.org: merge fix] Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Reviewed-by: Andi Kleen <andi.kleen@intel.com> Reviewed-by: Christoph Lameter <cl@linux-foundation.org> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mem-hotplug: separate setup_per_cpu_pageset() into separate functionsWu Fengguang2010-05-251-17/+20
| | | | | | | | | | | | | | | | No behavior change here. Move some of setup_per_cpu_pageset() code into a new function setup_zone_pageset() that will be useful for memory hotplug. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com> Reviewed-by: Andi Kleen <andi.kleen@intel.com> Reviewed-by: Christoph Lameter <cl@linux-foundation.org> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mm: fix NR_SECTION_ROOTS == 0 when using using sparsemem extreme.Marcelo Roberto Jimenez2010-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Got this while compiling for ARM/SA1100: mm/sparse.c: In function '__section_nr': mm/sparse.c:135: warning: 'root' is used uninitialized in this function This patch follows Russell King's suggestion for a new calculation for NR_SECTION_ROOTS. Thanks also to Sergei Shtylyov for pointing out the existence of the macro DIV_ROUND_UP. Atsushi Nemoto observed: : This fix doesn't just silence the warning - it fixes a real problem. : : Without this fix, mem_section[] might have 0 size so mem_section[0] : will share other variable area. For example, I got: : : c030c700 b __warned.16478 : c030c700 B mem_section : c030c701 b __warned.16483 : : This might cause very strange behavior. Your patch actually fixes it. Signed-off-by: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br> Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Minchan Kim <minchan.kim@gmail.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Sergei Shtylyov <sshtylyov@mvista.com> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* highmem: remove unneeded #ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT for ↵Akinobu Mita2010-05-252-2/+2
| | | | | | | | | | | | | | | | | | | | debug_kmap_atomic() In f4112de6b679d84bd9b9681c7504be7bdfb7c7d5 ("mm: introduce debug_kmap_atomic") I said that debug_kmap_atomic() needs CONFIG_TRACE_IRQFLAGS_SUPPORT. It was wrong. (I thought irqs_disabled() is only available when the architecture has CONFIG_TRACE_IRQFLAGS_SUPPORT) Remove the #ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT check to enable kmap_atomic() debugging for the architectures which do not have CONFIG_TRACE_IRQFLAGS_SUPPORT. Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* include/linux/gfp.h: fix coding stylematt mooney2010-05-251-5/+5
| | | | | | | | | | | | | Add parenthesis in a define. This doesn't change functionality. checkpatch errors: 1) white space fixes 2) add spaces after comas Signed-off-by: matt mooney <mfm@muteddisk.com> Cc: Dan Carpenter <error27@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* include/linux/gfp.h: spelling fixesmatt mooney2010-05-251-4/+4
| | | | | | | | | Fix minor spelling errors in a few comments; no code changes. Signed-off-by: matt mooney <mfm@muteddisk.com> Cc: Dan Carpenter <error27@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cpu/mem hotplug: enable CPUs online before local memory onlineminskey guo2010-05-253-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | Enable users to online CPUs even if the CPUs belongs to a numa node which doesn't have onlined local memory. The zonlists(pg_data_t.node_zonelists[]) of a numa node are created either in system boot/init period, or at the time of local memory online. For a numa node without onlined local memory, its zonelists are not initialized at present. As a result, any memory allocation operations executed by CPUs within this node will fail. In fact, an out-of-memory error is triggered when attempt to online CPUs before memory comes to online. This patch tries to create zonelists for such numa nodes, so that the memory allocation for this node can be fallback'ed to other nodes. [akpm@linux-foundation.org: remove unneeded export] [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: minskey guo<chaohong.guo@intel.com> Cc: Minchan Kim <minchan.kim@gmail.com> Cc: Yasunori Goto <y-goto@jp.fujitsu.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* vmscan: remove isolate_pages callback scan controlJohannes Weiner2010-05-252-30/+35
| | | | | | | | | | | | | | | | | | | | For now, we have global isolation vs. memory control group isolation, do not allow the reclaim entry function to set an arbitrary page isolation callback, we do not need that flexibility. And since we already pass around the group descriptor for the memory control group isolation case, just use it to decide which one of the two isolator functions to use. The decisions can be merged into nearby branches, so no extra cost there. In fact, we save the indirect calls. Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* vmscan: remove all_unreclaimable scan controlJohannes Weiner2010-05-251-8/+6
| | | | | | | | | | | | This scan control is abused to communicate a return value from shrink_zones(). Write this idiomatically and remove the knob. Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
OpenPOWER on IntegriCloud