David Brownell [Sat, 13 Oct 2007 21:56:32 +0000 (23:56 +0200)]
i2c: Move i2c-dev interfaces to i2c-dev.h
Move the i2c-dev support into <linux/i2c-dev.h> where it should always
have lived. Now <linux/i2c.h> no longer holds stuff related to the
optional userspace /dev/i2c-X interface. Improve the descriptions
for these ioctl requests.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
David Brownell [Sat, 13 Oct 2007 21:56:32 +0000 (23:56 +0200)]
i2c: Remove i2c_algorithm.algo_control()
This removes:
- An effectively unused hook: i2c_algorithm.algo_control.
- The i2c_control() call, used only by i2c-dev to call that
unused hook or set two barely supported adapter params.
(That param setting moves into i2c-dev.c ... still iffy
due to lack of locking, but no other changes.)
As shown by diffstat, this is a net code shrink. It also reduces the
complexity of the I2C adapter and /dev interfaces.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Sat, 13 Oct 2007 21:56:32 +0000 (23:56 +0200)]
cx23885: Drop empty i2c algorithm control callback
i2c_algorithm.algo_control is about to be removed.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
David Brownell [Sat, 13 Oct 2007 21:56:32 +0000 (23:56 +0200)]
i2c: Remove NOP i2c_algorithm.algo_control() methods
This removes NOP implementations of i2c_algorithm.algo_control.
With this change, there are no implementations of this hook in
the kernel.org tree ... that hook seems about ripe to remove.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
David Brownell [Sat, 13 Oct 2007 21:56:31 +0000 (23:56 +0200)]
i2c-dev: Reject I2C_M_RECV_LEN
The I2C_M_RECV_LEN calling convention for i2c_mesg.flags involves
playing games with reported buffer lengths. (They start out less
than their actual size, and the length is then modified to reflect
how many bytes were delivered ... which one hopes is less than the
presumed actual size.) Refuse to play such error prone games across
the boundary between userspace and kernel.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Sat, 13 Oct 2007 21:56:31 +0000 (23:56 +0200)]
i2c-stub: Support multiple chips
Add support for multiple chips to i2c-stub. I've changed the memory
allocation scheme from static to dynamic, so that we don't waste too
much memory.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Mark M. Hoffman <mhoffman@lightlink.com>
Francis Moreau [Sat, 13 Oct 2007 21:56:31 +0000 (23:56 +0200)]
i2c-bfin-twi: Remove useless twi_lock mutex
Remove this unneeded mutex. Indeed it was used to serialize access to
the hardware, but this is already done by the i2c-core layer, see
'bus_lock' mutex used by i2c_transfer().
Signed-off-by: Francis Moreau <francis.moro@gmail.com>
Acked-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jason Gaston [Sat, 13 Oct 2007 21:56:31 +0000 (23:56 +0200)]
i2c-i801: Add support for the Intel Tolapai SMBus
Add the Intel Tolapai SMBus Controller DID.
Signed-off-by: Jason Gaston <jason.d.gaston@intel.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
David Brownell [Sat, 13 Oct 2007 21:56:31 +0000 (23:56 +0200)]
i2c: Document struct i2c_msg
Clarify use of the I2C_M_* flags by highlighting the fact that
most of them depend on I2C_FUNC_PROTOCOL_MANGLING.
Also provide kerneldoc for i2c_smbus_read_block_data() and also
for "struct i2c_msg".
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Sat, 13 Oct 2007 21:56:31 +0000 (23:56 +0200)]
i2c/pcf8574: No arbitrary initialization
Do not initialize the PCF8574 with an arbitrary value. Users will have
to write the initial value to sysfs themselves.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Aurelien Jarno <aurelien@aurel32.net>
Vladimir Barinov [Sat, 13 Oct 2007 21:56:30 +0000 (23:56 +0200)]
i2c: Add DaVinci I2C controller support
Signed-off-by: Vladimir Barinov <vbarinov@ru.mvista.com>
Acked-by: Trilok Soni <soni.trilok@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Stefan Roese [Sat, 13 Oct 2007 21:56:30 +0000 (23:56 +0200)]
i2c-ibm_iic: Add support for new-style clients
Use i2c_bit_add_numbered_adapter() if device id specified, so that the
i2c-ibm_iic adapter works well with new-style pre-declared devices.
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
David Brownell [Sat, 13 Oct 2007 21:56:30 +0000 (23:56 +0200)]
i2c/tps65010: New-style driver updates, part 2
Switch the tps65010 driver into a "new-style" I2C driver, and convert all
of its in-tree users (board support for OSK, H2, H3) accordingly.
That accounts for most of the board-specific code in this driver; the
rest of that code is now moved into board-specific initcalls.
Also remove some of the many now-superfluous #includes.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
David Brownell [Sat, 13 Oct 2007 21:56:30 +0000 (23:56 +0200)]
i2c/tps65010: New-style driver updates, part 1
Prepare to convert tps65010 driver to "new style" driver by changing
how it references the i2c_client. This lets the eventual patch with
driver and platform updates be smaller.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Adrian Bunk [Sat, 13 Oct 2007 21:56:30 +0000 (23:56 +0200)]
i2c-core: Make some code static
After the i2c-isa removal some code can become static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
David Brownell [Sat, 13 Oct 2007 21:56:29 +0000 (23:56 +0200)]
i2c: New-style devices can support driver model wakeup flags
We need to be able to flag I2C devices, such as RTCs, which can issue wake
events (usually through IRQ lines). This adds an i2c_board_info.flags bit,
and uses it to initialize the i2c device node. (And shrinks a few lines
that were overly long.)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Sat, 13 Oct 2007 21:56:29 +0000 (23:56 +0200)]
i2c: Kill struct i2c_device_id
I2C devices do not have any form of ID as PCI or USB devices have.
No driver uses "MODULE_DEVICE_TABLE(i2c, ...)" because it doesn't
make sense. So we can get rid of struct i2c_device_id and the
associated support code.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Greg KH <greg@kroah.com>
Al Viro [Sat, 13 Oct 2007 18:40:08 +0000 (19:40 +0100)]
missing includes in arch/powerpc/platforms/52xx/lite5200.c
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 13 Oct 2007 18:42:42 +0000 (19:42 +0100)]
fallout from elsa setup split
... and yes, caller wants it to return int.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dave Kleikamp [Sat, 13 Oct 2007 17:58:00 +0000 (12:58 -0500)]
JFS: Bio cleanup: Replace missing return statements
commit
e30408b2a99cb7b8bf529c7dc2328a19d71894cf ("JFS: fix bio-related
build breakage") removed some "return 0;" statements, rather than
changing them to null returns.
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sat, 13 Oct 2007 17:14:25 +0000 (10:14 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] SMP: Fix use of cpumasks.
[MIPS] Revert "[MIPS] tlbex.c: Cleanup __init usage."
[MIPS] CFE: Add missing parenthesis.
Linus Torvalds [Sat, 13 Oct 2007 17:13:27 +0000 (10:13 -0700)]
Merge git://git./linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (27 commits)
alim15x3: remove redundant m5229_revision check
sc1200: fix ->dma_base equal zero handling
cs5520: fix ->dma_base equal zero handling
sgiioc4: add missing ->dma_base check
cs5535: add missing ->dma_base check
ide: remove CONFIG_IDEDMA_IVB config option
ide: change master/slave IDENTIFY order
ide: move ide_config_drive_speed() calls to upper layers (take 2)
pdc202xx_new: check ide_config_drive_speed() return value
cs5535: check ide_config_drive_speed() return value
amd74xx/via82cxxx: check ide_config_drive_speed() return value
au1xxx: fix au1xxx_set_pio_mode()
icside: use ide_tune_dma()
ide-pmac: fix PIO setup and enable autotune
ide-pmac: use ide_tune_dma() (take 2)
ide-pmac: remove pmac_ide_do_setfeature() (take 2)
ide-pmac: remove nIEN clearing from pmac_ide_do_setfeature()
ide-pmac: use __ide_wait_stat()
ide-pmac: remove extra good status wait from pmac_ide_do_setfeature()
ide: add __ide_wait_stat() helper
...
Linus Torvalds [Sat, 13 Oct 2007 17:12:15 +0000 (10:12 -0700)]
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (91 commits)
[MTD] [NAND] Blackfin on-chip NAND Flash Controller driver
[MTD] [NOR] fix ctrl-alt-del can't reboot for intel flash bug
[MTD] [NAND] Fix compiler warning in Alauda driver
[JFFS2] Remove stray debugging printk
[JFFS2] Handle dirents on the flash with embedded zero bytes in names.
[JFFS2] Check for creation of dirents with embedded zero bytes in name.
[JFFS2] Don't count all 'very dirty' blocks except in debug mode
[JFFS2] Check whether garbage-collection actually obsoleted its victim.
[JFFS2] Relax threshold for triggering GC due to dirty blocks.
[MTD] [OneNAND] Fix typo related with recent commit
[JFFS2] Trigger garbage collection when very_dirty_list size becomes excessive
[MTD] [NAND] Avoid deadlock in erase callback; release chip lock first.
[MTD] [NAND] Resume method for CAFÉ NAND controller
[MTD] [NAND] Fix PCI ident table for CAFÉ NAND controller.
[MTD] [NAND] s3c2410: fix arch moves
[MTD] [OneNAND] fix numerous races
[MTD] map driver for NOR flash on the Intel Vermilion Range chipset
[JFFS2] Fix unpoint length
[MTD] fix CFI point method for discontiguous maps
[MTD] MAPS: Merge Lubbock and Mainstone drivers into common PXA2xx driver
...
Linus Torvalds [Sat, 13 Oct 2007 17:02:11 +0000 (10:02 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/avi/kvm
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (106 commits)
KVM: Replace enum by #define
KVM: Skip pio instruction when it is emulated, not executed
KVM: x86 emulator: popf
KVM: x86 emulator: fix src, dst value initialization
KVM: x86 emulator: jmp abs
KVM: x86 emulator: lea
KVM: X86 emulator: jump conditional short
KVM: x86 emulator: imlpement jump conditional relative
KVM: x86 emulator: sort opcodes into ascending order
KVM: Improve emulation failure reporting
KVM: x86 emulator: pushf
KVM: x86 emulator: call near
KVM: x86 emulator: push imm8
KVM: VMX: Fix exit qualification width on i386
KVM: Move main vcpu loop into subarch independent code
KVM: VMX: Move vm entry failure handling to the exit handler
KVM: MMU: Don't do GFP_NOWAIT allocations
KVM: Rename kvm_arch_ops to kvm_x86_ops
KVM: Simplify memory allocation
KVM: Hoist SVM's get_cs_db_l_bits into core code.
...
Dave Jones [Sat, 13 Oct 2007 01:10:53 +0000 (21:10 -0400)]
Delete filenames in comments.
Since the x86 merge, lots of files that referenced their own filenames
are no longer correct. Rather than keep them up to date, just delete
them, as they add no real value.
Additionally:
- fix up comment formatting in scx200_32.c
- Remove a credit from myself in setup_64.c from a time when we had no SCM
- remove longwinded history from tsc_32.c which can be figured out from
git.
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 13 Oct 2007 07:40:24 +0000 (08:40 +0100)]
fix sparc32 breakage (result of vmlinux.lds.S bug)
In commit
4665079cbb2a3e17de82f2ab2940b9f97f37d65e ("[NETNS]: Move some
code into __init section when CONFIG_NET_NS=n") we got a new section -
.exit.text.refok (more of 'let's tell modpost that some bogus calls are
not bogus', a-la text.init.refok).
Unfortunately, the commit in question forgot to add it to TEXT_TEXT,
with rather amusing results.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 13 Oct 2007 07:30:26 +0000 (08:30 +0100)]
fallout from DECLARE_MAC_BUF patches
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 13 Oct 2007 07:25:24 +0000 (08:25 +0100)]
v4l: copy_to_user() is not a good method name
Breaks on any target that has copy_to_user() defined as a non-trivial
macro.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 13 Oct 2007 07:16:04 +0000 (08:16 +0100)]
minimal build fixes for uml (fallout from x86 merge)
a) include/asm-um/arch can't just point to include/asm-$(SUBARCH) now
b) arch/{i386,x86_64}/crypto are merged now
c) subarch-obj needed changes
d) cpufeature_64.h should pull "cpufeature_32.h", not <asm/cpufeature_32.h>
since it can be included from asm-um/cpufeature.h
e) in case of uml-i386 we need CONFIG_X86_32 for make and gcc, but not
for Kconfig
f) sysctl.c shouldn't do vdso_enabled for uml-i386 (actually, that one
should be registered from corresponding arch/*/kernel/*, with ifdef
going away; that's a separate patch, though).
With that and with Stephen's patch ("[PATCH net-2.6] uml: hard_header fix")
we have uml allmodconfig building both on i386 and amd64.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Sat, 13 Oct 2007 04:17:49 +0000 (21:17 -0700)]
net core: fix kernel-doc for new function parameters
Fix networking code kernel-doc for newly added parameters.
Warning(linux-2.6.23-git2//net/core/sock.c:879): No description found for parameter 'net'
Warning(linux-2.6.23-git2//net/core/dev.c:570): No description found for parameter 'net'
Warning(linux-2.6.23-git2//net/core/dev.c:594): No description found for parameter 'net'
Warning(linux-2.6.23-git2//net/core/dev.c:617): No description found for parameter 'net'
Warning(linux-2.6.23-git2//net/core/dev.c:641): No description found for parameter 'net'
Warning(linux-2.6.23-git2//net/core/dev.c:667): No description found for parameter 'net'
Warning(linux-2.6.23-git2//net/core/dev.c:722): No description found for parameter 'net'
Warning(linux-2.6.23-git2//net/core/dev.c:959): No description found for parameter 'net'
Warning(linux-2.6.23-git2//net/core/dev.c:1195): No description found for parameter 'dev'
Warning(linux-2.6.23-git2//net/core/dev.c:2105): No description found for parameter 'n'
Warning(linux-2.6.23-git2//net/core/dev.c:3272): No description found for parameter 'net'
Warning(linux-2.6.23-git2//net/core/dev.c:3445): No description found for parameter 'net'
Warning(linux-2.6.23-git2//include/linux/netdevice.h:1301): No description found for parameter 'cpu'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Sat, 13 Oct 2007 04:17:35 +0000 (21:17 -0700)]
docbook/mcabook: fixup x86 path/file names
Fix docbook templates for new x86 path/filenames:
docproc: linux-2.6.23-git2/include/asm-i386/mca_dma.h: No such file or directory
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Sat, 13 Oct 2007 04:17:23 +0000 (21:17 -0700)]
docbook/kernel-api: fixup x86 path/file names
Fix docbook templates for new x86 path/filenames.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Sat, 13 Oct 2007 04:17:12 +0000 (21:17 -0700)]
docbook/kernel-hacking: fixup x86 path/file names
Fix docbook templates for modified x86 path/filenames.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Sat, 13 Oct 2007 04:17:00 +0000 (21:17 -0700)]
docbook/deviceiobook: fixup x86 path/file names
Fix docbook templates for new x86 path/filenames:
docproc: linux-2.6.23-git2/include/asm-i386/io.h: No such file or directory
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sat, 13 Oct 2007 16:50:26 +0000 (09:50 -0700)]
Merge git://git./linux/kernel/git/lethal/sh64-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh64-2.6:
sh64: mach-cayman: Build fixes.
sh64: Symbol export fixups.
sh64: linker script tidying and alignment fixups.
sh64: Set KBUILD_IMAGE to make the rpm target happy.
sh64: Kill off obsolete linux/blk.h reference.
sh64: cleanup struct irqaction initializers.
sh64: Kill off dead gdb stub symbol.
sh64: alphanumeric display only on Cayman.
sh64: Add defconfigs for mach-sim and mach-harp.
sh64: update cayman defconfig.
sh64: Tidy up Kconfig dependencies.
sh64: Move consistent DMA routines to arch/sh64/mm/.
sh64: Some symbol exports and build fixes.
sh64: mach-sim: Build fixes.
sh64: mach-harp: Build fixes.
sh64: Kill off duplicate frame pointer option.
sh64: Kill off dead ROM-RAM and generic boards.
sh64: Tidy up includes for Cayman board.
sh64: Move *_p() I/O routine variants to io.h.
Linus Torvalds [Sat, 13 Oct 2007 16:49:04 +0000 (09:49 -0700)]
Merge git://git./linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (124 commits)
sh: allow building for both r2d boards in same binary.
sh: fix r2d board detection
sh: Discard .exit.text/.exit.data at runtime.
sh: Fix up some section alignments in linker script.
sh: Fix SH-4 DMAC CHCR masking.
sh: Rip out left-over nommu cond syscall cruft.
sh: Make kgdb i-cache flushing less inept.
sh: kgdb section mismatches and tidying.
sh: cleanup struct irqaction initializers.
sh: early_printk tidying.
video: pvr2fb: Add TV (RGB) support to Dreamcast PVR driver.
sh: Conditionalize gUSA support.
sh: Follow gUSA preempt changes in __switch_to().
sh: Tidy up gUSA preempt handling.
sh: __copy_user() optimizations for small copies.
sh: clkfwk: Support multi-level clock propagation.
sh: Fix URAM start address on SH7785.
sh: Use boot_cpu_data for CPU probe.
sh: Support extended mode TLB on SH-X3.
sh: Bump MAX_ACTIVE_REGIONS for SH7785.
...
Geert Uytterhoeven [Sat, 13 Oct 2007 12:31:31 +0000 (14:31 +0200)]
ssb bus needs <linux/io.h>
ssb bus needs <linux/io.h>
linux/drivers/ssb/main.c: In function 'ssb_ssb_read16':
linux/drivers/ssb/main.c:518: error: implicit declaration of function 'readw'
linux/drivers/ssb/main.c: In function 'ssb_ssb_read32':
linux/drivers/ssb/main.c:526: error: implicit declaration of function 'readl'
linux/drivers/ssb/main.c: In function 'ssb_ssb_write16':
linux/drivers/ssb/main.c:534: error: implicit declaration of function 'writew'
linux/drivers/ssb/main.c: In function 'ssb_ssb_write32':
linux/drivers/ssb/main.c:542: error: implicit declaration of function 'writel'
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Geert Uytterhoeven [Sat, 13 Oct 2007 12:31:30 +0000 (14:31 +0200)]
b43 wireless needs <linux/io.h>
b43 wireless needs <linux/io.h>
linux/drivers/net/wireless/b43/pio.h: In function 'b43_pio_write':
linux/drivers/net/wireless/b43/pio.h:89: error: implicit declaration of function 'mmiowb'
linux/drivers/net/wireless/b43/phy.c: In function 'b43_phy_write':
linux/drivers/net/wireless/b43/phy.c:301: error: implicit declaration of function 'mmiowb'
linuxdrivers/net/wireless/b43/sysfs.c: In function 'b43_attr_interfmode_store':
linuxdrivers/net/wireless/b43/sysfs.c:147: error: implicit declaration of function 'mmiowb'
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Geert Uytterhoeven [Sat, 13 Oct 2007 12:31:29 +0000 (14:31 +0200)]
m68k: fix net drivers after recent get_stats updates
m68k: fix net drivers after recent get_stats updates
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Geert Uytterhoeven [Sat, 13 Oct 2007 12:31:28 +0000 (14:31 +0200)]
dm: emc_endio returns void
emc_endio returns void:
linux/drivers/md/dm-emc.c: In function 'emc_endio':
linux/drivers/md/dm-emc.c:58: warning: 'return' with a value, in function returning void
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Matthew Wilcox [Sat, 13 Oct 2007 12:31:27 +0000 (14:31 +0200)]
m68k: Export cachectl.h
libffi in GCC 4.2 needs cachectl.h to do its cache flushing. But we
don't currently export it. I believe this patch should do the trick.
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Geert Uytterhoeven [Sat, 13 Oct 2007 12:31:26 +0000 (14:31 +0200)]
m68k: ignore restart_syscall
m68k: ignore restart_syscall, which is not needed on m68k.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Geert Uytterhoeven [Sat, 13 Oct 2007 12:31:25 +0000 (14:31 +0200)]
m68k: Atari keyboard ACIA driver cleanup
m68k: Atari keyboard ACIA driver cleanup:
- removed dead key autorepeat code
- removed hardcoded initial keymap
Signed-off-by: Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Geert Uytterhoeven [Sat, 13 Oct 2007 12:31:24 +0000 (14:31 +0200)]
m68k: Atari input drivers cleanup
m68k: Atari input drivers cleanup:
- memleak on failed init/register of input devices fixed
- correct keycodes table (Atari keycodes are almost, but not entirely, equal
to Linux keycodes).
Signed-off-by: Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:53 +0000 (17:47 +0200)]
alim15x3: remove redundant m5229_revision check
init_dma_ali15x3() guarantees that hwif->dma_base will never be set for
m5229_revision < 0x20 so remove redundant m5229_revision >= 0x20 check from
init_hwif_common_ali15x3().
While at it remove incorrect comment.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:53 +0000 (17:47 +0200)]
sc1200: fix ->dma_base equal zero handling
Set hwif->atapi_dma/{ultra,mwdma}_mask and drive->autodma after checking that
->dma_base exists. If ->dma_base is not set (== PCI BAR4 cannot be reserved)
then DMA hooks shouldn't be initialized or bad things will happen.
OTOH hwif->set_{pio,dma}_mode hooks should be set even if hwif->dma_base == 0.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:52 +0000 (17:47 +0200)]
cs5520: fix ->dma_base equal zero handling
Set hwif->ide_dma_{check,on} and hwif->autodma to 1 after checking that
->dma_base exists. If ->dma_base is not set (== PCI BAR4 cannot be reserved)
then DMA hooks shouldn't be initialized or bad things will happen.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:52 +0000 (17:47 +0200)]
sgiioc4: add missing ->dma_base check
If ->dma_base is not set (== PCI BAR4 cannot be reserved) then DMA hooks
shouldn't be initialized or bad things will happen.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:52 +0000 (17:47 +0200)]
cs5535: add missing ->dma_base check
If ->dma_base is not set (== PCI BAR4 cannot be reserved) then DMA hooks
shouldn't be initialized or bad things will happen.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:52 +0000 (17:47 +0200)]
ide: remove CONFIG_IDEDMA_IVB config option
Devices which don't set word 93 validation bit should be now handled by
ide-iops.c::ivb_list[] and for debugging purposes cable detection can be
completely overriden with "idex=ata66" parameter.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:51 +0000 (17:47 +0200)]
ide: change master/slave IDENTIFY order
Need to probe slave device first to make it release PDIAG-
(this is required for correct device side cable detection).
Based on libata commit
f31f0cc2f0b7527072d94d02da332d9bb8d7d94c.
Thanks to Craig for testing this patch.
Cc: Craig Block <chblock3@yahoo.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:51 +0000 (17:47 +0200)]
ide: move ide_config_drive_speed() calls to upper layers (take 2)
* Convert {ide_hwif_t,ide_pci_device_t}->host_flag to be u16.
* Add IDE_HFLAG_POST_SET_MODE host flag to indicate the need to program
the host for the transfer mode after programming the device. Set it
in au1xxx-ide, amd74xx, cs5530, cs5535, pdc202xx_new, sc1200, pmac
and via82cxxx host drivers.
* Add IDE_HFLAG_NO_SET_MODE host flag to indicate the need to completely
skip programming of host/device for the transfer mode ("smart" hosts).
Set it in it821x host driver and check it in ide_tune_dma().
* Add ide_set_pio_mode()/ide_set_dma_mode() helpers and convert all
direct ->set_pio_mode/->speedproc users to use these helpers.
* Move ide_config_drive_speed() calls from ->set_pio_mode/->speedproc
methods to callers.
* Rename ->speedproc method to ->set_dma_mode, make it void and update
all implementations accordingly.
* Update ide_set_xfer_rate() comments.
* Unexport ide_config_drive_speed().
v2:
* Fix issues noticed by Sergei:
- export ide_set_dma_mode() instead of moving ->set_pio_mode abuse wrt
to setting DMA modes from sc1200_set_pio_mode() to do_special()
- check IDE_HFLAG_NO_SET_MODE in ide_tune_dma()
- check for (hwif->set_pio_mode) == NULL in ide_set_pio_mode()
- check for (hwif->set_dma_mode) == NULL in ide_set_dma_mode()
- return -1 from ide_set_{pio,dma}_mode() if ->set_{pio,dma}_mode == NULL
- don't set ->set_{pio,dma}_mode on it821x in "smart" mode
- fix build problem in pmac.c
- minor fixes in au1xxx-ide.c/cs5530.c/siimage.c
- improve patch description
Changes in behavior caused by this patch:
- HDIO_SET_PIO_MODE ioctl would now return -ENOSYS for attempts to change
PIO mode if it821x controller is in "smart" mode
- removal of two debugging printk-s (from cs5530.c and sc1200.c)
- transfer modes 0x00-0x07 passed from user space may be programmed twice on
the device (not really an issue since 0x00 is not supported correctly by
any host driver ATM, 0x01 is not supported at all and 0x02-0x07 are invalid)
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:51 +0000 (17:47 +0200)]
pdc202xx_new: check ide_config_drive_speed() return value
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:51 +0000 (17:47 +0200)]
cs5535: check ide_config_drive_speed() return value
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:51 +0000 (17:47 +0200)]
amd74xx/via82cxxx: check ide_config_drive_speed() return value
* Check ide_config_drive_speed() return value.
* While at also call ide_config_drive_speed() if the transfer mode is
XFER_PIO_SLOW (this case happens iff the transfer mode has already been
set on the device by ide-proc.c::set_xfer_rate()) and remove redundant
setting of ->{init,current}_speed.
* Bump driver version.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:51 +0000 (17:47 +0200)]
au1xxx: fix au1xxx_set_pio_mode()
Set transfer mode on the device before programming the host controller for
the new timings (matches what auide_tune_chipset() is doing wrt DMA modes).
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:50 +0000 (17:47 +0200)]
icside: use ide_tune_dma()
* Add "good DMA drives" hack for icside to ide-dma.c::ide_find_dma_mode()
(in the long-term it should be either removed or generalized for all hosts).
* Use ide_tune_dma() in icside.c::icside_dma_check().
This results in the following changes in behavior:
- pre-EIDE SWDMA modes are now also respected
- drive->autodma is checked instead of hwif->autodma
(doesn't really matter as icside sets both to "1")
* Make ide-dma.c::__ide_dma_good_drive() static and drop "__" prefix.
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Benjamin Herrenschmidt [Sat, 13 Oct 2007 15:47:50 +0000 (17:47 +0200)]
ide-pmac: fix PIO setup and enable autotune
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:50 +0000 (17:47 +0200)]
ide-pmac: use ide_tune_dma() (take 2)
* Add missing initialization of hwif->autodma and drive->autodma to
pmac_ide_setup_dma().
* Use ide_tune_dma() in pmac_ide_dma_check().
While at it:
* Fix pmac_ide_dma_check() return value if DMA mode is not programmed
(should be "-1" otherwise ide_set_dma() will try to enable DMA).
* Remove unnecessary drive->using_dma fiddling (->dma_off_quietly is always
called before ide_set_dma() call and ide_set_dma() calls ->ide_dma_on if
->ide_dma_check returns "0").
v2:
* No reason to blacklist all ide_floppy devices and the old code was always
enabling DMA anyway (without even programming controller/device if the
device was ide_floppy).
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:50 +0000 (17:47 +0200)]
ide-pmac: remove pmac_ide_do_setfeature() (take 2)
Use ide_config_drive_speed() instead of pmac_ide_do_setfeature() and remove
the latter, also ide-iops.c::__ide_wait_stat() could be static again.
Since for IDE PMAC host driver IDE_CONTROL_REG is always true, device's
->quirk_list is always zero and ->ide_dma_host_{on,off} are nops than
the only changes in behavior are:
* if PIO mode is set then ->dma_off_queitly is called to disable DMA
* if setting transfer mode fails ide_dump_status() is called to dump status
v2:
* IDE PMAC controllers allow separate PIO and DMA timings and PPC userland
depends on this fact, and calls "hdparm -p" without calling "hdparm -d".
Therefore to compensate for DMA being disabled by ide_config_drive_speed()
for PIO modes:
- add IDE_HFLAG_SET_PIO_MODE_KEEP_DMA flag and set it in PMAC host driver
- add handling of the new flag to ide-io.c::do_special()
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:49 +0000 (17:47 +0200)]
ide-pmac: remove nIEN clearing from pmac_ide_do_setfeature()
Upper layers are responsible for controlling nIEN so don't clear nIEN after
command execution in pmac_ide_do_setfeature().
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:49 +0000 (17:47 +0200)]
ide-pmac: use __ide_wait_stat()
* Use __ide_wait_stat() instead of wait_for_ready() in pmac_ide_do_setfeature().
While at it do following changes to match __ide_wait_stat() call in
ide_config_drive_speed():
* Wait WAIT_CMD time (20 sec) instead of 2 sec for device to clear BUSY_STAT.
* Check DRQ_STAT bit (shouldn't be set for good device status).
Also remove no longer needed wait_for_ready() from ide-iops.c.
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:49 +0000 (17:47 +0200)]
ide-pmac: remove extra good status wait from pmac_ide_do_setfeature()
Don't check for good device status before executing the command in
pmac_ide_do_setfeature() (ide_config_drive_speed() doesn't do this).
It is a job of upper layers to guarantee that the device is ready to
accept new command before we get here.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:49 +0000 (17:47 +0200)]
ide: add __ide_wait_stat() helper
* Split off checking of the status register from ide_wait_stat() to
__ide_wait_stat() helper.
* Use the new helper in ide_config_drive_speed(). The only change in the
functionality is that the function now fails if after 20 sec (WAIT_CMD)
device is still busy (BUSY_STAT bit is set) while previously instead of
failing the function continued with checking for the correct device status
(which would give the device additional 10 usec to clear BUSY_STAT bit).
* Remove stale comment for ide_config_drive_speed().
* Remove duplicate comment for ide_wait_stat() from <linux/ide.h>.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:49 +0000 (17:47 +0200)]
ide-pmac: remove pmac_ide_{m,u}dma_enable() (take 2)
* Fix pmac_ide_dma_check() to use pmac_ide_tune_chipset() and remove no longer
necessary pmac_ide_{m,u}dma_enable().
* While at it remove some dead code from pmac_ide_dma_check() (leftovers from
conversion to use ide_max_dma_mode()).
There should be no functionality changes caused by this patch.
v2:
* Fix compile by replacing "id" with "drive->id" in pmac_ide_dma_check()
(Noticed by Ben).
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:49 +0000 (17:47 +0200)]
ide-pmac: remove control register messing from pmac_ide_dma_check()
pmac_ide_do_setfeature() contains matching nIEN setting/clearing so this
Device Control register messing in pmac_ide_dma_check() is totally unnecessary.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:48 +0000 (17:47 +0200)]
ide-pmac: fix set_timings_mdma()
* Move adjusting of cycle time for devices providing explicit DMA cycle time
from pmac_ide_mdma_enable() to set_timings_mdma().
* Remove no longer needed drive_cycle_time argument.
* BUG() if unsupported speed argument value is passed (shouldn't happen).
* Matching access/recovery timings always exist so remove redundant check.
* Make set_timings_mdma() void.
* Update pmac_ide_tune_chipset()'s comment.
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:48 +0000 (17:47 +0200)]
ide-pmac: pmac_ide_tune_chipset() fixes
* Don't check check for pmif == NULL (it should never be NULL if we got here).
* Make a local copy of the timings and set the pmif->timings[] only after
setting the transfer mode on the device (otherwise SELECT_DRIVE() call in
pmac_ide_do_setfeature() will program new timings before the transfer mode
is set on the device - this was pointed out by Sergei). This change makes
pmac_ide_tune_chipset() behavior match this of pmac_ide_{m,u}dma_enable().
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:48 +0000 (17:47 +0200)]
ide-pmac: don't check kauai_lookup_timing() return value
kauai_lookup_timing() should always return non-zero return value:
* BUG() in kauai_lookup_timing() if the timing info cannot be found.
* Remove code checking for zero return value from all callers.
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Adrian Bunk [Sat, 13 Oct 2007 15:47:48 +0000 (17:47 +0200)]
ide: unexport ide_acpi_set_state
This patch removes the unused EXPORT_SYMBOL_GPL(ide_acpi_set_state)
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Shaohua Li <shaohua.li@intel.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Sat, 13 Oct 2007 15:47:47 +0000 (17:47 +0200)]
ide_platform: set hwif->chipset
We need to set hwif->chipset or IDE PCI host drivers may try to claim
our ide_hwifs[] slot.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
David Woodhouse [Sat, 13 Oct 2007 13:58:23 +0000 (14:58 +0100)]
Merge branch 'master' of git://git./linux/kernel/git/torvalds/linux-2.6
David Woodhouse [Sat, 13 Oct 2007 13:43:54 +0000 (14:43 +0100)]
Merge Linux 2.6.23
Bryan Wu [Tue, 2 Oct 2007 20:56:05 +0000 (13:56 -0700)]
[MTD] [NAND] Blackfin on-chip NAND Flash Controller driver
This is the driver for latest Blackfin on-chip nand flash controller
- use nand_chip and mtd_info common nand driver interface
- provide both PIO and dma operation
- compiled with ezkit bf548 configuration
- use hardware 1-bit ECC
- tested with YAFFS2 and can mount YAFFS2 filesystem as rootfs
ChangeLog from try#1
- use hweight32() instead of count_bits()
- replace bf54x with bf5xx and BF54X with BF5XX
- compare against plat->page_size in 2 cases when enable hardware ECC
ChangeLog from try#2
- passed nand_test suites
- use cpu_relax() instead of busy wait loop
- some coding style issue pointed out by Andrew
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Kevin Hao [Tue, 2 Oct 2007 20:56:04 +0000 (13:56 -0700)]
[MTD] [NOR] fix ctrl-alt-del can't reboot for intel flash bug
When we press ctrl-alt-del,kernel_restart_prepare will invoke
cfi_intelext_reboot which will set flash to read array mode, but later
when device_shutdown is invoked which may put current work queue to
sleep and other process may be scheduled to running and programming
flash in not FL_READY mode again. So we can't boot up if this flash is
used for bootloader.
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
akpm@linux-foundation.org [Thu, 11 Oct 2007 07:02:06 +0000 (00:02 -0700)]
[MTD] [NAND] Fix compiler warning in Alauda driver
drivers/mtd/nand/alauda.c: In function 'alauda_bounce_read':
drivers/mtd/nand/alauda.c:412: warning: comparison of distinct pointer types lacks a cast
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Sat, 13 Oct 2007 13:29:39 +0000 (14:29 +0100)]
[JFFS2] Remove stray debugging printk
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Sat, 13 Oct 2007 10:35:58 +0000 (11:35 +0100)]
[JFFS2] Handle dirents on the flash with embedded zero bytes in names.
In three places: summary scan, normal scan, REF_PRISTINE GC.
Just truncate at the NUL, since that was the correct thing to do in the
only case where this (inexplicable) breakage has been seen.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Sat, 13 Oct 2007 10:33:50 +0000 (11:33 +0100)]
[JFFS2] Check for creation of dirents with embedded zero bytes in name.
I have no idea how this happened, but OLPC trac #4184 suggests that it
did. Catch it early.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Sat, 13 Oct 2007 10:32:16 +0000 (11:32 +0100)]
[JFFS2] Don't count all 'very dirty' blocks except in debug mode
... where we'll actually print the count in a debug message.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Sat, 13 Oct 2007 10:31:23 +0000 (11:31 +0100)]
[JFFS2] Check whether garbage-collection actually obsoleted its victim.
In OLPC trac #4184 we found a case where a corrupted node didn't
actually get obsoleted when we tried to garbage-collect it. So we wrote
out many million copies of it, in repeated attempts to obsolete it,
until the flash became full. Don't Do That.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Sat, 13 Oct 2007 10:29:07 +0000 (11:29 +0100)]
[JFFS2] Relax threshold for triggering GC due to dirty blocks.
Instead of matching resv_blocks_gcmerge, which is only about 3, instead
match resv_blocks_gctrigger, which includes a proportion of the total
device size.
These ought to become tunable from userspace, at some point.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Kyungmin Park [Wed, 10 Oct 2007 04:48:14 +0000 (13:48 +0900)]
[MTD] [OneNAND] Fix typo related with recent commit
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Avi Kivity [Wed, 10 Oct 2007 12:03:16 +0000 (14:03 +0200)]
KVM: Replace enum by #define
Easier for existence test (#ifdef) in userspace.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Avi Kivity [Sat, 15 Sep 2007 14:34:36 +0000 (17:34 +0300)]
KVM: Skip pio instruction when it is emulated, not executed
If we defer updating rip until pio instructions are executed, we have a
problem with reset: a pio reset updates rip, and when the instruction
completes we skip the emulated instruction, pointing rip somewhere completely
unrelated.
Fix by updating rip when we see decode the instruction, not after emulation.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Nitin A Kamble [Sat, 15 Sep 2007 07:45:05 +0000 (10:45 +0300)]
KVM: x86 emulator: popf
Implement emulation of instruction:
popf
opcode: 0x9d
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Nitin A Kamble [Sat, 15 Sep 2007 07:43:33 +0000 (10:43 +0300)]
KVM: x86 emulator: fix src, dst value initialization
Some operand fetches are less than the machine word size and can result in
stale bits if used together with operands of different sizes.
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Nitin A Kamble [Sat, 15 Sep 2007 07:41:26 +0000 (10:41 +0300)]
KVM: x86 emulator: jmp abs
Implement emulation of instruction:
jump absolute r/m
opcode: 0xff /4
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Nitin A Kamble [Sat, 15 Sep 2007 07:35:36 +0000 (10:35 +0300)]
KVM: x86 emulator: lea
Implement emulation of instruction
lea r16/r32, m
opcode: 0x8d:
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Nitin A Kamble [Sat, 15 Sep 2007 07:25:41 +0000 (10:25 +0300)]
KVM: X86 emulator: jump conditional short
Implement emulation of more jump conditional instructions
jcc shortrel
opcodes: 0x70 - 0x7f
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Nitin A Kamble [Sat, 15 Sep 2007 07:23:07 +0000 (10:23 +0300)]
KVM: x86 emulator: imlpement jump conditional relative
Implement emulation of instruction:
jump conditional rel
opcodes: 0x0f 0x80 - 0x0f 0x8f
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Nitin A Kamble [Sat, 15 Sep 2007 07:13:07 +0000 (10:13 +0300)]
KVM: x86 emulator: sort opcodes into ascending order
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Avi Kivity [Wed, 12 Sep 2007 10:21:09 +0000 (13:21 +0300)]
KVM: Improve emulation failure reporting
Report failed opcodes from all locations.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Nitin A Kamble [Wed, 29 Aug 2007 01:22:47 +0000 (18:22 -0700)]
KVM: x86 emulator: pushf
Implement emulation of instruction
pushf
opcode: 0x9c
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Nitin A Kamble [Wed, 29 Aug 2007 01:08:37 +0000 (18:08 -0700)]
KVM: x86 emulator: call near
Implement emulation of instruction
opcode: 0xe8
call (near)
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Nitin A Kamble [Wed, 29 Aug 2007 00:58:52 +0000 (17:58 -0700)]
KVM: x86 emulator: push imm8
Implement the instruction
push imm8
opcode: 0x6a
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
He, Qing [Wed, 12 Sep 2007 06:18:28 +0000 (14:18 +0800)]
KVM: VMX: Fix exit qualification width on i386
According to Intel Software Developer's Manual, Vol. 3B, Appendix H.4.2,
exit qualification should be of natural width. However, current code
uses u64 as the data type for this register, which occasionally
introduces invalid value to VMExit handling logics. This patch fixes
this bug.
I have tested Windows and Linux guest on i386 host, and they can boot
successfully with this patch.
Signed-off-by: Qing He <qing.he@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Avi Kivity [Mon, 10 Sep 2007 15:10:54 +0000 (18:10 +0300)]
KVM: Move main vcpu loop into subarch independent code
This simplifies adding new code as well as reducing overall code size.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Avi Kivity [Mon, 10 Sep 2007 14:27:03 +0000 (17:27 +0300)]
KVM: VMX: Move vm entry failure handling to the exit handler
This will help moving the main loop to subarch independent code.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Avi Kivity [Mon, 10 Sep 2007 08:28:17 +0000 (11:28 +0300)]
KVM: MMU: Don't do GFP_NOWAIT allocations
Before preempt notifiers, kvm needed to allocate memory with GFP_NOWAIT so
as not to have to enable preemption and take a heavyweight exit. On oom, we'd
fall back to a GFP_KERNEL allocation.
With preemption notifiers, we can do a GFP_KERNEL allocation, and perform
the heavyweight exit only if the kernel decides to put us to sleep.
Signed-off-by: Avi Kivity <avi@qumranet.com>