David Woodhouse [Mon, 23 Jun 2008 10:41:04 +0000 (11:41 +0100)]
dabusb: use request_firmware()
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
David Woodhouse [Mon, 23 Jun 2008 10:36:23 +0000 (11:36 +0100)]
cpia2: use request_firmware()
Thanks for Jaswinder Singh for converting the firmware blob itself to ihex.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
David Woodhouse [Wed, 11 Jun 2008 15:57:21 +0000 (16:57 +0100)]
ip2: use request_firmware()
Converted with help from Jaswinder Singh
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Alan Cox <alan@redhat.com>
David Woodhouse [Thu, 5 Jun 2008 11:59:51 +0000 (12:59 +0100)]
firmware: convert Ambassador ATM driver to request_firmware()
Since it had various regions to be loaded to separate addresses, and it
wanted to do them in fairly small chunks anyway, switch it to use the
new ihex code. Encode the start address in the first record.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Chas Williams <chas@cmf.nrl.navy.mil>
David Woodhouse [Fri, 30 May 2008 22:35:29 +0000 (01:35 +0300)]
whiteheat: use request_firmware()
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 30 May 2008 15:49:51 +0000 (18:49 +0300)]
ti_usb_3410_5052: use request_firmware()
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 30 May 2008 14:35:47 +0000 (17:35 +0300)]
emi62: use request_firmware()
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 30 May 2008 13:19:39 +0000 (16:19 +0300)]
emi26: use request_firmware()
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 30 May 2008 12:15:13 +0000 (15:15 +0300)]
keyspan_pda: use request_firmware()
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 30 May 2008 11:04:03 +0000 (14:04 +0300)]
keyspan: use request_firmware()
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Thu, 29 May 2008 16:50:06 +0000 (19:50 +0300)]
ttusb-budget: use request_firmware()
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
David Woodhouse [Thu, 29 May 2008 14:17:17 +0000 (17:17 +0300)]
kaweth: use request_firmware()
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Thu, 29 May 2008 13:39:16 +0000 (16:39 +0300)]
smctr: use request_firmware()
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Thu, 29 May 2008 12:07:34 +0000 (15:07 +0300)]
firmware: convert ymfpci driver to use firmware loader exclusively
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Thu, 29 May 2008 11:48:34 +0000 (14:48 +0300)]
firmware: convert maestro3 driver to use firmware loader exclusively
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Mon, 26 May 2008 22:01:27 +0000 (23:01 +0100)]
firmware: convert korg1212 driver to use firmware loader exclusively
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Thu, 26 Jun 2008 12:55:30 +0000 (13:55 +0100)]
ihex: Add support for long records to ihex2fw.c
Some drivers could do with using records like Intel HEX, but with each
record being larger than 256 bytes. This has been possible in the binary
representation (struct ihex_binrec) in the kernel since the beginning --
at least of the the current version of history. But we haven't been able
to represent that in the .HEX files which get converted to .fw files.
This adds a '-w' option to ihex2fw to make it interpret the first _two_
bytes of each line as the record length, instead of only one byte. And
adds makefile rules for %.H16->%.fw which use that.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Sat, 31 May 2008 12:07:18 +0000 (15:07 +0300)]
ihex: add ihex2fw tool for converting HEX files into firmware images
Not the straight conversion to binary which objcopy can do for us, but
actually representing each record with its original {addr, length},
because some drivers need that information preserved.
Fix up 'firmware_install' to be able to build $(hostprogs-y) too.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Sat, 31 May 2008 12:20:37 +0000 (15:20 +0300)]
ihex: request_ihex_firmware() function to load and validate firmware
Provide a helper to load the file and validate it in one call, to
simplify error handling in the drivers which are going to use it.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 30 May 2008 10:57:27 +0000 (13:57 +0300)]
ihex.h: binary representation of ihex records
Some devices need their firmware as a set of {address, len, data...}
records in some specific order rather than a simple blob.
The normal way of doing this kind of thing is 'ihex', which is a text
format and not entirely suitable for use in the kernel.
This provides a binary representation which is very similar, but much
more compact -- and a helper routine to skip to the next record,
because the alignment constraints mean that everybody will screw it up
for themselves otherwise.
Also a helper function which can verify that a 'struct firmware'
contains a valid set of ihex records, and that following them won't run
off the end of the loaded data.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Thu, 29 May 2008 08:01:51 +0000 (11:01 +0300)]
firmware: Add firmware installation to modules_install, add firmware_install
For 'make modules_install', install any firmware required by
the modules which are being installed.
Also add a 'make firmware_install' target which doesn't depend on the
configuration, but installs _all_ available in-kernel-tree firmware into
$(INSTALL_FW_PATH), which defaults to /lib/firmware. This is intended
for distributors to make arch-independent (and config-independent)
packages containing firmware.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
David Woodhouse [Wed, 25 Jun 2008 12:56:07 +0000 (13:56 +0100)]
firmware: Add CONFIG_FIRMWARE_IN_KERNEL option.
This will control whether we build firmware into the kernel image for
_every_ driver which we convert to request_firmware(), to avoid a
proliferation of 'CONFIG_XXX_FIRMWARE' options for each one.
Default to 'y' for now, which is the wrong thing to do but people seem
to be insisting on it and refusing to even review patches until it's
done. And it does preserve the existing behaviour for built-in drivers.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 12:58:12 +0000 (13:58 +0100)]
firmware: Add CONFIG_EXTRA_FIRMWARE option
This allows arbitrary firmware files to be included in the static kernel
where the firmware loader can find them without requiring userspace to
be alive.
(Updated and CONFIG_EXTRA_FIRMWARE_DIR added with lots of help from
Johannes Berg).
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
David Woodhouse [Fri, 23 May 2008 12:52:42 +0000 (13:52 +0100)]
firmware: allow firmware files to be built into kernel image
Some drivers have their own hacks to bypass the kernel's firmware loader
and build their firmware into the kernel; this renders those unnecessary.
Other drivers don't use the firmware loader at all, because they always
want the firmware to be available. This allows them to start using the
firmware loader.
A third set of drivers already use the firmware loader, but can't be
used without help from userspace, which sometimes requires an initrd.
This allows them to work in a static kernel.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 17:38:49 +0000 (18:38 +0100)]
firmware: make fw->data const
In preparation for supporting firmware files linked into the static
kernel, make fw->data const to ensure that users aren't modifying it (so
that we can pass a pointer to the original in-kernel copy, rather than
having to copy it).
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Howells [Tue, 8 Jul 2008 16:43:01 +0000 (17:43 +0100)]
Fix a const pointer usage warning in the Digigram miXart soundcard driver
Fix a const pointer usage warning in the Digigram miXart soundcard driver. A
const pointer is being passed to copy_from_user() to load the firmware into.
This is okay in this case because the function has allocated the firmware
struct itself, but the const qualifier is part of the firmware struct - so the
patch casts the const away.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
David Howells [Tue, 8 Jul 2008 16:45:58 +0000 (17:45 +0100)]
Fix a const pointer usage warning in the Digigram pcxhr soundcard driver
Fix a const pointer usage warning in the Digigram pcxhr compatible soundcard
driver. A const pointer is being passed to copy_from_user() to load the
firmware into. This is okay in this case because the function has allocated
the firmware struct itself, but the const qualifier is part of the firmware
struct - so the patch casts the const away.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
David Howells [Tue, 8 Jul 2008 16:38:56 +0000 (17:38 +0100)]
Fix a const pointer error in the Conexant cx23418 MPEG encoder driver
Fix a const pointer to non-const pointer assignment error in the Conexant
cx23418 MPEG encoder driver.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
David Howells [Tue, 8 Jul 2008 16:37:15 +0000 (17:37 +0100)]
Fix a const assignment in moxa_load_fw()
Fix an assignment of a const pointer to a non-const pointer in moxa_load_fw().
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
David Howells [Tue, 8 Jul 2008 16:36:45 +0000 (17:36 +0100)]
Fix a const pointer usage warning in the Digigram VX soundcard driver
Fix a const pointer usage warning in the Digigram VX soundcard driver. A
const pointer is being passed to copy_from_user() to load the firmware into.
This is okay in this case because the function has allocated the firmware
struct itself, but the const qualifier will be part of the firmware
struct - so the patch casts the const away.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
gregkh@suse.de [Thu, 29 May 2008 17:17:38 +0000 (10:17 -0700)]
isight: treat firmware data as const
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Greg Kroah-Hartman [Thu, 29 May 2008 17:05:08 +0000 (10:05 -0700)]
x86 microcode: firmware data is const
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Greg Kroah-Hartman [Thu, 29 May 2008 17:05:08 +0000 (10:05 -0700)]
dell_rbu: firmware data is const
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Thu, 29 May 2008 11:40:00 +0000 (14:40 +0300)]
ymfpci: treat firmware data as const
Standardise both in-kernel and loaded firmware to be stored as
little-endian instead of host-endian.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Thu, 29 May 2008 08:58:27 +0000 (11:58 +0300)]
maestro3: treat firmware data as const
The maestro3 driver is byte-swapping its firmware to be host-endian in
advance, when it doesn't seem to be necessary -- we could just use
le16_to_cpu() as we load it.
Doing that means that we need to switch the in-tree firmware to be
little-endian too.
Take the least intrusive way of doing this, which is to switch the
existing snd_m3_convert_from_le() function to convert _to_ little-endian
instead, and use it on the in-tree firmware instead of the loaded
firmware. It's a bit suboptimal but doesn't matter much right now
because we're about to remove the special cases for the in-tree version
anyway.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 23:13:34 +0000 (00:13 +0100)]
tuners: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 23:13:08 +0000 (00:13 +0100)]
gp8psk: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 23:12:42 +0000 (00:12 +0100)]
cxusb: treat firmware data as const
...which means allocating our own copy when we want to modify it.
(stupid thinko fixed by mkrufky)
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
David Woodhouse [Fri, 23 May 2008 23:12:23 +0000 (00:12 +0100)]
dvb frontends: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 23:12:00 +0000 (00:12 +0100)]
ttusb-dec: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 23:11:44 +0000 (00:11 +0100)]
bt8xx: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 23:10:55 +0000 (00:10 +0100)]
cxgb3: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 23:10:26 +0000 (00:10 +0100)]
irda-usb: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 23:09:29 +0000 (00:09 +0100)]
atmel: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 23:08:55 +0000 (00:08 +0100)]
p54: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 23:08:39 +0000 (00:08 +0100)]
rt2x00: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 23:08:19 +0000 (00:08 +0100)]
zd1201: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 23:05:45 +0000 (00:05 +0100)]
aic94xx: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 23:05:28 +0000 (00:05 +0100)]
cxacru: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 23:05:10 +0000 (00:05 +0100)]
ueagle-atm: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 23:02:49 +0000 (00:02 +0100)]
vx: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 23:02:28 +0000 (00:02 +0100)]
pcxhr: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 23:02:03 +0000 (00:02 +0100)]
riptide: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 23:01:40 +0000 (00:01 +0100)]
vx222: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 23:00:07 +0000 (00:00 +0100)]
myri10ge: treat firmware data as const
... which means allocating our own buffer for reading it back.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 22:58:24 +0000 (23:58 +0100)]
cx25840: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Tyler Trafford <ttrafford@gmail.com>
Acked-by: Mike Isely <isely@pobox.com>
David Woodhouse [Fri, 23 May 2008 22:57:19 +0000 (23:57 +0100)]
cyclades: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 22:56:51 +0000 (23:56 +0100)]
bluetooth: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 23 May 2008 17:37:51 +0000 (18:37 +0100)]
libertas: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Linus Torvalds [Wed, 9 Jul 2008 21:16:23 +0000 (14:16 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
RDMA/cxgb3: Fix regression caused by class_device -> device conversion
Linus Torvalds [Wed, 9 Jul 2008 04:48:26 +0000 (21:48 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/mfasheh/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
[PATCH] ocfs2/dlm: Fixes oops in dlm_new_lockres()
Vitaly Bordug [Wed, 9 Jul 2008 03:13:38 +0000 (13:13 +1000)]
powerpc: Add missing reference to coherent_dma_mask
There is dma_mask in of_device upon of_platform_device_create()
but we don't actually set coherent_dma_mask. This may cause weird
behavior of USB subsystem using of_device USB host drivers.
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 9 Jul 2008 01:10:51 +0000 (18:10 -0700)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: tcrypt - Fix memory leak in test_cipher
Daniel Guilak [Tue, 8 Jul 2008 22:02:06 +0000 (15:02 -0700)]
kernel/printk.c: Made printk_recursion_bug_msg static.
Signed-off-by: Daniel Guilak <daniel@danielguilak.com>
Acked-by: Josh Triplett <josh@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Steve Wise [Tue, 8 Jul 2008 21:40:05 +0000 (14:40 -0700)]
RDMA/cxgb3: Fix regression caused by class_device -> device conversion
The change to iwch_provider.c in commit
f4e91eb4 ("IB: convert struct
class_device to struct device") undid the fix done in commit
7f049f2f
("RDMA/cxgb3: Hold rtnl_lock() around ethtool get_drvinfo call"). It
removed the calls to rtnl_lock() that serialized the iw_cxgb3 ethtool
ops calls into the cxgb3 driver. This locking is needed to avoid
messing up the internal state of the cxgb3 driver.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Takashi Iwai [Tue, 8 Jul 2008 16:41:17 +0000 (18:41 +0200)]
Fix broken fix for fsl-diu-db
On 2.6.26-rc9, the commit
05946bce839b4fed5442dbfab77060fb75e051f3
("fsl_diu_fb: fix build with CONFIG_PM=y, plus fix some warnings")
breaks its previous fix
f969c5672b16b857e5231ad3c78f08d8ef3305aa
("fsl-diu-db: compile fix")
This patch reverts the broken part.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 8 Jul 2008 19:40:57 +0000 (12:40 -0700)]
Merge branch 'hotfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'hotfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
SUNRPC: Fix an rpcbind breakage for the case of IPv6 lookups
SUNRPC: Fix a double-free in rpcbind
NFS: Fix readdir cache invalidation
Linus Torvalds [Tue, 8 Jul 2008 19:40:19 +0000 (12:40 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] Fix 32bit kernels on R4k with 128 byte cache line size
[MIPS] Atlas, decstation: Fix section mismatches triggered by defconfigs
Jeff Mahoney [Tue, 8 Jul 2008 18:37:06 +0000 (14:37 -0400)]
reiserfs: discard prealloc in reiserfs_delete_inode
With the removal of struct file from the xattr code,
reiserfs_file_release() isn't used anymore, so the prealloc isn't
discarded. This causes hangs later down the line.
This patch adds it to reiserfs_delete_inode. In most cases it will be a
no-op due to it already having been called, but will avoid hangs with
xattrs.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Trond Myklebust [Tue, 1 Jul 2008 19:20:55 +0000 (15:20 -0400)]
SUNRPC: Fix an rpcbind breakage for the case of IPv6 lookups
Now that rpcb_next_version has been split into an IPv4 version and an IPv6
version, we Oops when rpcb_call_async attempts to look up the IPv6-specific
RPC procedure in rpcb_next_version.
Fix the Oops simply by having rpcb_getport_async pass the correct RPC
procedure as an argument.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Trond Myklebust [Mon, 7 Jul 2008 16:18:52 +0000 (12:18 -0400)]
SUNRPC: Fix a double-free in rpcbind
It is wrong to be freeing up the rpcbind arguments if the call to
rpcb_call_async() fails, since they should already have been freed up by
rpcb_map_release().
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Trond Myklebust [Mon, 7 Jul 2008 17:26:10 +0000 (13:26 -0400)]
NFS: Fix readdir cache invalidation
invalidate_inode_pages2_range() takes page offset arguments, not byte
ranges.
Another thought is that individual pages might perhaps get evicted by VM
pressure, in which case we might perhaps want to re-read not only the
evicted page, but all subsequent pages too (in case the server returns
more/less data per page so that the alignment of the next entry
changes). We should therefore remove the condition that we only do this on
page->index==0.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Thomas Bogendoerfer [Tue, 8 Jul 2008 12:46:34 +0000 (14:46 +0200)]
[MIPS] Fix 32bit kernels on R4k with 128 byte cache line size
The generated copy_page for R4k CPU with a 128 byte cache line size used
Create Dirty Exclusive cache line operations even if only part of the
cache line was filled. This change avoids generating cache operations,
if only part of the cache line size is copied in one loop. It also
increases the maxmimum loop size, because the generated code even fits
into the available space for r4k CPUs with 128 byte cache line size.
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Shane McDonald [Sat, 5 Jul 2008 23:19:42 +0000 (17:19 -0600)]
[MIPS] Atlas, decstation: Fix section mismatches triggered by defconfigs
Resolve these mismatches by defining affected functions with the __cpuinit
attribute, rather than __init.
Signed-off-by: Shane McDonald <mcdonald.shane@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Linus Torvalds [Tue, 8 Jul 2008 18:19:11 +0000 (11:19 -0700)]
Merge git://git./linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
it8213: fix return value in it8213_init_one()
palm_bk3710: fix IDECLK period calculation
ide: add __ide_default_irq() inline helper
Bartlomiej Zolnierkiewicz [Tue, 8 Jul 2008 17:27:23 +0000 (19:27 +0200)]
it8213: fix return value in it8213_init_one()
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sergei Shtylyov [Tue, 8 Jul 2008 17:27:22 +0000 (19:27 +0200)]
palm_bk3710: fix IDECLK period calculation
The driver uses completely bogus rounding formula for calculating period from
the IDECLK frequency which gives one-off period values (e.g. 11 ns with 100 MHz
IDECLK) which in turn can lead to overclocked IDE transfer timings. Actually,
rounding is just wrong in this case, so use a mere division for a safe result.
While at it, also:
- give 'ide_palm_clk' variable a more suitable name;
- get rid of the useless 'ideclkp' variable;
- drop the LISP stype 'p' postfix from the 'clkp' variable's name. :-)
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: mcherkashin@ru.mvista.com
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Tue, 8 Jul 2008 17:27:22 +0000 (19:27 +0200)]
ide: add __ide_default_irq() inline helper
Add __ide_default_irq() inline helper and use it instead of
ide_default_irq() in ide-probe.c and ns87415.c (all host drivers
except IDE PCI ones always setup hwif->irq so it is enough to
check only for I/O bases 0x1f0 and 0x170).
This fixes post-2.6.25 regression since ide_default_irq()
define could shadow ide_default_irq() inline.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Linus Torvalds [Tue, 8 Jul 2008 16:29:34 +0000 (09:29 -0700)]
Merge branch 'for-linus' of git://git390.osdl.marist.edu/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
[S390] protect _PAGE_SPECIAL bit against mprotect
David Gibson [Tue, 8 Jul 2008 05:58:16 +0000 (15:58 +1000)]
Correct hash flushing from huge_ptep_set_wrprotect()
As Andy Whitcroft recently pointed out, the current powerpc version of
huge_ptep_set_wrprotect() has a bug. It just calls ptep_set_wrprotect()
which in turn calls pte_update() then hpte_need_flush() with the 'huge'
argument set to 0. This will cause hpte_need_flush() to flush the wrong
hash entries (of any). Andy's fix for this is already in the powerpc
tree as commit
016b33c4958681c24056abed8ec95844a0da80a3.
I have confirmed this is a real bug, not masked by some other
synchronization, with a new testcase for libhugetlbfs. A process write
a (MAP_PRIVATE) hugepage mapping, fork(), then alter the mapping and
have the child incorrectly see the second write.
Therefore, this should be fixed for 2.6.26, and for the stable tree.
Here is a suitable patch for 2.6.26, which I think will also be suitable
for the stable tree (neither of the headers in question has been changed
much recently).
It is cut down slighlty from Andy's original version, in that it does
not include a 32-bit version of huge_ptep_set_wrprotect(). Currently,
hugepages are not supported on any 32-bit powerpc platform. When they
are, a suitable 32-bit version can be added - the only 32-bit hardware
which supports hugepages does not use the conventional hashtable MMU and
so will have different needs anyway.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Nick Piggin [Tue, 8 Jul 2008 09:31:06 +0000 (11:31 +0200)]
[S390] protect _PAGE_SPECIAL bit against mprotect
Stop mprotect's pte_modify from wiping out the s390 pte_special bit, which
caused oops thereafter when vm_normal_page thought X's abnormal was normal.
Debugged-by: Ryan Hope <rmh3093@gmail.com>
Debugged-by: Zan Lynx <zlynx@acm.org>
Acked-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Darren Jenkins [Tue, 8 Jul 2008 07:51:44 +0000 (15:51 +0800)]
crypto: tcrypt - Fix memory leak in test_cipher
Coverity CID: 2306 & 2307 RESOURCE_LEAK
In the second for loop in test_cipher(), data is allocated space with
kzalloc() and is only ever freed in an error case.
Looking at this loop, data is written to this memory but nothing seems
to read from it.
So here is a patch removing the allocation, I think this is the right
fix.
Only compile tested.
Signed-off-by: Darren Jenkins <darrenrjenkins@gmailcom>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Linus Torvalds [Mon, 7 Jul 2008 23:59:43 +0000 (16:59 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
Revert "PCI: Correct last two HP entries in the bfsort whitelist"
Jesse Barnes [Mon, 7 Jul 2008 16:55:26 +0000 (09:55 -0700)]
Revert "PCI: Correct last two HP entries in the bfsort whitelist"
This reverts commit
a1676072558854b95336c8f7db76b0504e909a0a. It duplicates
the change from
8d64c781f0c5fbfdf8016bd1634506ff2ad1376a and only one should be
applied, otherwise some of the Dell quirks are lost.
Thanks to Tony Camuso for catching this.
Acked-by: Tony Camuso <tcamuso@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Sunil Mushran [Mon, 7 Jul 2008 17:06:29 +0000 (10:06 -0700)]
[PATCH] ocfs2/dlm: Fixes oops in dlm_new_lockres()
Patch fixes a race that can result in an oops while adding a
lockres to the dlm lockres tracking list.
Bug introduced by mainline commit
29576f8bb54045be944ba809d4fca1ad77c94165.
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Jeff Dike [Mon, 7 Jul 2008 17:36:56 +0000 (13:36 -0400)]
[UML] fix gcc ICEs and unresolved externs
There are various constraints on the use of unit-at-a-time:
- i386 uses no-unit-at-a-time for pre-4.0 (not 4.3)
- x86_64 uses unit-at-a-time always
Uli reported a crash on x86_64 with gcc 4.1.2 with unit-at-a-time,
resulting in commit
c0a18111e571138747a98af18b3a2124df56a0d1
Ingo reported a gcc internal error with gcc 4.3 with no-unit-at-a-timem,
resulting in
22eecde2f9034764a3fd095eecfa3adfb8ec9a98
Benny Halevy is seeing extern inlines not resolved with gcc 4.3 with
no-unit-at-a-time
This patch reintroduces unit-at-a-time for gcc >= 4.0, bringing back the
possibility of Uli's crash. If that happens, we'll debug it.
I started seeing both the internal compiler errors and unresolved
inlines on Fedora 9. This patch fixes both problems, without so far
reintroducing the crash reported by Uli.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Benny Halevy <bhalevy@panasas.com>
Cc: Adrian Bunk <bunk@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Mon, 7 Jul 2008 16:24:28 +0000 (09:24 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
can: add sanity checks
fs_enet: restore promiscuous and multicast settings in restart()
ibm_newemac: Fixes entry of short packets
ibm_newemac: Fixes kernel crashes when speed of cable connected changes
pasemi_mac: Access iph->tot_len with correct endianness
ehea: Access iph->tot_len with correct endianness
ehea: fix race condition
ehea: add MODULE_DEVICE_TABLE
ehea: fix might sleep problem
forcedeth: fix lockdep warning on ethtool -s
Add missing skb->dev assignment in Frame Relay RX code
bridge: fix use-after-free in br_cleanup_bridges()
tcp: fix a size_t < 0 comparison in tcp_read_sock
tcp: net/ipv4/tcp.c needs linux/scatterlist.h
libertas: support USB persistence on suspend/resume (resend)
iwlwifi: drop skb silently for Tx request in monitor mode
iwlwifi: fix incorrect 5GHz rates reported in monitor mode
Benjamin Herrenschmidt [Mon, 7 Jul 2008 06:39:50 +0000 (16:39 +1000)]
powerpc: Fix unterminated of_device_id array in legacy_serial.c
A recent patch to legacy_serial.c factored out some code by
using the of_match_node() facility to match a node against
an array of possible matches. However, the patch didn't properly
terminate the array causing potential crashes in cases where no
match is found. In addition, the name of the array was poorly
chosen for a static symbol making debugging harder.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 6 Jul 2008 23:43:12 +0000 (16:43 -0700)]
vsprintf: add support for '%pS' and '%pF' pointer formats
They print out a pointer in symbolic format, if possible (ie using
symbolic KALLSYMS information). The '%pS' format is for regular direct
pointers (which can point to data or code and that you find on the stack
during backtraces etc), while '%pF' is for C function pointer types.
On most architectures, the two mean exactly the same thing, but some
architectures use an indirect pointer for C function pointers, where the
function pointer points to a function descriptor (which in turn contains
the actual pointer to the code). The '%pF' code automatically does the
appropriate function descriptor dereference on such architectures.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 6 Jul 2008 23:24:57 +0000 (16:24 -0700)]
vsprintf: add infrastructure support for extended '%p' specifiers
This expands the kernel '%p' handling with an arbitrary alphanumberic
specifier extension string immediately following the '%p'. Right now
it's just being ignored, but the next commit will start adding some
specific pointer type extensions.
NOTE! The reason the extension is appended to the '%p' is to allow
minimal gcc type checking: gcc will still see the '%p' and will check
that the argument passed in is indeed a pointer, and yet will not
complain about the extended information that gcc doesn't understand
about (on the other hand, it also won't actually check that the pointer
type and the extension are compatible).
Alphanumeric characters were chosen because there is no sane existing
use for a string format with a hex pointer representation immediately
followed by alphanumerics (which is what such a format string would have
traditionally resulted in).
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 6 Jul 2008 23:16:15 +0000 (16:16 -0700)]
vsprintf: split out '%p' handling logic
The actual code is the same, just split out into a helper function.
This makes it easier to read, and allows for simple future extension
of %p handling.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 6 Jul 2008 23:06:25 +0000 (16:06 -0700)]
vsprintf: split out '%s' handling logic
The actual code is the same, just split out into a helper function.
This makes it easier to read, and allows for future sharing of the
string code.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 6 Jul 2008 18:16:23 +0000 (11:16 -0700)]
Merge branch 'kvm-updates-2.6.26' of git://git./linux/kernel/git/avi/kvm
* 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm:
KVM: IOAPIC: Fix level-triggered irq injection hang
x86: KVM guest: Add memory clobber to hypercalls
Philipp Zabel [Sat, 5 Jul 2008 23:15:34 +0000 (01:15 +0200)]
pxamci: fix byte aligned DMA transfers
The pxa27x DMA controller defaults to 64-bit alignment. This caused
the SCR reads to fail (and, depending on card type, error out) when
card->raw_scr was not aligned on a 8-byte boundary.
For performance reasons all scatter-gather addresses passed to
pxamci_request should be aligned on 8-byte boundaries, but if
this can't be guaranteed, byte aligned DMA transfers in the
have to be enabled in the controller to get correct behaviour.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 6 Jul 2008 17:27:25 +0000 (10:27 -0700)]
Revert "USB: don't explicitly reenable root-hub status interrupts"
This reverts commit
e872154921a6b5256a3c412dd69158ac0b135176.
Andrey Borzenkov reports that it resulted in a totally hung machine for
him when loading the OHCI driver. Extensive netconsole capture with
SysRq output shows that modprobe gets stuck in ohci_hub_status_data()
when probing and enabling the OHCI controller, see for example
http://lkml.org/lkml/2008/7/5/236
for an analysis.
The problem appears to be an interrupt flood triggered by the commit
that gets reverted, and Andrey confirmed that the revert makes things
work for him again.
Reported-and-tested-by: Andrey Borzenkov <arvidjaar@mail.ru>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <david-b@pacbell.net>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mark McLoughlin [Fri, 4 Jul 2008 17:23:15 +0000 (18:23 +0100)]
KVM: IOAPIC: Fix level-triggered irq injection hang
The "remote_irr" variable is used to indicate an interrupt
which has been received by the LAPIC, but not acked.
In our EOI handler, we unset remote_irr and re-inject the
interrupt if the interrupt line is still asserted.
However, we do not set remote_irr here, leading to a
situation where if kvm_ioapic_set_irq() is called, then we go
ahead and call ioapic_service(). This means that IRR is
re-asserted even though the interrupt is currently in service
(i.e. LAPIC IRR is cleared and ISR/TMR set)
The issue with this is that when the currently executing
interrupt handler finishes and writes LAPIC EOI, then TMR is
unset and EOI sent to the IOAPIC. Since IRR is now asserted,
but TMR is not, then when the second interrupt is handled,
no EOI is sent and if there is any pending interrupt, it is
not re-injected.
This fixes a hang only seen while running mke2fs -j on an
8Gb virtio disk backed by a fully sparse raw file, with
aliguori "avoid fragmented virtio-blk transfers by copying"
changes.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Acked-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Anthony Liguori [Thu, 3 Jul 2008 16:02:36 +0000 (19:02 +0300)]
x86: KVM guest: Add memory clobber to hypercalls
Hypercalls can modify arbitrary regions of memory. Make sure to indicate this
in the clobber list. This fixes a hang when using KVM_GUEST kernel built with
GCC 4.3.0.
This was originally spotted and analyzed by Marcelo.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Oliver Hartkopp [Sun, 6 Jul 2008 06:38:43 +0000 (23:38 -0700)]
can: add sanity checks
Even though the CAN netlayer only deals with CAN netdevices, the
netlayer interface to the userspace and to the device layer should
perform some sanity checks.
This patch adds several sanity checks that mainly prevent userspace apps
to send broken content into the system that may be misinterpreted by
some other userspace application.
Signed-off-by: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
Signed-off-by: Urs Thuermann <urs.thuermann@volkswagen.de>
Acked-by: Andre Naujoks <nautsch@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Sat, 5 Jul 2008 22:53:22 +0000 (15:53 -0700)]
Linux 2.6.26-rc9
Andrew Morton [Sat, 5 Jul 2008 08:02:01 +0000 (01:02 -0700)]
Fix pagemap_read() use of struct mm_walk
Fix some issues in pagemap_read noted by Alexey:
- initialize pagemap_walk.mm to "mm" , so the code starts working as
advertised
- initialize ->private to "&pm" so it wouldn't immediately oops in
pagemap_pte_hole()
- unstatic struct pagemap_walk, so two threads won't fsckup each other
(including those started by root, including flipping ->mm when you don't
have permissions)
- pagemap_read() contains two calls to ptrace_may_attach(), second one
looks unneeded.
- avoid possible kmalloc(0) and integer wraparound.
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
[ Personally, I'd just remove the functionality entirely - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>