]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years agox86: cleanup in amd_cpu_notify()
Robert Richter [Fri, 22 Aug 2008 18:23:38 +0000 (20:23 +0200)]
x86: cleanup in amd_cpu_notify()

small coding style fix.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'x86/urgent' into x86/cleanups
Ingo Molnar [Mon, 25 Aug 2008 09:10:42 +0000 (11:10 +0200)]
Merge branch 'x86/urgent' into x86/cleanups

17 years agox86: separate generic cpu disabling code from APIC writes in cpu_disable
Alex Nixon [Fri, 22 Aug 2008 10:52:14 +0000 (11:52 +0100)]
x86: separate generic cpu disabling code from APIC writes in cpu_disable

It allows paravirt implementations of cpu_disable to share the
cpu_disable_common code, without having to take on board APIC
writes, which may not be appropriate.

Signed-off-by: Alex Nixon <alex.nixon@citrix.com>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: unify x86_32 and x86_64 play_dead into one function
Alex Nixon [Fri, 22 Aug 2008 10:52:13 +0000 (11:52 +0100)]
x86: unify x86_32 and x86_64 play_dead into one function

Add the new play_dead into smpboot.c, as it fits more cleanly in there
alongside other CONFIG_HOTPLUG functions.

Separate out the common code into its own function.

Signed-off-by: Alex Nixon <alex.nixon@citrix.com>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86_32: clean up play_dead
Alex Nixon [Fri, 22 Aug 2008 10:52:12 +0000 (11:52 +0100)]
x86_32: clean up play_dead

The removal of the CPU from the various maps was redundant as it already
happened in cpu_disable.

After cleaning this up, cpu_uninit only resets the tlb state, so rename
it and create a noop version for the X86_64 case (so the two play_deads
can be unified later).

Signed-off-by: Alex Nixon <alex.nixon@citrix.com>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: add cpu hotplug hooks into smp_ops
Alex Nixon [Fri, 22 Aug 2008 10:52:11 +0000 (11:52 +0100)]
x86: add cpu hotplug hooks into smp_ops

Signed-off-by: Alex Nixon <alex.nixon@citrix.com>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'linus' into x86/xen
Ingo Molnar [Mon, 25 Aug 2008 08:54:07 +0000 (10:54 +0200)]
Merge branch 'linus' into x86/xen

Conflicts:
arch/x86/kernel/paravirt.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: fix HPET regression in 2.6.26 versus 2.6.25, check hpet against BAR, v3
Yinghai Lu [Mon, 25 Aug 2008 07:56:08 +0000 (00:56 -0700)]
x86: fix HPET regression in 2.6.26 versus 2.6.25, check hpet against BAR, v3

David Witbrodt tracked down (and bisected) a hpet bootup hang on his
system to the following problem: a BIOS bug made the hpet device
visible as a generic PCI device. If e820 reserved entries happen to
be registered first in the resource tree [which v2.6.26 started doing],
then the PCI code will reallocate that device's BAR to some other
address - breaking timer IRQs and hanging the system.

( Normally hpet devices are hidden by the BIOS from the OS's PCI
  discovery via chipset magic. Sometimes the hpet is not a PCI device
  at all. )

Solve this fundamental fragility by making non-PCI platform drivers
insert resources into the resource tree even if it overlaps the e820
reserved entry, to keep the resource manager from updating the BAR.

Also do these checks for the ioapic and mmconfig addresses, and emit
a warning if this happens.

Bisected-by: David Witbrodt <dawitbro@sbcglobal.net>
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Tested-by: David Witbrodt <dawitbro@sbcglobal.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoALSA: wss_lib: do not mess mixer settings during probe
Krzysztof Helt [Sun, 24 Aug 2008 16:08:03 +0000 (18:08 +0200)]
ALSA: wss_lib: do not mess mixer settings during probe

Use the wss_dout function which does not mess
shadowed register values during chip probing.
Otherwise, user ends up with stupid mixer settings
after driver loading.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Acked-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: snd-ad1816a: add different TerraTec EWS64 S model
Rene Herman [Thu, 21 Aug 2008 21:07:43 +0000 (23:07 +0200)]
ALSA: snd-ad1816a: add different TerraTec EWS64 S model

Signed-off-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: ALS4000 driver work, step 2
Andreas Mohr [Thu, 21 Aug 2008 19:55:57 +0000 (21:55 +0200)]
ALSA: ALS4000 driver work, step 2

- more register naming work
- finally figured out that weird CR register stuff
  (and did I mention that I hate _really_ undecipherable open-coded values?)
- fix handling of IRQ sharing in interrupt handler
  (hopefully properly, otherwise I'd be grateful to hear your
  pedantic comments ;)
- add handy SPECS_PAGE references wherever useful
- comments, cleanup
- add me as module author

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: hda - Fix ALC269 capture source
Takashi Iwai [Thu, 21 Aug 2008 14:25:07 +0000 (16:25 +0200)]
ALSA: hda - Fix ALC269 capture source

ALC269 capture source wasn't properly set up.
It's an independent MUX (0x23), not a source of ADC.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: via82xx - check continuous pages in buffer setup
Takashi Iwai [Wed, 30 Jul 2008 13:23:06 +0000 (15:23 +0200)]
ALSA: via82xx - check continuous pages in buffer setup

Check continuous pages in the buffer set up so that the number of
BDL is reduced.  Also increased the max buffer size.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: via82xx - ignore buffer preallocation errors
Takashi Iwai [Thu, 21 Aug 2008 12:17:38 +0000 (14:17 +0200)]
ALSA: via82xx - ignore buffer preallocation errors

The errors at buffer preallocations aren't fatal and safe to ignore.
The buffer will be allocated dynamically when opened.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: hda - check page continuity
Takashi Iwai [Wed, 30 Jul 2008 13:13:34 +0000 (15:13 +0200)]
ALSA: hda - check page continuity

Check the continuity of allocated pages to reduce the BDL size as much
as possible so that it can use more than 1MB buffers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: Allocate larger pages in sgbuf
Takashi Iwai [Wed, 30 Jul 2008 13:13:33 +0000 (15:13 +0200)]
ALSA: Allocate larger pages in sgbuf

Most hardwares have limited buffer-descriptor table length.  This
also restricts the max buffer size of the sound driver.
For example, snd-hda-intel has 1MB buffer size limit, and this is
because it can have at most 256 BDL entries.  For supporting larger
buffers, we need to allocate larger pages even for sg-buffers.

This patch changes the sgbuf allocation code to try to allocate
larger pages first.  At each head of the allocated pages, the
number of allocated pages is stored in the lowest bits of the
corresponding entry of the table addr field.  This change isn't
visible as long as the driver uses snd_sgbuf_get_addr() helper.

Also, the patch adds a new function, snd_pcm_sgbuf_get_chunk_size().
This returns the size of the chunk on continuous pages starting at
the given position offset.  If the chunk reaches to a non-continuous
page, it returns the size to the boundary.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: Fix allocation size calculation in snd_dma_alloc_pages_fallback()
Takashi Iwai [Wed, 30 Jul 2008 13:13:33 +0000 (15:13 +0200)]
ALSA: Fix allocation size calculation in snd_dma_alloc_pages_fallback()

snd_dma_alloc_pages_fallback() always tries to reduce the size in a half,
but it's not good when the given size isn't a power-of-two.
Check it first then try to align.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: Clean up SG-buffer helper functions and macros
Takashi Iwai [Thu, 21 Aug 2008 11:00:13 +0000 (13:00 +0200)]
ALSA: Clean up SG-buffer helper functions and macros

Clean up SG-buffer helper functions and macros.  Helpers take substream
as arguments now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: revo51: add headphone output
Alexander Beregalov [Thu, 21 Aug 2008 04:28:42 +0000 (08:28 +0400)]
ALSA: revo51: add headphone output

It is ALSA bug #1754.
 D6 bit in 02 register is PW4.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: hda - Create beep control on ALC269 codec
Takashi Iwai [Wed, 20 Aug 2008 16:38:26 +0000 (18:38 +0200)]
ALSA: hda - Create beep control on ALC269 codec

ALC269 codec has a beep, but it was not used, so far.
Create a beep control appropriately.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: aoa - Remove duplicate assignment of SNDRV_PCM_FMTBIT_S{16,24}_BE bits
Roel Kluin [Wed, 20 Aug 2008 08:31:38 +0000 (10:31 +0200)]
ALSA: aoa - Remove duplicate assignment of SNDRV_PCM_FMTBIT_S{16,24}_BE bits

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: opl3sa2: replace nd_opl3sa2_info_xxx() with snd_wss_info_xxx()
Krzysztof Helt [Tue, 19 Aug 2008 19:51:49 +0000 (21:51 +0200)]
ALSA: opl3sa2: replace nd_opl3sa2_info_xxx() with snd_wss_info_xxx()

Replace snd_opl3sa2_info_xxx() with snd_wss_info_xxx().
Drop check of card->private_data which cannot be NULL
if card is not NULL (spotted by Rene Herman).

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Reviewed-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: als4000 - Code clean up
Andreas Mohr [Wed, 20 Aug 2008 08:04:56 +0000 (10:04 +0200)]
ALSA: als4000 - Code clean up

- use specs-derived register name enums instead of open-coded numeric
values, for better understanding of things
- fix naming confusion ("gcr" was _NOT_ the GCR register stuff, but
  instead the io _base_ which has multiplexed _access_ to GCR config
  space, at _sub_ registers 0x08 and 0x0c)
- add FIXME comments about a race condition and MPU401 features

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: Update MAINTAINERS
Takashi Iwai [Tue, 19 Aug 2008 11:10:04 +0000 (13:10 +0200)]
ALSA: Update MAINTAINERS

Added tiwai to MAINTAINERS (per request of akpm)

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agosound: oss: remove driver for SGI HAL2 audio device
Thomas Bogendoerfer [Tue, 19 Aug 2008 09:54:14 +0000 (11:54 +0200)]
sound: oss: remove driver for SGI HAL2 audio device

With the restructering of the indy button handling the old OSS HAL2 driver
got broken.  Since there is a new ALSA driver for HAL2, the experimental
OSS driver is obsolete and will be removed by this patch.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: hda - disable delayed period-ack with bdl_pos_adj=0
Takashi Iwai [Mon, 18 Aug 2008 15:11:09 +0000 (17:11 +0200)]
ALSA: hda - disable delayed period-ack with bdl_pos_adj=0

When bdl_pos_adj=0 is given, disable the position-check and the delayed
period update mechanism.  Usually bdl_pos_adj=0 is set only for the
debugging purpose on really broken hardwares.  It's better to disable
the extra complexity in such a case.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: wss_lib: snd_wss_calibrate_mute improvement
Krzysztof Helt [Sun, 17 Aug 2008 20:38:27 +0000 (22:38 +0200)]
ALSA: wss_lib: snd_wss_calibrate_mute improvement

Mute sound by setting mute bit without
setting volume to 0. It makes both source code
and binary shorter.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: hda - Add AD1882A codec support
Takashi Iwai [Mon, 18 Aug 2008 11:53:07 +0000 (13:53 +0200)]
ALSA: hda - Add AD1882A codec support

Added the basic support of AD1882A codec chip.
It's almost compatible with AD1882, but with a digital mic and some
differences in connections.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: opl3sa2: drop snd_card pointer from the snd_opl3sa2 structure
Krzysztof Helt [Sun, 17 Aug 2008 18:01:14 +0000 (20:01 +0200)]
ALSA: opl3sa2: drop snd_card pointer from the snd_opl3sa2 structure

Remove card pointer from the snd_opl3sa2
structure and break circular reference
snd_card->snd_opl3sa2->snd_card.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Acked-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: hda - set up HDMI channels
Takashi Iwai [Wed, 30 Jul 2008 13:13:29 +0000 (15:13 +0200)]
ALSA: hda - set up HDMI channels

Set up channel information for HDMI widgets.  This will allow LPCM
with multiple channels supported on some HDMI devices.

TODO: It still doesn't check ELD and doesn't change PCM parameters
dynamically.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: hda - print a few HDMI information in proc
Takashi Iwai [Wed, 30 Jul 2008 13:13:29 +0000 (15:13 +0200)]
ALSA: hda - print a few HDMI information in proc

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: hda - Add definitions of HDMI-related verbs
Takashi Iwai [Wed, 30 Jul 2008 13:13:28 +0000 (15:13 +0200)]
ALSA: hda - Add definitions of HDMI-related verbs

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 years agoALSA: CA0106 on MSI K8N Diamond PLUS Motherboard
Travis Place [Mon, 25 Aug 2008 06:11:50 +0000 (08:11 +0200)]
ALSA: CA0106 on MSI K8N Diamond PLUS Motherboard

Correct a previous patch for the ca0106 onboard the MSI K8N Diamond PLUS
motherboard. Confirmed to have Line/Mic/Aux working for input, and sound
output working as expected.

Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years ago[PATCH] deal with the first call of ->show() generating no output
Al Viro [Sun, 24 Aug 2008 11:45:33 +0000 (07:45 -0400)]
[PATCH] deal with the first call of ->show() generating no output

seq_read() has a subtle bug - we want the first loop there to go
until at least one *non-empty* record had fit entirely into buffer.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] fix ->llseek() for a bunch of directories
Al Viro [Sun, 24 Aug 2008 11:24:41 +0000 (07:24 -0400)]
[PATCH] fix ->llseek() for a bunch of directories

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] fix regular readdir() and friends
Al Viro [Tue, 12 Aug 2008 04:28:24 +0000 (00:28 -0400)]
[PATCH] fix regular readdir() and friends

Handling of -EOVERFLOW.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] fix hpux_getdents()
Al Viro [Tue, 12 Aug 2008 04:04:22 +0000 (00:04 -0400)]
[PATCH] fix hpux_getdents()

Missing checks for -EFAULT, broken handling of overflow.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] fix osf_getdirents()
Al Viro [Tue, 12 Aug 2008 03:51:22 +0000 (23:51 -0400)]
[PATCH] fix osf_getdirents()

Return value of filldir callback is just "should we stop here"; it's
not a usable channel for passing error values (i.e. ->readdir() will
forget anything except "is it non-zero").

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] ntfs: use d_add_ci
Christoph Hellwig [Thu, 7 Aug 2008 21:50:21 +0000 (23:50 +0200)]
[PATCH] ntfs: use d_add_ci

d_add_ci was lifted 1:1 from ntfs.  Change ntfs to use the common
version.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] change d_add_ci argument ordering
Christoph Hellwig [Thu, 7 Aug 2008 21:49:07 +0000 (23:49 +0200)]
[PATCH] change d_add_ci argument ordering

As pointed out during review d_add_ci argument order should match d_add,
so switch the dentry and inode arguments.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] fix efs_lookup()
Al Viro [Mon, 11 Aug 2008 15:33:57 +0000 (11:33 -0400)]
[PATCH] fix efs_lookup()

it needs to use d_splice_alias(), not d_add()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] proc: inode number fixlet
Alexey Dobriyan [Sat, 2 Aug 2008 03:30:48 +0000 (07:30 +0400)]
[PATCH] proc: inode number fixlet

Ouch, if number taken from IDA is too big, the intent was to signal an
error, not check for overflow and still do overflowing addition.

One still needs 2^28 proc entries to notice this.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agosparc64: Allow chmc to be built as a module.
David S. Miller [Mon, 25 Aug 2008 05:17:29 +0000 (22:17 -0700)]
sparc64: Allow chmc to be built as a module.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Add generic interface for registering a dimm printing handler.
David S. Miller [Mon, 25 Aug 2008 05:08:34 +0000 (22:08 -0700)]
sparc64: Add generic interface for registering a dimm printing handler.

The way to do this varies by platform type and the exact memory
controller the cpu uses.

For Spitfire cpus we currently just use prom_getunumber() and hope
that works.

For Cheetah cpus we have a memory controller driver that can
compute this information.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosh: fix ptrace_64.c:user_disable_single_step()
Adrian Bunk [Fri, 22 Aug 2008 15:20:36 +0000 (18:20 +0300)]
sh: fix ptrace_64.c:user_disable_single_step()

This patch fixes the following compile error caused by
commit c459dbf294b4a3d70490a468a7ca3907fb2c2f57
(sh: ptrace single stepping cleanups.):

<--  snip  -->

...
  CC      arch/sh/kernel/ptrace_64.o
arch/sh/kernel/ptrace_64.c: In function 'user_disable_single_step':
arch/sh/kernel/ptrace_64.c:134: error: 'regs' undeclared (first use in this function)
arch/sh/kernel/ptrace_64.c:134: error: (Each undeclared identifier is reported only once
arch/sh/kernel/ptrace_64.c:134: error: for each function it appears in.)
...
make[2]: *** [arch/sh/kernel/ptrace_64.o] Error 1

<--  snip  -->

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh64: re-add the __strnlen_user() prototype
Adrian Bunk [Fri, 22 Aug 2008 15:20:29 +0000 (18:20 +0300)]
sh64: re-add the __strnlen_user() prototype

Commit 42fd3b142d8867f5b58d6fb75592cd20fd654c1b
(sh: Initial consolidation of the _32/_64 uaccess split.)
mistakenly removed the sh64 __strnlen_user() prototype,
resulting in the following compile error:

<--  snip  -->

...
  CC      init/main.o
In file included from include/linux/poll.h:13,
                 from include/linux/rtc.h:113,
                 from include/linux/efi.h:19,
                 from init/main.c:43:
arch/sh/include/asm/uaccess.h: In function 'strnlen_user':
arch/sh/include/asm/uaccess.h:213: error: implicit declaration of function '__strnlen_user'
...
make[2]: *** [init/main.o] Error 1

<--  snip  -->

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosparc64: Use consistent chmc_ prefix in variables, types, and functions.
David S. Miller [Mon, 25 Aug 2008 04:45:44 +0000 (21:45 -0700)]
sparc64: Use consistent chmc_ prefix in variables, types, and functions.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Convert UltraSPARC-III memory controller driver to OF driver probing.
David S. Miller [Mon, 25 Aug 2008 04:32:42 +0000 (21:32 -0700)]
sparc64: Convert UltraSPARC-III memory controller driver to OF driver probing.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agohwmon: Add Ultra45 workstation hwmon driver.
David S. Miller [Mon, 25 Aug 2008 03:59:49 +0000 (20:59 -0700)]
hwmon: Add Ultra45 workstation hwmon driver.

This is a PIC16F747 based controller that monitors and consolidates
the hardware access to various fan and temperature values reported by
adr7462 and similar devices behind an I2C bus.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc: Add target for a stripped kernel
Martin Habets [Tue, 19 Aug 2008 05:37:18 +0000 (22:37 -0700)]
sparc: Add target for a stripped kernel

Add a target for a stripped kernel. This is used for the various
packaging targets (*-pkg).

Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Kill duplicated sys_pause() implementation.
David S. Miller [Mon, 25 Aug 2008 03:13:42 +0000 (20:13 -0700)]
sparc64: Kill duplicated sys_pause() implementation.

sys32_pause() is identical to the generically provided
sys_pause() in kernel/signal.c

Noticed by Christoph Hellwig.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Split syscall_trace() into two functions.
David S. Miller [Mon, 25 Aug 2008 03:10:23 +0000 (20:10 -0700)]
sparc64: Split syscall_trace() into two functions.

Christoph Hellwig noticed that having both entry and exit
logic in one function no longer makes sense, and having
seperate ones simplifies things a lot.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc: Add GPIO layer support.
David S. Miller [Thu, 21 Aug 2008 06:03:24 +0000 (23:03 -0700)]
sparc: Add GPIO layer support.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc: Implement irq_of_parse_and_map() and irq_dispose_mapping().
David S. Miller [Wed, 20 Aug 2008 23:34:39 +0000 (16:34 -0700)]
sparc: Implement irq_of_parse_and_map() and irq_dispose_mapping().

This allows more OF layer code to be shared between powerpc and
sparc.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc: Add mutex for set property calls.
David S. Miller [Wed, 20 Aug 2008 04:56:35 +0000 (21:56 -0700)]
sparc: Add mutex for set property calls.

On some platforms, the I2C controller is shared between the OS and
OBP.  OBP uses this I2C controller to access the EEPROM, and thus is
programmed when the kernel calls prom_setprop().

Wrap such calls with the new of_set_property_mutex.

Relevant I2C bus drivers can grab this mutex around top-level I2C
operations to provide the proper protection.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Add JBUS NUMA detection.
David S. Miller [Tue, 19 Aug 2008 03:36:17 +0000 (20:36 -0700)]
sparc64: Add JBUS NUMA detection.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Make NUMA depend upon SMP.
David S. Miller [Tue, 19 Aug 2008 03:35:16 +0000 (20:35 -0700)]
sparc64: Make NUMA depend upon SMP.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agox86: do not enable TSC notifier if we don't need it
Linus Torvalds [Sun, 24 Aug 2008 18:52:06 +0000 (11:52 -0700)]
x86: do not enable TSC notifier if we don't need it

Impact: crash on non-TSC-equipped CPUs

Don't enable the TSC notifier if we *either*:

1. don't have a CPU, or
2. have a CPU with constant TSC.

In either of those cases, the notifier is either damaging (1) or useless(2).

From: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years agodrm: don't set the signal blocker on the master process.
Dave Airlie [Sun, 24 Aug 2008 07:02:26 +0000 (17:02 +1000)]
drm: don't set the signal blocker on the master process.

There is a problem with debugging the X server and gdb crashes in
the xkb startup code.

This avoids the problem by allowing the master process to get signals.
It should be safe as the signal blocker is mainly so that you can
Ctrl-Z a 3D application without locking up the whole box. Ctrl-Z the
X server isn't something many people do.

Signed-off-by: Dave Airlie <airlied@redhat.com>
17 years agodrm: don't call the vblank tasklet with irqs disabled.
Thomas Hellstrom [Sun, 24 Aug 2008 07:00:00 +0000 (17:00 +1000)]
drm: don't call the vblank tasklet with irqs disabled.

If a specific tasklet shares data with irq context,
it needs to take a private irq-blocking spinlock within
the tasklet itself.

Signed-off-by: Dave Airlie <airlied@redhat.com>
17 years agor300: Fix cliprect emit
Nicolai Haehnle [Tue, 12 Aug 2008 23:50:12 +0000 (09:50 +1000)]
r300: Fix cliprect emit

This makes our handling of cliprects sane. drm_clip_rect always has exclusiv
bottom-right corners, but the hardware expects inclusive bottom-right corner
so we adjust this here.

This complements Michel Daenzer's commit 57aea290e1e0a26d1e74df6cff777eb9f03
to Mesa. See also http://bugs.freedesktop.org/show_bug.cgi?id=16123

Signed-off-by: Dave Airlie <airlied@redhat.com>
17 years agodrm/radeon: r300_cmdbuf: Always emit INDX_BUFFER immediately after DRAW_INDEX
Nicolai Haehnle [Tue, 12 Aug 2008 23:49:15 +0000 (09:49 +1000)]
drm/radeon: r300_cmdbuf: Always emit INDX_BUFFER immediately after DRAW_INDEX

DRAW_INDEX writes a vertex count to VAP_VF_CNTL. Docs say that behaviour
is undefined (i.e. lockups happen) when this write is not followed by the
right number of vertex indices.

Thus we used to do the wrong thing when drawing across many cliprects was
necessary, because we emitted a sequence
DRAW_INDEX, DRAW_INDEX, INDX_BUFFER, INDX_BUFFER
instead of
DRAW_INDEX, INDX_BUFFER, DRAW_INDEX, INDX_BUFFER
The latter is what we're doing now and which ought to be correct.

Signed-off-by: Dave Airlie <airlied@redhat.com>
17 years agoradeon: fix some hard lockups on r3/4/500s
Jerome Glisse [Tue, 12 Aug 2008 23:46:31 +0000 (09:46 +1000)]
radeon: fix some hard lockups on r3/4/500s

This patch should fix hard lockup and convert them in
softlockup (ie you can ssh the box but the gpu is busted
and we are waiting in loop for it to come back to reason).

Signed-off-by: Dave Airlie <airlied@redhat.com>
17 years agomv643xx_eth: bump version to 1.3
Lennert Buytenhek [Sun, 24 Aug 2008 05:33:05 +0000 (07:33 +0200)]
mv643xx_eth: bump version to 1.3

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agoFix oops in acer_wmi driver (acer_wmi_init)
Arjan van de Ven [Sun, 24 Aug 2008 04:45:21 +0000 (21:45 -0700)]
Fix oops in acer_wmi driver (acer_wmi_init)

The acer_wmi driver does a DMI scan for quirks, and then sets flags into the
"interface" datastructure for some cases. However, the quirks happen real early
before "interface" is per se initialized from NULL.

The patch below 1) adds a NULL pointer check and 2) (re)runs the quirks at the
end, when "interface" has it's final value.

Reported-by: kerneloops.org
Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
CC: stable@vger.kernel.org
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomv643xx_eth: enforce multiple-of-8-bytes receive buffer size restriction
Lennert Buytenhek [Sun, 24 Aug 2008 01:00:20 +0000 (03:00 +0200)]
mv643xx_eth: enforce multiple-of-8-bytes receive buffer size restriction

The mv643xx_eth hardware ignores the lower three bits of the buffer
size field in receive descriptors, causing the reception of full-sized
packets to fail at some MTUs.  Fix this by rounding the size of
allocated receive buffers up to a multiple of eight bytes.

While we are at it, add a bit of extra space to each receive buffer so
that we can handle multiple vlan tags on ingress.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agomv643xx_eth: fix NULL pointer dereference in rxq_process()
Lennert Buytenhek [Sun, 24 Aug 2008 00:33:47 +0000 (02:33 +0200)]
mv643xx_eth: fix NULL pointer dereference in rxq_process()

When we are low on memory, the assumption that every descriptor in the
receive ring will have an skbuff associated with it does not hold.

rxq_process() was assuming that if the receive descriptor it is working
on is not owned by the hardware, it can safely be processed and handed
to the networking stack.  But a descriptor in the receive ring not being
owned by the hardware can also happen when we are low on memory and did
not manage to refill the receive ring fully.

This patch changes rxq_process()'s bailout condition from "the first
receive descriptor to be processed is owned by the hardware" to "the
first receive descriptor to be processed is owned by the hardware OR
the number of valid receive descriptors in the ring is zero".

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agomv643xx_eth: fix inconsistent lock semantics
Lennert Buytenhek [Sun, 24 Aug 2008 00:30:42 +0000 (02:30 +0200)]
mv643xx_eth: fix inconsistent lock semantics

Nicolas Pitre noted that mv643xx_eth_poll was incorrectly using
non-IRQ-safe locks while checking whether to wake up the netdevice's
transmit queue.  Convert the locking to *_irq() variants, since we
are running from softirq context where interrupts are enabled.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agomv643xx_eth: fix double add_timer() on the receive oom timer
Lennert Buytenhek [Sat, 23 Aug 2008 23:59:05 +0000 (01:59 +0200)]
mv643xx_eth: fix double add_timer() on the receive oom timer

Commit 12e4ab79cd828563dc090d2117dc8626b344bc8f ("mv643xx_eth: be
more agressive about RX refill") changed the condition for the receive
out-of-memory timer to be scheduled from "the receive ring is empty"
to "the receive ring is not full".

This can lead to a situation where the receive out-of-memory timer is
pending because a previous rxq_refill() didn't manage to refill the
receive ring entirely as a result of being out of memory, and
rxq_refill() is then called again as a side effect of a packet receive
interrupt, and that rxq_refill() call then again does not succeed to
refill the entire receive ring with fresh empty skbuffs because we are
still out of memory, and then tries to call add_timer() on the already
scheduled out-of-memory timer.

This patch fixes this issue by changing the add_timer() call in
rxq_refill() to a mod_timer() call.  If the OOM timer was not already
scheduled, this will behave as before, whereas if it was already
scheduled, this patch will push back its firing time a bit, which is
safe because we've (unsuccessfully) attempted to refill the receive
ring just before we do this.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agomv643xx_eth: fix NAPI 'rotting packet' issue
Lennert Buytenhek [Sun, 24 Aug 2008 00:45:32 +0000 (02:45 +0200)]
mv643xx_eth: fix NAPI 'rotting packet' issue

When a receive interrupt occurs, mv643xx_eth would first process the
receive descriptors and then ACK the receive interrupt, instead of the
other way round.

This would leave a small race window between processing the last
receive descriptor and clearing the receive interrupt status in which
a new packet could come in, which would then 'rot' in the receive
ring until the next receive interrupt would come in.

Fix this by ACKing (clearing) the receive interrupt condition before
processing the receive descriptors.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agoARM: OMAP: Fix omap_wdt driver failure on 2420 when running multi-omap config
Jarkko Nikula [Thu, 21 Aug 2008 09:32:38 +0000 (12:32 +0300)]
ARM: OMAP: Fix omap_wdt driver failure on 2420 when running multi-omap config

omap_wdt driver will do unhandled fault on 2420 if support for 2430 is
compiled in since wrong base address is defined in that case. Assign
omap_wdt base address runtime depending on cpu type.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoARM: OMAP2: Fix SPI driver failure on 2420 when running multi-omap config
Jarkko Nikula [Thu, 21 Aug 2008 08:20:09 +0000 (11:20 +0300)]
ARM: OMAP2: Fix SPI driver failure on 2420 when running multi-omap config

SPI driver will do unhandled fault on OMAP2420 if trying to probe
non-existing SPI busses. Register those additional busses runtime only
for cpus having them.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoOMAP2EVM: Updates defconfig
Arun KS [Sat, 23 Aug 2008 09:19:37 +0000 (14:49 +0530)]
OMAP2EVM: Updates defconfig

This patch enables nand, jffs2 and twl4030 keypad support in defconfig

Signed-off-by: Arun KS <arunks@mistralsolutions.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoOMAP2EVM : Add nand support
Arun KS [Sat, 23 Aug 2008 09:18:10 +0000 (14:48 +0530)]
OMAP2EVM : Add nand support

This patch adds nand support to omap2evm board

Signed-off-by: Arun KS <arunks@mistralsolutions.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoARM: OMAP: Enable 34xx autoidle for clocks and plls
ext Jouni Hogander [Sat, 23 Aug 2008 23:12:42 +0000 (16:12 -0700)]
ARM: OMAP: Enable 34xx autoidle for clocks and plls

Enable autoidle for interface clocks and plls. Also automatic
control of external oscillator through sys_clkreq is enabled.

In the long term, proper solution is to generalize
omap3_dpll_allow_idle, omap3_dpll_deny_idle,
omap3_dpll_autoidle_read and call it for each clock on init.

Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoARM: OMAP: 34xx specific check wether any fck is active before entering sleep
Jouni Hogander [Sat, 23 Aug 2008 23:11:49 +0000 (16:11 -0700)]
ARM: OMAP: 34xx specific check wether any fck is active before entering sleep

We cannot enter sleep_while_idle if some functional clocks are
active. Add a check for enabled functional clocks for 34xx.

Note that this workaround could be behind CONFIG_PM_DEBUG
option when all drivers are configuring their sysconfig
registers properly and using their clocks properly.

Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoMisc fixes to sync with mainline
Tony Lindgren [Sat, 23 Aug 2008 22:47:58 +0000 (15:47 -0700)]
Misc fixes to sync with mainline

Based on comments from Russell King.

Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoARM: OMAP: Combine sleep242x.S and sleep243x.S and fix error for SDR
Tony Lindgren [Sat, 23 Aug 2008 22:17:21 +0000 (15:17 -0700)]
ARM: OMAP: Combine sleep242x.S and sleep243x.S and fix error for SDR

We can pass the addresses for SDRC_DDLA_CTRL and SDRC_POWER to the
omap24xx_cpu_suspend instead of loading the values since the only
difference between 242x and 243x is the address of these registers.

Also call omap2_sram_suspend with the value of SDRC_DLLA_CTRL instead
of the address as that's what omap24xx_cpu_suspend expects to
determine between DDR and SDR.

Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Sat, 23 Aug 2008 19:14:42 +0000 (12:14 -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:
  ipv6: protocol for address routes
  icmp: icmp_sk() should not use smp_processor_id() in preemptible code
  pkt_sched: Fix qdisc list locking
  pkt_sched: Fix qdisc_watchdog() vs. dev_deactivate() race
  sctp: fix potential panics in the SCTP-AUTH API.

17 years agoremoved unused #include <linux/version.h>'s
Adrian Bunk [Sun, 17 Aug 2008 14:36:59 +0000 (17:36 +0300)]
removed unused #include <linux/version.h>'s

This patch lets the files using linux/version.h match the files that
#include it.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agortc: fix deadlock
Ingo Molnar [Sat, 23 Aug 2008 15:59:07 +0000 (17:59 +0200)]
rtc: fix deadlock

if get_rtc_time() is _ever_ called with IRQs off, we deadlock badly
in it, waiting for jiffies to increment.

So make the code more robust by doing an explicit mdelay(20).

This solves a very hard to reproduce/debug hard lockup reported
by Mikael Pettersson.

Reported-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86 MCE: Fix CPU hotplug problem with multiple multicore AMD CPUs
Rafael J. Wysocki [Fri, 22 Aug 2008 20:23:09 +0000 (22:23 +0200)]
x86 MCE: Fix CPU hotplug problem with multiple multicore AMD CPUs

During CPU hot-remove the sysfs directory created by
threshold_create_bank(), defined in
arch/x86/kernel/cpu/mcheck/mce_amd_64.c, has to be removed before
its parent directory, created by mce_create_device(), defined in
arch/x86/kernel/cpu/mcheck/mce_64.c .  Moreover, when the CPU in
question is hotplugged again, obviously the latter has to be created
before the former.  At present, the right ordering is not enforced,
because all of these operations are carried out by CPU hotplug
notifiers which are not appropriately ordered with respect to each
other.  This leads to serious problems on systems with two or more
multicore AMD CPUs, among other things during suspend and hibernation.

Fix the problem by placing threshold bank CPU hotplug callbacks in
mce_cpu_callback(), so that they are invoked at the right places,
if defined.  Additionally, use kobject_del() to remove the sysfs
directory associated with the kobject created by
kobject_create_and_add() in threshold_create_bank(), to prevent the
kernel from crashing during CPU hotplug operations on systems with
two or more multicore AMD CPUs.

This patch fixes bug #11337.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Andi Kleen <andi@firstfloor.org>
Tested-by: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: use x2apic id reported by cpuid during topology discovery
Suresh Siddha [Sat, 23 Aug 2008 15:47:11 +0000 (17:47 +0200)]
x86: use x2apic id reported by cpuid during topology discovery

use x2apic id reported by cpuid during topology discovery, instead of the
apic id configured in the APIC. For most of the systems, x2apic id
reported by cpuid leaf 0xb will be same as the physical apic id reported
by the APIC_ID register of the APIC. We follow the suggested guidelines
and use the apic id reported by the cpuid.

No change to non-generic UV platforms, will use the apic id reported in the
APIC_ID register as the cpuid reported apic id's may not be unique.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: use cpuid vector 0xb when available for detecting cpu topology
Suresh Siddha [Sat, 23 Aug 2008 15:47:10 +0000 (17:47 +0200)]
x86: use cpuid vector 0xb when available for detecting cpu topology

cpuid leaf 0xb provides extended topology enumeration. This interface provides
the 32-bit x2APIC id of the logical processor and it also provides a new
mechanism to detect SMT and core siblings (which provides increased
addressability).

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'x86/cpu' into x86/x2apic
Ingo Molnar [Sat, 23 Aug 2008 15:46:59 +0000 (17:46 +0200)]
Merge branch 'x86/cpu' into x86/x2apic

17 years agox86: fix: make PCI ECS for AMD CPUs hotplug capable
Robert Richter [Fri, 22 Aug 2008 18:23:38 +0000 (20:23 +0200)]
x86: fix: make PCI ECS for AMD CPUs hotplug capable

Until now, PCI ECS setup was performed at boot time only and for cpus
that are enabled then. This patch fixes this and adds cpu hotplug.

Tests sequence (check if ECS bit is set when bringing cpu online again):

 # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' )   < /dev/cpu/1/msr
 00000008 00404010
 # ( perl -e 'sysseek(STDOUT, 0xC001001F, 0); print pack "l*", 8, 0x00400010' ) > /dev/cpu/1/msr
 # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' )   < /dev/cpu/1/msr
 00000008 00400010
 # echo 0 > /sys/devices/system/cpu/cpu1/online
 # echo 1 > /sys/devices/system/cpu/cpu1/online
 # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' )   < /dev/cpu/1/msr
 00000008 00404010

Reported-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: fix: do not run code in amd_bus.c on non-AMD CPUs
Robert Richter [Fri, 22 Aug 2008 18:23:37 +0000 (20:23 +0200)]
x86: fix: do not run code in amd_bus.c on non-AMD CPUs

Jan Beulich wrote:

> Even worse - this would even try to access the MSR on non-AMD CPUs
> (currently probably prevented just by the fact that only AMD ones use
> family values of 0x10 or higher).

This patch adds cpu vendor check to the postcore_initcalls.

Reported-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: have set_memory_array_{uc,wb} coalesce memtypes, fix
Venki Pallipadi [Fri, 22 Aug 2008 19:08:17 +0000 (12:08 -0700)]
x86: have set_memory_array_{uc,wb} coalesce memtypes, fix

Fix the start addr for free_memtype calls in the error path.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Acked-by: Rene Herman <rene.herman@keyaccess.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoipv6: protocol for address routes
Stephen Hemminger [Sat, 23 Aug 2008 12:16:46 +0000 (05:16 -0700)]
ipv6: protocol for address routes

This fixes a problem spotted with zebra, but not sure if it is
necessary a kernel problem.  With IPV6 when an address is added to an
interface, Zebra creates a duplicate RIB entry, one as a connected
route, and other as a kernel route.

When an address is added to an interface the RTN_NEWADDR message
causes Zebra to create a connected route. In IPV4 when an address is
added to an interface a RTN_NEWROUTE message is set to user space with
the protocol RTPROT_KERNEL. Zebra ignores these messages, because it
already has the connected route.

The problem is that route created in IPV6 has route protocol ==
RTPROT_BOOT.  Was this a design decision or a bug? This fixes it. Same
patch applies to both net-2.6 and stable.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agotcp: Add tcp_parse_aligned_timestamp
Ilpo Järvinen [Sat, 23 Aug 2008 12:12:29 +0000 (05:12 -0700)]
tcp: Add tcp_parse_aligned_timestamp

Some duplicated code lying around. Located with my suffix tree
tool.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agotcp: Add tcp_collapse_one to eliminate duplicated code
Ilpo Järvinen [Sat, 23 Aug 2008 12:11:41 +0000 (05:11 -0700)]
tcp: Add tcp_collapse_one to eliminate duplicated code

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agotcp: Add tcp_validate_incoming & put duplicated code there
Ilpo Järvinen [Sat, 23 Aug 2008 12:10:12 +0000 (05:10 -0700)]
tcp: Add tcp_validate_incoming & put duplicated code there

Large block of code duplication removed.

Sadly, the return value thing is a bit tricky here but it
seems the most sensible way to return positive from validator
on success rather than negative.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoicmp: icmp_sk() should not use smp_processor_id() in preemptible code
Denis V. Lunev [Sat, 23 Aug 2008 11:43:33 +0000 (04:43 -0700)]
icmp: icmp_sk() should not use smp_processor_id() in preemptible code

Pass namespace into icmp_xmit_lock, obtain socket inside and return
it as a result for caller.

Thanks Alexey Dobryan for this report:

Steps to reproduce:

CONFIG_PREEMPT=y
CONFIG_DEBUG_PREEMPT=y
tracepath <something>

BUG: using smp_processor_id() in preemptible [00000000] code: tracepath/3205
caller is icmp_sk+0x15/0x30
Pid: 3205, comm: tracepath Not tainted 2.6.27-rc4 #1

Call Trace:
 [<ffffffff8031af14>] debug_smp_processor_id+0xe4/0xf0
 [<ffffffff80409405>] icmp_sk+0x15/0x30
 [<ffffffff8040a17b>] icmp_send+0x4b/0x3f0
 [<ffffffff8025a415>] ? trace_hardirqs_on_caller+0xd5/0x160
 [<ffffffff8025a4ad>] ? trace_hardirqs_on+0xd/0x10
 [<ffffffff8023a475>] ? local_bh_enable_ip+0x95/0x110
 [<ffffffff804285b9>] ? _spin_unlock_bh+0x39/0x40
 [<ffffffff8025a26c>] ? mark_held_locks+0x4c/0x90
 [<ffffffff8025a4ad>] ? trace_hardirqs_on+0xd/0x10
 [<ffffffff8025a415>] ? trace_hardirqs_on_caller+0xd5/0x160
 [<ffffffff803e91b4>] ip_fragment+0x8d4/0x900
 [<ffffffff803e7030>] ? ip_finish_output2+0x0/0x290
 [<ffffffff803e91e0>] ? ip_finish_output+0x0/0x60
 [<ffffffff803e6650>] ? dst_output+0x0/0x10
 [<ffffffff803e922c>] ip_finish_output+0x4c/0x60
 [<ffffffff803e92e3>] ip_output+0xa3/0xf0
 [<ffffffff803e68d0>] ip_local_out+0x20/0x30
 [<ffffffff803e753f>] ip_push_pending_frames+0x27f/0x400
 [<ffffffff80406313>] udp_push_pending_frames+0x233/0x3d0
 [<ffffffff804067d1>] udp_sendmsg+0x321/0x6f0
 [<ffffffff8040d155>] inet_sendmsg+0x45/0x80
 [<ffffffff803b967f>] sock_sendmsg+0xdf/0x110
 [<ffffffff8024a100>] ? autoremove_wake_function+0x0/0x40
 [<ffffffff80257ce5>] ? validate_chain+0x415/0x1010
 [<ffffffff8027dc10>] ? __do_fault+0x140/0x450
 [<ffffffff802597d0>] ? __lock_acquire+0x260/0x590
 [<ffffffff803b9e55>] ? sockfd_lookup_light+0x45/0x80
 [<ffffffff803ba50a>] sys_sendto+0xea/0x120
 [<ffffffff80428e42>] ? _spin_unlock_irqrestore+0x42/0x80
 [<ffffffff803134bc>] ? __up_read+0x4c/0xb0
 [<ffffffff8024e0c6>] ? up_read+0x26/0x30
 [<ffffffff8020b8bb>] system_call_fastpath+0x16/0x1b

icmp6_sk() is similar.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agopcmcia: use dev_printk for cs_error()
Dominik Brodowski [Sun, 3 Aug 2008 12:03:07 +0000 (14:03 +0200)]
pcmcia: use dev_printk for cs_error()

Use dev_printk() in cs_error()-based error reporting. While this
function-turned-macro will hopefully go away soon, using dev_printk
simplifies the code much.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years agopcmcia: remove CS_ error codes alltogether
Dominik Brodowski [Sun, 3 Aug 2008 10:27:56 +0000 (12:27 +0200)]
pcmcia: remove CS_ error codes alltogether

Remoe the CS_ error codes. Drivers are expected to use default
error definitions (errno.h etc.).

Only one CS_ error code -- CS_IN_USE -- is used internally by the
(deprecated) pcmcia-cs userspace package. Therefore, keep this one
around so that it still compiles.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years agopcmcia: deprecate CS_BAD_TUPLE
Dominik Brodowski [Sun, 3 Aug 2008 10:22:40 +0000 (12:22 +0200)]
pcmcia: deprecate CS_BAD_TUPLE

CS_BAD_TUPLE was used to denote a bad tuple being passed to the parse
function. Therefore, replace it with -EINVAL and a verbose message.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years agopcmcia: deprecate CS_BAD_ARGS
Dominik Brodowski [Sun, 3 Aug 2008 10:15:11 +0000 (12:15 +0200)]
pcmcia: deprecate CS_BAD_ARGS

CS_BAD_ARGS mean a badly written driver or invalid userspace ioctl access,
so translate that to -EINVAL.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years agopcmcia: deprecate CS_BAD_BASE, CS_BAD_IRQ, CS_BAD_OFFSET and CS_BAD_SIZE
Dominik Brodowski [Sun, 3 Aug 2008 10:10:53 +0000 (12:10 +0200)]
pcmcia: deprecate CS_BAD_BASE, CS_BAD_IRQ, CS_BAD_OFFSET and CS_BAD_SIZE

These four error values mostly mean a badly written driver, so ds_dbg()
output and -EINVAL seems to be enough.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years agopcmcia: deprecate CS_BAD_ATTRIBUTE, CS_BAD_TYPE and CS_BAD_PAGE
Dominik Brodowski [Sun, 3 Aug 2008 09:58:53 +0000 (11:58 +0200)]
pcmcia: deprecate CS_BAD_ATTRIBUTE, CS_BAD_TYPE and CS_BAD_PAGE

CS_BAD_TYPE was only used in cs.c and already properly annotated by error
messages. CS_BAD_ATTRIBUTE and CS_BAD_PAGE mean a badly written driver, so
ds_dbg() output and -EINVAL seems to be enough.

(includes bugfix from and
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
)
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years agopcmcia: deprecate CS_NO_MORE_ITEMS
Dominik Brodowski [Sun, 3 Aug 2008 09:47:29 +0000 (11:47 +0200)]
pcmcia: deprecate CS_NO_MORE_ITEMS

CS_NO_MORE_ITEMS is returned by the CIS tuple reading and parsing code if
the end of a tuple chain is reached. As at least one PCMCIA driver relies
on matching this return value, replace it with -ENOSPC which is now
uniquely used for this purpose within the in-kernel pcmcia subsystem.

CC: Russell King <rmk+kernel@arm.linux.org.uk>
CC: linux-serial@vger.kernel.org
CC: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>