David Woodhouse [Tue, 3 Jul 2007 20:51:19 +0000 (16:51 -0400)]
[JFFS2] Fix readinode failure when read_dnode() detects CRC failure.
We should have stopped returning 1 from read_dnode() to indicate
failure. We can just mark the damn thing obsolete immediately. But I
missed a case where we don't.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Kyungmin Park [Sat, 30 Jun 2007 05:14:43 +0000 (14:14 +0900)]
[MTD] OneNAND Simulator support
This simulate various OneNAND flash chips for the MTD onenand layer.
It's simple implementation, only basic operations.
It don't support the recent changes in NANDSIM such as lazy block allocation,
bitflip, and so on.
Note: This passed nand-tests.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Kyungmin Park [Sat, 30 Jun 2007 04:57:49 +0000 (13:57 +0900)]
[MTD] [OneNAND] 2X program support
The 2X Program is an extension of Program Operation.
Since the device is equipped with two DataRAMs, and two-plane NAND Flash
memory array, these two component enables simultaneous program of 4KiB.
Plane1 has only even blocks such as block0, block2, block4 while Plane2
has only odd blocks such as block1, block3, block5.
So MTD regards it as 4KiB page size and 256KiB block size
Now the following chips support it. (KFXXX16Q2M)
Demux: KFG2G16Q2M, KFH4G16Q2M, KFW8G16Q2M,
Mux: KFM2G16Q2M, KFN4G16Q2M,
And more recent chips
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Randy Dunlap [Thu, 28 Jun 2007 22:00:09 +0000 (23:00 +0100)]
[MTD] [NOR] Use NULL instead of 0 for pointer to shut sparse up.
Use NULL instead of 0 for pointer:
drivers/mtd/chips/cfi_cmdset_0001.c:2258:43: warning: Using plain integer as NULL pointer
Other changes by inspection.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Brownell [Sun, 24 Jun 2007 22:12:35 +0000 (15:12 -0700)]
[MTD] m25p80 handles more chips, uses JEDEC ids and small eraseblocks
Update chip ID tables in m25p80 to handle more SPI flash chips, matching
datasheets. All of these can use the same core operations and are newer
chips that support the JEDEC "read id" instruction:
- Atmel AT25 and AT26 (seven chips)
- Spansion S25SL (five chips)
- SST 25VF (four chips)
- ST M25, M45 (five more chips)
- Winbond W25X series (seven chips)
That JEDEC instruction is now used, either to support a sanity check on the
platform data holding board configuration data, or to determine chip type
when it's not included in platform data. In fact, boards that don't need a
standard partition table may not need that platform data any more.
For chips that support 4KiB erase units, use that smaller block size instead
of the larger size (usually 64KiB); it's less wasteful. (Tested on W25X80.)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Stefan Roese [Tue, 22 May 2007 09:23:45 +0000 (11:23 +0200)]
[MTD] [NAND] Change NDFC driver to support 405 platforms too
This patch adds 405 platform support to the 440 NDFC driver. The new
AMCC 405EZ PPC is equipped with the same NDFC core as the 440EP(x)
and other will follow soon.
Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Ben Dooks [Mon, 28 May 2007 19:28:34 +0000 (20:28 +0100)]
[MTD] mtdcore.c: share syms with mtd_blkdev.c
Fix the sparse warnings generated by the implicit
dependency of mtd_blkdevs.c and mtd_core.c for the
two symbols mtd_table and mtd_table_mutex. This is
done by adding an local header file mtdcore.h to
define these (including the warning about the
non-proliferation of these symbols).
Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Ben Dooks [Mon, 28 May 2007 19:11:37 +0000 (20:11 +0100)]
[MTD] [NOR] cfi_cmdset_0001.c: sparse fixes
Fix sparse warnings generated from cfi_cmdset_0001.c.
drivers/mtd/chips/cfi_cmdset_0001.c:1783:5: warning: symbol 'cfi_intelext_erase_varsize' was not declared. Should it be static?
drivers/mtd/chips/cfi_cmdset_0001.c:2258:43: warning: Using plain integer as NULL pointer
Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Ben Dooks [Mon, 28 May 2007 18:51:59 +0000 (19:51 +0100)]
[MTD] mtd_blkdevs.c: do not export 'mtd_blktrans_ops'
The mtd_blktrans_ops is not defined in any of the headers
and is indeed not used elsewhere in the kernel, so mark it
as static to reduce the warnings from sparse
drivers/mtd/mtd_blkdevs.c:204:32: warning: symbol 'mtd_blktrans_ops' was not declared. Should it be static?
Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Ben Dooks [Mon, 28 May 2007 18:17:54 +0000 (19:17 +0100)]
[MTD] [NAND] nand_base.c: fix type of eccpos pointer
The nand_base.c driver implicitly casts the uint32_t
eccpos array to 'int *', which is not only not guaranteed
to be the same sign as the source, but is not guaranteed
to be the same size.
Fix by changing nand_base.c to use uint32_t
referencing the eccpos fields.
Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Richard Purdie [Tue, 29 May 2007 12:31:42 +0000 (13:31 +0100)]
[MTD] oops and panic message logging to MTD device
Kernel oops and panic messages are invaluable when debugging crashes.
These messages often don't make it to flash based logging methods (say a
syslog on jffs2) due to the overheads involved in writing to flash.
This patch allows you to turn an MTD partition into a circular log
buffer where kernel oops and panic messages are written to. The messages
are obtained by registering a console driver and checking
oops_in_progress. Erases are performed in advance to maximise the
chances of a saving messages.
To activate it, add console=ttyMTDx to the kernel commandline (where x
is the mtd device number to use).
Signed-off-by: Richard Purdie <rpurdie@openedhand.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Thu, 28 Jun 2007 18:49:36 +0000 (19:49 +0100)]
[JFFS2] Fix suspend failure with JFFS2 GC thread.
The try_to_freeze() call was in the wrong place; we need it in the
signal-pending loop now that a pending freeze also makes
signal_pending() return true.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Joakim Tjernlund [Tue, 26 Jun 2007 23:24:09 +0000 (01:24 +0200)]
[JFFS2] Reduce time for which erase_free_sem is held during erase.
With current desing erase_free_sem is locked every time the flash
block is being erased. For NOR flashes - ~1 second is needed to erase
single flash block. In the worst case scenario erase_free_sem may be
locked for a couple of seconds when the number of blocks is being
erased (e.g. after large file was removed). When erase_free_sem is
locked all read/write operations for given JFFS2 partition are locked
too - in effect from time to time access to the JFFS2 partition is
locked for a number of seconds. This fix makes critical section in
flash erasing procedure shorter - now erase_free_sem is locked around
erase_completion_lock spinlock only.
Originally from Radoslaw Bisewski Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Joakim Tjernlund [Sun, 24 Jun 2007 17:22:29 +0000 (19:22 +0200)]
[JFFS2] Prevent oops after 'node added in wrong place' debug check
jffs2_add_physical_node_ref() should never really return error -- it's
an internal debugging check which triggered. We really need to work out
why and stop it happening. But in the meantime, let's make the failure
mode a little less nasty.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Linus Torvalds [Wed, 27 Jun 2007 17:04:02 +0000 (10:04 -0700)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] Make SN2 PCI code use ioremap rather than manually mangle the address
[IA64] Force error to surface in nofault code
[IA64] change sh_change_coherence oemcall to use nolock
[IA64] remove duplicate header include line
[IA64] Correct unwind validation code
[IA64] is_power_of_2-ia64/mm/hugetlbpage.c
Tejun Heo [Tue, 26 Jun 2007 17:49:38 +0000 (02:49 +0900)]
libata: kill ATA_HORKAGE_DMA_RW_ONLY
ATA_HORKAGE_DMA_RW_ONLY for TORiSAN is verified to be subset of using
DMA for ATAPI commands which aren't aligned to 16 bytes. As libata
now doesn't use DMA for unaligned ATAPI commands, the horkage is
redundant. Kill it.
Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Tue, 26 Jun 2007 17:48:43 +0000 (02:48 +0900)]
libata: use PIO for non-16 byte aligned ATAPI commands
The IDE driver used DMA for ATAPI commands if READ/WRITE command is
multiple of sector size or sg command is multiple of 16 bytes. For
libata, READ/WRITE sector alignment is guaranteed by the high level
driver (sr), so we only have to worry about the 16 byte alignment.
This patch makes ata_check_atapi_dma() always request PIO for all data
transfer commands which are not multiple of 16 bytes.
The following reports are related to this problem.
Tejun Heo [Tue, 26 Jun 2007 17:47:35 +0000 (02:47 +0900)]
libata: call ata_check_atapi_dma() with qc better prepared
In atapi_xlat(), prepare qc better before calling
ata_check_atapi_dma() such that ata_check_atapi_dma() can use info
from qc. While at it, reformat weird looking if/else block in the
function.
Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Mon, 25 Jun 2007 12:47:11 +0000 (21:47 +0900)]
libata: fix infinite EH waiting bug
When EH gives up after repeated exceptions, it doesn't't clear the
PENDING bit on exit which leaves PENDING bit set without EH actually
scheduled. This makes ata_port_wait_eh() to wait forever makes rmmod
hang on such port. Fix it by clearing the flag.
Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Mon, 25 Jun 2007 11:45:54 +0000 (20:45 +0900)]
libata: be less verbose about hpa
There's no reason to print out hpa related messages when HPA is not
active. Kill the unconditional message and add a warning message
which is printed if HPA size is smaller than the current size.
Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Mon, 25 Jun 2007 12:11:13 +0000 (21:11 +0900)]
libata: kill non-sense warning message
prereset() is now allowed to set flag for unsupported reset method.
EH layer is responsible for selecting the fallback. Remove non-sense
warning message.
Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Mon, 25 Jun 2007 12:31:05 +0000 (21:31 +0900)]
libata: kill the infamous abnormal status message
The infamous abnormal status message triggers on not so abnormal cases
including empty port and even when it's being triggered on actual
errors the info it provides is redundant and out of context - higher
level functions will print the info in better safe later anyway.
Also, by being triggered all the time, it leads people to think that
the abnormality is somehow related to all ATA and system problems
they're experiencing and gives owners of healthy systems unfounded
doubts about the integrity of the universe. Make it a DPRINTK and
save the universe.
Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
On Tue, Jun 19, Stephen Hemminger wrote:
> Olaf Hering <olaf@aepfle.de> wrote:
> > What happend to __ucmpdi2 from David Woodhouse?
> > google has a few hits about stuff like this on 32bit powerpc with gcc 4.1.2:
> >
> > ERROR: "__ucmpdi2" [drivers/net/s2io.ko] undefined!
> >
> > using the drivers/net/s2io* files from 2.6.21 with 2.6.22-rc5 fixes the
> > compile.
> >
> > 25805dcf9d83098cf5492117ad2669cd14cc9b24 adds two u64 >>= 48 followed by
> > a switch statement (line 2889 and 6816).
>
> Probably the "switch(err) {" needs a cast to a smaller type (like u8).
This change removes the compiler-generated calls to __ucmpdi2.
Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Ralf Baechle [Sun, 24 Jun 2007 13:59:54 +0000 (15:59 +0200)]
au1000_eth: Fix warnings.
Fixed by including <linux/dma-mapping.h>:
CC drivers/net/au1000_eth.o
drivers/net/au1000_eth.c: In function 'au1000_probe':
drivers/net/au1000_eth.c:661: warning: implicit declaration of function 'dma_alloc_noncoherent'
drivers/net/au1000_eth.c:802: warning: implicit declaration of function 'dma_free_noncoherent'
Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Siddha, Suresh B [Mon, 25 Jun 2007 22:52:35 +0000 (15:52 -0700)]
x86_64 irq: use mask/unmask and proper locking in fixup_irqs()
Force irq migration path during cpu offline, is not using proper locks and
irq_chip mask/unmask routines. This will result in some races(especially
the device generating the interrupt can see some inconsistent state,
resulting in issues like stuck irq,..).
Appended patch fixes the issue by taking proper lock and encapsulating
irq_chip set_affinity() with a mask() before and an unmask() after.
This fixes a MSI irq stuck issue reported by Darrick Wong.
There are several more general bugs in this area(irq migration in the
process context). For example,
1. Possibility of missing edge triggered irq.
2. Reliable method of migrating level triggered irq in the process context.
We plan to look and close these in the near future.
Eric says:
In addition even with the fix from Suresh there is still at least one
nasty hardware race in fixup_irqs(). However we exercise that code
path rarely enough that we are unlikely to hit it in the real world,
and that race seems to have existed since the code was merged. And a
fix for that is not coming soon as it is an open investigation area
if we can fix irq migration to work outside of irq context or if
we have to rework the requirements imposed by the generic cpu hotplug
and layer on fixup_irqs(). So this may come up again.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Cc: Eric W. Biederman <ebiederm@xmission.com> Reported-and-tested-by: Darrick Wong <djwong@us.ibm.com> Cc: Andi Kleen <ak@suse.de> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 26 Jun 2007 23:51:23 +0000 (16:51 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] 4449/1: more entries in arch/arm/boot/.gitignore
[ARM] 4452/1: Force the literal pool dump before reloc_end
[ARM] Update show_regs/oops register format
[ARM] Add support for pause_on_oops and display preempt/smp options
Linus Torvalds [Tue, 26 Jun 2007 23:50:48 +0000 (16:50 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] Count timer interrupts correctly.
[MIPS] SMTC and non-SMTC kernel and modules are incompatible
[MIPS] EMMA2RH: Disable GEN_RTC, it can't possibly work.
[MIPS] Remove a duplicated local variable in test_and_clear_bit()
[MIPS] use compat_siginfo in rt_sigframe_n32
[MIPS] 20K: Handle WAIT related bugs according to errata information
[MIPS] AP/SP requires shadow registers, auto enable support.
[MIPS] Fix pb1500 reg B access
[MIPS] Alchemy: Fix wrong cast
[MIPS] remove "support for" from system type entry
[MIPS] add io_map_base to pci_controller on Cobalt
[MIPS] __ucmpdi2 arguments are unsigned long long.
Linus Torvalds [Tue, 26 Jun 2007 23:49:57 +0000 (16:49 -0700)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
[POWERPC] Fix subtle FP state corruption bug in signal return on SMP
[POWERPC] Fix VDSO gettimeofday() when called with NULL struct timeval
[POWERPC] Update defconfigs
[POWERPC] Update g5_defconfig
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6:
USB: ftdio_sio: New IPlus device ID
USB: add new device id to option driver
USB: fix race leading to use after free in io_edgeport
USB: usblcd doesn't limit memory consumption during write
USB: memory leak in iowarrior.c
USB: ti serial driver sleeps with spinlock held
USB: g_file_storage: call allow_signal()
Jes Sorensen [Mon, 18 Jun 2007 15:19:05 +0000 (17:19 +0200)]
[IA64] Make SN2 PCI code use ioremap rather than manually mangle the address
This one changes the SN2 specific PCI drivers to use ioremap() for
obtaining the real address to access for the PCI registers instead of
manually calculating them with __IA64_UNCACHED_OFFSET.
The patch should have no real change when running on a normal Linux
kernel, but when running as a paravirtualized it is needed.
Signed-off-by: Jes Sorenson <jes@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Russ Anderson [Thu, 14 Jun 2007 21:01:24 +0000 (16:01 -0500)]
[IA64] Force error to surface in nofault code
Montecito behaves slightly differently than previous processors,
resulting in the MCA due to a failed PIO read to sometimes surfacing
outside the nofault code. Adding an additional or and stop bits
ensures the MCA surfaces in the nofault code.
Signed-off-by: Russ Anderson <rja@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Keith Owens [Tue, 26 Jun 2007 06:25:22 +0000 (16:25 +1000)]
[IA64] Correct unwind validation code
Both rp_loc and pfs_loc can be in the register stack area _or_ they can
be in the memory stack area, the latter occurs when a struct pt_regs is
pushed. Correct the validation check on these fields to check for both
stack areas. Not allowing for memory stack locations means no
backtrace past ia64_leave_kernel, or any other code that uses
PT_REGS_UNWIND_INFO.
Signed-off-by: Keith Owens <kaos@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Ralf Baechle [Mon, 18 Jun 2007 15:36:11 +0000 (16:36 +0100)]
[MIPS] EMMA2RH: Disable GEN_RTC, it can't possibly work.
Neither rtc_mips_get_time nor rtc_mips_set_time are being initialized by
the EMMA2RH setup code, so genrtc at best was a RTC dummy avoiding a few
error messages but not providing actual functionality.
Ralf Baechle [Tue, 12 Jun 2007 12:04:09 +0000 (13:04 +0100)]
[MIPS] 20K: Handle WAIT related bugs according to errata information
We used to avoid the WAIT entirely on the 20K but really only need to do
this on early revs of the 20K. Without this a 20K was a bit of a
power hog. Well, in the lower power power hog category ;-)
Oliver Neukum [Wed, 13 Jun 2007 16:50:41 +0000 (18:50 +0200)]
USB: fix race leading to use after free in io_edgeport
usb_unlink_urb() is asynchronous, therefore an URB's buffer may not
be freed without waiting for the completion handler. This patch switches
to usb_kill_urb(), which is synchronous.
Thanks to Alan for making me look at the remaining users of usb_unlink_urb()
Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Al Borchers <alborchers@steinerpoint.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Oliver Neukum [Mon, 11 Jun 2007 13:36:02 +0000 (15:36 +0200)]
USB: usblcd doesn't limit memory consumption during write
usblcd currently has no way to limit memory consumption by fast writers.
This is a security problem, as it allows users with write access to this
device to drive the system into oom despite resource limits.
Here's the fix taken from the modern skeleton driver.
Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Oleg Nesterov [Wed, 30 May 2007 15:06:33 +0000 (11:06 -0400)]
USB: g_file_storage: call allow_signal()
New changes in the signal-handling code require compensating changes
in g_file_storage. This patch (as913) by Oleg Nesterov makes the
code use allow_signal() instead of sigprocmask().
From: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Paul Mackerras [Tue, 26 Jun 2007 04:49:11 +0000 (14:49 +1000)]
[POWERPC] Fix subtle FP state corruption bug in signal return on SMP
This fixes a bug which can cause corruption of the floating-point state
on return from a signal handler. If we have a signal handler that has
used the floating-point registers, and it happens to context-switch to
another task while copying the interrupted floating-point state from the
user stack into the thread struct (e.g. because of a page fault, or
because it gets preempted), the context switch code will think that the
FP registers contain valid FP state that needs to be copied into the
thread_struct, and will thus overwrite the values that the signal return
code has put into the thread_struct.
This can occur because we clear the MSR bits that indicate the presence
of valid FP state after copying the state into the thread_struct. To fix
this we just move the clearing of the MSR bits to before the copy. A
similar potential problem also occurs with the Altivec state, and this
fixes that in the same way.
Tony Breeds [Mon, 25 Jun 2007 23:50:32 +0000 (09:50 +1000)]
[POWERPC] Fix VDSO gettimeofday() when called with NULL struct timeval
Consider the prototype for gettimeofday():
int gettimofday(struct timeval *tv, struct timezone *tz);
Although it is valid to call with /either/ tv or tz being NULL, and
the C version of sys_gettimeofday() supports this, the current version
of gettimeofday() in the VDSO will SEGV if called with a NULL tv.
This adds a check for tv being NULL so that it doesn't SEGV.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
will schmidt [Fri, 22 Jun 2007 15:24:56 +0000 (01:24 +1000)]
[POWERPC] Update g5_defconfig
Update the g5_defconfig with default settings.
This is to keep things up to date, and specifically to ensure that the
CONFIG_MACINTOSH_DRIVERS option is enabled. This also turns on
CONFIG_MSI.
Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
cc: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Björn Steinbrink [Mon, 25 Jun 2007 21:04:37 +0000 (23:04 +0200)]
fix nmi_watchdog=2 bootup hang
wrmsrl() is broken, dropping the upper 32bits of the value to be
written. This broke the NMI watchdog on AMD hardware. (and it
probably broke other code too.)
Thomas Gleixner [Sat, 23 Jun 2007 09:48:40 +0000 (11:48 +0200)]
FUTEX: Restore the dropped ERSCH fix
The return value of futex_find_get_task() needs to be -ESRCH in case
that the search fails. This was part of the original futex fixes and
got accidentally dropped, when the futex-tidy-up patch was split out.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: Stable Team <stable@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 24 Jun 2007 16:42:15 +0000 (09:42 -0700)]
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]: Make skb_seq_read unmap the last fragment
[NET]: Re-enable irqs before pushing pending DMA requests
[TCP] tcp_read_sock: Allow recv_actor() return return negative error value.
[PPP]: Fix osize too small errors when decoding mppe.
[PPP]: Revert 606f585e363527da9feaed79465132c0c661fd9e
[TIPC]: Fix infinite loop in netlink handler
[SKBUFF]: Fix incorrect config #ifdef around skb_copy_secmark
[IPV4]: include sysctl.h from inetdevice.h
[IPV6] NDISC: Fix thinko to control Router Preference support.
[NETFILTER]: nfctnetlink: Don't allow to change helper
[NETFILTER]: nf_conntrack_sip: add missing message types containing RTP info
Tian Kevin [Sun, 24 Jun 2007 00:16:52 +0000 (17:16 -0700)]
ACPI: preserve the ebx value in acpi_copy_wakeup_routine
Register %ebx serves as the "global offset table base register" for
position-independent code. For absolute code, %ebx serves as a local
register and has no specified role in the function calling sequence. In
either case, a function must preserve the register value for the caller.
acpi_copy_wakeup_routine overrides %ebx without saving it, this may corrupt
the called data.
Kevin found that most time the value of Sx is saved in %esi, however
sometimes compiler also uses %ebx. When this happens, suspends fails since
sleep value in ebx is changed by acpi_copy_wakeup_routine.
The same funtion in X86_64 doesn't have this problem.
Signed-off-by: Zhang Rui <rui.zhang@intel.com> Looks-okay-to: Pavel Machek <pavel@ucw.cz> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Len Brown <lenb@kernel.org> Acked-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Tony Jones <tonyj@suse.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Carsten Otte [Sun, 24 Jun 2007 00:16:46 +0000 (17:16 -0700)]
ext2: disallow setting xip on remount
Yan Zheng pointed out that ext2_remount lacks checking if -o xip should be
enabled or not. This patch checks for presence of direct_access on the
backing block device and if the blocksize meets the requirements.
Signed-off-by: Carsten Otte <cotte@de.ibm.com> Cc: Yan Zheng <yanzheng@21cn.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joshua Wise [Sun, 24 Jun 2007 00:16:45 +0000 (17:16 -0700)]
x86_64: fix misplaced `continue' in mce.c
Background:
When a userspace application wants to know about machine check events, it
opens /dev/mcelog and does a read(). Usually, we found that this interface
works well, but in some cases, when the system was taking large numbers of
machine check exceptions, the read() would hang. The system would output a
soft-lockup warning, and the daemon reading from /dev/mcelog would suck up
as much of a single CPU as it could spinning in system space.
Description:
This patch fixes this bug. In particular, there was a "continue" inside a
timeout loop that presumably was intended to break out of the outer loop,
but instead caused the inner loop to continue. This patch also makes the
condition for the break-out a little more evident by changing a
!time_before to a time_after_eq.
Result:
The read() no longer hangs in this test case.
Testing:
On my system, I could replicate the bug with the following command:
# for i in `seq 15000`; do ./inject_sbe.sh; done
where inject_sbe.sh contains commands to inject a single-bit error into the
next memory write transaction.
Andy Whitcroft [Sun, 24 Jun 2007 00:16:44 +0000 (17:16 -0700)]
update checkpatch.pl to version 0.06
Update to checkpatch.pl v0.06. Of note:
- do { and else handled correctly as control structures for { matching
- trailing whitespace correctly tripped when line otherwise empty
- support for const, including const foo * const bar
- multiline macros defining values correctly reported
This version of checkpatch.pl can be found at the following URL:
Andy Whitcroft (14):
Version: 0.06
cleanup the Type regular expression declarations
fix up block counting
end of line counts as a space for ++ and --
do { needs the same checks as if, for et al
handle "const foo * const a" as a valid type
add spacing checks following ;
complete whitespace lines should trip trailing whitespace check
else is also a block control structure
badly formatted else can trip function declaration
detect and report trailing statements after else
types need to be terminated by a boundary
multiline macros defining values should be surrounded by parentheses
soften the wording of the Signed-off-by: warnings
Signed-off-by: Andy Whitcroft <apw@shadowen.org> Cc: "Randy.Dunlap" <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dave Hansen [Sun, 24 Jun 2007 00:16:42 +0000 (17:16 -0700)]
document nlink function
These should have been documented from the beginning. Fix it.
Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>