]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
14 years agoMerge branch 'kbuild/kbuild' into kbuild/for-next
Michal Marek [Tue, 3 Aug 2010 12:24:38 +0000 (14:24 +0200)]
Merge branch 'kbuild/kbuild' into kbuild/for-next

Conflicts:
arch/powerpc/Makefile

14 years agoMerge branch 'kbuild/kconfig' into kbuild/for-next
Michal Marek [Tue, 3 Aug 2010 12:23:30 +0000 (14:23 +0200)]
Merge branch 'kbuild/kconfig' into kbuild/for-next

Conflicts:
scripts/kconfig/Makefile

14 years agofrv: clean up arch/frv/Makefile
Sam Ravnborg [Wed, 28 Jul 2010 17:33:00 +0000 (19:33 +0200)]
frv: clean up arch/frv/Makefile

- removed a lot of unused variable assignmnets
- removed unused bootstrap target
- replaced ARCHMODFLAGS with proper KBUILD_{A,C}FLAGS_MODULE assignmnets

The resuting Makefile has not been tested due to lack of toolchain,
but these were all trivial changes.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokbuild: allow assignment to {A,C}FLAGS_KERNEL on the command line
Sam Ravnborg [Wed, 28 Jul 2010 17:11:27 +0000 (19:11 +0200)]
kbuild: allow assignment to {A,C}FLAGS_KERNEL on the command line

It is now possible to assign options to AS and CC
on the command line - which is only used for built-in code.

{A,C}FLAGS_KERNEL was used both in the top-level Makefile
in the arch makefiles, thus users had no way to specify
additional options to AS, CC without overriding
the original value.

Introduce a new set of variables KBUILD_{A,C}FLAGS_KERNEL
that is used by arch specific files and free up
{A,C}FLAGS_KERNEL so they can be assigned on
the command line.

All arch Makefiles that used the old variables has been updated.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line
Sam Ravnborg [Wed, 28 Jul 2010 15:33:09 +0000 (17:33 +0200)]
kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line

It is now possible to assign options to AS, CC and LD
on the command line - which is only used when building modules.

{A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile
in the arch makefiles, thus users had no way to specify
additional options to AS, CC, LD when building modules
without overriding the original value.

Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE
that is used by arch specific files and free up
{A,C,LD}FLAGS_MODULE so they can be assigned on
the command line.

All arch Makefiles that used the old variables has been updated.

Note: Previously we had a MODFLAGS variable for both
AS and CC. But in favour of consistency this was dropped.
So in some cases arch Makefile has one assignmnet replaced by
two assignmnets.

Note2: MODFLAGS was not documented and is dropped
without any notice. I do not expect much/any breakage
from this.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin]
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [avr32]
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokconfig: add savedefconfig
Sam Ravnborg [Sat, 31 Jul 2010 21:35:34 +0000 (23:35 +0200)]
kconfig: add savedefconfig

savedefconfig will save a minimal config to a file
named "defconfig".

The config symbols are saved in the same order as
they appear in the menu structure so it should
be possible to map them to the relevant menus
if desired.

The implementation was tested against several minimal
configs for arm which was created using brute-force.

There was one regression related to default numbers
which had their valid range further limited by another symbol.

Sample:

config FOO
int "foo"
default 4

config BAR
int "bar"
range 0 FOO

If FOO is set to 3 then BAR cannot take a value higher than 3.
But the current implementation will set BAR equal to 4.

This is seldomly used and the final configuration is OK,
and the fix was non-trivial.
So it was documented in the code and left as is.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokconfig: code refactoring in confdata.c
Sam Ravnborg [Sat, 31 Jul 2010 21:35:33 +0000 (23:35 +0200)]
kconfig: code refactoring in confdata.c

Add a a few local functions to avoid some code duplication
No functional changes.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokconfig: refactor code in symbol.c
Sam Ravnborg [Sat, 31 Jul 2010 21:35:32 +0000 (23:35 +0200)]
kconfig: refactor code in symbol.c

Move logic to determine default for a choice to
a separate function.
No functional changes.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokconfig: add alldefconfig
Sam Ravnborg [Sat, 31 Jul 2010 21:35:31 +0000 (23:35 +0200)]
kconfig: add alldefconfig

alldefconfig create a configuration with all values set
to their default value (form the Kconfig files).

This may be useful when we try to use more sensible default
values and may also be used in combination with
the minimal defconfigs.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokconfig: print more info when we see a recursive dependency
Roman Zippel [Sat, 31 Jul 2010 21:35:30 +0000 (23:35 +0200)]
kconfig: print more info when we see a recursive dependency

Consider following kconfig file:

config TEST1
bool "test 1"
depends on TEST2

config TEST2
bool "test 2"
depends on TEST1

Previously kconfig would report:

foo:6:error: found recursive dependency: TEST2 -> TEST1 -> TEST2

With the following patch kconfig reports:
foo:5:error: recursive dependency detected!
foo:5:  symbol TEST2 depends on TEST1
foo:1:  symbol TEST1 depends on TEST2

Note that we now report where the offending symbols are defined.
This can be a great help for complex situations involving
several files.

Patch is originally from Roman Zippel with a few adjustments by Sam.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokconfig: save location of config symbols
Sam Ravnborg [Sat, 31 Jul 2010 21:35:29 +0000 (23:35 +0200)]
kconfig: save location of config symbols

When we add a new config symbol save the file/line
so we later can refer to their location.

The information is saved as a property to a config symbol
because we may have multiple definitions of the same symbol.

This has the side-effect that a symbol always has
at least one property.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokconfig: change nonint_oldconfig to listnewconfig
Sam Ravnborg [Sat, 31 Jul 2010 21:35:28 +0000 (23:35 +0200)]
kconfig: change nonint_oldconfig to listnewconfig

Rename to a name that better match the other kconfig targets.

listnewconfig shall read as:

- list new options compared to current configuration

New options are now written to stdout so one can redirect the output.

Do not exit with an error code if there is new options.

These are feature changes compared to the original
nonint_oldconfig - but as this feature has not yet been in a
released kernel it should not matter.

It is still possible to do:

make listnewconfig
lookup new config options in Kconfig*
edit .config

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Aristeu Rozanski <aris@redhat.com>
Acked-by: Aristeu Rozanski <aris@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokconfig: rename loose_nonint_oldconfig => oldnoconfig
Sam Ravnborg [Sat, 31 Jul 2010 21:35:27 +0000 (23:35 +0200)]
kconfig: rename loose_nonint_oldconfig => oldnoconfig

Rename target to something that fall more in line
with the other kconfig targets.

oldnoconfig shall read as:

- read the old configuration and set all new options to no

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Aristeu Rozanski <aris@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokconfig: use long options in conf
Sam Ravnborg [Sat, 31 Jul 2010 21:35:26 +0000 (23:35 +0200)]
kconfig: use long options in conf

The list of options supported by conf is growing
and their abbreviation did not resemble anything usefull.

So drop the single letter options in favour of long options.

The long options are named equal to what we know from
the make target.
The internal implmentation was changed to match this,
resulting in much more readable code.

Support for short options is dropped - no one is supposed
to call this program direct anyway.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kconfig' into for-next
Michal Marek [Thu, 29 Jul 2010 14:57:27 +0000 (14:57 +0000)]
Merge branch 'kconfig' into for-next

14 years agokconfig: fix MODULES-related bug in case of no .config
Ulf Magnusson [Tue, 27 Jul 2010 19:57:43 +0000 (21:57 +0200)]
kconfig: fix MODULES-related bug in case of no .config

There seems to be a kconfig bug due to MODULES not always being
evaluated if no .config is found. Take the following Kconfig as an
example:

config MODULES
def_bool y

config FOO
def_tristate m

With no .config, the following configuration is generated:

CONFIG_MODULES=y
CONFIG_FOO=y

With an empty .config, the following:

CONFIG_MODULES=y
CONFIG_FOO=m

Tristate choice statements can also exhibit the problem, due to having an
implicit rev_dep (select) containing "m".

The problem is that MODULES is never evaluted in conf_read_simple() unless
there's a .config. The following patch fixes this.

Signed-off-by: Ulf Magnusson <ulfalizer.lkml@gmail.com>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kconfig' into for-next
Michal Marek [Mon, 26 Jul 2010 13:46:38 +0000 (13:46 +0000)]
Merge branch 'kconfig' into for-next

14 years agokconfig: make randconfig fair for booleans
Peter Korsgaard [Thu, 22 Jul 2010 12:24:57 +0000 (14:24 +0200)]
kconfig: make randconfig fair for booleans

Give boolean symbols a 50% chance of getting enabled, rather than 67%.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'rc-fixes' into for-next
Michal Marek [Fri, 23 Jul 2010 09:28:15 +0000 (09:28 +0000)]
Merge branch 'rc-fixes' into for-next

14 years agonconfig: Fix segfault when help contains special characters
Stephen Boyd [Fri, 23 Jul 2010 07:04:14 +0000 (00:04 -0700)]
nconfig: Fix segfault when help contains special characters

nconfig segfaults when help text contains the character '%'. For a quick
example, navigate to the kernel compression options and get the help for
bzip2. Doing so triggers a call to mvwprintw() with a string containing
'%' and no extra arguments to fill in the specifier's value. Fix this
case by printing the literal string retrieved from the kconfig.

 #0  0x00002b52b6b11d83 in vfprintf () from /lib/libc.so.6
 #1  0x00002b52b6bad010 in __vsnprintf_chk () from /lib/libc.so.6
 #2  0x00002b52b623991b in _nc_printf_string () from
 /lib/libncursesw.so.5
 #3  0x00002b52b6234cff in vwprintw () from /lib/libncursesw.so.5
 #4  0x00002b52b6234db9 in mvwprintw () from /lib/libncursesw.so.5
 #5  0x00000000004151d8 in fill_window (win=0x21b64c0,
     text=0x21b62b0 "CONFIG_KERNEL_BZIP2:\n\nIts compression ratio and
     speed is intermediate.\nDecompression speed is slowest among the
     three.  The kernel\nsize is about 10% smaller with bzip2, in
     comparison to gzip.\nBzip2 us"...)
     at scripts/kconfig/nconf.gui.c:229
 #6  0x0000000000416335 in show_scroll_win (main_window=0x21a5630,
         title=0x157fa30 "Bzip2",
      text=0x21b62b0 "CONFIG_KERNEL_BZIP2:\n\nIts compression
      ratio and speed is intermediate.\nDecompression speed is
      slowest among the three.  The kernel\nsize is about 10%
      smaller with bzip2, in comparison to gzip.\nBzip2 us"...)
     at scripts/kconfig/nconf.gui.c:535
 #7  0x00000000004055b2 in show_help (menu=0x157f9d0)
         at scripts/kconfig/nconf.c:1257
 #8  0x0000000000405897 in conf_choice (menu=0x157f130)
      at scripts/kconfig/nconf.c:1321
 #9  0x0000000000405326 in conf (menu=0x157d130) at
      scripts/kconfig/nconf.c:1208
 #10 0x00000000004052e8 in conf (menu=0xb434a0) at
      scripts/kconfig/nconf.c:1203
 #11 0x0000000000406092 in main (ac=2, av=0x7fff96a93c38)

Cc: Michal Marek <mmarek@suse.cz>
Cc: Nir Tzachar <nir.tzachar@gmail.com>
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'rc-fixes' into for-next
Michal Marek [Wed, 21 Jul 2010 14:22:35 +0000 (14:22 +0000)]
Merge branch 'rc-fixes' into for-next

14 years agokbuild: Fix make rpm
Michal Marek [Thu, 15 Jul 2010 08:36:37 +0000 (10:36 +0200)]
kbuild: Fix make rpm

make rpm was broken by commit 0915512:
make clean
set -e; cd ..; ln -sf /usr/src/iwlwifi-2.6 kernel-2.6.35rc4wl
/bin/sh /usr/src/iwlwifi-2.6/scripts/setlocalversion --scm-only >
/usr/src/iwlwifi-2.6/.scmversion
cat: .scmversion: input file is output file
make[1]: *** [rpm] Error 1

Reported-and-tested-by: "Zheng, Jiajia" <jiajia.zheng@intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'rc-fixes' into for-next
Michal Marek [Tue, 20 Jul 2010 14:08:59 +0000 (14:08 +0000)]
Merge branch 'rc-fixes' into for-next

14 years agokbuild: Make the setlocalversion script POSIX-compliant
Michał Górny [Sun, 18 Jul 2010 08:26:40 +0000 (10:26 +0200)]
kbuild: Make the setlocalversion script POSIX-compliant

The 'source' builtin is a bash alias to the '.' (dot) builtin. While the
former is supported only by bash, the latter is specified in POSIX and
works fine with all POSIX-compliant shells I am aware of.

The '$_' special parameter is specific to bash. It is partially
supported in dash too but it always evaluates to the current script path
(which causes the script to enter a loop recursively re-executing
itself). This is why I have replaced the two occurences of '$_' with the
explicit parameter.

The 'local' builtin is another example of bash-specific code. Although
it is supported by all POSIX-compliant shells I am aware of, it is not
part of POSIX specification and thus the code should not rely on it
assigning a specific value to the local variable. Moreover, the 'posh'
shell has a limited version of 'local' builtin not supporting direct
variable assignments. Thus, I have broken one of the 'local'
declarations down into a (non-POSIX) 'local' declaration and a plain
(POSIX-compliant) variable assignment.

Signed-off-by: Michał Górny <gentoo@mgorny.alt.pl>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kbuild' into for-next
Michal Marek [Wed, 14 Jul 2010 15:22:02 +0000 (15:22 +0000)]
Merge branch 'kbuild' into for-next

14 years agoKbuild: Add option to set -femit-struct-debug-baseonly
Andi Kleen [Wed, 14 Jul 2010 13:43:52 +0000 (15:43 +0200)]
Kbuild: Add option to set -femit-struct-debug-baseonly

Newer gcc has a -femit-struct-debug-baseonly option that dramatically
reduces the size of object files with debug info. What it does
is to only emit type information for structures when the structures
are defined in the same file or in a header file.

This means the type information for most headers are not included.
This is not good when the type information is actually
needed (e.g. with kgdb or systemtap)

But often kernel hackers only care about line numbers and don't
need all the type information anyways. In this case setting
the option can be a big win:

A build dir for a specific x86-64 configuration with gcc 4.5
shrunk from 2.3G to 1.2G. The compilation was also nearly a minute
faster.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
[mmarek: reformatted help text]
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoLinux 2.6.35-rc5 v2.6.35-rc5
Linus Torvalds [Mon, 12 Jul 2010 21:55:33 +0000 (14:55 -0700)]
Linux 2.6.35-rc5

14 years agoMerge branch 'arm/defconfig/reduced-v2.6.35-rc1' of git://git.pengutronix.de/git...
Linus Torvalds [Mon, 12 Jul 2010 21:47:01 +0000 (14:47 -0700)]
Merge branch 'arm/defconfig/reduced-v2.6.35-rc1' of git://git.pengutronix.de/git/ukl/linux-2.6

* 'arm/defconfig/reduced-v2.6.35-rc1' of git://git.pengutronix.de/git/ukl/linux-2.6:
  ARM: reduce defconfigs

This is a big change, but results in no loss of information, despite us
losing almost 200k lines:

 177 files changed, 652 insertions(+), 194157 deletions(-)

and Grant Likely thinks powerpc can also use the same reduction
technique.

The python script that did the reduction looks like this:

    #! /usr/bin/env python
    # vim: set fileencoding=utf-8 :
    # Copyright (C) 2010 by Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

    import re
    import subprocess
    import os
    import sys

    # This prevents including a timestamp in the .config which makes comparing a
    # bit easier.
    os.environ['KCONFIG_NOTIMESTAMP'] = 'Yes, please'

    # XXX: get these using getopt
    kernel_tree = '' # os.path.join(os.environ['HOME'], 'gsrc', 'linux-2.6')
    arch = 'arm'
    target = sys.argv[1]
    defconfig_src = os.path.join(kernel_tree, 'arch/%s/configs/%s' % (arch, target))

    subprocess.check_call(['make', '-s', 'ARCH=%s' % arch, target])
    origconfig = list(open('.config'))
    config = list(origconfig)
    config_size = os.stat('.config').st_size

    i = 0

    while i < len(config):
        print 'test for %r' % config[i]
        defconfig = open(defconfig_src, 'w')
        defconfig.writelines(config[:i])
        defconfig.writelines(config[i + 1:])
        defconfig.close()
        subprocess.check_call(['make', '-s', 'ARCH=%s' % arch, target])
        if os.stat('.config').st_size == config_size and list(open('.config')) == origconfig:
            del config[i]
        else:
            i += 1

    defconfig = open(defconfig_src, 'w')
    defconfig.writelines(config)
    defconfig.close()

which is pretty self-explanatory.

Acked-by: Nicolas Pitre <nico@fluxnic.net>
Acked-by: Russell King <linux@arm.linux.org.uk>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 12 Jul 2010 21:44:43 +0000 (14:44 -0700)]
Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Restore cleared pin controls on resume

14 years agoMerge branch 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mcheha...
Linus Torvalds [Mon, 12 Jul 2010 21:44:19 +0000 (14:44 -0700)]
Merge branch 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  V4L/DVB: uvc: Fix multiple symbols definitions with UVC gadget and host drivers
  V4L/DVB: v4l: mem2mem_testdev: fix g_fmt NULL pointer dereference
  V4L/DVB: uvcvideo: Power line frequency control doesn't support GET_MIN/MAX/RES
  V4L/DVB: ivtv: Add delay to ensure the decoder always restarts with a blank screen
  V4L/DVB: Documentation: Add the Philips FQ1236 MK5 to video4linux/CARDLIST.tuner
  V4L/DVB: tveeprom: Add an entry for tuner code 168: a TCL M30WTP-4N-E tuner
  V4L/DVB: tuner: Add a definition for the Philips FQ1236 MK5 NTSC tuner
  V4L/DVB: OMAP_VOUT: fix: Module params were not working through bootargs
  V4L/DVB: OMAP_VOUT: fix: Replaced dma-sg with dma-contig
  V4L/DVB: OMAP_VOUT:Build FIX: Rebased against latest DSS2 changes

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Mon, 12 Jul 2010 21:42:21 +0000 (14:42 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: Send Report ID when numbered reports are sent over the control endpoint.
  HID: Enable HID_QUIRK_MULTI_INPUT for Retro Adaptor
  HID: add support for CH Eclipse yoke
  HID: eliminate a double lock in debug code
  HID: ntrig: add support for new firwmare versions
  HID: check for HID_QUIRK_IGNORE during probing
  HID: roccat: fix modules interdependencies

14 years agoMAINTAINERS: fix EDAC-I7CORE file patterns
Joe Perches [Mon, 12 Jul 2010 20:45:49 +0000 (17:45 -0300)]
MAINTAINERS: fix EDAC-I7CORE file patterns

File patterns are one per line.
Fixed include file location.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoHID: Send Report ID when numbered reports are sent over the control endpoint.
Alan Ott [Wed, 30 Jun 2010 13:50:36 +0000 (09:50 -0400)]
HID: Send Report ID when numbered reports are sent over the control endpoint.

The Report ID wasn't sent as part of the payload for reports which were sent
over the control endpoint. This is required by section 8.1 of the HID spec.

Signed-off-by: Alan Ott <alan@signal11.us>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
14 years agoV4L/DVB: uvc: Fix multiple symbols definitions with UVC gadget and host drivers
Laurent Pinchart [Sat, 10 Jul 2010 19:13:05 +0000 (16:13 -0300)]
V4L/DVB: uvc: Fix multiple symbols definitions with UVC gadget and host drivers

The UVC gadget driver borrowed code from the UVC host driver without
changing the symbol names. This results in a namespace clash with
multiple definitions of several symbols when compiling both drivers in
the kernel.

Make all generic UVC functions and variables static in the UVC gadget
driver, as the symbols are not referenced outside of the gadget driver.
Rename the uvc_trace_param global variable to uvc_gadget_trace_param.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
Linus Torvalds [Sun, 11 Jul 2010 20:35:34 +0000 (13:35 -0700)]
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: Fix autoloading of fschmd on recent Fujitsu machines
  hwmon: (coretemp) Properly label the sensors
  hwmon: (coretemp) Skip duplicate CPU entries
  hwmon: (it87) Fix in7 on IT8720F
  hwmon: (k8temp) Fix temperature reporting for ASB1 processor revisions

14 years agoMerge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
Linus Torvalds [Sun, 11 Jul 2010 20:32:55 +0000 (13:32 -0700)]
Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  i2c/mips: Fix error return codes from Sibyte i2c bus driver
  i2c: Fix probability check

14 years agoHID: Enable HID_QUIRK_MULTI_INPUT for Retro Adaptor
Peter Edwards [Sun, 11 Jul 2010 16:45:50 +0000 (17:45 +0100)]
HID: Enable HID_QUIRK_MULTI_INPUT for Retro Adaptor

Patch for linux-2.6.35-rc4 mainline kernel to enable Paul Qureshi's
Retro Adapter [http://keio.dk/retroadapter.html], an open source USB
device which allows controllers and joysticks from classic computers
and consoles to work on modern PCs, to appear as two separate devices
under Linux.
Signed-off-by: Peter Edwards <samwise@bagshot-row.org>
Acked-by: Paul Qureshi <retro@world3.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
14 years agoHID: add support for CH Eclipse yoke
Jonathan Rockway [Sat, 3 Jul 2010 07:59:01 +0000 (02:59 -0500)]
HID: add support for CH Eclipse yoke

This USB flight yoke needs the NOGET quirk, like most of CH's other
products. This patch adds that.

Signed-off-by: Jonathan Rockway <jon@jrock.us>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
14 years agoi2c/mips: Fix error return codes from Sibyte i2c bus driver
Guenter Roeck [Sat, 10 Jul 2010 07:42:47 +0000 (09:42 +0200)]
i2c/mips: Fix error return codes from Sibyte i2c bus driver

Sibyte i2c bus driver returns non-descriptive error values.
Update to return error values as defined in Documentation/i2c/fault-codes.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c: Fix probability check
Jean Delvare [Sat, 10 Jul 2010 07:42:46 +0000 (09:42 +0200)]
i2c: Fix probability check

The new unified probing function differs from the original code, and
the preliminary test whether probing is possible must be updated
accordingly.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: Fix autoloading of fschmd on recent Fujitsu machines
Jean Delvare [Fri, 9 Jul 2010 14:22:51 +0000 (16:22 +0200)]
hwmon: Fix autoloading of fschmd on recent Fujitsu machines

Fujitsu slightly changed the DMI strings in their recent machines,
(for example the D2778) and this breaks the automatic loading of the
needed fschmd driver. Being more tolerant on string comparison fixes
the issue.

This closes bug #15634:
https://bugzilla.kernel.org/show_bug.cgi?id=15634

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Sergey Spiridonov <sena@hurd.homeunix.org>
Cc: Hans de Goede <hdegoede@redhat.com>
14 years agohwmon: (coretemp) Properly label the sensors
Jean Delvare [Fri, 9 Jul 2010 14:22:51 +0000 (16:22 +0200)]
hwmon: (coretemp) Properly label the sensors

Don't assume that CPU entry number and core ID always match. It
worked in the simple cases (single CPU, no HT) but fails on
multi-CPU systems.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Huaxu Wan <huaxu.wan@intel.com>
Cc: stable@kernel.org
14 years agohwmon: (coretemp) Skip duplicate CPU entries
Jean Delvare [Fri, 9 Jul 2010 14:22:49 +0000 (16:22 +0200)]
hwmon: (coretemp) Skip duplicate CPU entries

On hyper-threaded CPUs, each core appears twice in the CPU list. Skip
the second entry to avoid duplicate sensors.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Huaxu Wan <huaxu.wan@intel.com>
Cc: stable@kernel.org
14 years agohwmon: (it87) Fix in7 on IT8720F
Jean Delvare [Fri, 9 Jul 2010 14:22:48 +0000 (16:22 +0200)]
hwmon: (it87) Fix in7 on IT8720F

The IT8720F has no VIN7 pin, so VCCH should always be routed
internally to VIN7 with an internal divider. Curiously, there still
is a configuration bit to control this, which means it can be set
incorrectly. And even more curiously, many boards out there are
improperly configured, even though the IT8720F datasheet claims that
the internal routing of VCCH to VIN7 is the default setting. So we
force the internal routing in this case.

It turns out that all boards with the wrong setting are from Gigabyte,
so I suspect a BIOS bug. But it's easy enough to workaround in the
driver, so let's do it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Jean-Marc Spaggiari <jean-marc@spaggiari.org>
Cc: stable@kernel.org
14 years agohwmon: (k8temp) Fix temperature reporting for ASB1 processor revisions
Andreas Herrmann [Fri, 9 Jul 2010 14:22:47 +0000 (16:22 +0200)]
hwmon: (k8temp) Fix temperature reporting for ASB1 processor revisions

Reported temperature for ASB1 CPUs is too high.
Add ASB1 CPU revisions (these are also non-desktop variants) to the
list of CPUs for which the temperature fixup is not required.

Example: (from LENOVO ThinkPad Edge 13, 01972NG, system was idle)

  Current kernel reports

  $ sensors
  k8temp-pci-00c3
  Adapter: PCI adapter
  Core0 Temp:  +74.0 C
  Core0 Temp:  +70.0 C
  Core1 Temp:  +69.0 C
  Core1 Temp:  +70.0 C

  With this patch I have

  $ sensors
  k8temp-pci-00c3
  Adapter: PCI adapter
  Core0 Temp:  +54.0 C
  Core0 Temp:  +51.0 C
  Core1 Temp:  +48.0 C
  Core1 Temp:  +49.0 C

Cc: stable@kernel.org [.32.x .33.x, .34.x]
Cc: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoALSA: hda - Restore cleared pin controls on resume
Takashi Iwai [Mon, 5 Jul 2010 14:50:13 +0000 (16:50 +0200)]
ALSA: hda - Restore cleared pin controls on resume

Many codecs now clear the pin controls at suspend via snd_hda_shutup_pins()
for reducing the click noise at power-off.  But this leaves some pins
uninitialized, and they'll be never recovered after resume.

This patch adds the proper recovery of cleared pin controls on resume.
Also it adds a check of bus->shutdown so that pins won't be cleared at
module unloading.

Reference: Kernel bug 16339
http://bugzilla.kernel.org/show_bug.cgi?id=16339

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoIB/qib: Use request_firmware() to load SD7220 firmware
Ben Hutchings [Thu, 1 Jul 2010 20:37:20 +0000 (20:37 +0000)]
IB/qib: Use request_firmware() to load SD7220 firmware

Extract the microcode for the QLogic QLE7220 series IB HCA and use the
kernel microcode request facility to load the microcode.  This
supports Debian Linux's requirements to separate microcode which
doesn't have open source code available from the device driver.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
14 years agoV4L/DVB: v4l: mem2mem_testdev: fix g_fmt NULL pointer dereference
Pawel Osciak [Tue, 22 Jun 2010 08:38:41 +0000 (05:38 -0300)]
V4L/DVB: v4l: mem2mem_testdev: fix g_fmt NULL pointer dereference

Calling g_fmt before s_fmt resulted in a NULL pointer dereference as no
default formats were being selected on probe.

Reported-by: Németh Márton <nm127@freemail.hu>
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: uvcvideo: Power line frequency control doesn't support GET_MIN/MAX/RES
Laurent Pinchart [Mon, 5 Jul 2010 18:24:39 +0000 (15:24 -0300)]
V4L/DVB: uvcvideo: Power line frequency control doesn't support GET_MIN/MAX/RES

Issuing a GET_MIN request on the power line frequency control times out
on at least the Apple iSight. As the UVC specification doesn't list
GET_MIN/MAX/RES as supported on that control, remove them from the
uvc_ctrls array.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ivtv: Add delay to ensure the decoder always restarts with a blank screen
Ian Armstrong [Sun, 20 Jun 2010 18:12:28 +0000 (15:12 -0300)]
V4L/DVB: ivtv: Add delay to ensure the decoder always restarts with a blank screen

Add a short delay when stopping the decoder, allowing it to settle and
preventing some unexpected interaction with other firmware commands.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Tested-by: Martin Dauskardt <martin.dauskardt@gmx.de>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Documentation: Add the Philips FQ1236 MK5 to video4linux/CARDLIST.tuner
Andy Walls [Fri, 18 Jun 2010 01:24:09 +0000 (22:24 -0300)]
V4L/DVB: Documentation: Add the Philips FQ1236 MK5 to video4linux/CARDLIST.tuner

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tveeprom: Add an entry for tuner code 168: a TCL M30WTP-4N-E tuner
Andy Walls [Sat, 12 Jun 2010 23:24:24 +0000 (20:24 -0300)]
V4L/DVB: tveeprom: Add an entry for tuner code 168: a TCL M30WTP-4N-E tuner

Hauppauge EEPROM tuner code 168 has recently shown up on HVR-1600 TV
capture cards supported by the cx18 driver.  This change allows analog
tuner type autodetection to succeed for these cards.

Information for decoding tuner code 168 was provided by Hauppauge.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tuner: Add a definition for the Philips FQ1236 MK5 NTSC tuner
Andy Walls [Sat, 12 Jun 2010 23:20:36 +0000 (20:20 -0300)]
V4L/DVB: tuner: Add a definition for the Philips FQ1236 MK5 NTSC tuner

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: OMAP_VOUT: fix: Module params were not working through bootargs
Vaibhav Hiremath [Thu, 27 May 2010 11:17:09 +0000 (08:17 -0300)]
V4L/DVB: OMAP_VOUT: fix: Module params were not working through bootargs

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: OMAP_VOUT: fix: Replaced dma-sg with dma-contig
Vaibhav Hiremath [Thu, 27 May 2010 11:17:08 +0000 (08:17 -0300)]
V4L/DVB: OMAP_VOUT: fix: Replaced dma-sg with dma-contig

Actually OMAP doesn't support scatter-gather DMA for
Display subsystem but due to legacy coding it has been overlooked
till now.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: OMAP_VOUT:Build FIX: Rebased against latest DSS2 changes
Vaibhav Hiremath [Thu, 27 May 2010 11:17:07 +0000 (08:17 -0300)]
V4L/DVB: OMAP_VOUT:Build FIX: Rebased against latest DSS2 changes

Changes -
- Kconfig option dependancy changed to ARCH_OMAP2/3 from
ARCH_OMAP24XX/34XX
- There are some moments of function from omap_dss_device
to omap_dss_driver. Incorporated changes for the same.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Thu, 8 Jul 2010 19:20:54 +0000 (12:20 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IPoIB: Fix world-writable child interface control sysfs attributes
  IB/qib: Clean up properly if qib_init() fails
  IB/qib: Completion queue callback needs to be single threaded
  IB/qib: Update 7322 serdes tables
  IB/qib: Clear 6120 hardware error register
  IB/qib: Clear eager buffer memory for each new process
  IB/qib: Mask hardware error during link reset
  IB/qib: Don't mark VL15 bufs as WC to avoid a rare 7322 chip problem
  RDMA/cxgb4: Derive smac_idx from port viid
  RDMA/cxgb4: Avoid false GTS CIDX_INC overflows
  RDMA/cxgb4: Don't call abort_connection() for active connect failures
  RDMA/cxgb4: Use the DMA state API instead of the pci equivalents

14 years agoMerge branches 'cxgb4', 'ipoib' and 'qib' into for-next
Roland Dreier [Thu, 8 Jul 2010 16:10:24 +0000 (09:10 -0700)]
Merge branches 'cxgb4', 'ipoib' and 'qib' into for-next

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Thu, 8 Jul 2010 15:20:41 +0000 (08:20 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/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 - Enable beep on Realtek codecs with PCI SSID override
  ALSA: usb-audio - Add volume resolution quirk for some Logitech webcams
  ALSA: hda - Add Macbook 5,2 quirk
  ALSA: hda - Fix uninitialized variable

14 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Thu, 8 Jul 2010 15:06:40 +0000 (08:06 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  writeback: simplify the write back thread queue
  writeback: split writeback_inodes_wb
  writeback: remove writeback_inodes_wbc
  fs-writeback: fix kernel-doc warnings
  splice: check f_mode for seekable file
  splice: direct_splice_actor() should not use pos in sd

14 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Thu, 8 Jul 2010 15:05:43 +0000 (08:05 -0700)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc: Fix userspace build of ptrace.h
  powerpc: Fix default_machine_crash_shutdown #ifdef botch
  powerpc: Fix logic error in fixup_irqs
  powerpc/iseries: Fix possible null pointer dereference in iSeries_pcibios_fixup_resources
  powerpc: Linux cannot run with 0 cores
  powerpc: Fix feature-fixup tests for gcc 4.5
  powerpc: Disable SPARSE_IRQ by default
  powerpc: Fix compile errors in prom_init_check for gcc 4.5
  powerpc: Fix module building for gcc 4.5 and 64 bit
  powerpc/perf_event: Fix for power_pmu_disable()

14 years agoMerge branch 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 8 Jul 2010 15:02:18 +0000 (08:02 -0700)]
Merge branch 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung

* 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: SAMSUNG: Fix on wrong function name for S5PV210 sdhci0
  ARM: S5P6442: Fix PLL setting announce message.
  ARM: SAMSUNG: Fix build without SDHCI controllers for S3C64XX
  ARM: S5PV210: Correct clock register properties
  ARM: S5P: Bug fix on external interrupt for S5P SoCs

14 years agoMerge branch 'fix/misc' into for-linus
Takashi Iwai [Thu, 8 Jul 2010 14:55:26 +0000 (16:55 +0200)]
Merge branch 'fix/misc' into for-linus

14 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Thu, 8 Jul 2010 14:55:02 +0000 (16:55 +0200)]
Merge branch 'fix/hda' into for-linus

14 years agoMerge branch 'misc' into for-next
Michal Marek [Thu, 8 Jul 2010 13:11:46 +0000 (13:11 +0000)]
Merge branch 'misc' into for-next

14 years agoMerge branch 'kconfig' into for-next
Michal Marek [Thu, 8 Jul 2010 12:38:43 +0000 (12:38 +0000)]
Merge branch 'kconfig' into for-next

14 years agokconfig: Don't write invisible choice values
Jan Beulich [Wed, 30 Jun 2010 12:11:01 +0000 (13:11 +0100)]
kconfig: Don't write invisible choice values

This makes it so "make oldconfig" really prompts for any choice where
options that previously weren't visible just became so. Previously one
would have to remember to go over all choice values and check whether
some that previously couldn't be selected now can be.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agopowerpc: Fix userspace build of ptrace.h
Sam Ravnborg [Sun, 9 May 2010 06:52:31 +0000 (08:52 +0200)]
powerpc: Fix userspace build of ptrace.h

Build of ptrace.h failed for assembly because it
pulls in stdint.h.
Use exportable types (__u32, __u64) to avoid the dependency
on stdint.h.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrey Volkov <avolkov@varma-el.com>
Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc: Fix default_machine_crash_shutdown #ifdef botch
Paul E. McKenney [Tue, 15 Jun 2010 14:48:39 +0000 (14:48 +0000)]
powerpc: Fix default_machine_crash_shutdown #ifdef botch

crash_kexec_wait_realmode() is defined only if CONFIG_PPC_STD_MMU_64
and CONFIG_SMP, but is called if CONFIG_PPC_STD_MMU_64 even if !CONFIG_SMP.
Fix the conditional compilation around the invocation.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc: Fix logic error in fixup_irqs
Johannes Berg [Wed, 16 Jun 2010 00:09:35 +0000 (00:09 +0000)]
powerpc: Fix logic error in fixup_irqs

When SPARSE_IRQ is set, irq_to_desc() can
return NULL. While the code here has a
check for NULL, it's not really correct.
Fix it by separating the check for it.

This fixes CPU hot unplug for me.

Reported-by: Alastair Bridgewater <alastair.bridgewater@gmail.com>
Cc: stable@kernel.org [2.6.32+]
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc/iseries: Fix possible null pointer dereference in iSeries_pcibios_fixup_resources
Denis Kirjanov [Wed, 16 Jun 2010 05:16:59 +0000 (05:16 +0000)]
powerpc/iseries: Fix possible null pointer dereference in iSeries_pcibios_fixup_resources

I don't know if this is a right fix for the problem
since of_get_property can return NULL.
Since iseries_device_information is used only for informational purpose,
we can skip this function without valid HvSubBusNumber number.

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc: Linux cannot run with 0 cores
Anton Blanchard [Thu, 17 Jun 2010 14:33:06 +0000 (14:33 +0000)]
powerpc: Linux cannot run with 0 cores

If we configure with CONFIG_SMP=n or set NR_CPUS less than the number of
SMT threads we will set the max cores property to 0 in the
ibm,client-architecture-support structure. On new versions of firmware that
understand this property it obliges and terminates our partition.

Use DIV_ROUND_UP so we handle not only the CONFIG_SMP=n case but also the
case where NR_CPUS isn't a multiple of the number of SMT threads.

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc: Fix feature-fixup tests for gcc 4.5
Stephen Rothwell [Mon, 28 Jun 2010 21:08:29 +0000 (21:08 +0000)]
powerpc: Fix feature-fixup tests for gcc 4.5

The feature-fixup test declare some extern void variables and then take
their addresses.  Fix this by declaring them as extern u8 instead.

Fixes these warnings (treated as errors):

  CC      arch/powerpc/lib/feature-fixups.o
cc1: warnings being treated as errors
arch/powerpc/lib/feature-fixups.c: In function 'test_cpu_macros':
arch/powerpc/lib/feature-fixups.c:293:23: error: taking address of expression of type 'void'
arch/powerpc/lib/feature-fixups.c:294:9: error: taking address of expression of type 'void'
arch/powerpc/lib/feature-fixups.c:297:2: error: taking address of expression of type 'void'
arch/powerpc/lib/feature-fixups.c:297:2: error: taking address of expression of type 'void'
arch/powerpc/lib/feature-fixups.c: In function 'test_fw_macros':
arch/powerpc/lib/feature-fixups.c:306:23: error: taking address of expression of type 'void'
arch/powerpc/lib/feature-fixups.c:307:9: error: taking address of expression of type 'void'
arch/powerpc/lib/feature-fixups.c:310:2: error: taking address of expression of type 'void'
arch/powerpc/lib/feature-fixups.c:310:2: error: taking address of expression of type 'void'
arch/powerpc/lib/feature-fixups.c: In function 'test_lwsync_macros':
arch/powerpc/lib/feature-fixups.c:321:23: error: taking address of expression of type 'void'
arch/powerpc/lib/feature-fixups.c:322:9: error: taking address of expression of type 'void'
arch/powerpc/lib/feature-fixups.c:326:3: error: taking address of expression of type 'void'
arch/powerpc/lib/feature-fixups.c:326:3: error: taking address of expression of type 'void'
arch/powerpc/lib/feature-fixups.c:329:3: error: taking address of expression of type 'void'
arch/powerpc/lib/feature-fixups.c:329:3: error: taking address of expression of type 'void'

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc: Disable SPARSE_IRQ by default
Yang Li [Mon, 28 Jun 2010 23:32:57 +0000 (23:32 +0000)]
powerpc: Disable SPARSE_IRQ by default

The SPARSE_IRQ considerably adds overhead to critical path of IRQ
handling.  However it doesn't benefit much in space for most systems with
limited IRQ_NR.  Should be disabled unless really necessary.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc: Fix compile errors in prom_init_check for gcc 4.5
Stephen Rothwell [Tue, 29 Jun 2010 20:04:22 +0000 (20:04 +0000)]
powerpc: Fix compile errors in prom_init_check for gcc 4.5

Just whitelist these extra compiler generated symbols.
Fixes these errors:

Error: External symbol '_restgpr0_14' referenced from prom_init.c
Error: External symbol '_restgpr0_20' referenced from prom_init.c
Error: External symbol '_restgpr0_22' referenced from prom_init.c
Error: External symbol '_restgpr0_24' referenced from prom_init.c
Error: External symbol '_restgpr0_25' referenced from prom_init.c
Error: External symbol '_restgpr0_26' referenced from prom_init.c
Error: External symbol '_restgpr0_27' referenced from prom_init.c
Error: External symbol '_restgpr0_28' referenced from prom_init.c
Error: External symbol '_restgpr0_29' referenced from prom_init.c
Error: External symbol '_restgpr0_31' referenced from prom_init.c
Error: External symbol '_savegpr0_14' referenced from prom_init.c
Error: External symbol '_savegpr0_20' referenced from prom_init.c
Error: External symbol '_savegpr0_22' referenced from prom_init.c
Error: External symbol '_savegpr0_24' referenced from prom_init.c
Error: External symbol '_savegpr0_25' referenced from prom_init.c
Error: External symbol '_savegpr0_26' referenced from prom_init.c
Error: External symbol '_savegpr0_27' referenced from prom_init.c
Error: External symbol '_savegpr0_28' referenced from prom_init.c
Error: External symbol '_savegpr0_29' referenced from prom_init.c
Error: External symbol '_savegpr0_31' referenced from prom_init.c

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc: Fix module building for gcc 4.5 and 64 bit
Stephen Rothwell [Tue, 29 Jun 2010 20:08:42 +0000 (20:08 +0000)]
powerpc: Fix module building for gcc 4.5 and 64 bit

Gcc 4.5 is now generating out of line register save and restore
in the function prefix and postfix when we use -Os.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc/perf_event: Fix for power_pmu_disable()
Matt Evans [Mon, 5 Jul 2010 17:36:32 +0000 (17:36 +0000)]
powerpc/perf_event: Fix for power_pmu_disable()

When power_pmu_disable() removes the given event from a particular index into
cpuhw->event[], it shuffles down higher event[] entries.  But, this array is
paired with cpuhw->events[] and cpuhw->flags[] so should shuffle them
similarly.

If these arrays get out of sync, code such as power_check_constraints() will
fail.  This caused a bug where events were temporarily disabled and then failed
to be re-enabled; subsequent code tried to write_pmc() with its (disabled) idx
of 0, causing a message "oops trying to write PMC0".  This triggers this bug on
POWER7, running a miss-heavy test:

  perf record -e L1-dcache-load-misses -e L1-dcache-store-misses ./misstest

Signed-off-by: Matt Evans <matt@ozlabs.org>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 8 Jul 2010 02:56:00 +0000 (19:56 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (35 commits)
  NET: SB1250: Initialize .owner
  vxge: show startup message with KERN_INFO
  ll_temac: Fix missing iounmaps
  bridge: Clear IPCB before possible entry into IP stack
  bridge br_multicast: BUG: unable to handle kernel NULL pointer dereference
  net: Fix definition of netif_vdbg() when VERBOSE_DEBUG is defined
  net/ne: fix memory leak in ne_drv_probe()
  xfrm: fix xfrm by MARK logic
  virtio_net: fix oom handling on tx
  virtio_net: do not reschedule rx refill forever
  s2io: resolve statistics issues
  linux/net.h: fix kernel-doc warnings
  net: decreasing real_num_tx_queues needs to flush qdisc
  sched: qdisc_reset_all_tx is calling qdisc_reset without qdisc_lock
  qlge: fix a eeh handler to not add a pending timer
  qlge: Replacing add_timer() to mod_timer()
  usbnet: Set parent device early for netdev_printk()
  net: Revert "rndis_host: Poll status channel before control channel"
  netfilter: ip6t_REJECT: fix a dst leak in ipv6 REJECT
  drivers: bluetooth: bluecard_cs.c: Fixed include error, changed to linux/io.h
  ...

14 years agoNET: SB1250: Initialize .owner
Ralf Baechle [Tue, 6 Jul 2010 05:18:11 +0000 (05:18 +0000)]
NET: SB1250: Initialize .owner

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
 drivers/net/sb1250-mac.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovxge: show startup message with KERN_INFO
Wu Fengguang [Tue, 6 Jul 2010 03:02:03 +0000 (03:02 +0000)]
vxge: show startup message with KERN_INFO

The original KERN_CRIT will mess up terminals.

CC: Sreenivasa Honnur <Sreenivasa.Honnur@neterion.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoll_temac: Fix missing iounmaps
Denis Kirjanov [Mon, 5 Jul 2010 21:44:20 +0000 (21:44 +0000)]
ll_temac: Fix missing iounmaps

Fix missing iounmaps.

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobridge: Clear IPCB before possible entry into IP stack
Herbert Xu [Mon, 5 Jul 2010 21:29:28 +0000 (21:29 +0000)]
bridge: Clear IPCB before possible entry into IP stack

The bridge protocol lives dangerously by having incestuous relations
with the IP stack.  In this instance an abomination has been created
where a bogus IPCB area from a bridged packet leads to a crash in
the IP stack because it's interpreted as IP options.

This patch papers over the problem by clearing the IPCB area in that
particular spot.  To fix this properly we'd also need to parse any
IP options if present but I'm way too lazy for that.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cheers,
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Wed, 7 Jul 2010 18:43:28 +0000 (11:43 -0700)]
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm: correctly update connector DPMS status in drm_fb_helper
  drm/radeon/kms: fix shared ddc handling
  drm/ttm: Allocate the page pool manager in the heap.

14 years agoMerge branch 'rc-fixes' into for-next
Michal Marek [Wed, 7 Jul 2010 08:30:10 +0000 (08:30 +0000)]
Merge branch 'rc-fixes' into for-next

14 years agokbuild: Fix path to scripts/setlocalversion
Michal Marek [Mon, 5 Jul 2010 21:36:16 +0000 (23:36 +0200)]
kbuild: Fix path to scripts/setlocalversion

Commit 0a564b2 broke LOCALVERSION for O=... builds. Ouch.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agodrm: correctly update connector DPMS status in drm_fb_helper
Jesse Barnes [Fri, 2 Jul 2010 17:48:08 +0000 (10:48 -0700)]
drm: correctly update connector DPMS status in drm_fb_helper

We don't currently update the DPMS status of the connector (both in the
connector itself and the connector's DPMS property) in the fb helper
code.  This means that if the kernel FB core has blanked the screen,
sysfs will still show a DPMS status of "on".  It also means that when X
starts, it will try to light up the connectors, but the drm_crtc_helper
code will ignore the DPMS change since according to the connector, the
DPMS status is already on.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=28436 (the annoying
"my screen was blanked when I started X and now it won't light up" bug).

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: fix shared ddc handling
Alex Deucher [Thu, 1 Jul 2010 14:34:56 +0000 (10:34 -0400)]
drm/radeon/kms: fix shared ddc handling

Connectors with a shared ddc line can be connected to different
encoders.

Reported by Pasi Kärkkäinen <pasik@iki.fi> on dri-devel

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/ttm: Allocate the page pool manager in the heap.
Francisco Jerez [Sun, 4 Jul 2010 02:03:07 +0000 (04:03 +0200)]
drm/ttm: Allocate the page pool manager in the heap.

Repeated ttm_page_alloc_init/fini fails noisily because the pool
manager kobj isn't zeroed out between uses (we could do just that but
statically allocated kobjects are generally considered a bad thing).
Move it to kzalloc'ed memory.

Note that this patch drops the refcounting behavior of the pool
allocator init/fini functions: it would have led to a race condition
in its current form, and anyway it was never exploited.

This fixes a regression with reloading kms modules at runtime, since
page allocator was introduced.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoVFS: introduce s_dirty accessors
Artem Bityutskiy [Thu, 10 Jun 2010 10:56:33 +0000 (13:56 +0300)]
VFS: introduce s_dirty accessors

This patch introduces 3 VFS accessors: 'sb_mark_dirty()',
'sb_mark_clean()', and 'sb_is_dirty()'. They simply
set 'sb->s_dirt' or test 'sb->s_dirt'. The plan is to make
every FS use these accessors later instead of manipulating
the 'sb->s_dirt' flag directly.

Ultimately, this change is a preparation for the periodic
superblock synchronization optimization which is about
preventing the "sync_supers" kernel thread from waking up
even if there is nothing to synchronize.

This patch does not do any functional change, just adds
accessor functions.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 7 Jul 2010 00:16:09 +0000 (17:16 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  rbtree: Undo augmented trees performance damage and regression
  x86, Calgary: Limit the max PHB number to 256

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Wed, 7 Jul 2010 00:15:15 +0000 (17:15 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  ceph: fix crush device 'out' threshold to 1.0, not 0.1
  ceph: fix caps usage accounting for import (non-reserved) case
  ceph: only release clean, unused caps with mds requests
  ceph: fix crush CHOOSE_LEAF when type is already a leaf
  ceph: fix crush recursion
  ceph: fix caps debugfs entry
  ceph: delay umount until all mds requests drop inode+dentry refs
  ceph: handle splice_dentry/d_materialize_unique error in readdir_prepopulate
  ceph: fix crush map update decoding
  ceph: fix message memory leak, uninitialized variable
  ceph: fix map handler error path
  ceph: some endianity fixes

14 years agoMerge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
Linus Torvalds [Wed, 7 Jul 2010 00:14:53 +0000 (17:14 -0700)]
Merge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6

* 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
  pcmcia: do not initialize the present flag too late.

14 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Wed, 7 Jul 2010 00:14:33 +0000 (17:14 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (22 commits)
  MIPS: Return after handling coprocessor 2 exception
  MIPS: BCM47xx: Add NVRAM support devices
  MIPS: Loongson: Define rtc device on MC146818-equipped systems
  MIPS: MT: Fix FPU affinity.
  MIPS: Oprofile: Fixup of loongson2_exit()
  MIPS: Alchemy: sleepcode without compile-time cputype dependencies
  MIPS: Tracing: Cleanup of address space checking
  MIPS: Tracing: Cleanup of function graph tracer
  MIPS: Tracing: Reduce the overhead of dynamic Function Tracer
  MIPS: Tracing: Cleanup of instructions used
  MIPS: Tracing: Fix 32-bit support with -mmcount-ra-address
  MIPS: Tracing: Fix argument passing of the 32bit support with gcc 4.5
  MIPS: Tracing: Cleanup comments
  MIPS: Tracing: Cleanup the arguments passing of prepare_ftrace_return
  MIPS: Tracing: Merge adjacent #ifdefs with same condition.
  MIPS: AR7, BCM63xx: fix gpio_to_irq() return value
  MIPS: Restore signalling NaN behaviour for abs.[sd]
  MIPS: Loongson: CS5536: Fix ISA support
  MIPS: Loongson: Add a missing break statement in CS5536 IDE code
  MIPS: Loongson: CS5536: Add missing RDMSRs for IDE and USB
  ...

14 years agokbuild: Fix path to scripts/setlocalversion
Michal Marek [Mon, 5 Jul 2010 21:43:04 +0000 (23:43 +0200)]
kbuild: Fix path to scripts/setlocalversion

Commit 0a564b2 broke LOCALVERSION for O=... builds. Ouch.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-and-tested-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Peter Anvin <hpa@zytor.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoIPoIB: Fix world-writable child interface control sysfs attributes
Or Gerlitz [Sun, 6 Jun 2010 04:59:16 +0000 (04:59 +0000)]
IPoIB: Fix world-writable child interface control sysfs attributes

Sumeet Lahorani <sumeet.lahorani@oracle.com> reported that the IPoIB
child entries are world-writable; however we don't want ordinary users
to be able to create and destroy child interfaces, so fix them to be
writable only by root.

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Cc: <stable@kernel.org>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
14 years agoIB/qib: Clean up properly if qib_init() fails
Ralph Campbell [Thu, 1 Jul 2010 20:25:45 +0000 (20:25 +0000)]
IB/qib: Clean up properly if qib_init() fails

If qib_init() fails, the driver fails to free memory, unregister
device files, and unregister with the PCIe framework. The driver will
unload without error but a subsequent driver load will cause the
system to panic.  This was found by changing the 7220 code to load the
serdes microcode separately and not installing the microcode file.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
14 years agoIB/qib: Completion queue callback needs to be single threaded
Ralph Campbell [Thu, 17 Jun 2010 23:14:15 +0000 (23:14 +0000)]
IB/qib: Completion queue callback needs to be single threaded

Workqueues aren't exactly equivalent to tasklets since the callback
function may be called from multiple CPUs before the callback returns.
This causes completion notification callbacks to have MT bugs since
they weren't expecting this behavior. The fix is to use a single
threaded work queue.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
14 years agoIB/qib: Update 7322 serdes tables
Ralph Campbell [Thu, 17 Jun 2010 23:14:09 +0000 (23:14 +0000)]
IB/qib: Update 7322 serdes tables

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
14 years agoIB/qib: Clear 6120 hardware error register
Ralph Campbell [Thu, 17 Jun 2010 23:14:04 +0000 (23:14 +0000)]
IB/qib: Clear 6120 hardware error register

The hardware error register needs to be cleared or another interrupt
will be generated, thus causing an infinite loop.  This is a
regression introduced when removing debug output.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
14 years agoIB/qib: Clear eager buffer memory for each new process
Ralph Campbell [Thu, 17 Jun 2010 23:13:59 +0000 (23:13 +0000)]
IB/qib: Clear eager buffer memory for each new process

The eager buffers are not being cleared before being mmapped into a
new user address space.  This is a potential security risk and should
be fixed.  Note that the eager header queue is already being cleared.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>