]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
16 years agoARM: OMAP: Add helper module for board specific I2C bus registration
Jarkko Nikula [Wed, 7 Nov 2007 10:54:31 +0000 (12:54 +0200)]
ARM: OMAP: Add helper module for board specific I2C bus registration

This helper module simplifies I2C bus registration for different OMAP
platforms by doing registration in one place only and to allow board
specific bus configuration like clock rate and number of busses configured.

Helper should cover OMAP processors from first to third generation.

This patch just adds the feature and current implementation cleanup and
board file modifications will be done in following patches.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoCBUS: Do not BUG_ON in retu-headset in case of spurious release event
Jarkko Nikula [Tue, 13 Nov 2007 13:53:14 +0000 (15:53 +0200)]
CBUS: Do not BUG_ON in retu-headset in case of spurious release event

There is a small chance that retu_headset_detect_timer can run twice
and pressed flag being zero in second run. Do nothing in that case instead
of throwing BUG_ON.

Double run can happen under very busy system assuming following scenario

1. Hook interrupt (run in softirq context, pressed flag = 1)
2. First retu_headset_enable_timer call
3. Busy system, retu raises an interrupt but cannot run hook interrupt for
   300-350 ms
4. Second hook interrupt
5. First retu_headset_detect_timer call (pressed flag = 0)
6. Second retu_headset_enable_timer
7. Second retu_headset_detect_timer
   -> pressed flag == 0 => BUG_ON

Patch also removes two debug messages since they are not needed very much
and removal cleans up code a bit.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoV4L/DVB: Make Philips TEA5761 driver to compile
Jarkko Nikula [Tue, 13 Nov 2007 13:46:18 +0000 (15:46 +0200)]
V4L/DVB: Make Philips TEA5761 driver to compile

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoARM: OMAP: Warm reset functionality for 34xx
Choraria, Rohit [Thu, 15 Nov 2007 21:27:03 +0000 (13:27 -0800)]
ARM: OMAP: Warm reset functionality for 34xx

This patch adds the implementation for warm reset functionality for OMAP3.

Signed-off-by: Rohit Choraria <rohitkc@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoARM: OMAP: Export more mcbsp functions
Luís Cargnini [Thu, 15 Nov 2007 21:24:13 +0000 (13:24 -0800)]
ARM: OMAP: Export more mcbsp functions

this patch only export two more functions to been used externally, for read
and write in polled mode.without the need of irqs.

Signed-off-by: Luis Vitorio Cargnini <lvcargnini@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP: Fix the BYTEBLOCK capability removal
Francisco Alecrim [Mon, 5 Nov 2007 14:54:21 +0000 (10:54 -0400)]
OMAP: Fix the BYTEBLOCK capability removal

According with commit 255d01af9a990fd5166f04ed0cc0b30b7b67e81e
from Linux-OMAP tree, the BYTEBLOCK capability was removed by Pierre Ossman.
MMC_CAP_BYTEBLOCK is not defined causing the compile error:

drivers/mmc/host/omap.c: In function `mmc_omap_probe':
drivers/mmc/host/omap.c:1077: error: `MMC_CAP_BYTEBLOCK' undeclared (first use in this function)
drivers/mmc/host/omap.c:1077: error: (Each undeclared identifier is reported only once
drivers/mmc/host/omap.c:1077: error: for each function it appears in.)

Signed-off-by: Francisco Alecrim <francisco.alecrim@indt.org.br>
Signed-off-by: Carlos Eduardo Aguiar <carlos.aguiar@indt.org.br>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agomach:omap: some correction in Clock 34XX
Chandra shekhar [Mon, 12 Nov 2007 13:46:23 +0000 (19:16 +0530)]
mach:omap: some correction in Clock 34XX

Resumbmitting the patch earlier sent by girish, after fixing review comments given by paul.

This patch modifies the I2C clock nodes as per LDM, corrects usage of DPLL mask and updates the flags of 96M clock nodes

Signed-off-by: Chandra Shekhar <x0044955@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoARM: OMAP: clk_disable_unused: init section mismatch
Kevin Hilman [Fri, 2 Nov 2007 00:12:02 +0000 (17:12 -0700)]
ARM: OMAP: clk_disable_unused: init section mismatch

Fix the following warning when OMAP_RESET_CLOCKS is enabled:

WARNING: vmlinux.o(.data+0x33a0): Section mismatch: reference to .init.text:omap2_clk_disable_unused (between 'omap2_clk_functions' and 'osc_ck')

omap2_clk_disable_unused cannot be declared __init as it part of a
struct where the rest of the functions are not __init.

Signed-off-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoRevert "ARM: OMAP: clk_disable_unused: init section mismatch"
Tony Lindgren [Thu, 15 Nov 2007 20:54:09 +0000 (12:54 -0800)]
Revert "ARM: OMAP: clk_disable_unused: init section mismatch"

This reverts commit 669bbebe52d3c3733deb3f1b1d4e3d77e859ce5b.

Using Kevin's resent patch instead.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agofix NULL pointer with MUSB and DMA on ISO ep
Hunyue Yau [Thu, 1 Nov 2007 22:40:49 +0000 (15:40 -0700)]
fix NULL pointer with MUSB and DMA on ISO ep

For the case of an isochonous endpoint, musb_write_fifo may be
called with a NULL buffer from musb_host_tx if DMA is enabled.
Remove DMA check and always supply a valid buffer as long as
the URB contains a valid buffer.

Signed-off-by: Hunyue Yau <hyau@mvista.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
16 years agoARM: OMAP: 2430: add serial console ATAG
Kevin Hilman [Thu, 1 Nov 2007 18:11:34 +0000 (11:11 -0700)]
ARM: OMAP: 2430: add serial console ATAG

Signed-off-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoARM: OMAP: clk_disable_unused: init section mismatch
Kevin Hilman [Thu, 1 Nov 2007 17:18:14 +0000 (10:18 -0700)]
ARM: OMAP: clk_disable_unused: init section mismatch

Fix the following warning when OMAP_RESET_CLOCKS is enabled:

WARNING: vmlinux.o(.data+0x33a0): Section mismatch: reference to .init.text:omap2_clk_disable_unused (between 'omap2_clk_functions' and 'osc_ck')

omap2_clk_disable_unused cannot be declared __init as it part of a
struct where the rest of the functions are not __init.

Signed-off-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoARM: OMAP: Fix usb gadget related compile error
Tony Lindgren [Thu, 15 Nov 2007 20:39:27 +0000 (12:39 -0800)]
ARM: OMAP: Fix usb gadget related compile error

As noted by Dirk Behme.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
Linus Torvalds [Thu, 15 Nov 2007 20:14:52 +0000 (12:14 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched

* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
  sched: reorder SCHED_FEAT_ bits
  sched: make sched_nr_latency static
  sched: remove activate_idle_task()
  sched: fix __set_task_cpu() SMP race
  sched: fix SCHED_FIFO tasks & FAIR_GROUP_SCHED
  sched: fix accounting of interrupts during guest execution on s390

16 years agosched: reorder SCHED_FEAT_ bits
Ingo Molnar [Thu, 15 Nov 2007 19:57:40 +0000 (20:57 +0100)]
sched: reorder SCHED_FEAT_ bits

reorder SCHED_FEAT_ bits so that the used ones come first. Makes
tuning instructions easier.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: make sched_nr_latency static
Adrian Bunk [Thu, 15 Nov 2007 19:57:40 +0000 (20:57 +0100)]
sched: make sched_nr_latency static

sched_nr_latency can now become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: remove activate_idle_task()
Dmitry Adamushko [Thu, 15 Nov 2007 19:57:40 +0000 (20:57 +0100)]
sched: remove activate_idle_task()

cpu_down() code is ok wrt sched_idle_next() placing the 'idle' task not
at the beginning of the queue.

So get rid of activate_idle_task() and make use of activate_task() instead.
It is the same as activate_task(), except for the update_rq_clock(rq) call
that is redundant.

Code size goes down:

   text    data     bss     dec     hex filename
  47853    3934     336   52123    cb9b sched.o.before
  47828    3934     336   52098    cb82 sched.o.after

Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: fix __set_task_cpu() SMP race
Dmitry Adamushko [Thu, 15 Nov 2007 19:57:40 +0000 (20:57 +0100)]
sched: fix __set_task_cpu() SMP race

Grant Wilson has reported rare SCHED_FAIR_USER crashes on his quad-core
system, which crashes can only be explained via runqueue corruption.

there is a narrow SMP race in __set_task_cpu(): after ->cpu is set up to
a new value, task_rq_lock(p, ...) can be successfuly executed on another
CPU. We must ensure that updates of per-task data have been completed by
this moment.

this bug has been hiding in the Linux scheduler for an eternity (we never
had any explicit barrier for task->cpu in set_task_cpu() - so the bug was
introduced in 2.5.1), but only became visible via set_task_cfs_rq() being
accidentally put after the task->cpu update. It also probably needs a
sufficiently out-of-order CPU to trigger.

Reported-by: Grant Wilson <grant.wilson@zen.co.uk>
Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: fix SCHED_FIFO tasks & FAIR_GROUP_SCHED
Oleg Nesterov [Thu, 15 Nov 2007 19:57:40 +0000 (20:57 +0100)]
sched: fix SCHED_FIFO tasks & FAIR_GROUP_SCHED

Suppose that the SCHED_FIFO task does

switch_uid(new_user);

Now, p->se.cfs_rq and p->se.parent both point into the old
user_struct->tg because sched_move_task() doesn't call set_task_cfs_rq()
for !fair_sched_class case.

Suppose that old user_struct/task_group is freed/reused, and the task
does

sched_setscheduler(SCHED_NORMAL);

__setscheduler() sets fair_sched_class, but doesn't update
->se.cfs_rq/parent which point to the freed memory.

This means that check_preempt_wakeup() doing

while (!is_same_group(se, pse)) {
se = parent_entity(se);
pse = parent_entity(pse);
}

may OOPS in a similar way if rq->curr or p did something like above.

Perhaps we need something like the patch below, note that
__setscheduler() can't do set_task_cfs_rq().

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: fix accounting of interrupts during guest execution on s390
Christian Borntraeger [Thu, 15 Nov 2007 19:57:39 +0000 (20:57 +0100)]
sched: fix accounting of interrupts during guest execution on s390

Currently the scheduler checks for PF_VCPU to decide if this timeslice
has to be accounted as guest time. On s390 host interrupts are not
disabled during guest execution. This causes theses interrupts to be
accounted as guest time if CONFIG_VIRT_CPU_ACCOUNTING is set. Solution
is to check if an interrupt triggered account_system_time. As the tick
is timer interrupt based, we have to subtract hardirq_offset.

I tested the patch on s390 with CONFIG_VIRT_CPU_ACCOUNTING and on
x86_64. Seems to work.

CC: Avi Kivity <avi@qumranet.com>
CC: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
Linus Torvalds [Thu, 15 Nov 2007 19:01:07 +0000 (11:01 -0800)]
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6

* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c/eeprom: Recognize VGN as a valid Sony Vaio name prefix
  i2c/eeprom: Hide Sony Vaio serial numbers
  i2c-pasemi: Fix NACK detection
  i2c-pasemi: Replace obsolete "driverfs" reference with "sysfs"
  i2c: Make i2c_check_addr static
  i2c-dev: Unbound new-style i2c clients aren't busy
  i2c-dev: "how does it work" comments

16 years agoi2c/eeprom: Recognize VGN as a valid Sony Vaio name prefix
Jean Delvare [Thu, 15 Nov 2007 18:24:03 +0000 (19:24 +0100)]
i2c/eeprom: Recognize VGN as a valid Sony Vaio name prefix

Recent (i.e. 2005 and later) Sony Vaio laptops have names beginning
with VGN rather than PCG. Update the eeprom driver so that it
recognizes these.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c/eeprom: Hide Sony Vaio serial numbers
Jean Delvare [Thu, 15 Nov 2007 18:24:03 +0000 (19:24 +0100)]
i2c/eeprom: Hide Sony Vaio serial numbers

The sysfs interface to DMI data takes care to not make the system
serial number and UUID world-readable, presumably due to privacy
concerns. For consistency, we should not let the eeprom driver
export these same strings to the world on Sony Vaio laptops.
Instead, only make them readable by root, as we already do for BIOS
passwords.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-pasemi: Fix NACK detection
Olof Johansson [Thu, 15 Nov 2007 18:24:02 +0000 (19:24 +0100)]
i2c-pasemi: Fix NACK detection

Turns out we don't actually check the status to see if there was a
device out there to talk to, just if we had a timeout when doing so.

Add the proper check, so we don't falsly think there are devices
on the bus that are not there, etc.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-pasemi: Replace obsolete "driverfs" reference with "sysfs"
Robert P. J. Day [Thu, 15 Nov 2007 18:24:02 +0000 (19:24 +0100)]
i2c-pasemi: Replace obsolete "driverfs" reference with "sysfs"

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: Make i2c_check_addr static
Jean Delvare [Thu, 15 Nov 2007 18:24:02 +0000 (19:24 +0100)]
i2c: Make i2c_check_addr static

i2c_check_addr is only used inside i2c-core now, so we can make it
static and stop exporting it. Thanks to David Brownell for noticing.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-dev: Unbound new-style i2c clients aren't busy
Jean Delvare [Thu, 15 Nov 2007 18:24:01 +0000 (19:24 +0100)]
i2c-dev: Unbound new-style i2c clients aren't busy

Let i2c-dev deal properly with new-style i2c clients. Instead of
considering them always busy, it needs to check wether a driver is
bound to them or not.

This is still not completely correct, as the client could become
busy later, but the same problem already existed before new-style
clients were introduced. We'll want to fix it someday.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
16 years agoi2c-dev: "how does it work" comments
David Brownell [Thu, 15 Nov 2007 18:24:01 +0000 (19:24 +0100)]
i2c-dev: "how does it work" comments

This adds some "how does this work" comments to the i2c-dev driver,
plus separators between the three main components:

  - The parallel list of i2c_adapters ("i2c_dev_list"), each of which
    gets a "struct i2c_dev" and a /dev/i2c-X character special file.

  - An i2cdev_driver gets adapter add/remove notifications, which are
    used to maintain that list of adapters.

  - Special file operations, which let userspace talk either directly to
    the adapter (for i2c_msg operations) or through cached addressing info
    using an anonymous i2c_client (never registered anywhere).

Plus there's the usual module load/unload record keeping.

After making sense of this code, I think that the anonymous i2c_client
is pretty shady.  But since it's never registered, using this code with
a system set up for "new style" I2C drivers is no more complicated than
always using the I2C_SLAVE_FORCE ioctl (instead of I2C_SLAVE).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoRevert "skge: fix ram buffer size calculation"
Linus Torvalds [Thu, 15 Nov 2007 16:44:36 +0000 (08:44 -0800)]
Revert "skge: fix ram buffer size calculation"

This reverts commit 7fb7ac241162dc51ec0f7644d4a97b2855213c32.

Heikki Orsila reports that it causes a regression:

  "Doing

nc host port < /dev/zero

   on a sending machine (not skge) to an skge machine that is receiving:

nc -l -p port >/dev/null

   with ~60 MiB/s speed, causes the interface go malfunct. A slow
   transfer doesn't cause a problem."

See

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

for some more information.

There is a workaround (also reported by Heikki):

  "After some fiddling, I noticed that not changing the register write
   order on patch:

   +       skge_write32(hw, RB_ADDR(q, RB_END), end);
           skge_write32(hw, RB_ADDR(q, RB_WP), start);
           skge_write32(hw, RB_ADDR(q, RB_RP), start);
   -       skge_write32(hw, RB_ADDR(q, RB_END), end);

   fixes the visible effect..  Possibly not the root cause of the
   problem, but changing the order back fixes networking here."

but that has yet to be ack'ed or tested more widely, so the whole
problem-causing commit gets reverted until this is resolved properly.

Bisected-and-requested-by: Heikki Orsila <shdl@zakalwe.fi>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen...
Linus Torvalds [Thu, 15 Nov 2007 16:37:09 +0000 (08:37 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
  [AVR32] Export intc_get_pending symbol
  [AVR32] Add missing bit in PCCR sysreg
  [AVR32] Fix duplicate clock index in at32ap machine code
  [AVR32] remove UID16 option
  [AVR32] Turn off debugging in SMC driver
  Extend I/O resource for wdt0 for at32ap7000 devices
  [AVR32] pcmcia ioaddr_t should be 32 bits on AVR32

16 years agoslob: fix memory corruption
Nick Piggin [Thu, 15 Nov 2007 11:32:04 +0000 (12:32 +0100)]
slob: fix memory corruption

Previously, it would be possible for prev->next to point to
&free_slob_pages, and thus we would try to move a list onto itself, and
bad things would happen.

It seems a bit hairy to be doing list operations with the list marker as
an entry, rather than a head, but...

this resolves the following crash:

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

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agowait_task_stopped: Check p->exit_state instead of TASK_TRACED
Roland McGrath [Wed, 14 Nov 2007 06:11:50 +0000 (22:11 -0800)]
wait_task_stopped: Check p->exit_state instead of TASK_TRACED

The original meaning of the old test (p->state > TASK_STOPPED) was
"not dead", since it was before TASK_TRACED existed and before the
state/exit_state split.  It was a wrong correction in commit
14bf01bb0599c89fc7f426d20353b76e12555308 to make this test for
TASK_TRACED instead.  It should have been changed when TASK_TRACED
was introducted and again when exit_state was introduced.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Alexey Dobriyan <adobriyan@sw.ru>
Cc: Kees Cook <kees@ubuntu.com>
Acked-by: Scott James Remnant <scott@ubuntu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[AVR32] Export intc_get_pending symbol
Haavard Skinnemoen [Wed, 31 Oct 2007 19:34:11 +0000 (20:34 +0100)]
[AVR32] Export intc_get_pending symbol

Oprofile needs to call intc_get_pending() in order to determine
whether a performance counter interrupt is pending.

Also, include the header which declares intc_get_pending() and fix the
definition to match the prototype.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
16 years ago[AVR32] Add missing bit in PCCR sysreg
Haavard Skinnemoen [Wed, 31 Oct 2007 19:32:00 +0000 (20:32 +0100)]
[AVR32] Add missing bit in PCCR sysreg

The enable bit was missing...

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
16 years ago[AVR32] Fix duplicate clock index in at32ap machine code
ben.nizette@iinet.net.au [Wed, 7 Nov 2007 07:16:22 +0000 (16:16 +0900)]
[AVR32] Fix duplicate clock index in at32ap machine code

There's a duplicate clock index between USART0 and USART1 which may be
causing system crashes when USART0 is used.  Change the USART0 index
to '3', indicating the clock that is actually used by USART0.

Signed-off-by: Ben Nizette <ben@niasdigital.com>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
16 years ago[AVR32] remove UID16 option
Adrian Bunk [Mon, 5 Nov 2007 17:06:12 +0000 (18:06 +0100)]
[AVR32] remove UID16 option

avr32 already sees the option from init/Kconfig.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
16 years ago[AVR32] Turn off debugging in SMC driver
Haavard Skinnemoen [Mon, 5 Nov 2007 13:06:51 +0000 (14:06 +0100)]
[AVR32] Turn off debugging in SMC driver

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
16 years agoExtend I/O resource for wdt0 for at32ap7000 devices
Hans-Christian Egtvedt [Tue, 30 Oct 2007 13:29:50 +0000 (14:29 +0100)]
Extend I/O resource for wdt0 for at32ap7000 devices

This patch extends the I/O resource to 0xfff000cf which will enable the
watchdog driver to access the reset cause (RCAUSE) register. Making it
capable of reporting boot status.

Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
16 years ago[AVR32] pcmcia ioaddr_t should be 32 bits on AVR32
Haavard Skinnemoen [Tue, 16 Oct 2007 09:23:51 +0000 (11:23 +0200)]
[AVR32] pcmcia ioaddr_t should be 32 bits on AVR32

Define ioaddr_t as u_int on AVR32 just like on ARM and MIPS.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
16 years ago[INET]: Fix potential kfree on vmalloc-ed area of request_sock_queue
Pavel Emelyanov [Thu, 15 Nov 2007 10:57:06 +0000 (02:57 -0800)]
[INET]: Fix potential kfree on vmalloc-ed area of request_sock_queue

The request_sock_queue's listen_opt is either vmalloc-ed or
kmalloc-ed depending on the number of table entries. Thus it
is expected to be handled properly on free, which is done in
the reqsk_queue_destroy().

However the error path in inet_csk_listen_start() calls
the lite version of reqsk_queue_destroy, called
__reqsk_queue_destroy, which calls the kfree unconditionally.

Fix this and move the __reqsk_queue_destroy into a .c file as
it looks too big to be inline.

As David also noticed, this is an error recovery path only,
so no locking is required and the lopt is known to be not NULL.

reqsk_queue_yank_listen_sk is also now only used in
net/core/request_sock.c so we should move it there too.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VIA_VELOCITY]: Don't oops on MTU change.
Stephen Hemminger [Thu, 15 Nov 2007 03:47:27 +0000 (19:47 -0800)]
[VIA_VELOCITY]: Don't oops on MTU change.

Simple mtu change when device is down.
Fix http://bugzilla.kernel.org/show_bug.cgi?id=9382.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'fixes-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Thu, 15 Nov 2007 03:44:02 +0000 (19:44 -0800)]
Merge branch 'fixes-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Thu, 15 Nov 2007 03:17:07 +0000 (19:17 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  [CRYPTO] geode: Fix not inplace encryption

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Thu, 15 Nov 2007 02:53:49 +0000 (18:53 -0800)]
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:
  mlx4_core: Fix thinko in QP destroy (incorrect bitmap_free)
  RDMA/cxgb3: Set the max_qp_init_rd_atom attribute in query_device
  IB/ehca: Fix static rate calculation
  IB/ehca: Return physical link information in query_port()
  IB/ipath: Fix race with ACK retry timeout list management
  IB/ipath: Fix memory leak in ipath_resize_cq() if copy_to_user() fails
  mlx4_core: Fix possible bad free in mlx4_buf_free()

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/x86
Linus Torvalds [Thu, 15 Nov 2007 02:53:11 +0000 (18:53 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/x86

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/x86:
  x86: enable "make ARCH=x86"
  x86: do not use $(ARCH) when not needed
  kconfig: use $K64BIT to set 64BIT with all*config targets
  kconfig: add helper to set config symbol from environment variable
  kconfig: factor out code in confdata.c
  x86: move the rest of the menu's to Kconfig
  x86: move all simple arch settings to Kconfig
  x86: copy x86_64 specific Kconfig symbols to Kconfig.i386
  x86: add X86_64 dependency to x86_64 specific symbols in Kconfig.x86_64
  x86: add X86_32 dependency to i386 specific symbols in Kconfig.i386
  x86: arch/x86/Kconfig.cpu unification
  x86: start unification of arch/x86/Kconfig.*
  x86: unification of cfufreq/Kconfig

16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 15 Nov 2007 02:51:48 +0000 (18:51 -0800)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [NET]: rt_check_expire() can take a long time, add a cond_resched()
  [ISDN] sc: Really, really fix warning
  [ISDN] sc: Fix sndpkt to have the correct number of arguments
  [TCP] FRTO: Clear frto_highmark only after process_frto that uses it
  [NET]: Remove notifier block from chain when register_netdevice_notifier fails
  [FS_ENET]: Fix module build.
  [TCP]: Make sure write_queue_from does not begin with NULL ptr
  [TCP]: Fix size calculation in sk_stream_alloc_pskb
  [S2IO]: Fixed memory leak when MSI-X vector allocation fails
  [BONDING]: Fix resource use after free
  [SYSCTL]: Fix warning for token-ring from sysctl checker
  [NET] random : secure_tcp_sequence_number should not assume CONFIG_KTIME_SCALAR
  [IWLWIFI]: Not correctly dealing with hotunplug.
  [TCP] FRTO: Plug potential LOST-bit leak
  [TCP] FRTO: Limit snd_cwnd if TCP was application limited
  [E1000]: Fix schedule while atomic when called from mii-tool.
  [NETX]: Fix build failure added by 2.6.24 statistics cleanup.
  [EP93xx_ETH]: Build fix after 2.6.24 NAPI changes.
  [PKT_SCHED]: Check subqueue status before calling hard_start_xmit

16 years agoCRISv10 fasttimer: Scrap INLINE and name timeval_cmp better
Jesper Nilsson [Thu, 15 Nov 2007 01:01:33 +0000 (17:01 -0800)]
CRISv10 fasttimer: Scrap INLINE and name timeval_cmp better

Scrap the local __INLINE__ macro, and rename timeval_cmp to fasttime_cmp.

Inline macro was completely unnecessary since the macro was defined
locally to be inline.
timeval_cmp was inaccurately named since it does comparison on
struct fasttimer_t and not on struct timeval.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoCRISv10 memset library add lineendings to asm
Jesper Nilsson [Thu, 15 Nov 2007 01:01:32 +0000 (17:01 -0800)]
CRISv10 memset library add lineendings to asm

Add \n\ at end of lines inside asm statement to avoid warning.

No change except adding \n\ to end of line and correcting
whitespace has been done.
Removes warning about multi-line string literals when compiling
arch/cris/arch-v10/lib/memset.c

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoCRISv10 string library add lineendings to asm
Jesper Nilsson [Thu, 15 Nov 2007 01:01:31 +0000 (17:01 -0800)]
CRISv10 string library add lineendings to asm

Add \n\ at end of lines inside asm statement to avoid warning.

No change except adding \n\ to end of line and correcting
whitespace has been done.
Removes warning about multi-line string literals when compiling
arch/cris/arch-v10/lib/string.c

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoCRISv10 usercopy library add lineendings to asm
Jesper Nilsson [Thu, 15 Nov 2007 01:01:30 +0000 (17:01 -0800)]
CRISv10 usercopy library add lineendings to asm

Removes warning when compiling arch/cris/arch-v10/lib/usercopy.c

No change except adding \n\ on the end of the lines has been done.
Removes warning about multi-line string literals.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoCRISv10 Ethernet declare mac fix
Jesper Nilsson [Thu, 15 Nov 2007 01:01:29 +0000 (17:01 -0800)]
CRISv10 Ethernet declare mac fix

Declare mac using DECLARE_MAC_BUF for use when calling print_mac().

This fixes compile error where mac was undeclared.
Also, remove unused variable i.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoCRIS tlb.h should include linux/pagemap.h
Jesper Nilsson [Thu, 15 Nov 2007 01:01:28 +0000 (17:01 -0800)]
CRIS tlb.h should include linux/pagemap.h

Include linux/pagemap.h for release_pages and page_cache_release.

Fixes compilation error in arch/cris/mm/init.c when CONFIG_SWAP is unset.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoCRISv32: add cache flush operations
Jesper Nilsson [Thu, 15 Nov 2007 01:01:27 +0000 (17:01 -0800)]
CRISv32: add cache flush operations

These are needed due to a cache bug, and can be used to make sure that the
DMA descriptors are flushed to memory and can be safely handled by DMA.

flush_dma_descr - Flush one DMA descriptor.
flush_dma_list - Flush a complete list of DMA descriptors.
cris_flush_cache - Flush the complete cache.
cris_flush_cache_range - Flush only the specified range

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoCRISv10 improve and bugfix fasttimer
Jesper Nilsson [Thu, 15 Nov 2007 01:01:23 +0000 (17:01 -0800)]
CRISv10 improve and bugfix fasttimer

Improve and bugfix CRIS v10 fast timers.

- irq_handler_t now only takes two arguments.
- Keep interrupts disabled as long as we have a reference to the
  fasttimer list and only enable them while doing the callback.
  del_fast_timer may be called from other interrupt context.
- Fix bug where debug code could return without calling local_irq_restore.
- Use jiffies instead of usec (change from struct timeval to fasttime_t).
- Don't initialize static variables to zero.
- Remove obsolete #ifndef DECLARE_WAITQUEUE code.
- fast_timer_init should be __initcall.
- Change status/debug variables to unsigned.
- Remove CVS log and CVS id.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoCRISv10: fix timer interrupt parameters
Jesper Nilsson [Thu, 15 Nov 2007 01:01:21 +0000 (17:01 -0800)]
CRISv10: fix timer interrupt parameters

Fix timer interrupt parameters for CRIS v10.

- irq_handler_t only takes two arguments, use get_irq_regs to get
  regs for profiling.
- Call update_process_times.
- Remove CVS tag.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoCRIS: remove MTD_AMSTD and MTD_OBSOLETE_CHIPS take two
Jesper Nilsson [Thu, 15 Nov 2007 01:01:20 +0000 (17:01 -0800)]
CRIS: remove MTD_AMSTD and MTD_OBSOLETE_CHIPS take two

Remove MTD_AMDSTD and MTD_OBSOLETE_CHIPS from defconfig, Kconfig and code,
instead we'll use MTD_CFI or MTD_JEDECPROBE.

[akpm@linux-foundation.org: codingl-style cleanups]
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoCRISv10 serial driver rewrite
Jesper Nilsson [Thu, 15 Nov 2007 01:01:15 +0000 (17:01 -0800)]
CRISv10 serial driver rewrite

New and improved serial driver for CRISv10, take three, with improvements
suggested by Jiri Slaby.

- Call wait_event_interruptible with a _correct_ and sensible condition.
- Removed superfluous test of info->flags & ASYNC_CLOSING, since that is done
  by wait_event_interruptible.
- Moved common code for deregistering DMA and IRQ to deinit_port function.
- Use setup_timer when initializing flush_timer.
- Convert bit-field for uses_dma_in and uses_dma_out to regular bytes.
- Removed CVS tags.
- Removed defines and comments for CRIS_BUF_SIZE and TTY_THRESHOLD_THROTTLE
  (no longer used).
- Cleaned up code to pass checkpatch.
- Add crisv10.h header file.
- Merge of CRISv10 from Axis internal CVS.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Reviewed-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoCRIS don't include bitops.h in posix_types.h
Jesper Nilsson [Thu, 15 Nov 2007 01:01:13 +0000 (17:01 -0800)]
CRIS don't include bitops.h in posix_types.h

In file included from include/asm/byteorder.h:23,
                 from include/asm-generic/bitops/le.h:5,
                 from include/asm-generic/bitops/ext2-non-atomic.h:4,
                 from include/asm/bitops.h:163,
                 from include/linux/bitops.h:17,
                 from include/asm/posix_types.h:55,
                 from include/linux/posix_types.h:47,
                 from include/linux/types.h:11,
                 from include/linux/capability.h:16,
                 from include/linux/sched.h:49,
                 from arch/cris/kernel/asm-offsets.c:1:
include/linux/byteorder/little_endian.h:43: parse error before "__cpu_to_le64p"
include/linux/byteorder/little_endian.h:44: warning: return type defaults to `int'
include/linux/byteorder/little_endian.h: In function `__cpu_to_le64p':
include/linux/byteorder/little_endian.h:45: `__le64' undeclared (first use in this function)

Remove include of asm/bitops.h, not needed here, corrects compilation error
(__le64 undeclared).

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocris: ARRAY_SIZE() cleanup
Alex Unleashed [Thu, 15 Nov 2007 01:01:06 +0000 (17:01 -0800)]
cris: ARRAY_SIZE() cleanup

I'm converting most array size calculations under arch/ to use
ARRAY_SIZE().  This is the patch for CRIS.

Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocris build fixes: defconfig updates
Jesper Nilsson [Thu, 15 Nov 2007 01:01:04 +0000 (17:01 -0800)]
cris build fixes: defconfig updates

Remove some unused config lines, and add some others that needs to be off
for a succesful compile. This is the minimal set of changes for 2.6.23.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocris build fixes: fix crisksyms.c
Jesper Nilsson [Thu, 15 Nov 2007 01:01:02 +0000 (17:01 -0800)]
cris build fixes: fix crisksyms.c

- Add __negdi2 to exported symbols.
- Remove string functions from exported symbols.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocris build fixes: setup.c needs param.h
Jesper Nilsson [Thu, 15 Nov 2007 01:01:01 +0000 (17:01 -0800)]
cris build fixes: setup.c needs param.h

Include linux/param.h for HZ.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocris build fixes: fixes in arch/cris/kernel/time.c
Jesper Nilsson [Thu, 15 Nov 2007 01:01:00 +0000 (17:01 -0800)]
cris build fixes: fixes in arch/cris/kernel/time.c

- Remove debug print.
- Change #if to #ifdef to avoid compile time warning if CONFIG_PROFILING
  isn't set.
- Number of parameters to profile_tick has changed, drop the regs parameter.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocris build fixes: corrected and improved NMI and IRQ handling
Jesper Nilsson [Thu, 15 Nov 2007 01:00:59 +0000 (17:00 -0800)]
cris build fixes: corrected and improved NMI and IRQ handling

Corrects compile errors and the following:

- Remove oldset parameter from do_signal and do_notify_resume.

- Modified to fit new consolidated IRQ handling code.

- Reverse check order between external nmi and watchdog nmi to avoid false
  watchdog oops in case of a glitch on the nmi pin.

- Return from an pin-generated NMI the same way as for other interrupts.

- Moved blocking of ethernet rx/tx irq from ethernet interrupt handler to
  low-level asm interrupt handlers.  Fixed in the multiple interrupt
  handler also.

- Add space for thread local storage in thread_info struct.

- Add NO_DMA to Kconfig, and include arch specific Kconfig using arch
  independent path. Include subsystem Kconfigs for pcmcia, usb, i2c,
  rtc and pci.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocris-build-fixes-update-eth_v10c-ethernet-driver-fix
Andrew Morton [Thu, 15 Nov 2007 01:00:58 +0000 (17:00 -0800)]
cris-build-fixes-update-eth_v10c-ethernet-driver-fix

Fix locking bug noted by  Roel Kluin <12o3l@tiscali.nl>.

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocris build fixes: update eth_v10.c ethernet driver
Jesper Nilsson [Thu, 15 Nov 2007 01:00:55 +0000 (17:00 -0800)]
cris build fixes: update eth_v10.c ethernet driver

New (updated) version of ethernet driver for cris v10.

- First steps to simplify and make the MII code more similar
  between the etrax100 and etraxfs ports.

- Start the transmit queue before enabling tx interrupts
  to avoid race with the first frame.

- Flip the comparition statement to stick to physical addresses
  to avoid phys_to_virt mapping a potential null pointer.
  This was not an error but the change simplifies debugging
  of address-space mappings.

- Made myPrevRxDesc local to e100_rx since it was only used there.
  Fixed out of memory handling in e100_rx.  If dev_alloc_skb() fails
  persistently the system is hosed anyway but at least it won't
  loop in an interrupt handler.

- Correct some code formatting issues.

- Add defines SET_ETH_ENABLE_LEDS, SET_ETH_DISABLE_LEDS
  and SET_ETH_AUTONEG used in new cris v10 ethernet driver.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocris build fixes: add baud rate defines
Jesper Nilsson [Thu, 15 Nov 2007 01:00:54 +0000 (17:00 -0800)]
cris build fixes: add baud rate defines

Add missing defines for (unsupported) baud rates.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocris build fixes: sys_cris.c needs fs.h
Jesper Nilsson [Thu, 15 Nov 2007 01:00:53 +0000 (17:00 -0800)]
cris build fixes: sys_cris.c needs fs.h

Include linux/fs.h, needed for do_pipe.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocris build fixes: irq fixes
Jesper Nilsson [Thu, 15 Nov 2007 01:00:52 +0000 (17:00 -0800)]
cris build fixes: irq fixes

- New file include/asm-cris/irq_regs.h.
- Change handling of registers for do_IRQ.
- Add GENERIC_HARDIRQS to Kconfig.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocris-build-fixes-atomich-needs-compilerh-fix
Andrew Morton [Thu, 15 Nov 2007 01:00:51 +0000 (17:00 -0800)]
cris-build-fixes-atomich-needs-compilerh-fix

Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocris build fixes: atomic.h needs compiler.h
Jesper Nilsson [Thu, 15 Nov 2007 01:00:50 +0000 (17:00 -0800)]
cris build fixes: atomic.h needs compiler.h

Include file linux/compiler.h is needed for 'likely'.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocris build fixes: hardirq.h: include asm/irq.h
Jesper Nilsson [Thu, 15 Nov 2007 01:00:49 +0000 (17:00 -0800)]
cris build fixes: hardirq.h: include asm/irq.h

Include asm/irq.h to avoid undefined value warning.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocris build fixes: Add missing syscalls
Jesper Nilsson [Thu, 15 Nov 2007 01:00:48 +0000 (17:00 -0800)]
cris build fixes: Add missing syscalls

Add missing syscalls to cris architecture.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocris build fixes: fix csum_tcpudp_magic() declaration
Jesper Nilsson [Thu, 15 Nov 2007 01:00:47 +0000 (17:00 -0800)]
cris build fixes: fix csum_tcpudp_magic() declaration

Remove int from prototype, no longer needed and causes compile error.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoaic94xx_sds: rename FLASH_SIZE
Andrew Morton [Thu, 15 Nov 2007 01:00:45 +0000 (17:00 -0800)]
aic94xx_sds: rename FLASH_SIZE

arm:

drivers/scsi/aic94xx/aic94xx_sds.c:381:1: warning: "FLASH_SIZE" redefined
In file included from include/asm/arch/irqs.h:22,
                 from include/asm/irq.h:4,
                 from include/asm/hardirq.h:6,
                 from include/linux/hardirq.h:7,
                 from include/asm-generic/local.h:5,
                 from include/asm/local.h:1,
                 from include/linux/module.h:19,
                 from include/linux/device.h:21,
                 from include/linux/pci.h:52,
                 from drivers/scsi/aic94xx/aic94xx_sds.c:28:
include/asm/arch/platform.h:444:1: warning: this is the location of the previous definition

Cc: Gilbert Wu <gilbert_wu@adaptec.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agox86: don't call mce_create_device on CPU_UP_PREPARE
Andreas Herrmann [Thu, 15 Nov 2007 01:00:44 +0000 (17:00 -0800)]
x86: don't call mce_create_device on CPU_UP_PREPARE

Fix regression introduced with d435d862baca3e25e5eec236762a43251b1e7ffc
("cpu hotplug: mce: fix cpu hotplug error handling").

A CPU which was not brought up during boot (using maxcpus and
additional_cpus parameters) couldn't be onlined anymore.  For such a CPU it
seemed that MCE was not supported during CPU_UP_PREPARE-time which caused
mce_cpu_callback to return NOTIFY_BAD to notifier_call_chain.  To fix this
we:

 - call mce_create_device for CPU_ONLINE event (instead of CPU_UP_PREPARE),
 - avoid mce_remove_device() for the CPU that is not correctly initialized
   by mce_create_device() failure,
 - make mce_cpu_callback always return NOTIFY_OK for CPU_ONLINE event.
   Because CPU_ONLINE callback return value is always ignored.

[akinobu.mita@gmail.com: avoid mce_remove_device() for not initialized device]
[akinobu.mita@gmail.com: make mce_cpu_callback always return NOTIFY_OK]
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agooprofile: fix oops on x86 32-bit
Jan Blunck [Thu, 15 Nov 2007 01:00:42 +0000 (17:00 -0800)]
oprofile: fix oops on x86 32-bit

x86 32-bit isn't saving the stack pointer to pt_regs->esp when an
interrupt occurs.

Signed-off-by: Jan Blunck <jblunck@suse.de>
Tested-by: Robert Fitzsimons <robfitz@273k.net>
Cc: Andi Kleen <ak@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Philippe Elie <phil.el@wanadoo.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agox86: disable preemption in delay_tsc()
Andrew Morton [Thu, 15 Nov 2007 01:00:41 +0000 (17:00 -0800)]
x86: disable preemption in delay_tsc()

Marin Mitov points out that delay_tsc() can misbehave if it is preempted and
rescheduled on a different CPU which has a skewed TSC.  Fix it by disabling
preemption.

(I assume that the worst-case behaviour here is a stall of 2^32 cycles)

Cc: Andi Kleen <ak@suse.de>
Cc: Marin Mitov <mitov@issp.bas.bg>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokeyspan: init termios properly
Borislav Petkov [Thu, 15 Nov 2007 01:00:39 +0000 (17:00 -0800)]
keyspan: init termios properly

Remove redundant code leading to NULL ptr deref and let terminal config
settings take place in the proper initialization path in
usb_console_setup().

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Cc: <lucy@keyspan.com>
Cc: Greg KH <greg@kroah.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoACPI: AC: Update AC state on resume
Alexey Starikovskiy [Thu, 15 Nov 2007 01:00:39 +0000 (17:00 -0800)]
ACPI: AC: Update AC state on resume

Check if AC state has changed across resume and notify userspace if so.

Fixes "[2.6.24-rc1 regression] AC adapter state does not change after resume"

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Tested-by: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: Len Brown <lenb@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomake /proc/acpi/ac_adapter dependent on ACPI_PROCFS
Andrey Borzenkov [Thu, 15 Nov 2007 01:00:37 +0000 (17:00 -0800)]
make /proc/acpi/ac_adapter dependent on ACPI_PROCFS

Do not provide /proc/acpi/ac_adapter if ACPI_PROCFS is not defined.  This
eliminates duplicated power adapters in HAL and makes it consistent with
battery module

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokernel/taskstats.c: fix bogus nlmsg_free()
Adrian Bunk [Thu, 15 Nov 2007 01:00:37 +0000 (17:00 -0800)]
kernel/taskstats.c: fix bogus nlmsg_free()

We'd better not nlmsg_free on a pointer containing an undefined value
(and without having anything allocated).

Spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofeature-removal-schedule: remove SA_* flags entry
Adrian Bunk [Thu, 15 Nov 2007 01:00:36 +0000 (17:00 -0800)]
feature-removal-schedule: remove SA_* flags entry

No reason to keep the feature-removal-schedule.txt entry after the code
was removed.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofile capabilities: allow sigcont within session
Serge E. Hallyn [Thu, 15 Nov 2007 01:00:34 +0000 (17:00 -0800)]
file capabilities: allow sigcont within session

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

Allow sigcont to be sent to a process with greater capabilities if it is in
the same session.  Otherwise, a shell from which I've started a root shell
and done 'suspend' can't be restarted by the parent shell.

Also don't do file-capabilities signaling checks when uids for the
processes don't match, since the standard check_kill_permission will have
done those checks.

[akpm@linux-foundation.org: coding-style cleanups]
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Acked-by: Andrew Morgan <morgan@kernel.org>
Cc: Chris Wright <chrisw@sous-sol.org>
Tested-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Stephen Smalley <sds@epoch.ncsc.mil>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: James Morris <jmorris@namei.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoSwap delay accounting, include lock_page() delays
Balbir Singh [Thu, 15 Nov 2007 01:00:33 +0000 (17:00 -0800)]
Swap delay accounting, include lock_page() delays

The delay incurred in lock_page() should also be accounted in swap delay
accounting

Reported-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: fix build for !CONFIG_PRINTK
Jeff Dike [Thu, 15 Nov 2007 01:00:31 +0000 (17:00 -0800)]
uml: fix build for !CONFIG_PRINTK

Handle the case of CONFIG_PRINTK being disabled.  This requires a do-nothing
stub to be present in arch/um/include/user.h so that we don't get references
to printk from libc code.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: fix build for !CONFIG_TCP
Jeff Dike [Thu, 15 Nov 2007 01:00:28 +0000 (17:00 -0800)]
uml: fix build for !CONFIG_TCP

Make UML build in the absence of CONFIG_INET by making the inetaddr_notifier
registration depend on it.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: remove last include of libc asm/page.h
Jeff Dike [Thu, 15 Nov 2007 01:00:27 +0000 (17:00 -0800)]
uml: remove last include of libc asm/page.h

asm/page.h is disappearing from the libc headers and we don't need it anyway.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: fix spurious IRQ testing
Jeff Dike [Thu, 15 Nov 2007 01:00:23 +0000 (17:00 -0800)]
uml: fix spurious IRQ testing

The spurious IRQ testing in request_irq is mishandled in um_request_irq, which
sets the incoming file descriptors non-blocking only after request_irq
succeeds.  This results in the spurious irq calling read on a blocking
descriptor, and a hang.

Fixed by reversing the O_NONBLOCK setting and the request_irq call.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFix 64KB blocksize in ext3 directories
Jan Kara [Thu, 15 Nov 2007 01:00:19 +0000 (17:00 -0800)]
Fix 64KB blocksize in ext3 directories

With 64KB blocksize, a directory entry can have size 64KB which does not
fit into 16 bits we have for entry lenght.  So we store 0xffff instead and
convert value when read from / written to disk.  The patch also converts
some places to use ext3_next_entry() when we are changing them anyway.

[akpm@linux-foundation.org: coding-style cleanups]
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosmbfs: fix debug builds
Jeff Layton [Thu, 15 Nov 2007 01:00:18 +0000 (17:00 -0800)]
smbfs: fix debug builds

Fix some warnings with SMBFS_DEBUG_* builds.  This patch makes it so that
builds with -Werror don't fail.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agohibernate: fix lockdep report
Johannes Berg [Thu, 15 Nov 2007 01:00:16 +0000 (17:00 -0800)]
hibernate: fix lockdep report

Lockdep reports a circular locking dependency in the hibernate code
because
 - during system boot hibernate code (from an initcall) locks pm_mutex
   and then a sysfs buffer mutex via name_to_dev_t
 - during regular operation hibernate code locks pm_mutex under a
   sysfs buffer mutex because it's called from sysfs methods.

The deadlock can never happen because during initcall invocation nothing
can write to sysfs yet. This removes the lockdep report by marking the
initcall locking as being in a different class.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago__do_IRQ does not check IRQ_DISABLED when IRQ_PER_CPU is set
Russ Anderson [Thu, 15 Nov 2007 01:00:15 +0000 (17:00 -0800)]
__do_IRQ does not check IRQ_DISABLED when IRQ_PER_CPU is set

In __do_IRQ(), the normal case is that IRQ_DISABLED is checked and if set
the handler (handle_IRQ_event()) is not called.

Earlier in __do_IRQ(), if IRQ_PER_CPU is set the code does not check
IRQ_DISABLED and calls the handler even though IRQ_DISABLED is set.  This
behavior seems unintentional.

One user encountering this behavior is the CPE handler (in
arch/ia64/kernel/mca.c).  When the CPE handler encounters too many CPEs
(such as a solid single bit error), it sets up a polling timer and disables
the CPE interrupt (to avoid excessive overhead logging the stream of single
bit errors).  disable_irq_nosync() is called which sets IRQ_DISABLED.  The
IRQ_PER_CPU flag was previously set (in ia64_mca_late_init()).  The net
result is the CPE handler gets called even though it is marked disabled.

If the behavior of not checking IRQ_DISABLED when IRQ_PER_CPU is set is
intentional, it would be worthy of a comment describing the intended
behavior.  disable_irq_nosync() does call chip->disable() to provide a
chipset specifiec interface for disabling the interrupt, which avoids this
issue when used.

Signed-off-by: Russ Anderson <rja@sgi.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agopidns: Place under CONFIG_EXPERIMENTAL
Eric W. Biederman [Thu, 15 Nov 2007 01:00:13 +0000 (17:00 -0800)]
pidns: Place under CONFIG_EXPERIMENTAL

This is my trivial patch to swat innumerable little bugs with a single
blow.

After some intensive review (my apologies for not having gotten to this
sooner) what we have looks like a good base to build on with the current
pid namespace code but it is not complete, and it is still much to simple
to find issues where the kernel does the wrong thing outside of the initial
pid namespace.

Until the dust settles and we are certain we have the ABI and the
implementation is as correct as humanly possible let's keep process ID
namespaces behind CONFIG_EXPERIMENTAL.

Allowing us the option of fixing any ABI or other bugs we find as long as
they are minor.

Allowing users of the kernel to avoid those bugs simply by ensuring their
kernel does not have support for multiple pid namespaces.

[akpm@linux-foundation.org: coding-style cleanups]
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Adrian Bunk <bunk@kernel.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Kir Kolyshkin <kir@swsoft.com>
Cc: Kirill Korotaev <dev@sw.ru>
Cc: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agovmstat: fix section mismatch warning
Randy Dunlap [Thu, 15 Nov 2007 01:00:12 +0000 (17:00 -0800)]
vmstat: fix section mismatch warning

Mark start_cpu_timer() as __cpuinit instead of __devinit.
Fixes this section warning:

WARNING: vmlinux.o(.text+0x60e53): Section mismatch: reference to .init.text:start_cpu_timer (between 'vmstat_cpuup_callback' and 'vmstat_show')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agogbefb: fix section mismatch warnings
Randy Dunlap [Thu, 15 Nov 2007 01:00:11 +0000 (17:00 -0800)]
gbefb: fix section mismatch warnings

Make 'default_mode' and 'default_var' be __initdata.
Fixes these section warnings:

WARNING: vmlinux.o(.data+0x128e0): Section mismatch: reference to .init.data:default_mode_CRT (between 'default_mode' and 'default_var')
WARNING: vmlinux.o(.data+0x128e4): Section mismatch: reference to .init.data:default_var_CRT (between 'default_var' and 'dev_attr_size')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomark sys_open/sys_read exports unused
Arjan van de Ven [Thu, 15 Nov 2007 01:00:10 +0000 (17:00 -0800)]
mark sys_open/sys_read exports unused

sys_open / sys_read were used in the early 1.2 days to load firmware from
disk inside drivers.  Since 2.0 or so this was deprecated behavior, but
several drivers still were using this.  Since a few years we have a
request_firmware() API that implements this in a nice, consistent way.
Only some old ISA sound drivers (pre-ALSA) still straggled along for some
time....  however with commit c2b1239a9f22f19c53543b460b24507d0e21ea0c the
last user is now gone.

This is a good thing, since using sys_open / sys_read etc for firmware is a
very buggy to dangerous thing to do; these operations put an fd in the
process file descriptor table....  which then can be tampered with from
other threads for example.  For those who don't want the firmware loader,
filp_open()/vfs_read are the better APIs to use, without this security
issue.

The patch below marks sys_open and sys_read unused now that they're
really not used anymore, and for deletion in the 2.6.25 timeframe.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofix param_sysfs_builtin name length check
Jan Kiszka [Thu, 15 Nov 2007 01:00:08 +0000 (17:00 -0800)]
fix param_sysfs_builtin name length check

Commit faf8c714f4508207a9c81cc94dafc76ed6680b44 caused a regression:
parameter names longer than MAX_KBUILD_MODNAME will now be rejected,
although we just need to keep the module name part that short.  This patch
restores the old behaviour while still avoiding that memchr is called with
its length parameter larger than the total string length.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Cc: Dave Young <hidave.darkstar@gmail.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoproc: simplify and correct proc_flush_task
Eric W. Biederman [Thu, 15 Nov 2007 01:00:07 +0000 (17:00 -0800)]
proc: simplify and correct proc_flush_task

Currently we special case when we have only the initial pid namespace.
Unfortunately in doing so the copied case for the other namespaces was
broken so we don't properly flush the thread directories :(

So this patch removes the unnecessary special case (removing a usage of
proc_mnt) and corrects the flushing of the thread directories.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Al Viro <viro@ftp.linux.org.uk>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Cc: Kirill Korotaev <dev@sw.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomips: undo locking on error path returns
Roel Kluin [Thu, 15 Nov 2007 01:00:06 +0000 (17:00 -0800)]
mips: undo locking on error path returns

[akpm@linux-foundation.org: coding-style cleanups]
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>