safe/jmp/linux-2.6
14 years agocore, x86: make LIST_POISON less deadly
Avi Kivity [Sun, 10 Jan 2010 14:28:09 +0000 (16:28 +0200)]
core, x86: make LIST_POISON less deadly

The list macros use LIST_POISON1 and LIST_POISON2 as undereferencable
pointers in order to trap erronous use of freed list_heads.  Unfortunately
userspace can arrange for those pointers to actually be dereferencable,
potentially turning an oops to an expolit.

To avoid this allow architectures (currently x86_64 only) to override
the default values for these pointers with truly-undereferencable values.
This is easy on x86_64 as the virtual address space is large and contains
areas that cannot be mapped.

Other 64-bit architectures will likely find similar unmapped ranges.

[ingo: switch to 0xdead000000000000 as the unmapped area]
[ingo: add comments, cleanup]
[jaswinder: eliminate sparse warnings]

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 11 Jan 2010 17:44:19 +0000 (09:44 -0800)]
Merge branch 'omap-fixes-for-linus' of git://git./linux/kernel/git/tmlind/linux-omap-2.6

* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (26 commits)
  OMAP2 clock: dynamically allocate CPUFreq frequency table
  OMAP clock/CPUFreq: add clk_exit_cpufreq_table()
  OMAP2xxx OPP: clean up comments in OPP data
  OMAP2xxx clock: clk2xxx.c doesn't compile if CPUFREQ is enabled
  OMAP1 clock: remove __initdata from struct clk_functions to prevent crash
  OMAP1 clock: Add missing clocks for OMAP 7xx
  OMAP clock: remove incorrect EXPORT_SYMBOL()s
  OMAP3 clock: Add capability to change rate of dpll4_m5_ck
  OMAP3 clock: McBSP 2, 3, 4 functional clock parent is PER_96M_FCLK, not CORE_96M_FCLK
  OMAP3: clock: add clockdomains for UART1 & 2
  OMAP2420 IO mapping: move IVA mapping virtual address out of vmalloc space
  OMAP2xxx IO mapping: mark DSP mappings as being 2420-only
  ARM: OMAP3: PM: Fix the Invalid CM_CLKSTCTRL reg access.
  OMAP2: remove duplicated #include
  omap3: EVM: Choose OMAP_PACKAGE_CBB
  omap3: Fix booting if package is uninitialized
  omap3: add missing parentheses
  omap3: add missing parentheses
  omap2/3: ZOOM: Correcting key mapping for few keys
  omap2/3: make serial_in_override() address the right uart port
  ...

14 years agomn10300: update the ASB2303 defconfig
David Howells [Fri, 8 Jan 2010 22:43:21 +0000 (14:43 -0800)]
mn10300: update the ASB2303 defconfig

Update the defconfig for the ASB2303 platform.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomn10300: make the ASB2305's PCnet32 NIC work by using the PCI bridge's SRAM
David Howells [Fri, 8 Jan 2010 22:43:21 +0000 (14:43 -0800)]
mn10300: make the ASB2305's PCnet32 NIC work by using the PCI bridge's SRAM

Access to the ASB2305's PCnet32 NIC doesn't work correctly because when
the NIC attempts to update the ring buffer flags by DMA, the change to RAM
crops up about 17uS after the interrupt line is asserted.  This is almost
certainly due to a bug in the PCI bridge FPGA on that board.

We can get around this by making dma_alloc_coherent() put the ring buffer
in the SRAM attached to the PCI bridge rather than in the SDRAM.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomn10300: insert PCI root bus resources for the ASB2305 devel motherboard
David Howells [Fri, 8 Jan 2010 22:43:20 +0000 (14:43 -0800)]
mn10300: insert PCI root bus resources for the ASB2305 devel motherboard

Insert PCI root bus resources for the MN10300-based ASB2305 development
kit motherboard.  This is required because the CPU's window onto the PCI
bus address space is considerably smaller than the CPU's full address
space and non-PCI devices lie outside of the PCI window that we might want
to access.

Without this patch, the PCI root bus uses the platform-level bus
resources, and these are then confined to the PCI window, thus making
platform_device_add() reject devices outside of this window.

We also add a reservation for the PCI SRAM region.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomn10300: use generic pci_enable_resources()
Bjorn Helgaas [Fri, 8 Jan 2010 22:43:19 +0000 (14:43 -0800)]
mn10300: use generic pci_enable_resources()

Use the generic pci_enable_resources() instead of the arch-specific code.

Unlike this arch-specific code, the generic version:

 - checks PCI_NUM_RESOURCES (11), not 6, resources
 - skips resources that have neither IORESOURCE_IO nor IORESOURCE_MEM set
 - skips ROM resources unless IORESOURCE_ROM_ENABLE is set
 - checks for resource collisions with "!r->parent"

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomn10300: use KERN_ERR not KERN_ERROR
David Howells [Fri, 8 Jan 2010 22:43:18 +0000 (14:43 -0800)]
mn10300: use KERN_ERR not KERN_ERROR

Use KERN_ERR not KERN_ERROR in the ASB2305 platform code.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomn10300: fix several bogus includes on abs2305
Al Viro [Fri, 8 Jan 2010 22:43:17 +0000 (14:43 -0800)]
mn10300: fix several bogus includes on abs2305

asm/cpu never existed for mn10300; the files they are looking for are in
asm.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomn10300: wire up missing new syscalls
David Howells [Fri, 8 Jan 2010 22:43:17 +0000 (14:43 -0800)]
mn10300: wire up missing new syscalls

Wire up missing new system calls for MN10300.

Signed-off-by: David Howells <dhowelsl@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomn10300: add cc clobbers to asm statements
Mark Salter [Fri, 8 Jan 2010 22:43:16 +0000 (14:43 -0800)]
mn10300: add cc clobbers to asm statements

gcc 4.2.1 for MN10300 is more agressive than the older gcc in
reordering/moving other insns between an insn that sets flags and an insn
that uses those flags.  This leads to trouble with asm statements which
are missing an explicit "cc" clobber.  This patch adds the explicit "cc"
clobber to asm statements which do indeed clobber the condition flags.

Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomn10300: objcopy flags fix
Mark Salter [Fri, 8 Jan 2010 22:43:15 +0000 (14:43 -0800)]
mn10300: objcopy flags fix

The gcc-4.2.1 based toolchain for MN10300 adds some new note sections
which need to be stripped from the binary image.  This patch takes care of
that.

Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomn10300: signal stack fix
Mark Salter [Fri, 8 Jan 2010 22:43:14 +0000 (14:43 -0800)]
mn10300: signal stack fix

This fixes a signal stack handling problem in the MN10300 arch.  When new
threads are cloned with CLONE_VM, they don't inherit the alternate signal
stack.  They do share the signal flags, though.  When deciding whether to
use an alternate stack, the arch code needs to check to make sure the task
struct contains a valid alternate stack.  This patch fixes the MN10300
arch by using the sas_ss_flags() test provided by sched.h rather than the
on_sig_stack() test which is insufficient by itself.

Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc_cmos: convert shutdown to new pnp_driver->shutdown
OGAWA Hirofumi [Fri, 8 Jan 2010 22:43:11 +0000 (14:43 -0800)]
rtc_cmos: convert shutdown to new pnp_driver->shutdown

commit abd6633c67925f90775bb74755f9c547e30f1f20 ("pnp: add a shutdown
method to pnp drivers") adds shutdown method to bus driver blindly.  With
it, driver->shutdown is no longer valid.

Use pnp_driver->shutdown instead.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=14889

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Reported-by: Malte Schröder <maltesch@gmx.de>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: David Hardeman <david@hardeman.nu>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Cc: <stable@kernel.org> [2.6.32.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agosmaps: fix wrong rss count
Minchan Kim [Fri, 8 Jan 2010 22:43:10 +0000 (14:43 -0800)]
smaps: fix wrong rss count

A long time ago we regarded zero page as file_rss and vm_normal_page
doesn't return NULL.

But now, we reinstated ZERO_PAGE and vm_normal_page's implementation can
return NULL in case of zero page.  Also we don't count it with file_rss
any more.

Then, RSS and PSS can't be matched.  For consistency, Let's ignore zero
page in smaps_pte_range.

Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Acked-by: Matt Mackall <mpm@selenic.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodocumentation: update kernel-doc-nano-HOWTO information
Randy Dunlap [Fri, 8 Jan 2010 22:43:09 +0000 (14:43 -0800)]
documentation: update kernel-doc-nano-HOWTO information

Remove comments about function short descriptions not allowed to be on
multiple lines (that was fixed/changed recently).

Add comments that function "section header:" names need to be unique per
function/struct/union/typedef/enum.

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>
14 years agogpio: adp5588-gpio: new driver for ADP5588 GPIO expanders
Michael Hennerich [Fri, 8 Jan 2010 22:43:08 +0000 (14:43 -0800)]
gpio: adp5588-gpio: new driver for ADP5588 GPIO expanders

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodrivers/cpuidle/governors/menu.c: fix undefined reference to `__udivdi3'
Stephen Hemminger [Fri, 8 Jan 2010 22:43:08 +0000 (14:43 -0800)]
drivers/cpuidle/governors/menu.c: fix undefined reference to `__udivdi3'

menu: use proper 64 bit math

The new menu governor is incorrectly doing a 64 bit divide.  Compile
tested only

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoDocumentation: update ring-buffer-design.txt
Randy Dunlap [Fri, 8 Jan 2010 22:43:07 +0000 (14:43 -0800)]
Documentation: update ring-buffer-design.txt

Fix typos, grammos, spellos, hyphenation.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomm: hugetlb: fix clear_huge_page()
Andrea Arcangeli [Fri, 8 Jan 2010 22:43:05 +0000 (14:43 -0800)]
mm: hugetlb: fix clear_huge_page()

sz is in bytes, MAX_ORDER_NR_PAGES is in pages.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: David Gibson <dwg@au1.ibm.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: David Rientjes <rientjes@google.com>
Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agohwmon: driver for Texas Instruments amc6821 chip
Tomaz Mertelj [Fri, 8 Jan 2010 22:43:04 +0000 (14:43 -0800)]
hwmon: driver for Texas Instruments amc6821 chip

Signed-off-by: <tomaz.mertelj@guest.arnes.si>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agogpiolib: fix poll(2) support reconfigure on sysfs polarity change
Jani Nikula [Fri, 8 Jan 2010 22:43:03 +0000 (14:43 -0800)]
gpiolib: fix poll(2) support reconfigure on sysfs polarity change

Previously enabled poll(2) support on one edge was never reconfigured when
sysfs polarity change was triggered from kernel, because 'struct device
*dev' shadowed an earlier definition.

Found by sparse, which I should've run much earlier.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agovsnprintf: fix reference for compressed ipv6 addresses
Uwe Kleine-König [Fri, 8 Jan 2010 22:43:02 +0000 (14:43 -0800)]
vsnprintf: fix reference for compressed ipv6 addresses

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reported-by: Josip Rodin <joy@entuzijast.net>
Cc: Joe Perches <joe@perches.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agommc: allow for MMC v4.4
Adrian Hunter [Fri, 8 Jan 2010 22:43:01 +0000 (14:43 -0800)]
mmc: allow for MMC v4.4

JEDEC eMMC specification version 4.4 (MMCA 4.4) defines Extended CSD
structure versions up to 5.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agommc_block: fix queue cleanup
Adrian Hunter [Fri, 8 Jan 2010 22:43:00 +0000 (14:43 -0800)]
mmc_block: fix queue cleanup

The main bug was that 'blk_cleanup_queue()' was called while the block
device could still be in use, for example, because the card was removed
while files were still open.

In addition, to be sure that 'mmc_request()' will get called for all new
requests (so it can error them out), the queue is emptied during cleanup.
This is done after the worker thread is stopped to avoid racing with it.

Finally, it is not a device error for this to be happening, so quiet the
(sometimes very many) error messages.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Cc: <linux-mmc@vger.kernel.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agommc_block: fix probe error cleanup bug
Jarkko Lavinen [Fri, 8 Jan 2010 22:42:59 +0000 (14:42 -0800)]
mmc_block: fix probe error cleanup bug

If mmc_blk_set_blksize() fails mmc_blk_probe() the request queue and its
thread have been set up and they need to be shut down properly before
putting the disk.

Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Cc: <linux-mmc@vger.kernel.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agommc_block: add dev_t initialization check
Anna Lemehova [Fri, 8 Jan 2010 22:42:58 +0000 (14:42 -0800)]
mmc_block: add dev_t initialization check

When a card is removed before mmc_blk_probe() has called add_disk(), then
the minor field is uninitialized and has value 0.  This caused
mmc_blk_put() to always release devidx 0 even if 0 was still in use.  Then
the next mmc_blk_probe() used the first free idx of 0, which oopses in
sysfs, since it is used by another card.

Signed-off-by: Anna Lemehova <EXT-Anna.Lemehova@nokia.com>
Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Cc: <linux-mmc@vger.kernel.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agopower: fix kernel-doc notation
Randy Dunlap [Fri, 8 Jan 2010 22:42:57 +0000 (14:42 -0800)]
power: fix kernel-doc notation

Warning(drivers/base/power/main.c:453): No description found for parameter 'dev'
Warning(drivers/base/power/main.c:453): No description found for parameter 'cb'
Warning(drivers/base/power/main.c:719): No description found for parameter 'dev'
Warning(drivers/base/power/main.c:719): No description found for parameter 'state'
Warning(drivers/base/power/main.c:719): No description found for parameter 'cb'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoproc: partially revert "procfs: provide stack information for threads"
KOSAKI Motohiro [Fri, 8 Jan 2010 22:42:56 +0000 (14:42 -0800)]
proc: partially revert "procfs: provide stack information for threads"

Commit d899bf7b (procfs: provide stack information for threads) introduced
to show stack information in /proc/{pid}/status.  But it cause large
performance regression.  Unfortunately /proc/{pid}/status is used ps
command too and ps is one of most important component.  Because both to
take mmap_sem and page table walk are heavily operation.

If many process run, the ps performance is,

[before d899bf7b]

% perf stat ps >/dev/null

 Performance counter stats for 'ps':

     4090.435806  task-clock-msecs         #      0.032 CPUs
             229  context-switches         #      0.000 M/sec
               0  CPU-migrations           #      0.000 M/sec
             234  page-faults              #      0.000 M/sec
      8587565207  cycles                   #   2099.425 M/sec
      9866662403  instructions             #      1.149 IPC
      3789415411  cache-references         #    926.409 M/sec
        30419509  cache-misses             #      7.437 M/sec

   128.859521955  seconds time elapsed

[after d899bf7b]

% perf stat  ps  > /dev/null

 Performance counter stats for 'ps':

     4305.081146  task-clock-msecs         #      0.028 CPUs
             480  context-switches         #      0.000 M/sec
               2  CPU-migrations           #      0.000 M/sec
             237  page-faults              #      0.000 M/sec
      9021211334  cycles                   #   2095.480 M/sec
     10605887536  instructions             #      1.176 IPC
      3612650999  cache-references         #    839.160 M/sec
        23917502  cache-misses             #      5.556 M/sec

   152.277819582  seconds time elapsed

Thus, this patch revert it. Fortunately /proc/{pid}/task/{tid}/smaps
provide almost same information. we can use it.

Commit d899bf7b introduced two features:

 1) Add the annotattion of [thread stack: xxxx] mark to
    /proc/{pid}/task/{tid}/maps.
 2) Add StackUsage field to /proc/{pid}/status.

I only revert (2), because I haven't seen (1) cause regression.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Stefani Seibold <stefani@seibold.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years ago.gitignore: ignore vmlinuz
Florian Fainelli [Fri, 8 Jan 2010 22:42:54 +0000 (14:42 -0800)]
.gitignore: ignore vmlinuz

MIPS compressed kernels output a vmlinuz file in the top-level directory
(maybe others do).  Add vmlinuz to the list of files to ignore by git.

Signed-off-by: Florian Fainelli <ffainelli@freebox.fr>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agokernel/signal.c: fix kernel information leak with print-fatal-signals=1
Andi Kleen [Fri, 8 Jan 2010 22:42:52 +0000 (14:42 -0800)]
kernel/signal.c: fix kernel information leak with print-fatal-signals=1

When print-fatal-signals is enabled it's possible to dump any memory
reachable by the kernel to the log by simply jumping to that address from
user space.

Or crash the system if there's some hardware with read side effects.

The fatal signals handler will dump 16 bytes at the execution address,
which is fully controlled by ring 3.

In addition when something jumps to a unmapped address there will be up to
16 additional useless page faults, which might be potentially slow (and at
least is not very efficient)

Fortunately this option is off by default and only there on i386.

But fix it by checking for kernel addresses and also stopping when there's
a page fault.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agocgroups: fix 2.6.32 regression causing BUG_ON() in cgroup_diput()
Dave Anderson [Fri, 8 Jan 2010 22:42:50 +0000 (14:42 -0800)]
cgroups: fix 2.6.32 regression causing BUG_ON() in cgroup_diput()

The LTP cgroup test suite generates a "kernel BUG at kernel/cgroup.c:790!"
here in cgroup_diput():

                 /*
                  * if we're getting rid of the cgroup, refcount should ensure
                  * that there are no pidlists left.
                  */
                 BUG_ON(!list_empty(&cgrp->pidlists));

The cgroup pidlist rework in 2.6.32 generates the BUG_ON, which is caused
when pidlist_array_load() calls cgroup_pidlist_find():

(1) if a matching cgroup_pidlist is found, it down_write's the mutex of the
     pre-existing cgroup_pidlist, and increments its use_count.
(2) if no matching cgroup_pidlist is found, then a new one is allocated, it
     down_write's its mutex, and the use_count is set to 0.
(3) the matching, or new, cgroup_pidlist gets returned back to pidlist_array_load(),
     which increments its use_count -- regardless whether new or pre-existing --
     and up_write's the mutex.

So if a matching list is ever encountered by cgroup_pidlist_find() during
the life of a cgroup directory, it results in an inflated use_count value,
preventing it from ever getting released by cgroup_release_pid_array().
Then if the directory is subsequently removed, cgroup_diput() hits the
BUG_ON() when it finds that the directory's cgroup is still populated with
a pidlist.

The patch simply removes the use_count increment when a matching pidlist
is found by cgroup_pidlist_find(), because it gets bumped by the calling
pidlist_array_load() function while still protected by the list's mutex.

Signed-off-by: Dave Anderson <anderson@redhat.com>
Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Ben Blum <bblum@andrew.cmu.edu>
Cc: Paul Menage <menage@google.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoscripts/get_maintainer.pl: fix file exclusion X: logic
Joe Perches [Fri, 8 Jan 2010 22:42:48 +0000 (14:42 -0800)]
scripts/get_maintainer.pl: fix file exclusion X: logic

The following command doesn't generate any output.
`./scripts/get_maintainer.pl --no-git -f drivers/net/wireless/wl12xx/wl1271_acx.c`

An excluded "X:" pattern match in any section would cause a file not to
match any other section.

Signed-off-by: Joe Perches <joe@perches.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agolib/rational.c needs module.h
Sascha Hauer [Fri, 8 Jan 2010 22:42:47 +0000 (14:42 -0800)]
lib/rational.c needs module.h

lib/rational.c:62: warning: data definition has no type or storage class
lib/rational.c:62: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
lib/rational.c:62: warning: parameter names (without types) in function declaration

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Oskar Schirmer <os@emlix.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoAdd LZO compression support for initramfs and old-style initrd
Albin Tonnerre [Fri, 8 Jan 2010 22:42:46 +0000 (14:42 -0800)]
Add LZO compression support for initramfs and old-style initrd

Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
Tested-by: Wu Zhangjin <wuzhangjin@gmail.com>
Acked-by: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Russell King <rmk@arm.linux.org.uk>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agox86: add support for LZO-compressed kernels
Albin Tonnerre [Fri, 8 Jan 2010 22:42:45 +0000 (14:42 -0800)]
x86: add support for LZO-compressed kernels

The necessary changes to the x86 Kconfig and boot/compressed to allow the
use of this new compression method

Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Tested-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Russell King <rmk@arm.linux.org.uk>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoarm: add support for LZO-compressed kernels
Albin Tonnerre [Fri, 8 Jan 2010 22:42:43 +0000 (14:42 -0800)]
arm: add support for LZO-compressed kernels

- changes to ach/arch/boot/Makefile to make it easier to add new
   compression types
 - new piggy.lzo.S necessary for lzo compression
 - changes in arch/arm/boot/compressed/misc.c to allow the use of lzo or
   gzip, depending on the config
 - Kconfig support

Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
Tested-by: Wu Zhangjin <wuzhangjin@gmail.com>
Acked-by: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Russell King <rmk@arm.linux.org.uk>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agolib: add support for LZO-compressed kernels
Albin Tonnerre [Fri, 8 Jan 2010 22:42:42 +0000 (14:42 -0800)]
lib: add support for LZO-compressed kernels

This patch series adds generic support for creating and extracting
LZO-compressed kernel images, as well as support for using such images on
the x86 and ARM architectures, and support for creating and using
LZO-compressed initrd and initramfs images.

Russell King said:

: Testing on a Cortex A9 model:
: - lzo decompressor is 65% of the time gzip takes to decompress a kernel
: - lzo kernel is 9% larger than a gzip kernel
:
: which I'm happy to say confirms your figures when comparing the two.
:
: However, when comparing your new gzip code to the old gzip code:
: - new is 99% of the size of the old code
: - new takes 42% of the time to decompress than the old code
:
: What this means is that for a proper comparison, the results get even better:
: - lzo is 7.5% larger than the old gzip'd kernel image
: - lzo takes 28% of the time that the old gzip code took
:
: So the expense seems definitely worth the effort.  The only reason I
: can think of ever using gzip would be if you needed the additional
: compression (eg, because you have limited flash to store the image.)
:
: I would argue that the default for ARM should therefore be LZO.

This patch:

The lzo compressor is worse than gzip at compression, but faster at
extraction.  Here are some figures for an ARM board I'm working on:

Uncompressed size: 3.24Mo
gzip  1.61Mo 0.72s
lzo   1.75Mo 0.48s

So for a compression ratio that is still relatively close to gzip, it's
much faster to extract, at least in that case.

This part contains:
 - Makefile routine to support lzo compression
 - Fixes to the existing lzo compressor so that it can be used in
   compressed kernels
 - wrapper around the existing lzo1x_decompress, as it only extracts one
   block at a time, while we need to extract a whole file here
 - config dialog for kernel compression

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: cleanup]
Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
Tested-by: Wu Zhangjin <wuzhangjin@gmail.com>
Acked-by: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Russell King <rmk@arm.linux.org.uk>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agozlib: optimize inffast when copying direct from output
Joakim Tjernlund [Fri, 8 Jan 2010 22:42:40 +0000 (14:42 -0800)]
zlib: optimize inffast when copying direct from output

JFFS2 uses lesser compression ratio and inflate always ends up in "copy
direct from output" case.

This patch tries to optimize the direct copy procedure.  Uses
get_unaligned() but only in one place.

The copy loop just above this one can also use this optimization, but I
havn't done so as I have not tested if it is a win there too.

On my MPC8321 this is about 17% faster on my JFFS2 root FS than the
original.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Cc: Roel Kluin <roel.kluin@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agopercpu: avoid calling __pcpu_ptr_to_addr(NULL)
Andrew Morton [Fri, 8 Jan 2010 22:42:39 +0000 (14:42 -0800)]
percpu: avoid calling __pcpu_ptr_to_addr(NULL)

__pcpu_ptr_to_addr() can be overridden by the architecture and might not
behave well if passed a NULL pointer.  So avoid calling it until we have
verified that its arg is not NULL.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agokmod: fix resource leak in call_usermodehelper_pipe()
Masami Hiramatsu [Fri, 8 Jan 2010 22:42:38 +0000 (14:42 -0800)]
kmod: fix resource leak in call_usermodehelper_pipe()

Fix resource (write-pipe file) leak in call_usermodehelper_pipe().

When call_usermodehelper_exec() fails, write-pipe file is opened and
call_usermodehelper_pipe() just returns an error.  Since it is hard for
caller to determine whether the error occured when opening the pipe or
executing the helper, the caller cannot close the pipe by themselves.

I've found this resoruce leak when testing coredump.  You can check how
the resource leaks as below;

$ echo "|nocommand" > /proc/sys/kernel/core_pattern
$ ulimit -c unlimited
$ while [ 1 ]; do ./segv; done &> /dev/null &
$ cat /proc/meminfo (<- repeat it)

where segv.c is;
//-----
int main () {
        char *p = 0;
        *p = 1;
}
//-----

This patch closes write-pipe file if call_usermodehelper_exec() failed.

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodma-debug: allow DMA_BIDIRECTIONAL mappings to be synced with DMA_FROM_DEVICE and
Krzysztof Halasa [Fri, 8 Jan 2010 22:42:36 +0000 (14:42 -0800)]
dma-debug: allow DMA_BIDIRECTIONAL mappings to be synced with DMA_FROM_DEVICE and

There is no need to perform full BIDIR sync (copying the buffers in case
of swiotlb and similar schemes) if we know that the owner (CPU or device)
hasn't altered the data.

Addresses the false-positive reported at
http://bugzilla.kernel.org/show_bug.cgi?id=14169

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Cc: David Miller <davem@davemloft.net>
Cc: Joerg Roedel <joerg.roedel@amd.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agokmemcheck: make bitfield annotations truly no-ops when disabled
Vegard Nossum [Fri, 8 Jan 2010 22:42:35 +0000 (14:42 -0800)]
kmemcheck: make bitfield annotations truly no-ops when disabled

It turns out that even zero-sized struct members (int foo[0];) will affect
the struct layout, causing us in particular to lose 4 bytes in struct
sock.

This patch fixes the regression in CONFIG_KMEMCHECK=n case.

Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodocs: large update to ioctl-number.txt
Randy Dunlap [Fri, 8 Jan 2010 22:42:34 +0000 (14:42 -0800)]
docs: large update to ioctl-number.txt

Add many ioctl definitions to ioctl-number.txt.
Fix some whitespace/formatting.
Correct some filenames/paths.

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>
14 years agomm: make totalhigh_pages unsigned long
Andreas Fenkart [Fri, 8 Jan 2010 22:42:31 +0000 (14:42 -0800)]
mm: make totalhigh_pages unsigned long

Makes it consistent with the extern declaration, used when CONFIG_HIGHMEM
is set Removes redundant casts in printout messages

Signed-off-by: Andreas Fenkart <andreas.fenkart@streamunlimited.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoDRM / i915: Fix resume regression on MSI Wind U100 w/o KMS
Rafael J. Wysocki [Fri, 8 Jan 2010 23:45:33 +0000 (00:45 +0100)]
DRM / i915: Fix resume regression on MSI Wind U100 w/o KMS

Commit cbda12d77ea590082edb6d30bd342a67ebc459e0 (drm/i915: implement
new pm ops for i915), among other things, removed the .suspend and
.resume pointers from the struct drm_driver object in i915_drv.c,
which broke resume without KMS on my MSI Wind U100.

Fix this by reverting that part of commit cbda12d77ea59.

[ The DRM layer will not use the class-specific suspend/resume functions
  if the driver is marked MODESET-aware, and conversely it will not
  register the PCI device if the drievr isn't so marked, so you always
  end up with _either_ the drm-class suspend/resume _or_ the PCI layer
  PM functionality, never both.  - Linus ]

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'for_2.6.33rc_c' of git://git.pwsan.com/linux-2.6 into omap-fixes-for...
Tony Lindgren [Fri, 8 Jan 2010 22:27:56 +0000 (14:27 -0800)]
Merge branch 'for_2.6.33rc_c' of git://git.pwsan.com/linux-2.6 into omap-fixes-for-linus

14 years agoOMAP2 clock: dynamically allocate CPUFreq frequency table
Paul Walmsley [Fri, 8 Jan 2010 22:23:17 +0000 (15:23 -0700)]
OMAP2 clock: dynamically allocate CPUFreq frequency table

Dynamically allocate the CPUFreq frequency table on OMAP2xxx chips.
This fixes some compilation problems, since the kernel may not know
what chip it is running on until boot-time.  This also reduces the size
of the CPUFreq frequency table.

Problem originally reported by Felipe Balbi <felipe.balbi@nokia.com>.
Thanks also for comments on the patch from Felipe and Kevin.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
14 years agoOMAP clock/CPUFreq: add clk_exit_cpufreq_table()
Paul Walmsley [Fri, 8 Jan 2010 22:23:16 +0000 (15:23 -0700)]
OMAP clock/CPUFreq: add clk_exit_cpufreq_table()

A subsequent patch adds code on OMAP2xxx to dynamically allocate the
CPUFreq frequency table in clk_init_cpufreq_table(), so for it to
avoid a leak, it will need a corresponding function to free the
memory.  This patch adds clk_exit_cpufreq_table() with generic
code to call a chip-specific variant inside the clockfw_lock spinlock via
struct clk_functions.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP2xxx OPP: clean up comments in OPP data
Paul Walmsley [Fri, 8 Jan 2010 22:23:15 +0000 (15:23 -0700)]
OMAP2xxx OPP: clean up comments in OPP data

Revise some of the comments in the OMAP2xxx OPP data for clarity.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Richard Woodruff <r-woodruff2@ti.com>
14 years agoOMAP2xxx clock: clk2xxx.c doesn't compile if CPUFREQ is enabled
Felipe Balbi [Fri, 8 Jan 2010 22:23:15 +0000 (15:23 -0700)]
OMAP2xxx clock: clk2xxx.c doesn't compile if CPUFREQ is enabled

if we enable CPUFREQ we can't build omap2 for two reasons,
one of them is fixed by the patch below.

It's failing because the __must_be_array() check in
ARRAY_SIZE() is failing and printing the following message:

arch/arm/mach-omap2/clock2xxx.c:453: error: negative width in bit-field '<anonymous>'

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
[paul@pwsan.com: commit message updated; changed rate variable name]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP1 clock: remove __initdata from struct clk_functions to prevent crash
Cory Maccarrone [Fri, 8 Jan 2010 22:23:14 +0000 (15:23 -0700)]
OMAP1 clock: remove __initdata from struct clk_functions to prevent crash

Commit 52650505fbf3a6ab851c801f54e73e76c55ab8da added an __initdata
decoration to the structure containing the clk_enable and clk_disable
functions.  Once init data was freed, these pointers went to null, and
the next enable or disable call caused the kernel to crash.  This
change removes this decoration.

Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com>
[paul@pwsan.com: patch manually split and commit message edited]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP1 clock: Add missing clocks for OMAP 7xx
Cory Maccarrone [Fri, 8 Jan 2010 22:23:10 +0000 (15:23 -0700)]
OMAP1 clock: Add missing clocks for OMAP 7xx

This change adds in some missing clocks that were needed as a result
of 526505... (OMAP1 clock: convert mach-omap1/clock.h to
mach-omap1/clock_data.c).  Prior to this, it was just assumed that
these clocks existed for all devices, and it was used directly instead
of calling it out with a clock_get call or similar.  So, not having
the CK_7XX meant these clocks weren't being used anymore for omap 7xx
devices, which broke things badly.

Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com>
[paul@pwsan.com: commit message edited]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP clock: remove incorrect EXPORT_SYMBOL()s
Paul Walmsley [Fri, 8 Jan 2010 22:23:09 +0000 (15:23 -0700)]
OMAP clock: remove incorrect EXPORT_SYMBOL()s

The only symbols that should be exported are symbols that are to be
called from loadable kernel modules, e.g., device drivers.  In the
context of plat-omap/clock.c, these should only be the Linux clock
interface symbols as defined by include/linux/clk.h.  Core code
doesn't need these symbols to be exported.  Also, clean up an old
comment while here.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP3 clock: Add capability to change rate of dpll4_m5_ck
Tuukka Toivonen [Fri, 8 Jan 2010 22:23:08 +0000 (15:23 -0700)]
OMAP3 clock: Add capability to change rate of dpll4_m5_ck

Add necessary definitions to clock framework to allow changing
dpll4_m5_ck rate.  This is used by the camera code.

Signed-off-by: Jouni Högander <jouni.hogander@nokia.com>
Signed-off-by: Tuukka Toivonen <tuukka.o.toivonen@nokia.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP3 clock: McBSP 2, 3, 4 functional clock parent is PER_96M_FCLK, not CORE_96M_FCLK
Paul Walmsley [Fri, 8 Jan 2010 22:23:07 +0000 (15:23 -0700)]
OMAP3 clock: McBSP 2, 3, 4 functional clock parent is PER_96M_FCLK, not CORE_96M_FCLK

The correct parent of the McBSP 2, 3, and 4 functional clocks is
PER_96M_FCLK, not CORE_96M_FCLK.  Fix this in the OMAP clock tree.
Reported by Nicole Chalhoub <n-chalhoub@ti.com>.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Nicole Chalhoub <n-chalhoub@ti.com>
14 years agoOMAP3: clock: add clockdomains for UART1 & 2
Kevin Hilman [Fri, 8 Jan 2010 22:23:06 +0000 (15:23 -0700)]
OMAP3: clock: add clockdomains for UART1 & 2

UART1 & 2 were missing clockdomains resulting in broken omap_hwmod
init for these devices.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP2420 IO mapping: move IVA mapping virtual address out of vmalloc space
Paul Walmsley [Fri, 8 Jan 2010 22:23:06 +0000 (15:23 -0700)]
OMAP2420 IO mapping: move IVA mapping virtual address out of vmalloc space

Commit 10db25fea4c11661070b97832b8cc3d2af495092 causes the following
kernel messages during N800 boot (and presumably all other 2420
boards):

[    0.000000] BUG: mapping for 0x58000000 at 0xe0000000 overlaps vmalloc space
[    0.000000] BUG: mapping for 0x59000000 at 0xe1000000 overlaps vmalloc space
[    0.000000] BUG: mapping for 0x5a000000 at 0xe2000000 overlaps vmalloc space

Fix by remapping the IVA memory areas somewhere outside vmalloc space.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
14 years agoOMAP2xxx IO mapping: mark DSP mappings as being 2420-only
Paul Walmsley [Fri, 8 Jan 2010 22:23:05 +0000 (15:23 -0700)]
OMAP2xxx IO mapping: mark DSP mappings as being 2420-only

Out of the three major OMAP2 chip types, OMAP2420, OMAP2430, and OMAP3430,
we only map the IVA on OMAP2420.  The memory mapping is not shared between
OMAP2420 and OMAP2430, so it is inappropriate to label those macros as
'24XX'; this patch changes them to '2420'.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoARM: OMAP3: PM: Fix the Invalid CM_CLKSTCTRL reg access.
Abhijit Pagare [Fri, 8 Jan 2010 22:23:04 +0000 (15:23 -0700)]
ARM: OMAP3: PM: Fix the Invalid CM_CLKSTCTRL reg access.

In OMAP2/3 some of the clock-domains which did not have control
facility were being falsely written to and read using the CM_CLKSTCTRL
register though it did not exist for them. One check is added to remove
this flaw.

Signed-off-by: Abhijit Pagare <abhijitpagare@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
14 years agoOMAP2: remove duplicated #include
Huang Weiyi [Fri, 8 Jan 2010 22:23:03 +0000 (15:23 -0700)]
OMAP2: remove duplicated #include

Remove duplicated #include('s) in
  arch/arm/mach-omap2/clock34xx.c
  arch/arm/mach-omap2/io.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Fri, 8 Jan 2010 22:05:28 +0000 (14:05 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/addr: Correct CONFIG_IPv6 to CONFIG_IPV6
  mlx4_core: Fix cleanup in __mlx4_init_one() error path
  IB/mlx4: Fix queue overflow check in post_recv
  IB/mlx4: Initialize SRQ scatter entries when creating an SRQ

14 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel...
Linus Torvalds [Fri, 8 Jan 2010 22:04:20 +0000 (14:04 -0800)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jwessel/linux-2.6-kgdb

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
  kgdb: Fix kernel-doc format error in kgdb.h
  blackfin,kgdb: Do not put PC in gdb_regs into retx.
  blackfin,kgdb,probe_kernel: Cleanup probe_kernel_read/write
  maccess,probe_kernel: Allow arch specific override probe_kernel_(read|write)

14 years agoMerge branch 'reiserfs/kill-bkl' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 8 Jan 2010 22:03:55 +0000 (14:03 -0800)]
Merge branch 'reiserfs/kill-bkl' of git://git./linux/kernel/git/frederic/random-tracing

* 'reiserfs/kill-bkl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
  reiserfs: Relax reiserfs_xattr_set_handle() while acquiring xattr locks
  reiserfs: Fix unreachable statement
  reiserfs: Don't call reiserfs_get_acl() with the reiserfs lock
  reiserfs: Relax lock on xattr removing
  reiserfs: Relax the lock before truncating pages
  reiserfs: Fix recursive lock on lchown
  reiserfs: Fix mistake in down_write() conversion

14 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Fri, 8 Jan 2010 21:57:32 +0000 (13:57 -0800)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: kill some warnings on i386 builds

14 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Fri, 8 Jan 2010 21:57:19 +0000 (13:57 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] move fnptr definition inside #ifdef __KERNEL__

14 years agoMerge branch 'for-linus/samsung' of git://git.fluff.org/bjdooks/linux
Linus Torvalds [Fri, 8 Jan 2010 21:56:31 +0000 (13:56 -0800)]
Merge branch 'for-linus/samsung' of git://git.fluff.org/bjdooks/linux

* 'for-linus/samsung' of git://git.fluff.org/bjdooks/linux:
  ARM: S3C64XX: Fix possible clock look in EPLL and MPLL clock chains

14 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 8 Jan 2010 21:55:52 +0000 (13:55 -0800)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/x86/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip:
  x86, irq: Check move_in_progress before freeing the vector mapping
  x86: copy_from_user() should not return -EFAULT
  Revert "x86: Side-step lguest problem by only building cmpxchg8b_emu for pre-Pentium"
  x86/pci: Intel ioh bus num reg accessing fix
  x86: Fix size for ex trampoline with 32bit

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Fri, 8 Jan 2010 21:55:39 +0000 (13:55 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCIe AER: prevent AER injection if hardware masks error reporting
  PCI/PM: Use per-device D3 delays
  PCI: Check the node argument passed to cpumask_of_node
  PCI: AER: fix aer inject result in kernel oops
  PCI: pcie portdrv: style cleanup

14 years agoMerge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
Linus Torvalds [Fri, 8 Jan 2010 21:55:14 +0000 (13:55 -0800)]
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6

* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
  nfs: fix oops in nfs_rename()
  sunrpc: fix build-time warning
  sunrpc: on successful gss error pipe write, don't return error
  SUNRPC: Fix the return value in gss_import_sec_context()
  SUNRPC: Fix up an error return value in gss_import_sec_context_kerberos()

14 years agoxfs: kill some warnings on i386 builds
Dave Chinner [Thu, 17 Dec 2009 00:20:07 +0000 (00:20 +0000)]
xfs: kill some warnings on i386 builds

Randy Dunlap Reported printk() format-related warnings reported
on i386 builds in his environment.  Dave Chinner provided this
patch to eliminate them.

Signed-off by: Dave Chinner <david@fromorbit.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
14 years ago[IA64] move fnptr definition inside #ifdef __KERNEL__
Tony Luck [Fri, 8 Jan 2010 18:53:28 +0000 (10:53 -0800)]
[IA64] move fnptr definition inside #ifdef __KERNEL__

Linus pointed out that this definition should not be
exported to user space.

Signed-off-by: Tony Luck <tony.luck@intel.com>
14 years agoomap3: EVM: Choose OMAP_PACKAGE_CBB
Vaibhav Hiremath [Fri, 8 Jan 2010 18:29:08 +0000 (10:29 -0800)]
omap3: EVM: Choose OMAP_PACKAGE_CBB

Without this the kernel doesn't boot, it craches in
omap_mux_package_fixup(), since the package_subset becomes NULL.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap3: Fix booting if package is uninitialized
Tony Lindgren [Fri, 8 Jan 2010 18:29:08 +0000 (10:29 -0800)]
omap3: Fix booting if package is uninitialized

Otherwise bringing up new boards can be harder:

Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 5 [#1]
last sysfs file:
Modules linked in:
CPU: 0    Not tainted  (2.6.33-rc2-00015-g0bc9c93-dirty #37)
PC is at omap_mux_init+0xa4/0x3d8
LR is at omap_mux_init+0x3c/0x3d8
...

Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap3: add missing parentheses
Roel Kluin [Fri, 8 Jan 2010 18:29:07 +0000 (10:29 -0800)]
omap3: add missing parentheses

`!' has a higher precedence than `&' so parentheses are required.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap3: add missing parentheses
Roel Kluin [Fri, 8 Jan 2010 18:29:07 +0000 (10:29 -0800)]
omap3: add missing parentheses

not(!) has a higher precedence than bit and(&).

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap2/3: ZOOM: Correcting key mapping for few keys
Vimal Singh [Fri, 8 Jan 2010 18:29:07 +0000 (10:29 -0800)]
omap2/3: ZOOM: Correcting key mapping for few keys

Keys: 'right arrow', 'up arrow' and 'select' were mapped
wrongly. This patch corrects them.
This patch also adds one missing key present in the board,
currently I added it as 'unknown' key, as I am not able to
find proper description for this key.
One key entry (r: 7, c: 5) is present in the keymap, which
is really not present in the board, removing it.

Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap2/3: make serial_in_override() address the right uart port
Alexander Shishkin [Fri, 8 Jan 2010 18:29:06 +0000 (10:29 -0800)]
omap2/3: make serial_in_override() address the right uart port

Commit f62349ee9788b1d94c55eb6c291d74a1f69bdd9e makes it possible to
have some other than first uart port as ttyS0, which breaks the workaround
serial_in_override() function which will try to address the first uart
port (for ttyS0) and not the one that was initialized.

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
CC: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap1: Fix compile for omap1_bl.c
Tony Lindgren [Fri, 8 Jan 2010 18:29:06 +0000 (10:29 -0800)]
omap1: Fix compile for omap1_bl.c

Commit 9905a43b made struct backlight_ops const. Omap was
setting check_fb dynamically, which caused the following
compile error:

drivers/video/backlight/omap1_bl.c: In function 'omapbl_probe':
drivers/video/backlight/omap1_bl.c:142: error: assignment of read-only variable 'omapbl_ops'

Turns out pdata->check_fb is not being used, so just remove
it to fix the compile.

Cc: Emese Revfy <re.emese@gmail.com>
Cc: Richard Purdie <rpurdie@linux.intel.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap1: Add 7xx clocks and pin muxes for SPI
Cory Maccarrone [Fri, 8 Jan 2010 18:29:05 +0000 (10:29 -0800)]
omap1: Add 7xx clocks and pin muxes for SPI

Commit 35c9049b27040d09461bc90928ad770be7ddf661 added
drivers/spi/omap_spi_100k.c.

This patch add the related clocks and pin muxing
entries to make the driver work on omap7xx platforms.

Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: Remove uninitialized warning for gpio.c
Tony Lindgren [Fri, 8 Jan 2010 18:29:05 +0000 (10:29 -0800)]
omap: Remove uninitialized warning for gpio.c

Flags is not used on 15xx.

Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: &&/|| confusion in iommu_put()
Roel Kluin [Fri, 8 Jan 2010 18:29:05 +0000 (10:29 -0800)]
omap: &&/|| confusion in iommu_put()

obj can't be both NULL and be an error pointer.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: gpio: Simultaneously requested rising and falling edge
Cory Maccarrone [Fri, 8 Jan 2010 18:29:04 +0000 (10:29 -0800)]
omap: gpio: Simultaneously requested rising and falling edge

Some chips, namely any OMAP1 chips using METHOD_MPUIO,
OMAP15xx and OMAP7xx, cannot be setup to respond to on-chip GPIO
interrupts in both rising and falling edge directions -- they can
only respond to one direction or the other, depending on how the
ICR is configured.

Additionally, current code forces rising edge detection if both
flags are specified:

        if (trigger & IRQ_TYPE_EDGE_RISING)
                l |= 1 << gpio;
        else if (trigger & IRQ_TYPE_EDGE_FALLING)
                l &= ~(1 << gpio);
        else
                goto bad;

This change implements a toggle function that will modify the ICR
to flip the direction of interrupt for IRQs that are requested with
both rising and falling flags.  The toggle function is not called
for chips and GPIOs it does not apply to through the use of a flip_mask
that's added on a per-bank basis.  The mask is only set for those
GPIOs where a toggle is necessary.  Edge detection starts out the
same as above with FALLING mode first.

The toggle happens on EACH interrupt; without it, we have the
following sequence of actions on GPIO transition:

  ICR    GPIO               Result
  0x1    0 -> 1 (rising)    Interrupt
  0x1    1 -> 0 (falling)   No interrupt

  (set ICR to 0x0 manually)
  0x0    0 -> 1 (rising)    No interrupt
  0x0    1 -> 0 (falling)   Interrupt

That is, with the ICR set to 1 for a gpio, only rising edge interrupts
are caught, and with it set to 0, only falling edge interrupts are
caught.  If we add in the toggle, we get this:

  ICR    GPIO               Result
  0x1    0 -> 1 (rising)    Interrupt (ICR set to 0x0)
  0x0    1 -> 0 (falling)   Interrupt (ICR set to 0x1)
  0x1    0 -> 1 ...

so, both rising and falling are caught, per the request for both
(IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING).

Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: McBSP: Fix possible port lockout
Janusz Krzysztofik [Fri, 8 Jan 2010 18:29:04 +0000 (10:29 -0800)]
omap: McBSP: Fix possible port lockout

In its current form, the omap_mcbsp_request() function can return after
irq_request() failure without any cleanups, effectively locking out the port
forever with clocks left running. Fix it.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Fri, 8 Jan 2010 17:32:50 +0000 (09:32 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  hp-wmi: remove double free caused by merge conflict

14 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Fri, 8 Jan 2010 17:32:15 +0000 (09:32 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] __per_cpu_idtrs[] is a memory hog
  [IA64] sanity in #include files.  Move fnptr to types.h
  [IA64] use helpers for rlimits
  [IA64] cpumask_of_node() should handle -1 as a node

14 years ago[IA64] __per_cpu_idtrs[] is a memory hog
Tony Luck [Fri, 8 Jan 2010 00:10:57 +0000 (16:10 -0800)]
[IA64] __per_cpu_idtrs[] is a memory hog

__per_cpu_idtrs is statically allocated ... on CONFIG_NR_CPUS=4096
systems it hogs 16MB of memory. This is way too much for a quite
probably unused facility (only KVM uses dynamic TR registers).

Change to an array of pointers, and allocate entries as needed on
a per cpu basis.  Change the name too as the __per_cpu_ prefix is
confusing (this isn't a classic <linux/percpu.h> type object).

Signed-off-by: Tony Luck <tony.luck@intel.com>
14 years agokgdb: Fix kernel-doc format error in kgdb.h
Randy Dunlap [Thu, 7 Jan 2010 17:58:37 +0000 (11:58 -0600)]
kgdb: Fix kernel-doc format error in kgdb.h

linux-next-20081022//include/linux/kgdb.h:308): duplicate section name 'Description'

and fix typos in that file's kernel-doc comments.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
14 years agoblackfin,kgdb: Do not put PC in gdb_regs into retx.
Sonic Zhang [Thu, 7 Jan 2010 17:58:37 +0000 (11:58 -0600)]
blackfin,kgdb: Do not put PC in gdb_regs into retx.

In blackfin, kgdb is running in delayed exception IRQ5 other than in
exception IRQ3 directly.  Register reti other than retx in pt_regs is
the kgdb return address. So, don't put PC in gdb_regs into retx.

CC: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
14 years agoblackfin,kgdb,probe_kernel: Cleanup probe_kernel_read/write
Jason Wessel [Thu, 7 Jan 2010 17:58:36 +0000 (11:58 -0600)]
blackfin,kgdb,probe_kernel: Cleanup probe_kernel_read/write

Blackfin needs it own arch specific probe_kernel_read() and
probe_kernel_write().

This was moved out of the kgdb code and into the
arch/blackfin/maccess.c, because it is a generic kernel api.

The arch specific kgdb.c for blackfin was cleaned of all functions
which exist in the kgdb core that do the same thing after resolving
the probe_kernel_read() and probe_kernel_write().  This also
eliminated the need for most of the #include's.

CC: Sonic Zhang <sonic.adi@gmail.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agomaccess,probe_kernel: Allow arch specific override probe_kernel_(read|write)
Jason Wessel [Thu, 7 Jan 2010 17:58:36 +0000 (11:58 -0600)]
maccess,probe_kernel: Allow arch specific override probe_kernel_(read|write)

Some archs such as blackfin, would like to have an arch specific
probe_kernel_read() and probe_kernel_write() implementation which can
fall back to the generic implementation if no special operations are
needed.

CC: Thomas Gleixner <tglx@linutronix.de>
CC: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoreiserfs: Relax reiserfs_xattr_set_handle() while acquiring xattr locks
Frederic Weisbecker [Thu, 7 Jan 2010 14:55:31 +0000 (15:55 +0100)]
reiserfs: Relax reiserfs_xattr_set_handle() while acquiring xattr locks

Fix remaining xattr locks acquired in reiserfs_xattr_set_handle()
while we are holding the reiserfs lock to avoid lock inversions.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Christian Kujau <lists@nerdbynature.de>
Cc: Alexander Beregalov <a.beregalov@gmail.com>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Ingo Molnar <mingo@elte.hu>
14 years agoreiserfs: Fix unreachable statement
Jiri Slaby [Wed, 6 Jan 2010 22:09:50 +0000 (23:09 +0100)]
reiserfs: Fix unreachable statement

Stanse found an unreachable statement in reiserfs_ioctl. There is a
if followed by error assignment and `break' with no braces. Add the
braces so that we don't break every time, but only in error case,
so that REISERFS_IOC_SETVERSION actually works when it returns no
error.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Reiserfs <reiserfs-devel@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
14 years agoreiserfs: Don't call reiserfs_get_acl() with the reiserfs lock
Frederic Weisbecker [Thu, 7 Jan 2010 11:57:47 +0000 (12:57 +0100)]
reiserfs: Don't call reiserfs_get_acl() with the reiserfs lock

reiserfs_get_acl is usually not called under the reiserfs lock,
as it doesn't need it. But it happens when it is called by
reiserfs_acl_chmod(), which creates a dependency inversion against
the private xattr inodes mutexes for the given inode.

We need to call it without the reiserfs lock, especially since
it's unnecessary.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Christian Kujau <lists@nerdbynature.de>
Cc: Alexander Beregalov <a.beregalov@gmail.com>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Thu, 7 Jan 2010 04:26:42 +0000 (20:26 -0800)]
Merge branch 'drm-linus' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/radeon/kms: rs600: use correct mask for SW interrupt
  gpu/drm/radeon/radeon_irq.c: move a dereference below a NULL test
  drm/radeon/radeon_device.c: move a dereference below a NULL test
  drm/radeon/radeon_fence.c: move a dereference below the NULL test
  drm/radeon/radeon_connectors.c: add a NULL test before dereference
  drm/radeon/kms: fix memory leak
  drm/kms: Fix &&/|| confusion in drm_fb_helper_connector_parse_command_line()
  drm/edid: Fix CVT width/height decode
  drm/edid: Skip empty CVT codepoints
  drm: remove address mask param for drm_pci_alloc()
  drm/radeon/kms: add missing breaks in i2c and ss lookups
  drm/radeon/kms: add primary dac adj values table
  drm/radeon/kms: fallback to default connector table

14 years agoMerge remote branch 'korg/drm-radeon-next' into drm-linus
Dave Airlie [Thu, 7 Jan 2010 04:00:29 +0000 (14:00 +1000)]
Merge remote branch 'korg/drm-radeon-next' into drm-linus

* korg/drm-radeon-next:
  drm/radeon/kms: rs600: use correct mask for SW interrupt
  gpu/drm/radeon/radeon_irq.c: move a dereference below a NULL test
  drm/radeon/radeon_device.c: move a dereference below a NULL test
  drm/radeon/radeon_fence.c: move a dereference below the NULL test
  drm/radeon/radeon_connectors.c: add a NULL test before dereference
  drm/radeon/kms: fix memory leak
  drm/radeon/kms: add missing breaks in i2c and ss lookups
  drm/radeon/kms: add primary dac adj values table
  drm/radeon/kms: fallback to default connector table

14 years agodrm/radeon/kms: rs600: use correct mask for SW interrupt
Luca Tettamanti [Mon, 28 Dec 2009 21:53:05 +0000 (22:53 +0100)]
drm/radeon/kms: rs600: use correct mask for SW interrupt

The mask happens to be the same, but the IH is reading the status, not the
not the control register.

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agogpu/drm/radeon/radeon_irq.c: move a dereference below a NULL test
Darren Jenkins [Wed, 30 Dec 2009 01:16:35 +0000 (12:16 +1100)]
gpu/drm/radeon/radeon_irq.c: move a dereference below a NULL test

If a NULL value is possible, the dereference should only occur after the
NULL test.

Coverity CID: 13338

Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/radeon_device.c: move a dereference below a NULL test
Darren Jenkins [Wed, 30 Dec 2009 01:18:30 +0000 (12:18 +1100)]
drm/radeon/radeon_device.c: move a dereference below a NULL test

If a NULL value is possible, the dereference should only occur after the
NULL test.

Coverity CID: 13335

Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/radeon_fence.c: move a dereference below the NULL test
Darren Jenkins [Wed, 30 Dec 2009 01:20:05 +0000 (12:20 +1100)]
drm/radeon/radeon_fence.c: move a dereference below the NULL test

If a NULL value is possible, the dereference should only occur after the
NULL test.

Coverity CID: 13334

Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/radeon_connectors.c: add a NULL test before dereference
Darren Jenkins [Wed, 30 Dec 2009 01:22:55 +0000 (12:22 +1100)]
drm/radeon/radeon_connectors.c: add a NULL test before dereference

The encoder variable can be NULL in this function so I believe it should
be checked before dereference.

Coverity CID: 13253

[airlied: extremely unlikely to happen]

Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>