deliverable/linux.git
14 years ago[S390] con3215: remove empty ioctl function
Heiko Carstens [Wed, 13 Jan 2010 19:44:41 +0000 (20:44 +0100)] 
[S390] con3215: remove empty ioctl function

...instead of adding a compat ioctl function which would do nothing
as well.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] dasd: add proper compat pointer conversion for symmetrix ioctl
Heiko Carstens [Wed, 13 Jan 2010 19:44:40 +0000 (20:44 +0100)] 
[S390] dasd: add proper compat pointer conversion for symmetrix ioctl

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] mmap: add missing compat_ptr conversion to both mmap compat syscalls
Heiko Carstens [Wed, 13 Jan 2010 19:44:39 +0000 (20:44 +0100)] 
[S390] mmap: add missing compat_ptr conversion to both mmap compat syscalls

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] bug: implement arch specific __WARN macro
Heiko Carstens [Wed, 13 Jan 2010 19:44:38 +0000 (20:44 +0100)] 
[S390] bug: implement arch specific __WARN macro

This one will trap, generates shorter code and emits better debug data
than the generic version.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] Move __cpu_logical_map to smp.c
Heiko Carstens [Wed, 13 Jan 2010 19:44:37 +0000 (20:44 +0100)] 
[S390] Move __cpu_logical_map to smp.c

Finally move it to the place where it belongs to and make get rid of
it for !CONFIG_SMP.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] tape_block: remove ioctl function
Heiko Carstens [Wed, 13 Jan 2010 19:44:36 +0000 (20:44 +0100)] 
[S390] tape_block: remove ioctl function

This is just a complicated construct which always returns -EINVAL.
Just remove it.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] smp: remove volatile type quilifier from __cpu_logical_map
Heiko Carstens [Wed, 13 Jan 2010 19:44:35 +0000 (20:44 +0100)] 
[S390] smp: remove volatile type quilifier from __cpu_logical_map

Remove pointless qualifier.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] smp: setup smp_processor_id early
Heiko Carstens [Wed, 13 Jan 2010 19:44:34 +0000 (20:44 +0100)] 
[S390] smp: setup smp_processor_id early

smp_processor_id() is supposed to work before setup_arch() gets called.
Before that smp_processor_id() may return just an arbitrary value that
is contained in the uninitialized boot lowcore.
So provide the arch function which will override the weak function in
init/main.c.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] use helpers for rlimits
Jiri Slaby [Wed, 13 Jan 2010 19:44:33 +0000 (20:44 +0100)] 
[S390] use helpers for rlimits

Make sure compiler won't do weird things with limits. E.g. fetching
them twice may return 2 different values after writable limits are
implemented.

I.e. either use rlimit helpers added in
3e10e716abf3c71bdb5d86b8f507f9e72236c9cd
or ACCESS_ONCE if not applicable.

Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux390@de.ibm.com
Cc: linux-s390@vger.kernel.org
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] fs3270: add missing compat ptr conversion
Heiko Carstens [Wed, 13 Jan 2010 19:44:32 +0000 (20:44 +0100)] 
[S390] fs3270: add missing compat ptr conversion

Add missing compat ptr conversion including two additional
whitespace changes that aren't worth a separate patch.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] vmcp: add missing compat ptr conversion
Heiko Carstens [Wed, 13 Jan 2010 19:44:31 +0000 (20:44 +0100)] 
[S390] vmcp: add missing compat ptr conversion

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: add missing compat ptr conversion
Heiko Carstens [Wed, 13 Jan 2010 19:44:30 +0000 (20:44 +0100)] 
[S390] cio: add missing compat ptr conversion

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] dasd: add missing compat ptr conversion
Heiko Carstens [Wed, 13 Jan 2010 19:44:29 +0000 (20:44 +0100)] 
[S390] dasd: add missing compat ptr conversion

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] remove superfluous TIF_USEDFPU bit
Martin Schwidefsky [Wed, 13 Jan 2010 19:44:28 +0000 (20:44 +0100)] 
[S390] remove superfluous TIF_USEDFPU bit

The TIF_USEDFPU bit is always 0 for s390 and it is not tested anywhere.
Remove the bit. At the same time remove the calls to clear_used_math()
as well. The PF_USED_MATH bit is never set for s390 either.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] duplicate SIGTRAP on signal delivery.
Martin Schwidefsky [Wed, 13 Jan 2010 19:44:27 +0000 (20:44 +0100)] 
[S390] duplicate SIGTRAP on signal delivery.

The code in do_signal sets the TIF_SINGLE_STEP bit and calls
tracehook_signal_handler after the signal frame has been set up.
This causes two SIGTRAP signals to be delivered to the tracer.
Stop setting the TIF_SINGLE_STEP bit in do_signal to get the
correct number of SIGTRAPs.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] clear TIF_SINGLE_STEP for new process.
Martin Schwidefsky [Wed, 13 Jan 2010 19:44:26 +0000 (20:44 +0100)] 
[S390] clear TIF_SINGLE_STEP for new process.

Clear the TIF_SINGLE_STEP bit in copy_thread. The new process did not get
a PER event of its own. It is wrong deliver a SIGTRAP that was meant for
the parent process.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] fix loading of PER control registers for utrace.
Martin Schwidefsky [Wed, 13 Jan 2010 19:44:25 +0000 (20:44 +0100)] 
[S390] fix loading of PER control registers for utrace.

If the current task enables / disables PER tracing for itself the
PER control registers need to be loaded in FixPerRegisters.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years agoMakefile: do not override LC_CTYPE
Michal Marek [Fri, 8 Jan 2010 11:25:37 +0000 (12:25 +0100)] 
Makefile: do not override LC_CTYPE

Setting LC_CTYPE=C breaks localized messages in some setups. With only
LC_COLLATE=C and LC_NUMERIC=C, we get almost all we need, except for not
so defined character classes and tolower()/toupper(). The former is not
a big issue, because we can assume that e.g. [:alpha:] will always
include a-zA-Z and we only ever process ASCII input. The latter seems
only affect arch/sh/tools/gen-mach-types, which we can handle separately.

So after this patch the meaning of ranges like [a-z], the behavior of
sort and join, etc. should be the same everywhere and at the same time
gcc should be able to print localized waring and error messages.
LC_NUMERIC=C might not be necessary, but setting it doesn't hurt.

Reported-by: Simon Horman <horms@verge.net.au>
Reported-by: Sergei Trofimovich <slyfox@inbox.ru>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Tested-by: Simon Horman <horms@verge.net.au>
Tested-by: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokbuild: really fix bzImage build with non-bash sh
Jonathan Nieder [Mon, 28 Dec 2009 19:38:27 +0000 (19:38 +0000)] 
kbuild: really fix bzImage build with non-bash sh

In an x86 build with CONFIG_KERNEL_LZMA enabled and dash as sh,
arch/x86/boot/compressed/vmlinux.bin.lzma ends with
'\xf0\x7d\x39\x00' (16 bytes) instead of the 4 bytes intended and
the resulting vmlinuz fails to boot.  This improves on the
previous behavior, in which the file contained the characters
'-ne ' as well, but not by much.

Previous commits replaced "echo -ne" first with "/bin/echo -ne",
then "printf" in the hope of improving portability, but none of
these commands is guaranteed to support hexadecimal escapes on
POSIX systems.  So use the shell to convert from hexadecimal to
octal.

With this change, an LZMA-compressed kernel built with dash as sh
boots correctly again.

Reported-by: Sebastian Dalfuß <sd@sedf.de>
Reported-by: Oliver Hartkopp <oliver@hartkopp.net>
Reported-by: Michael Guntsche <mike@it-loops.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Cc: Michael Tokarev <mjt@tls.msk.ru>
Cc: Alek Du <alek.du@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoHID: wacom: Add BTN_TOOL_FINGER for pad button reporting
Przemo Firszt [Sat, 9 Jan 2010 14:20:03 +0000 (15:20 +0100)] 
HID: wacom: Add BTN_TOOL_FINGER for pad button reporting

Without this patch xf86-input-wacom driver wasn't able to properly recognise
pad button events. It was also causing some problems with button mapping.

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
14 years agoHID: add device IDs for new model of Apple Wireless Keyboard
Christian Schuerer-Waldheim [Wed, 6 Jan 2010 13:49:57 +0000 (14:49 +0100)] 
HID: add device IDs for new model of Apple Wireless Keyboard

Added device IDs for the new model of the Apple Wireless Keyboard
(November 2009).

Signed-off-by: Christian Schuerer-Waldheim <csw@xray.at>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
14 years agoHID: fix pad button definition in hid-wacom
Przemo Firszt [Mon, 4 Jan 2010 11:32:00 +0000 (12:32 +0100)] 
HID: fix pad button definition in hid-wacom

This fix is required for xorg driver to recognise 2 pad buttons

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
14 years agox86: xen: 64-bit kernel RPL should be 0
Ian Campbell [Wed, 13 Jan 2010 10:16:08 +0000 (10:16 +0000)] 
x86: xen: 64-bit kernel RPL should be 0

Under Xen 64 bit guests actually run their kernel in ring 3,
however the hypervisor takes care of squashing descriptor the
RPLs transparently (in order to allow them to continue to
differentiate between user and kernel space CS using the RPL).
Therefore the Xen paravirt backend should use RPL==0 instead of
1 (or 3). Using RPL==1 causes generic arch code to take
incorrect code paths because it uses "testl $3, <CS>, je foo"
type tests for a userspace CS and this considers 1==userspace.

This issue was previously masked because get_kernel_rpl() was
omitted when setting CS in kernel_thread(). This was fixed when
kernel_thread() was unified with 32 bit in
f443ff4201dd25cd4dec183f9919ecba90c8edc2.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Christian Kujau <lists@nerdbynature.de>
Cc: Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Brian Gerst <brgerst@gmail.com>
LKML-Reference: <1263377768-19600-2-git-send-email-ian.campbell@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agox86: kernel_thread() -- initialize SS to a known state
Cyrill Gorcunov [Wed, 13 Jan 2010 10:16:07 +0000 (10:16 +0000)] 
x86: kernel_thread() -- initialize SS to a known state

Before the kernel_thread was converted into "C" we had
pt_regs::ss set to __KERNEL_DS (by SAVE_ALL asm macro).

Though I must admit I didn't find any *explicit* load of
%ss from this structure the better to be on a safe side
and set it to a known value.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Christian Kujau <lists@nerdbynature.de>
Cc: Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com>
Cc: Brian Gerst <brgerst@gmail.com>
LKML-Reference: <1263377768-19600-1-git-send-email-ian.campbell@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agox86/agp: Fix agp_amd64_init and agp_amd64_cleanup
FUJITA Tomonori [Mon, 4 Jan 2010 07:16:23 +0000 (16:16 +0900)] 
x86/agp: Fix agp_amd64_init and agp_amd64_cleanup

This fixes the regression introduced by the commit
f405d2c02395a74d3883bd03ded36457aa3697ad.

The above commit fixes the following issue:

  http://marc.info/?l=linux-kernel&m=126192729110083&w=2

However, it doesn't work properly when you remove and insert the
agp_amd64 module again.

agp_amd64_init() and agp_amd64_cleanup should be called only
when gart_iommu is not called earlier (that is, the GART IOMMU
is not enabled). We need to use 'gart_iommu_aperture' to see if
GART IOMMU is enabled or not.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: mitov@issp.bas.bg
Cc: davej@redhat.com
LKML-Reference: <20100104161603L.fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoxen: fix hang on suspend.
Ian Campbell [Thu, 17 Dec 2009 13:57:09 +0000 (13:57 +0000)] 
xen: fix hang on suspend.

In 65f63384 "xen: improve error handling in do_suspend" I said:
    - xs_suspend()/xs_resume() and dpm_suspend_noirq()/dpm_resume_noirq() were not
      nested in the obvious way.
and changed the ordering of the calls as so:
    BEFORE AFTER
    xs_suspend dpm_suspend_noirq
    dpm_suspend_noirq xs_suspend
    *SUSPEND* *SUSPEND*
    dpm_resume_noirq dpm_resume_noirq
    xs_resume xs_resume
Clearly this is not an improvement and I was talking rubbish.

In particular the new ordering is susceptible to a hang if a xenstore write is
in progress at the point at which the suspend kicks in. When the suspend
process calls xs_suspend it tries to take the request_mutex but if a write is
in progress it could be looping in xenbus_xs.c:read_reply() waiting for
something to arrive on &xs_state.reply_list while holding the request_mutex
(taken in the caller of read_reply).

However if we have done dpm_suspend_noirq before xs_suspend then we won't get
any more xenstore interrupts and process_msg() will never be woken up to add
anything to the reply_list.

Fix this by calling xs_suspend before dpm_suspend_noirq. If dpm_suspend_noirq
fails then make sure we go through the xs_suspend_cancel() code path.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Stable Kernel <stable@kernel.org>
14 years agox86: SGI UV: Fix mapping of MMIO registers
Mike Travis [Fri, 8 Jan 2010 20:13:54 +0000 (12:13 -0800)] 
x86: SGI UV: Fix mapping of MMIO registers

This fixes the problem of the initialization code not correctly
mapping the entire MMIO space on a UV system.  A side effect is
the map_high() interface needed to be changed to accommodate
different address and size shifts.

Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Mike Habeck <habeck@sgi.com>
Cc: <stable@kernel.org>
Cc: Jack Steiner <steiner@sgi.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <4B479202.7080705@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agox86: mce.h: Fix warning in header checks
Alan Cox [Mon, 4 Jan 2010 16:17:21 +0000 (16:17 +0000)] 
x86: mce.h: Fix warning in header checks

Someone isn't reading their build output: Move the definition
out of the exported header.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: linux-kernel@vger.kernelorg
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf tools: Check if /dev/null can be used as the -o gcc argument
Arnaldo Carvalho de Melo [Tue, 12 Jan 2010 10:58:30 +0000 (08:58 -0200)] 
perf tools: Check if /dev/null can be used as the -o gcc argument

At least on Debian PARISC64, using:

acme@parisc:~/git/linux-2.6-tip$ gcc -v
Using built-in specs.
Target: hppa-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian
4.3.4-6' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --disable-libssp --enable-checking=release --build=hppa-linux-gnu --host=hppa-linux-gnu --target=hppa-linux-gnu Thread model: posix gcc version 4.3.4 (Debian 4.3.4-6)

there are issues about using 'gcc -o /dev/null':

/usr/bin/ld: final link failed: File truncated
collect2: ld returned 1 exit status

So we test that and use /dev/null in environments where it
works, while using an .INTERMEDIATE file on those where it can't
be used, so that the .perf.dev.null file can be used instead and
then deleted when make exits.

Researched-with: Kyle McMartin <kyle@mcmartin.ca>
Researched-with: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1263293910-8484-2-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf tools: Move QUIET_STDERR def to before first use
Arnaldo Carvalho de Melo [Tue, 12 Jan 2010 10:58:29 +0000 (08:58 -0200)] 
perf tools: Move QUIET_STDERR def to before first use

QUIET_STDERR is used when detecting if -fstack-protector-all can
be used.

Noticed while building the perf tools on a Debian PARISC64
machine.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1263293910-8484-1-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf: Stop stack frame walking off kernel addresses boundaries
Frederic Weisbecker [Thu, 31 Dec 2009 02:52:25 +0000 (03:52 +0100)] 
perf: Stop stack frame walking off kernel addresses boundaries

While processing kernel perf callchains, an bad entry can be
considered as a valid stack pointer but not as a kernel address.

In this case, we hang in an endless loop. This can happen in an
x86-32 kernel after processing the last entry in a kernel
stacktrace.

Just stop the stack frame walking after we encounter an invalid
kernel address.

This fixes a hard lockup in x86-32.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1262227945-27014-1-git-send-regression-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoInput: sentelic - fix left/right horizontal scroll mapping
Tai-hwa Liang [Wed, 13 Jan 2010 08:25:35 +0000 (00:25 -0800)] 
Input: sentelic - fix left/right horizontal scroll mapping

Signed-off-by: Tai-hwa Liang <avatar@sentelic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
14 years agoInput: pmouse - move Sentelic probe down the list
Tai-hwa Liang [Wed, 13 Jan 2010 08:16:27 +0000 (00:16 -0800)] 
Input: pmouse - move Sentelic probe down the list

Sentelic probes confuse IBM trackpoints so they stop responding to
TP_READ_ID command. See:

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

Let's move FSP detection lower so it is probed after trackpoint and
others, just before we strat probing for Intellimouse Explorer.

Signed-off-by: Tai-hwa Liang <avatar@sentelic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
14 years agofutexes: Remove rw parameter from get_futex_key()
KOSAKI Motohiro [Tue, 5 Jan 2010 07:32:43 +0000 (16:32 +0900)] 
futexes: Remove rw parameter from get_futex_key()

Currently, futexes have two problem:

A) The current futex code doesn't handle private file mappings properly.

get_futex_key() uses PageAnon() to distinguish file and
anon, which can cause the following bad scenario:

  1) thread-A call futex(private-mapping, FUTEX_WAIT), it
     sleeps on file mapping object.
  2) thread-B writes a variable and it makes it cow.
  3) thread-B calls futex(private-mapping, FUTEX_WAKE), it
     wakes up blocked thread on the anonymous page. (but it's nothing)

B) Current futex code doesn't handle zero page properly.

Read mode get_user_pages() can return zero page, but current
futex code doesn't handle it at all. Then, zero page makes
infinite loop internally.

The solution is to use write mode get_user_page() always for
page lookup. It prevents the lookup of both file page of private
mappings and zero page.

Performance concerns:

Probaly very little, because glibc always initialize variables
for futex before to call futex(). It means glibc users never see
the overhead of this patch.

Compatibility concerns:

This patch has few compatibility issues. After this patch,
FUTEX_WAIT require writable access to futex variables (read-only
mappings makes EFAULT). But practically it's not a problem,
glibc always initalizes variables for futexes explicitly - nobody
uses read-only mappings.

Reported-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Darren Hart <dvhltc@us.ibm.com>
Cc: <stable@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Ulrich Drepper <drepper@gmail.com>
LKML-Reference: <20100105162633.45A2.A69D9226@jp.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge remote branch 'korg/drm-radeon-next' into drm-linus
Dave Airlie [Wed, 13 Jan 2010 06:17:38 +0000 (16:17 +1000)] 
Merge remote branch 'korg/drm-radeon-next' into drm-linus

* korg/drm-radeon-next
  drm/radeon/kms: only evict to GTT if CP is ready
  drm/radeon/kms: Fix crash getting TV info with no BIOS.
  drm/radeon/kms/rv100: reject modes > 135 Mhz on DVI (v2)
  drm/radeon/kms/r6xx+: make irq handler less verbose
  drm/radeon/kms: fix up LVDS handling on macs (v2)

14 years agodrm: change drm set mode messages as DRM_DEBUG
Dave Young [Wed, 13 Jan 2010 05:38:59 +0000 (13:38 +0800)] 
drm: change drm set mode messages as DRM_DEBUG

Following drm info repeat 207 times during one hour, it's quite annoying
[ 1266.286747] [drm] TV-19: set mode NTSC 480i 0

Change from DRM_INFO to DRM_DEBUG

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm: fix crtc no modes printf + typo
Dave Airlie [Wed, 13 Jan 2010 06:15:11 +0000 (16:15 +1000)] 
drm: fix crtc no modes printf + typo

Toralf Förster pointed out the typo, the fact I forget the if
statement is purely personal fail.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Wed, 13 Jan 2010 05:33:49 +0000 (21:33 -0800)] 
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

14 years agoLinux 2.6.33-rc4
Linus Torvalds [Wed, 13 Jan 2010 05:15:00 +0000 (21:15 -0800)] 
Linux 2.6.33-rc4

14 years agoMerge git://git.infradead.org/battery-2.6
Linus Torvalds [Wed, 13 Jan 2010 05:13:06 +0000 (21:13 -0800)] 
Merge git://git.infradead.org/battery-2.6

* git://git.infradead.org/battery-2.6:
  pmu_battery: Fix battery full reporting

14 years ago[SCSI] megaraid_sas: remove sysfs poll_mode_io world writeable permissions
Bryn M. Reeves [Thu, 12 Nov 2009 18:31:54 +0000 (18:31 +0000)] 
[SCSI] megaraid_sas: remove sysfs poll_mode_io world writeable permissions

/sys/bus/pci/drivers/megaraid_sas/poll_mode_io defaults to being
world-writable, which seems bad (letting any user affect kernel driver
behavior).

This turns off group and user write permissions, so that on typical
production systems only root can write to it.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'for-linus' of git://gitorious.org/linux-omap-dss2/linux
Linus Torvalds [Wed, 13 Jan 2010 05:04:04 +0000 (21:04 -0800)] 
Merge branch 'for-linus' of git://gitorious.org/linux-omap-dss2/linux

* 'for-linus' of git://gitorious.org/linux-omap-dss2/linux:
  OMAP: DSS2: OMAPFB: fix crash when panel driver was not loaded
  OMAP: DSS2: Reject scaling settings when they cannot be supported
  OMAP: DSS2: Make check-delay-loops consistent
  OMAP: DSS2: OMAPFB: fix omapfb_free_fbmem()
  video/omap: add __init/__exit macros to drivers/video/omap/lcd_htcherald.c
  OMAP: DSS2: Fix compile warning
  MAINTAINERS: Combine DSS2 and OMAPFB2 into one entry
  MAINTAINERS: change omapfb maintainer
  OMAP: OMAPFB: add dummy release function for omapdss
  OMAP: OMAPFB: fix clk_get for RFBI
  OMAP: DSS2: RFBI: convert to new kfifo API
  OMAP: DSS2: Fix crash when panel doesn't define enable_te()
  OMAP: DSS2: Collect interrupt statistics
  OMAP: DSS2: DSI: print debug DCS cmd in hex
  OMAP: DSS2: DSI: fix VC channels in send_short and send_null

14 years agolib: Introduce generic list_sort function
Dave Chinner [Tue, 12 Jan 2010 06:39:16 +0000 (17:39 +1100)] 
lib: Introduce generic list_sort function

There are two copies of list_sort() in the tree already, one in the DRM
code, another in ubifs.  Now XFS needs this as well.  Create a generic
list_sort() function from the ubifs version and convert existing users
to it so we don't end up with yet another copy in the tree.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Acked-by: Artem Bityutskiy <dedekind@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoremove my email address from checkpatch.
Dave Jones [Tue, 12 Jan 2010 21:59:52 +0000 (16:59 -0500)] 
remove my email address from checkpatch.

Maybe this will stop people emailing me about it.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Wed, 13 Jan 2010 04:56:20 +0000 (20:56 -0800)] 
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata: retry link resume if necessary
  ata_piix: enable 32bit PIO on SATA piix
  sata_promise: don't classify overruns as HSM errors

14 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Wed, 13 Jan 2010 04:56:01 +0000 (20:56 -0800)] 
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  ARM: Ensure ARMv6/7 mm files are built using appropriate assembler options
  ARM: Fix wrong dmb
  ARM: 5874/1: serial21285: fix disable_irq-from-interrupt-handler deadlock
  ARM: 5873/1: ARM: Fix the reset logic for ARM RealView boards
  ARM: 5872/1: ARM: include needed linux/cpu.h in asm/cpu.h
  ARM: 5871/1: arch/arm: Fix build failure for lpd7a404_defconfig caused by missing includes
  ARM: 5870/1: arch/arm: Fix build failure for defconfigs without CONFIG_ISA_DMA_API set
  ARM: 5868/1: ARM: fix "BUG: using smp_processor_id() in preemptible code"
  ARM: 5867/1: Update U300 defconfig
  ARM: 5866/1: arm ptrace: use unsigned types for kernel pt_regs
  [ARM] pxa: fix strange characters in zaurus gpio .desc
  ARM: add missing recvmmsg syscall number
  [ARM] pxa: fix compiler warnings of unused variable 'id' in cpu_is_pxa9*()
  [ARM] pxa: update pwm_backlight->notify() to include missed 'struct device *'
  [ARM] pxa: enable L2 if present in XSC3
  [ARM] pxa: do not enable L2 after MMU is enabled

14 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Wed, 13 Jan 2010 04:55:31 +0000 (20:55 -0800)] 
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (22 commits)
  MIPS: Ignore vmlinux.*
  MIPS: Move vmlinux.ecoff to arch/mips/boot
  MIPS: cpumask_of_node() should handle -1 as a node
  MIPS: Octeon: Use non-overflowing arithmetic in sched_clock
  MIPS: Malta, PowerTV: Remove unnecessary "Linux started"
  MIPS: BCM63xx: Remove duplicate CONFIG_CMDLINE.
  MIPS: AR7: Remove unused prom_getchar()
  MIPS: PowerTV: Remove extra r4k_clockevent_init() call
  MIPS: Cobalt use strlcat() for the command line arguments
  MIPS: Octeon: Add sched_clock() to csrc-octeon.c
  MIPS: TXx9: Cleanup builtin-cmdline processing
  MIPS: PowerTV: simplify prom_init_cmdline() and merge into prom_init()
  MIPS: PowerTV: Remove unused platform_die()
  MIPS: PowerTV: Remove mips_machine_halt()
  MIPS: PowerTV: Remove unused ptv_memsize
  MIPS: PowerTV: Remove unused prom_getcmdline()
  MIPS: AR7: Remove kgdb_enabled
  MIPS: Alchemy: Correct code taking the size of a pointer
  MIPS: BCM63xx: Fix whitespace damaged board_bcm963xx.c
  MIPS: VR41xx: Use strlcat() for the command line arguments
  ...

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Wed, 13 Jan 2010 04:54:52 +0000 (20:54 -0800)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Fix ALC861-VD capture source mixer
  ALSA: ac97: add AC97 STMicroelectronics' codecs
  ALSA: ac97: Add Dell Dimension 2400 to Headphone/Line Jack Sense blacklist
  ASoC: Fix WM8350 DSP mode B configuration
  sbawe: fix memory detection part 2
  sound: oss: off by one bug
  ALSA: usb-audio - Avoid Oops after disconnect
  ALSA: test off by one in setsamplerate()
  ALSA: atiixp: Specify codec for Foxconn RC4107MA-RS2

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 13 Jan 2010 04:53:29 +0000 (20:53 -0800)] 
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (56 commits)
  sky2: Fix oops in sky2_xmit_frame() after TX timeout
  Documentation/3c509: document ethtool support
  af_packet: Don't use skb after dev_queue_xmit()
  vxge: use pci_dma_mapping_error to test return value
  netfilter: ebtables: enforce CAP_NET_ADMIN
  e1000e: fix and commonize code for setting the receive address registers
  e1000e: e1000e_enable_tx_pkt_filtering() returns wrong value
  e1000e: perform 10/100 adaptive IFS only on parts that support it
  e1000e: don't accumulate PHY statistics on PHY read failure
  e1000e: call pci_save_state() after pci_restore_state()
  netxen: update version to 4.0.72
  netxen: fix set mac addr
  netxen: fix smatch warning
  netxen: fix tx ring memory leak
  tcp: update the netstamp_needed counter when cloning sockets
  TI DaVinci EMAC: Handle emac module clock correctly.
  dmfe/tulip: Let dmfe handle DM910x except for SPARC on-board chips
  ixgbe: Fix compiler warning about variable being used uninitialized
  netfilter: nf_ct_ftp: fix out of bounds read in update_nl_seq()
  mv643xx_eth: don't include cache padding in rx desc buffer size
  ...

Fix trivial conflict in drivers/scsi/cxgb3i/cxgb3i_offload.c

14 years agom68knommu: fix definitions of __pa() and __va()
Greg Ungerer [Wed, 13 Jan 2010 00:42:05 +0000 (10:42 +1000)] 
m68knommu: fix definitions of __pa() and __va()

Fix compilation breakage of all m68knommu targets:

  CC      arch/m68knommu/kernel/asm-offsets.s
In file included from include/linux/sched.h:77,
                 from arch/m68knommu/kernel/asm-offsets.c:12:
include/linux/percpu.h: In function 'per_cpu_ptr_to_phys':
include/linux/percpu.h:161: error: implicit declaration of function 'virt_to_phy

This is broken in linux-2.6.33-rc3.

Change the definitions of __pa() and __va() to not use virt_to_phys()
and phys_to_virt(). Trivial 1:1 conversion required for the non-MMU case.

A side effect if this is that the m68knommu can now use asm/virtconvert.h
for the definition of virt_to_phys() and phys_to_virt().

Also cleaned up the definition of page_to_phys() when moving into
virtconvert.h.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodrm/radeon/kms: only evict to GTT if CP is ready
Dave Airlie [Tue, 12 Jan 2010 23:21:49 +0000 (09:21 +1000)] 
drm/radeon/kms: only evict to GTT if CP is ready

Testing GTT ready might be more correct but cp.ready
works fine and has been tested on irc by 2-3 ppl.

fixes bug k.org 15035 and fd.o 25733

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: Fix crash getting TV info with no BIOS.
Michel Dänzer [Mon, 11 Jan 2010 07:58:38 +0000 (08:58 +0100)] 
drm/radeon/kms: Fix crash getting TV info with no BIOS.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms/rv100: reject modes > 135 Mhz on DVI (v2)
Alex Deucher [Mon, 11 Jan 2010 20:02:31 +0000 (15:02 -0500)] 
drm/radeon/kms/rv100: reject modes > 135 Mhz on DVI (v2)

Due to heat issues.  Fixes fdo bug 25992

v2: fix typo noticed by Maarten Maathuis

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms/r6xx+: make irq handler less verbose
Alex Deucher [Tue, 12 Jan 2010 00:47:38 +0000 (19:47 -0500)] 
drm/radeon/kms/r6xx+: make irq handler less verbose

Unhandled vectors can be safely ignored, no need
to spam the kernel log by default.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: fix up LVDS handling on macs (v2)
Alex Deucher [Tue, 12 Jan 2010 16:16:57 +0000 (11:16 -0500)] 
drm/radeon/kms: fix up LVDS handling on macs (v2)

Based on radeonfb code and recent ddx fix.

v2: minor formatting fix from Michel Dänzer

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Tested-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/i915: Don't wait interruptible for possible plane buffer flush
Zhenyu Wang [Wed, 25 Nov 2009 05:09:39 +0000 (13:09 +0800)] 
drm/i915: Don't wait interruptible for possible plane buffer flush

When we setup buffer for display plane, we'll check any pending
required GPU flush and possible make interruptible wait for flush
complete. But that wait would be most possibly to fail in case of
signals received for X process, which will then fail modeset process
and put display engine in unconsistent state. The result could be
blank screen or CPU hang, and DDX driver would always turn on outputs
DPMS after whatever modeset fails or not.

So this one creates new helper for setup display plane buffer, and
when needing flush using uninterruptible wait for that.

This one should fix bug like https://bugs.freedesktop.org/show_bug.cgi?id=24009.
Also fixing mode switch stress test on Ironlake.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: try another possible DDC bus for the SDVO device with multiple outputs
Zhao Yakui [Fri, 8 Jan 2010 02:58:20 +0000 (10:58 +0800)] 
drm/i915: try another possible DDC bus for the SDVO device with multiple outputs

There exist multiple DDC buses for the SDVO cards with multiple outputs.
When we can't get the EDID by using the select DDC bus, we can try the other
possible DDC bus to see whether the EDID can be obtained.

https://bugs.freedesktop.org/show_bug.cgi?id=23842

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Tested-by: Sebastien Caty <sebastien.caty@mrnf.gouv.qc.ca>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Read the response after issuing DDC bus switch command
Zhao Yakui [Fri, 8 Jan 2010 02:58:19 +0000 (10:58 +0800)] 
drm/i915: Read the response after issuing DDC bus switch command

For some SDVO cards based on conexant chip, we can't read the EDID if
we don't read the response after issuing SDVO DDC bus switch
command.

From the SDVO spec once when another I2C transaction is finished after
completing the I2C transaction of issuing the bus switch command, it
will be switched back to the SDVO internal state again. So we can't
initiate a new I2C transaction to read the response after issuing the
DDC bus switch command. Instead we should issue DDC bus switch command
and read the response in the same I2C transaction.

https://bugs.freedesktop.org/show_bug.cgi?id=23842
https://bugs.freedesktop.org/show_bug.cgi?id=24458
https://bugs.freedesktop.org/show_bug.cgi?id=24522
https://bugs.freedesktop.org/show_bug.cgi?id=24282

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Tested-by: Sebastien Caty <sebastien.caty@mrnf.gouv.qc.ca>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Don't use the child device parsed from VBT to setup HDMI/DP
Zhao Yakui [Wed, 6 Jan 2010 01:49:31 +0000 (09:49 +0800)] 
drm/i915: Don't use the child device parsed from VBT to setup HDMI/DP

On some boxes the BIOS will report different child device arrays when
the system is booted with/without the dock. In such case the HDMI/DP
port can't be setup correctly.  So revert two commits
(fc816655236cd9da162356e96e74c7cfb0834d92/
6e36595a2131e7ed5ee2674be54b2713ba7f0490) that use the child device
parsed from VBT to setup HDMI/DP.

http://bugzilla.kernel.org/show_bug.cgi?id=14854
http://bugzilla.kernel.org/show_bug.cgi?id=14860

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Tested-by: Sean Young <sean@mess.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
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.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
[anholt: added comment explaining when .suspend/.resume matter]
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agolibata: retry link resume if necessary
Tejun Heo [Mon, 11 Jan 2010 02:14:44 +0000 (11:14 +0900)] 
libata: retry link resume if necessary

Interestingly, when SIDPR is used in ata_piix, writes to DET in
SControl sometimes get ignored leading to detection failure.  Update
sata_link_resume() such that it reads back SControl after clearing DET
and retry if it's not clear.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: fengxiangjun <fengxiangjun@neusoft.com>
Reported-by: Jim Faulkner <jfaulkne@ccs.neu.edu>
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoata_piix: enable 32bit PIO on SATA piix
Tejun Heo [Mon, 11 Jan 2010 08:03:11 +0000 (17:03 +0900)] 
ata_piix: enable 32bit PIO on SATA piix

Commit 871af1210f13966ab911ed2166e4ab2ce775b99d enabled 32bit PIO for
PATA piix but didn't for SATA.  There's no reason not to use 32bit PIO
on SATA piix.  Enable it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agosata_promise: don't classify overruns as HSM errors
Mikael Pettersson [Sat, 9 Jan 2010 22:32:06 +0000 (23:32 +0100)] 
sata_promise: don't classify overruns as HSM errors

When sata_promise encounters an overrun or underrun error it
translates that to a libata AC_ERR_HSM, causing a hard reset.
Since over/under-runs were thought to be rare and transient,
this action seemed reasonable.

Unfortunately it turns out that the controller throws overrun
errors when e.g. hal polls a CD or DVD writer containing blank
media, causing long sequences of hard resets and retries before
EH finally gives up.

This patch updates sata_promise to classify over/under-runs as
AC_ERR_OTHER instead. This allows libata EH and upper layers to
retry or fail the operation as they see fit without the disruption
caused by repeated hard resets.

This fixes a problem using a DVD-RAM drive with sata_promise,
reported by Thomas Schorpp. I also tested it on a DVD-RW drive.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Tested-by: thomas schorpp <thomas.schorpp@googlemail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoARM: Ensure ARMv6/7 mm files are built using appropriate assembler options
Russell King [Tue, 12 Jan 2010 19:02:05 +0000 (19:02 +0000)] 
ARM: Ensure ARMv6/7 mm files are built using appropriate assembler options

A kernel with both ARMv6 and ARMv7 selected results in build errors.
Fix this by specifying the proper architectures for these assembly
files.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: Fix wrong dmb
Russell King [Tue, 12 Jan 2010 18:59:16 +0000 (18:59 +0000)] 
ARM: Fix wrong dmb

The __kuser_cmpxchg code uses an ARMv6 dmb instruction, rather than
one based upon the architecture being built for.  Switch to using
the macro provided for this purpose, which also eliminates the
need for an ifdef.

Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoInput: add compat support for sysfs and /proc capabilities output
Dmitry Torokhov [Mon, 11 Jan 2010 08:05:43 +0000 (00:05 -0800)] 
Input: add compat support for sysfs and /proc capabilities output

Input core displays capabilities bitmasks in form of one or more longs printed
in hex form and separated by spaces. Unfortunately it does not work well
for 32-bit applications running on 64-bit kernels since applications expect
that number is "worth" only 32 bits when kernel advances by 64 bits.

Fix that by ensuring that output produced for compat tasks uses 32-bit units.

Reported-and-tested-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
14 years agoMIPS: Ignore vmlinux.*
Yoichi Yuasa [Fri, 18 Dec 2009 12:14:19 +0000 (21:14 +0900)] 
MIPS: Ignore vmlinux.*

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/795/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Move vmlinux.ecoff to arch/mips/boot
Yoichi Yuasa [Fri, 18 Dec 2009 12:13:17 +0000 (21:13 +0900)] 
MIPS: Move vmlinux.ecoff to arch/mips/boot

It moves to the same directory as the boot files in other formats.

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/796/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: cpumask_of_node() should handle -1 as a node
Anton Blanchard [Wed, 6 Jan 2010 04:55:13 +0000 (15:55 +1100)] 
MIPS: cpumask_of_node() should handle -1 as a node

pcibus_to_node can return -1 if we cannot determine which node a pci bus
is on. If passed -1, cpumask_of_node will negatively index the lookup array
and pull in random data:

# cat /sys/devices/pci0000:00/0000:00:01.0/local_cpus
00000000,00000003,00000000,00000000
# cat /sys/devices/pci0000:00/0000:00:01.0/local_cpulist
64-65

Change cpumask_of_node to check for -1 and return cpu_all_mask in this
case:

# cat /sys/devices/pci0000:00/0000:00:01.0/local_cpus
ffffffff,ffffffff,ffffffff,ffffffff
# cat /sys/devices/pci0000:00/0000:00:01.0/local_cpulist
0-127

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andrew Morton <akpm@linux-foundation.org>
Patchwork: http://patchwork.linux-mips.org/patch/831/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Octeon: Use non-overflowing arithmetic in sched_clock
David Daney [Fri, 8 Jan 2010 22:47:36 +0000 (14:47 -0800)] 
MIPS: Octeon: Use non-overflowing arithmetic in sched_clock

With typical mult and shift values, the calculation for Octeon's sched_clock
overflows when using 64-bit arithmetic.  Use 128-bit calculations instead.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/849/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Malta, PowerTV: Remove unnecessary "Linux started"
Yoichi Yuasa [Sun, 3 Jan 2010 05:47:34 +0000 (14:47 +0900)] 
MIPS: Malta, PowerTV: Remove unnecessary "Linux started"

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/813/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: BCM63xx: Remove duplicate CONFIG_CMDLINE.
Yoichi Yuasa [Sun, 3 Jan 2010 05:39:11 +0000 (14:39 +0900)] 
MIPS: BCM63xx: Remove duplicate CONFIG_CMDLINE.

Builtin cmdline is copied by arch_mem_init().

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/812/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: AR7: Remove unused prom_getchar()
Yoichi Yuasa [Sun, 3 Jan 2010 05:13:04 +0000 (14:13 +0900)] 
MIPS: AR7: Remove unused prom_getchar()

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/811/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: PowerTV: Remove extra r4k_clockevent_init() call
David VomLehn [Tue, 22 Dec 2009 01:43:42 +0000 (17:43 -0800)] 
MIPS: PowerTV: Remove extra r4k_clockevent_init() call

A call to r4k_clocksource_init() was added to plat_time_init(), but
when init_mips_clock_source() calls the same function, boot fails in
clockevents_register_device(). This patch removes the extraneous call.

Signed-off-by: David VomLehn <dvomlehn@cisco.com>
Patchwork: http://patchwork.linux-mips.org/patch/803/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Cobalt use strlcat() for the command line arguments
Yoichi Yuasa [Thu, 24 Dec 2009 08:06:34 +0000 (17:06 +0900)] 
MIPS: Cobalt use strlcat() for the command line arguments

Tested with CoLo v1.22

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/807/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Octeon: Add sched_clock() to csrc-octeon.c
David Daney [Wed, 23 Dec 2009 21:18:54 +0000 (13:18 -0800)] 
MIPS: Octeon: Add sched_clock() to csrc-octeon.c

With the advent of function graph tracing on MIPS, Octeon needs a high
precision sched_clock() implementation.  Without it, most timing
numbers are reported as 0.000.

This new sched_clock just uses the 64-bit cycle counter appropriately
scaled.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/805/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: TXx9: Cleanup builtin-cmdline processing
Atsushi Nemoto [Mon, 21 Dec 2009 15:48:57 +0000 (00:48 +0900)] 
MIPS: TXx9: Cleanup builtin-cmdline processing

Since commit 898d357b5262f9e26bc2418e01f8676e80d9867e (lmo) /
6acc7d485c24c00e111c61b2e6dff9180faebcae (kernel.org) ("Fix and enhance
built-in kernel command line") arcs_cmdline[] does not contain built-in
command line.  The commit introduce CONFIG_CMDLINE_BOOL and
CONFIG_CMDLINE_OVERRIDE to control built-in command line, and now we can
use them instead of platform-specific built-in command line processing.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Patchwork: http://patchwork.linux-mips.org/patch/802/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: PowerTV: simplify prom_init_cmdline() and merge into prom_init()
Yoichi Yuasa [Fri, 18 Dec 2009 12:38:37 +0000 (21:38 +0900)] 
MIPS: PowerTV: simplify prom_init_cmdline() and merge into prom_init()

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/801/
Reviewed-by: David VomLehn <dvomlehn@cisco.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: PowerTV: Remove unused platform_die()
Yoichi Yuasa [Fri, 18 Dec 2009 12:36:32 +0000 (21:36 +0900)] 
MIPS: PowerTV: Remove unused platform_die()

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/800/
Reviewed-by: David VomLehn <dvomlehn@cisco.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: PowerTV: Remove mips_machine_halt()
Yoichi Yuasa [Fri, 18 Dec 2009 12:33:46 +0000 (21:33 +0900)] 
MIPS: PowerTV: Remove mips_machine_halt()

mips_machine_halt() is same as mips_machine_restart().  Also delete the
registration of _machine_halt and pm_power_off because mips_machine_halt()
is the restart function.

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/798/
Reviewed-by: David VomLehn <dvomlehn@cisco.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: PowerTV: Remove unused ptv_memsize
Yoichi Yuasa [Fri, 18 Dec 2009 12:30:18 +0000 (21:30 +0900)] 
MIPS: PowerTV: Remove unused ptv_memsize

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/799/
Reviewed-by: David VomLehn <dvomlehn@cisco.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: PowerTV: Remove unused prom_getcmdline()
Yoichi Yuasa [Fri, 18 Dec 2009 12:29:17 +0000 (21:29 +0900)] 
MIPS: PowerTV: Remove unused prom_getcmdline()

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/797/
Reviewed-by: David VomLehn <dvomlehn@cisco.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: AR7: Remove kgdb_enabled
Yoichi Yuasa [Fri, 18 Dec 2009 12:20:24 +0000 (21:20 +0900)] 
MIPS: AR7: Remove kgdb_enabled

An unused leftover from the old KGDB implementation.

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/794/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Alchemy: Correct code taking the size of a pointer
Julia Lawall [Sun, 13 Dec 2009 11:40:39 +0000 (12:40 +0100)] 
MIPS: Alchemy: Correct code taking the size of a pointer

sizeof(dp) is just the size of the pointer.  Change it to the size of the
referenced structure.

A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression *x;
expression f;
type T;
@@

*f(...,(T)x,...)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Patchwork: http://patchwork.linux-mips.org/patch/789/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: BCM63xx: Fix whitespace damaged board_bcm963xx.c
Florian Fainelli [Sat, 12 Dec 2009 16:57:39 +0000 (17:57 +0100)] 
MIPS: BCM63xx: Fix whitespace damaged board_bcm963xx.c

Signed-off-by: Florian Fainelli <ffainelli@freebox.fr>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: VR41xx: Use strlcat() for the command line arguments
Yoichi Yuasa [Thu, 10 Dec 2009 05:00:39 +0000 (14:00 +0900)] 
MIPS: VR41xx: Use strlcat() for the command line arguments

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/784/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Cleanup and Fixup of compressed kernel support
Wu Zhangjin [Thu, 10 Dec 2009 14:55:13 +0000 (22:55 +0800)] 
MIPS: Cleanup and Fixup of compressed kernel support

 o Remove the .initrd section.  The initrd section was already handled
   when vmlinux was linked.
 o Discard .MIPS.options, .options, .pdr, .reginfo, .comment and .note
   sections.  If .MIPS.options is not removed, kernels compiled with gcc
   3.4.6 will not boot.
 o Clean up the file format.
 o Remove several other unneeded sections.

Tested with GCC 3.4.6 and 4.4.1 with and without initrd.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/785/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Cleanup forgotten label_module_alloc in tlbex.c
David Daney [Fri, 4 Dec 2009 01:43:54 +0000 (17:43 -0800)] 
MIPS: Cleanup forgotten label_module_alloc in tlbex.c

commit c8af165342e83a4eb078c9607d29a7c399d30a53 (lmo) rsp.
e0cc87f59490d7d62a8ab2a76498dc8a2b64927a (kernel.org) left
label_module_alloc unused.  Remove it now.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/752/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Tue, 12 Jan 2010 16:50:06 +0000 (17:50 +0100)] 
Merge branch 'fix/asoc' into for-linus

14 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Tue, 12 Jan 2010 16:50:03 +0000 (17:50 +0100)] 
Merge branch 'fix/hda' into for-linus

14 years agoALSA: hda - Fix ALC861-VD capture source mixer
Takashi Iwai [Tue, 12 Jan 2010 13:00:11 +0000 (14:00 +0100)] 
ALSA: hda - Fix ALC861-VD capture source mixer

The capture source or input source mixer element wasn't created properly
for ALC861-VD codec due to the wrong NID passed to
alc_auto_create_input_ctls().

References: Novell bnc#568305
http://bugzilla.novell.com/show_bug.cgi?id=568305

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
14 years agosky2: Fix oops in sky2_xmit_frame() after TX timeout
Jarek Poplawski [Mon, 4 Jan 2010 08:48:41 +0000 (08:48 +0000)] 
sky2: Fix oops in sky2_xmit_frame() after TX timeout

During TX timeout procedure dev could be awoken too early, e.g. by
sky2_complete_tx() called from sky2_down(). Then sky2_xmit_frame()
can run while buffers are freed causing an oops. This patch fixes it
by adding netif_device_present() test in sky2_tx_complete().

Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=14925
With debugging by: Mike McCormack <mikem@ring3k.org>

Reported-by: Berck E. Nash <flyboy@gmail.com>
Tested-by: Berck E. Nash <flyboy@gmail.com>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoOMAP: DSS2: OMAPFB: fix crash when panel driver was not loaded
Tomi Valkeinen [Thu, 7 Jan 2010 15:45:03 +0000 (17:45 +0200)] 
OMAP: DSS2: OMAPFB: fix crash when panel driver was not loaded

If the panel's probe had failed, omapfb would still go on, eventually
crashing.

A better fix would be to handle each display properly, and leaving just
the failed display out. But that is a bigger change.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
14 years agoOMAP: DSS2: Reject scaling settings when they cannot be supported
Ville Syrjälä [Fri, 8 Jan 2010 09:56:41 +0000 (11:56 +0200)] 
OMAP: DSS2: Reject scaling settings when they cannot be supported

If the scaling ratio is below 0.5 video output width can't be identical
to the display width. Reject such settings.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
14 years agoMerge remote branch 'alsa/fixes' into fix/misc
Takashi Iwai [Tue, 12 Jan 2010 08:40:48 +0000 (09:40 +0100)] 
Merge remote branch 'alsa/fixes' into fix/misc

14 years agotracing/x86: Derive arch from bits argument in recordmcount.pl
Jan Kiszka [Mon, 11 Jan 2010 10:31:44 +0000 (11:31 +0100)] 
tracing/x86: Derive arch from bits argument in recordmcount.pl

Let the arch argument be overruled by bits. Otherwise, building of
external modules against a i386 target on a x86-64 host (and likely vice
versa as well) fails unless ARCH=i386 is explicitly passed to make.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
LKML-Reference: <4B4AFE10.8050109@siemens.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
14 years agoRevert "x86, apic: Use logical flat on intel with <= 8 logical cpus"
Ananth N Mavinakayanahalli [Mon, 11 Jan 2010 23:51:04 +0000 (15:51 -0800)] 
Revert "x86, apic: Use logical flat on intel with <= 8 logical cpus"

Revert commit 2fbd07a5f5d1295fa9b0c0564ec27da7c276a75a, as this commit
breaks an IBM platform with quad-core Xeon cpu's.

According to Suresh, this might be an IBM platform issue, as on other
Intel platforms with <= 8 logical cpu's, logical flat mode works fine
irespective of physical apic id values (inline with the xapic
architecture).

Revert this for now because of the IBM platform breakage.

Another version will be re-submitted after the complete analysis.

Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agocfg80211: fix refcount imbalance when wext is disabled
Johannes Berg [Mon, 11 Jan 2010 15:14:57 +0000 (16:14 +0100)] 
cfg80211: fix refcount imbalance when wext is disabled

When CONFIG_CFG80211_WEXT is not set, there is
a refcount imbalance with rdev->opencount, fix
that by moving it out of the ifdef.

Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix queue selection for data frames on monitor interfaces
Felix Fietkau [Mon, 11 Jan 2010 05:47:00 +0000 (06:47 +0100)] 
mac80211: fix queue selection for data frames on monitor interfaces

When ieee80211_monitor_select_queue encounters data frames, it selects
the WMM AC based on skb->priority and assumes that skb->priority
contains a valid 802.1d tag. However this assumption is incorrect, since
ieee80211_select_queue has not been called at this point.
If skb->priority > 7, an array overrun occurs, which could lead to
invalid values, resulting in crashes in the tx path.
Fix this by setting skb->priority based on the 802.11 header for QoS
frames and using the default AC for all non-QoS frames.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoDocumentation/3c509: document ethtool support
Ben Hutchings [Mon, 11 Jan 2010 23:53:45 +0000 (15:53 -0800)] 
Documentation/3c509: document ethtool support

3c509 was changed to support ethtool in 2002, making the 'xcvr' module
parameter obsolete in most cases.  More recently 3c509 was converted
to the modern driver model and this parameter was removed.  Fix the
documentation to refer to ethtool rather than the module parameter.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
This page took 0.050024 seconds and 5 git commands to generate.