sfrench/cifs-2.6.git
14 years agoext4: Clear the unwritten buffer_head flag after the extent is initialized
Aneesh Kumar K.V [Thu, 14 May 2009 21:05:39 +0000 (17:05 -0400)]
ext4: Clear the unwritten buffer_head flag after the extent is initialized

The BH_Unwritten flag indicates that the buffer is allocated on disk
but has not been written; that is, the disk was part of a persistent
preallocation area.  That flag should only be set when a get_blocks()
function is looking up a inode's logical to physical block mapping.

When ext4_get_blocks_wrap() is called with create=1, the uninitialized
extent is converted into an initialized one, so the BH_Unwritten flag
is no longer appropriate.  Hence, we need to make sure the
BH_Unwritten is not left set, since the combination of BH_Mapped and
BH_Unwritten is not allowed; among other things, it will result ext4's
get_block() to be called over and over again during the write_begin
phase of write(2).

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoBtrfs: Spelling fix in btrfs_lookup_first_block_group comments
Sankar P [Thu, 14 May 2009 17:52:22 +0000 (13:52 -0400)]
Btrfs: Spelling fix in btrfs_lookup_first_block_group comments

Signed-off-by: Sankar P <sankar.curiosity@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: make show_options result match actual option names
Sage Weil [Thu, 14 May 2009 17:52:21 +0000 (13:52 -0400)]
Btrfs: make show_options result match actual option names

The notreelog and flushoncommit mount options were being printed slightly
differently.

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: remove outdated comment in btrfs_ioctl_resize()
Li Hong [Thu, 14 May 2009 17:52:21 +0000 (13:52 -0400)]
Btrfs: remove outdated comment in btrfs_ioctl_resize()

In Li Zefan's commit dae7b665cf6d6e6e733f1c9c16cf55547dd37e33,
a combination call of kmalloc() and copy_from_user() is replaced by
memdup_user(). So btrfs_ioctl_resize() doesn't use GFP_NOFS any more.

Signed-off-by: Li Hong <lihong.hi@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: remove some WARN_ONs in the IO failure path
Chris Mason [Thu, 14 May 2009 17:31:21 +0000 (13:31 -0400)]
Btrfs: remove some WARN_ONs in the IO failure path

These debugging WARN_ONs make too much console noise during regular
IO failures.  An IO failure will still generate a number of messages
as we verify checksums etc, but these two are not needed.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: Don't loop forever on metadata IO failures
Chris Mason [Thu, 14 May 2009 17:24:30 +0000 (13:24 -0400)]
Btrfs: Don't loop forever on metadata IO failures

When a btrfs metadata read fails, the first thing we try to do is find
a good copy on another mirror of the block.  If this fails, read_tree_block()
ends up returning a buffer that isn't up to date.

The btrfs btree reading code was reworked to drop locks and repeat
the search when IO was done, but the changes didn't add a check for failed
reads.  The end result was looping forever on buffers that were never
going to become up to date.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: init inode ordered_data_close flag properly
Chris Mason [Thu, 14 May 2009 17:10:02 +0000 (13:10 -0400)]
Btrfs: init inode ordered_data_close flag properly

This flag is used to decide when we need to send a given file through
the ordered code to make sure it is fully written before a transaction
commits.  It was not being properly set to zero when the inode was
being setup.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agothermal: fix off-by-1 error in trip point trigger condition
Vladimir Zajac [Wed, 6 May 2009 17:34:21 +0000 (19:34 +0200)]
thermal: fix off-by-1 error in trip point trigger condition

This patch fixes a regression caused by commit
b1569e99c795bf83b4ddf41c4f1c42761ab7f75e
"ACPI: move thermal trip handling to generic thermal layer"
which accidentally changed trip point trigger condition to
  temp > trip_temp

This patch changes the trigger condition back to
  temp >= trip_temp

Signed-off-by: Vladimir Zajac <eightgraph@gmail.com>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agopowerpc/virtex: Fix duplicate level irq events.
John Linn [Thu, 14 May 2009 16:23:11 +0000 (10:23 -0600)]
powerpc/virtex: Fix duplicate level irq events.

The interrupt controller was not handling level interrupts correctly
such that duplicate interrupts were happening. This fixes the problem
and adds edge type interrupts which are needed in Xilinx hardware.

Signed-off-by: John Linn <john.linn@xilinx.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
14 years agopowerpc/virtex: Add uImage to the default images list
Grant Likely [Thu, 14 May 2009 16:23:10 +0000 (10:23 -0600)]
powerpc/virtex: Add uImage to the default images list

It is common to use U-Boot on Xilinx Virtex platforms.  This patch
ensures that CONFIG_DEFAULT_UIMAGE is selected for virtex

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
14 years agopowerpc/boot: add simpleImage.* to clean-files list
Grant Likely [Thu, 14 May 2009 16:23:09 +0000 (10:23 -0600)]
powerpc/boot: add simpleImage.* to clean-files list

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
14 years agoALSA: pcsp: fix printk format warning
Randy Dunlap [Thu, 14 May 2009 15:49:13 +0000 (08:49 -0700)]
ALSA: pcsp: fix printk format warning

Fix printk format warning:

sound/drivers/pcsp/pcsp_mixer.c:54: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoeeepc-laptop: unregister_rfkill_notifier on failure
Corentin Chary [Mon, 27 Apr 2009 07:23:43 +0000 (09:23 +0200)]
eeepc-laptop: unregister_rfkill_notifier on failure

If there is a failure during eeepc_hotk_add() we need
to remove the acpi_notify_handler.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoasus-laptop: fix input keycode
Corentin Chary [Mon, 27 Apr 2009 07:23:42 +0000 (09:23 +0200)]
asus-laptop: fix input keycode

KEY_STOP is now KEY_STOPCD
 It's the correct key to stop a media
BTN_EXTRA is now KEY_SCREENLOCK:
 The laptop manual tells us that this key is for screenlock
KEY_TV is now KEY_PROG1
 So it can be reported to X server

Ref: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/361505

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: support for super hybrid engine (SHE)
Grigori Goronzy [Mon, 27 Apr 2009 07:23:40 +0000 (09:23 +0200)]
eeepc-laptop: support for super hybrid engine (SHE)

The older eeepc-acpi driver allowed to control the SHE performance
preset through a ACPI function for just this purpose. SHE underclocks
and undervolts the FSB and undervolts the CPU (at preset 2,
"powersave"), or slightly overclocks the CPU (at preset 0,
"performance"). Preset 1 is the default setting with default clocks and
voltage.

The new eeepc-laptop driver doesn't support it anymore.
The attached patch adds support for it to eeepc-laptop. It's very
straight-forward and almost trivial.

Signed-off-by: Grigori Goronzy <greg@chown.ath.cx>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: Work around rfkill firmware bug
Alan Jenkins [Mon, 27 Apr 2009 07:23:39 +0000 (09:23 +0200)]
eeepc-laptop: Work around rfkill firmware bug

1) Buggy firmware can change the RFKILL state by itself. This is easily
   detected.  The RFKILL API states that in such cases, we should call
   rfkill_force_state() to notify the core.

   I have reported the bug to Asus. I believe this is the right thing
   to do for robustness, even if this particular firmware bug is fixed.

2) The same bug causes the wireless toggle key to be reported as 0x11
   instead of 0x10.  0x11 is otherwise unused, so it should be safe to
   add this as a new keycode.

The bug is triggered by removing the laptop battery while hibernated.

On resume, the wireless toggle key causes the firmware to toggle the
wireless state itself.  (Also, the key is reported as 0x11 when the
current wireless state is OFF).

This is very poor behaviour because the OS can't predict whether the
firmware is controlling the RFKILL state.

Without this workaround, the bug means users have to press the wireless
toggle key twice to enable, due to the OS/firmware conflict.  (Assuming
rfkill-input or equivalent is being used).  The workaround avoids this.

I believe that acpid scripts which toggle the value of the sysfs state file
when the toggle key is pressed will be rendered ineffective by the bug,
regardless of this workaround.  If they simply toggle the state, when the
firmware has already toggled it, then you will never see a state change.

Tested on "EEEPC 4G" only.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: report brightness control events via the input layer
Darren Salt [Mon, 27 Apr 2009 07:23:38 +0000 (09:23 +0200)]
eeepc-laptop: report brightness control events via the input layer

This maps the brightness control events to one of two keys, either
KEY_BRIGHTNESSDOWN or KEY_BRIGHTNESSUP, as needed.

Some mapping has to be done due to the fact that the BIOS reports them as
<base value> + <current brightness index>; the selection is done according to
the sign of the change in brightness (if this is 0, no keypress is reported).

(Ref. http://lists.alioth.debian.org/pipermail/debian-eeepc-devel/2009-April/002001.html)

Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: fix wlan rfkill state change during init
Alan Jenkins [Mon, 27 Apr 2009 07:23:37 +0000 (09:23 +0200)]
eeepc-laptop: fix wlan rfkill state change during init

When an rfkill device is registered, the rfkill core will change its
state to the system default. So we need to prepare for state changes
*before* we register it. That means installing the eeepc-specific ACPI
callback which handles the hotplug of the wireless network adaptor.

This problem doesn't occur during normal operation.  You have to

1) Boot with wireless enabled. eeepc-laptop should load automatically.
2) modprobe -r eeepc-laptop
3) modprobe eeepc-laptop

On boot, the default rfkill state will be set to enabled.
With the current core code, step 2) will disable the wireless.
Therefore in step 3), the wireless will change state during registration,
from disabled to enabled.  But without this fix, the PCI device for the
wireless adaptor will not appear.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Acked-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agocifs: fix error handling in parse_DFS_referrals
Jeff Layton [Thu, 14 May 2009 11:46:59 +0000 (07:46 -0400)]
cifs: fix error handling in parse_DFS_referrals

cifs_strndup_from_ucs returns NULL on error, not an ERR_PTR

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
14 years agoMIPS: Sibyte: Fix locking in set_irq_affinity
Thomas Bogendoerfer [Mon, 4 May 2009 21:51:54 +0000 (23:51 +0200)]
MIPS: Sibyte: Fix locking in set_irq_affinity

Locking of irq_desc is now done in irq_set_affinity; don't lock it again
in chip specific set_affinity function.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Use force_sig when handling address errors.
David Daney [Tue, 5 May 2009 19:49:47 +0000 (12:49 -0700)]
MIPS: Use force_sig when handling address errors.

When init is started it is SIGNAL_UNKILLABLE.  If it were to get an
address error, we would try to send it SIGBUS, but it would be ignored
and the faulting instruction restarted.  This results in an endless
loop.

We need to use force_sig() instead so it will actually die and give us
some useful information.

Reported-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Cavium: Add struct clocksource * argument to octeon_cvmcount_read()
Coly Li [Wed, 22 Apr 2009 19:06:06 +0000 (03:06 +0800)]
MIPS: Cavium: Add struct clocksource * argument to octeon_cvmcount_read()

This patch modifies parameter of octeon_cvmcount_read() from 'void' to
'struct clocksource *cs', which fixes compile warning for incompatible
parameter type.

Signed-off-by: Coly Li <coly.li@suse.de>
Cc: David Daney <ddaney@caviumnetworks.com>
Cc: Ingo Molnar <mingo@elte.hu>
Reviewed-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Rewrite <asm/div64.h> to work with gcc 4.4.0.
Ralf Baechle [Thu, 30 Apr 2009 16:14:56 +0000 (18:14 +0200)]
MIPS: Rewrite <asm/div64.h> to work with gcc 4.4.0.

The inline assembler used on 32-bit kernels was using the "h" constraint
which was considered dangerous and removed for gcc 4.4.0.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Fix highmem.
Ralf Baechle [Sat, 25 Apr 2009 09:25:34 +0000 (11:25 +0200)]
MIPS: Fix highmem.

Commit 351336929ccf222ae38ff0cb7a8dd5fd5c6236a0 (kernel.org) rsp.
b3594a089f1c17ff919f8f78505c3f20e1f6f8ce (linux-mips.org):

> From: Chris Dearman <chris@mips.com>
> Date: Wed, 19 Sep 2007 00:58:24 +0100
> Subject: [PATCH] [MIPS] Allow setting of the cache attribute at run time.
>
> Slightly tacky, but there is a precedent in the sparc archirecture code.

introduces the variable _page_cachable_default, which defaults to zero and.
is used to create the prototype PTE for __kmap_atomic in
arch/mips/mm/init.c:kmap_init before initialization in
arch/mips/mm/c-r4k.c:coherency_setup, so the default value of 0 will be
used as the CCA of kmap atomic pages which on many processors is not a
defined CCA value and may result in writes to kmap_atomic pages getting
corrupted.  Debugged by Jon Fraser (jfraser@broadcom.com).

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Fix sign-extension bug in 32-bit kernel on 32-bit hardware.
Ralf Baechle [Thu, 30 Apr 2009 00:16:19 +0000 (02:16 +0200)]
MIPS: Fix sign-extension bug in 32-bit kernel on 32-bit hardware.

Probably nobody does arithmetic on cp0 register values so this has never
bitten.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: MSP71xx: Remove the RAMROOT functions
Shane McDonald [Tue, 28 Apr 2009 23:00:27 +0000 (17:00 -0600)]
MIPS: MSP71xx: Remove the RAMROOT functions

The RAMROOT function was a successful but non-portable attempt to append
the root filesystem to the end of the kernel image.  The preferred and
portable solution is to use an initramfs instead.

Signed-off-by: Shane McDonald <mcdonald.shane@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Use -mno-check-zero-division
Ralf Baechle [Tue, 28 Apr 2009 17:28:33 +0000 (19:28 +0200)]
MIPS: Use -mno-check-zero-division

I don't think that in 15 years of Linux/MIPS the zero division checking
code generated by gcc by default has ever caught anything.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Set compiler options only after the compiler prefix has ben set.
Ralf Baechle [Tue, 28 Apr 2009 17:38:35 +0000 (19:38 +0200)]
MIPS: Set compiler options only after the compiler prefix has ben set.

Otherwise indigestable options might be passed to the host compiler.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: IP27: Get rid of #ident. Gcc 4.4.0 doesn't like it.
Ralf Baechle [Tue, 28 Apr 2009 15:31:50 +0000 (17:31 +0200)]
MIPS: IP27: Get rid of #ident.  Gcc 4.4.0 doesn't like it.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: uaccess: Switch lock annotations to might_fault().
Ralf Baechle [Tue, 28 Apr 2009 12:17:54 +0000 (14:17 +0200)]
MIPS: uaccess: Switch lock annotations to might_fault().

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: MSP71xx: Resolve use of non-existent GPIO routines in msp71xx reset
Shane McDonald [Tue, 28 Apr 2009 05:52:25 +0000 (23:52 -0600)]
MIPS: MSP71xx: Resolve use of non-existent GPIO routines in msp71xx reset

There have been a number of compile problems with the msp71xx configuration
ever since it was included in the linux-mips.org repository.  This patch
resolves compilation problems with attempting to reset the board using
non-existent GPIO routines.

This patch has been compile-tested against the current HEAD.

Signed-off-by: Shane McDonald <mcdonald.shane@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: MSP71xx: Resolve multiple definition of plat_timer_setup
Shane McDonald [Tue, 28 Apr 2009 05:50:21 +0000 (23:50 -0600)]
MIPS: MSP71xx: Resolve multiple definition of plat_timer_setup

There have been a number of compile problems with the msp71xx configuration
ever since it was included in the linux-mips.org repository.  This patch
resolves the "multiple definition of plat_timer_setup" problem, and creates
the required get_c0_compare_int function.

This patch has been compile-tested against the current HEAD.

Signed-off-by: Shane McDonald <mcdonald.shane@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Make uaccess.h slightly more sparse friendly.
Ralf Baechle [Mon, 27 Apr 2009 14:46:21 +0000 (16:46 +0200)]
MIPS: Make uaccess.h slightly more sparse friendly.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Make access_ok() sideeffect proof.
Ralf Baechle [Mon, 27 Apr 2009 13:31:34 +0000 (15:31 +0200)]
MIPS: Make access_ok() sideeffect proof.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: IP27: Fix clash with NMI_OFFSET from hardirq.h
Thomas Bogendoerfer [Tue, 21 Apr 2009 21:31:12 +0000 (23:31 +0200)]
MIPS: IP27: Fix clash with NMI_OFFSET from hardirq.h

There was already a define for NMI_OFFSET in asm/sn/addr.h, which now
clashes with linux/hardirq.h. Rename the one in sn/addr.h to fix IP27
builds..

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Alchemy: Timer build fix
Manuel Lauss [Wed, 22 Apr 2009 06:01:48 +0000 (08:01 +0200)]
MIPS: Alchemy: Timer build fix

Fix breakage introduced by 8e19608e8b5c001e4a66ce482edc474f05fb7355.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Kconfig: Delete duplicate definition of RWSEM_GENERIC_SPINLOCK.
Ralf Baechle [Mon, 20 Apr 2009 11:43:05 +0000 (13:43 +0200)]
MIPS: Kconfig: Delete duplicate definition of RWSEM_GENERIC_SPINLOCK.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Cavium: Add support for 8k and 32k page sizes.
Ralf Baechle [Thu, 2 Apr 2009 12:07:10 +0000 (14:07 +0200)]
MIPS: Cavium: Add support for 8k and 32k page sizes.

Beyond the requirements of the architecture standard Cavium also supports
8k and 32k pages.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: David Daney <ddaney@caviumnetworks.com>
14 years agoMIPS: TXx9: Fix possible overflow in clock calculations
Atsushi Nemoto [Thu, 2 Apr 2009 16:01:21 +0000 (01:01 +0900)]
MIPS: TXx9: Fix possible overflow in clock calculations

Addition of -fwrapv option in 2.6.29 discloses possible overflow with
signed arithmetics.  For example, result of "a * 6 / 12" (int a =
400000000) is 200000000 without -fwrapv but -157913941 with -fwrapv.

Change some variable to unsigned to avoid such overflows.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Synchronize dma_map_page and dma_map_single
Atsushi Nemoto [Thu, 22 Jan 2009 15:42:11 +0000 (00:42 +0900)]
MIPS: Synchronize dma_map_page and dma_map_single

Synchronize dma_map_page/dma_unmap_page and dma_map_single/dma_unmap_single.
This will reduce unnecessary writebacks and invalidates.

[Ralf: make dma_unmap_page an inline function.]

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Enable CLO / CLZ instructions via separate CPU property
Ralf Baechle [Sun, 19 Apr 2009 01:21:22 +0000 (03:21 +0200)]
MIPS: Enable CLO / CLZ instructions via separate CPU property

This is useful for IDT RC32332, RC32334 and NEC VR5500 processors which do
not implement the full MIPS32 / MIPS64 architecture.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson 2 needs no hazard barriers.
Zhang Le [Wed, 15 Apr 2009 09:01:52 +0000 (17:01 +0800)]
MIPS: Loongson 2 needs no hazard barriers.

Quoting from Loongson2FUserGuide.pdf:

5.22.1 Hazards
The processor detects most of the pipeline hazards in hardware, including
CP0 hazards and load hazards. No NOP instructions are required to correct
instruction sequences.

Signed-off-by: Zhang Le <r0bertz@gentoo.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Do not include seccomp.h from compat.h
Atsushi Nemoto [Sat, 11 Apr 2009 14:31:50 +0000 (23:31 +0900)]
MIPS: Do not include seccomp.h from compat.h

The compat.h does not need seccomp.h since TIF_32BIT was moved to
thread_info.h

This fixes a build error of 64-bit kernel without CONFIG_SECCOMP.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Acked-by: : David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: RBTX4939: Fix typo in system name
Atsushi Nemoto [Wed, 15 Apr 2009 17:22:21 +0000 (02:22 +0900)]
MIPS: RBTX4939: Fix typo in system name

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Compat: Use generic 32-bit wrapers for sys_timerfd_{g,s}ettime
David Daney [Thu, 16 Apr 2009 16:20:17 +0000 (09:20 -0700)]
MIPS: Compat: Use generic 32-bit wrapers for sys_timerfd_{g,s}ettime

The LTP timerfd01 test is failing (blocking forever) on the 32-bit ABIs. We
need to use the compat_* wrappers for these system calls.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Fix build error if CONFIG_CEVT_R4K is undefined.
Ralf Baechle [Sun, 5 Apr 2009 22:31:22 +0000 (00:31 +0200)]
MIPS: Fix build error if CONFIG_CEVT_R4K is undefined.

Introduced by 99aa5029937ee926e3b249369e208d7013cd381b.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Add Loongson cpu-feature-overrides.h
Zhang Le [Thu, 2 Apr 2009 07:41:45 +0000 (15:41 +0800)]
MIPS: Add Loongson cpu-feature-overrides.h

I have taken Wu Zhangjin's and Philippe Vachon's version as references,
did a little modification and tested on 16K page size kernel. It works
well.

Unfornately although it already has defined cpu_has_dc_aliases as 1, 4k
page size still not working.  More work needed here.

Signed-off-by: Zhang Le <r0bertz@gentoo.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Print the actual detected I-cache associativity on bootup.
Ralf Baechle [Wed, 1 Apr 2009 14:11:53 +0000 (16:11 +0200)]
MIPS: Print the actual detected I-cache associativity on bootup.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: gbe: Make needlessly global symbols static in drivers/video/gbefb.c
Dmitri Vorobiev [Mon, 30 Mar 2009 19:53:26 +0000 (22:53 +0300)]
MIPS: gbe: Make needlessly global symbols static in drivers/video/gbefb.c

The following symbols are needlessly defined global:

default_mode
default_var
gbe_mem_phys
gbe_turn_off
gbefb_exit
gbefb_init
gbefb_setup

This error was noticed by namespacecheck when compiling ip32_defconfig.

This patch makes the symbols static.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: IP32: Fix needlessly global symbols in arch/mips/sgi-ip32/ip32-irq.c
Dmitri Vorobiev [Mon, 30 Mar 2009 19:53:25 +0000 (22:53 +0300)]
MIPS: IP32: Fix needlessly global symbols in arch/mips/sgi-ip32/ip32-irq.c

The following symbols are needlessly defined global: cpuerr_irq and
memerr_irq. This patch makes the symbols static.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: IP32: ip32_be_handler symbol is needlessly defined global
Dmitri Vorobiev [Mon, 30 Mar 2009 19:53:24 +0000 (22:53 +0300)]
MIPS: IP32: ip32_be_handler symbol is needlessly defined global

The file arch/mips/sgi-ip32/ip32-berr.c needlessly defines the function
ip32_be_handler() as global, and this patch makes it static.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: IP32: Two symbols can become static
Dmitri Vorobiev [Mon, 30 Mar 2009 19:53:23 +0000 (22:53 +0300)]
MIPS: IP32: Two symbols can become static

The file arch/mips/mm/sc-rm7k.c needlessly defines two global symbols:

rm7k_sc_ops
rm7k_tcache_enabled

This patch makes these symbols static.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: au1xxx-ide: Fix build with CONFIG_PM
Manuel Lauss [Tue, 31 Mar 2009 16:44:36 +0000 (18:44 +0200)]
MIPS: au1xxx-ide: Fix build with CONFIG_PM

au1xxx_power_dev_t? is never defined;  get rid of all PM stuff as well
since it is not in the driver source anyway.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Alchemy: Add missing Au1200 GPIO203 interrupt
Manuel Lauss [Tue, 31 Mar 2009 16:51:28 +0000 (18:51 +0200)]
MIPS: Alchemy: Add missing Au1200 GPIO203 interrupt

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Alchemy: Fix AU1100 interrupt numbers off-by-one
Manuel Lauss [Tue, 31 Mar 2009 16:51:27 +0000 (18:51 +0200)]
MIPS: Alchemy: Fix AU1100 interrupt numbers off-by-one

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: SMTC: Fix xxx_clockevent_init() naming conflict for SMTC
Kevin D. Kissell [Tue, 31 Mar 2009 11:10:32 +0000 (13:10 +0200)]
MIPS: SMTC: Fix xxx_clockevent_init() naming conflict for SMTC

Commit 779e7d41ad004946603da139da99ba775f74cb1c created a name collision
in SMTC builds.  The attached patch corrects this in a a
not-too-terribly-ugly manner.  Note that the SMTC case has to come
first, because CEVT_R4K will also be true.

Signed-off-by: Kevin D. Kissell <kevink@paralogos.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: SMTC: Bring set/clear/change_c0_## return value semantics uptodate.
Kevin D. Kissell [Tue, 31 Mar 2009 10:59:24 +0000 (12:59 +0200)]
MIPS: SMTC: Bring set/clear/change_c0_## return value semantics uptodate.

Signed-off-by: Kevin D. Kissell <kevink@paralogos.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoALSA: riptide: postfix increment and off by one
Roel Kluin [Wed, 13 May 2009 18:44:07 +0000 (20:44 +0200)]
ALSA: riptide: postfix increment and off by one

With a postfix increment these variables are incremented beyond
CMDIF_TIMEOUT / MAX_WRITE_RETRY.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6
Linus Torvalds [Thu, 14 May 2009 00:07:28 +0000 (17:07 -0700)]
Merge git://git./linux/kernel/git/czankel/xtensa-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6:
  xtensa: Fix linker script to include .literal sections
  xtensa: update s6105_defconfig for ccount calibration
  xtensa: implement ccount calibration for s6000
  xtensa: fix wrong extern declaration renamed in code using it
  xtensa: register gpio chip before use
  xtensa: always use correct stack pointer for stack traces
  xtensa: Fix checksum header file
  xtensa: Fix architecture specific Kconfig

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus
Linus Torvalds [Wed, 13 May 2009 23:33:25 +0000 (16:33 -0700)]
Merge git://git./linux/kernel/git/pkl/squashfs-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus:
  Squashfs: cody tidying, remove commented out line in Makefile
  Squashfs: check page size is not larger than the filesystem block size
  Squashfs: fix breakage when page size > metadata block size

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
Linus Torvalds [Wed, 13 May 2009 23:32:57 +0000 (16:32 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mszeredi/fuse

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
  fuse: destroy bdi on error

14 years agoMerge branch 'kvm-updates/2.6.30' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Wed, 13 May 2009 23:32:30 +0000 (16:32 -0700)]
Merge branch 'kvm-updates/2.6.30' of git://git./virt/kvm/kvm

* 'kvm-updates/2.6.30' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: SVM: Remove port 80 passthrough
  KVM: Make EFER reads safe when EFER does not exist
  KVM: Fix NX support reporting
  KVM: SVM: Fix cross vendor migration issue with unusable bit

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke...
Linus Torvalds [Wed, 13 May 2009 23:32:16 +0000 (16:32 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ryusuke/nilfs2

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
  nilfs2: check size of array structured data exchanged via ioctls
  nilfs2: fix lock order reversal in nilfs_clean_segments ioctl
  nilfs2: fix possible circular locking for get information ioctls
  nilfs2: ensure to clear dirty state when deleting metadata file block
  nilfs2: fix circular locking dependency of writer mutex
  nilfs2: fix possible recovery failure due to block creation without writer

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Wed, 13 May 2009 23:31:12 +0000 (16:31 -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:
  IB/mlx4: Don't overwrite fast registration page list when posting work request
  RDMA/cxgb3: Don't complete flushed send work requests twice

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Wed, 13 May 2009 23:30:43 +0000 (16:30 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/drm-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/drm-2.6:
  drm/i915: automatically select FRAMEBUFFER_CONSOLE if !EMBEDDED

14 years agopowerpc/8xx: Update defconfigs
Kumar Gala [Wed, 13 May 2009 22:29:08 +0000 (17:29 -0500)]
powerpc/8xx: Update defconfigs

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/embedded6xx: Update defconfigs
Kumar Gala [Wed, 13 May 2009 22:28:42 +0000 (17:28 -0500)]
powerpc/embedded6xx: Update defconfigs

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/86xx: Update defconfigs
Kumar Gala [Wed, 13 May 2009 22:26:51 +0000 (17:26 -0500)]
powerpc/86xx: Update defconfigs

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/85xx: Update defconfigs
Kumar Gala [Wed, 13 May 2009 22:24:50 +0000 (17:24 -0500)]
powerpc/85xx: Update defconfigs

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/83xx: Update defconfigs
Kumar Gala [Wed, 13 May 2009 22:24:24 +0000 (17:24 -0500)]
powerpc/83xx: Update defconfigs

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agoMerge branches 'cxgb3' and 'mlx4' into for-linus
Roland Dreier [Wed, 13 May 2009 22:16:17 +0000 (15:16 -0700)]
Merge branches 'cxgb3' and 'mlx4' into for-linus

14 years agoRevert "Ignore madvise(MADV_WILLNEED) for hugetlbfs-backed regions"
Linus Torvalds [Wed, 13 May 2009 15:29:12 +0000 (08:29 -0700)]
Revert "Ignore madvise(MADV_WILLNEED) for hugetlbfs-backed regions"

This reverts commit a425a638c858fd10370b573bde81df3ba500e271.

Now that the previous commit removed the "readpage" actor for hugetlb
files, read-ahead will no longer mess up the mapping, and there's no
longer any reason to treat hugetlbfs mappings specially.

Tested-and-acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoRemove implementation of readpage from the hugetlbfs_aops
Mel Gorman [Wed, 13 May 2009 14:56:10 +0000 (15:56 +0100)]
Remove implementation of readpage from the hugetlbfs_aops

The core VM assumes the page size used by the address_space in
inode->i_mapping is PAGE_SIZE but hugetlbfs breaks this assumption by
inserting pages into the page cache at offsets the core VM considers
unexpected.

This would not be a problem except that hugetlbfs also provide a
->readpage implementation.  As it exists, the core VM can assume the
base page size is being used, allocate pages on behalf of the
filesystem, insert them into the page cache and call ->readpage to
populate them.  These pages are the wrong size and at the wrong offset
for hugetlbfs causing confusion.

This patch deletes the ->readpage implementation for hugetlbfs on the
grounds the core VM should not be allocating and populating pages on
behalf of hugetlbfs.  There should be no existing users of the
->readpage implementation so it should not cause a regression.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoSquashfs: cody tidying, remove commented out line in Makefile
Phillip Lougher [Wed, 13 May 2009 02:25:20 +0000 (03:25 +0100)]
Squashfs: cody tidying, remove commented out line in Makefile

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
14 years agoSquashfs: check page size is not larger than the filesystem block size
Phillip Lougher [Wed, 13 May 2009 01:59:26 +0000 (02:59 +0100)]
Squashfs: check page size is not larger than the filesystem block size

Normally the block size (by default 128K) will be larger than the
page size, unless a non-standard block size has been specified in
Mksquashfs, and the page size is larger than 4K.

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
14 years agoSquashfs: fix breakage when page size > metadata block size
Doug Chapman [Wed, 13 May 2009 01:56:39 +0000 (02:56 +0100)]
Squashfs: fix breakage when page size > metadata block size

Squashfs is broken on any system where the page size is larger than
the metadata size (8192).  This is easily fixed by ensuring cache->pages
is always > 0.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Doug Chapman <doug.chapman@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Wed, 13 May 2009 00:12:54 +0000 (17:12 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: add NOGET quirk for devices from CH Products
  HID: fix dropped device-specific quirks

14 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
Linus Torvalds [Wed, 13 May 2009 00:12:36 +0000 (17:12 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/djbw/async_tx

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx:
  dma: fix ipu_idmac.c to not discard the last queued buffer
  ioatdma: fix "ioatdma frees DMA memory with wrong function"
  ipu_idmac: Use disable_irq_nosync() from within irq handlers.
  dmatest: fix max channels handling

14 years agoMerge branch 'for-2.6.30' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Wed, 13 May 2009 00:11:56 +0000 (17:11 -0700)]
Merge branch 'for-2.6.30' of git://linux-nfs.org/~bfields/linux

* 'for-2.6.30' of git://linux-nfs.org/~bfields/linux:
  nfsd: silence lockdep warning
  lockd: fix list corruption on lockd restart
  nfsd4: check for negative dentry before use in nfsv4 readdir
  nfsd41: slots are freed with session
  svcrdma: clean up error paths.
  svcrdma: Fix dma map direction for rdma read targets

14 years agodma: fix ipu_idmac.c to not discard the last queued buffer
Guennadi Liakhovetski [Tue, 12 May 2009 07:16:29 +0000 (09:16 +0200)]
dma: fix ipu_idmac.c to not discard the last queued buffer

This also fixes the case of a single queued buffer, for example, when taking a
single frame snapshot with the mx3_camera driver.

Reported-by: Agustin Ferrin Pozuelo <gatoguan-os@yahoo.com>
Tested-by: Agustin Ferrin Pozuelo <gatoguan-os@yahoo.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
14 years agoioatdma: fix "ioatdma frees DMA memory with wrong function"
Maciej Sosnowski [Thu, 23 Apr 2009 10:31:51 +0000 (12:31 +0200)]
ioatdma: fix "ioatdma frees DMA memory with wrong function"

as reported by Alexander Beregalov <a.beregalov@gmail.com>

ioatdma 0000:00:08.0: DMA-API: device driver frees DMA memory with
wrong function [device address=0x000000007f76f800] [size=2000 bytes]
[map
ped as single] [unmapped as page]

The ioatdma driver was unmapping all regions
(either allocated as page or single) using unmap_page.
This patch lets dma driver recognize if unmap_single or unmap_page should be used.
It introduces two new dma control flags:
DMA_COMPL_SRC_UNMAP_SINGLE and DMA_COMPL_DEST_UNMAP_SINGLE.
They should be set to indicate dma driver to do dma-unmapping as single
(first one for the source, tha latter for the destination).
If respective flag is not set, the driver assumes dma-unmapping as page.

Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Reported-by: Alexander Beregalov <a.beregalov@gmail.com>
Tested-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
14 years agoepoll: fix size check in epoll_create()
Davide Libenzi [Tue, 12 May 2009 20:19:44 +0000 (13:19 -0700)]
epoll: fix size check in epoll_create()

Fix a size check WRT the manual pages.  This was inadvertently broken by
commit 9fe5ad9c8cef9ad5873d8ee55d1cf00d9b607df0 ("flag parameters
add-on: remove epoll_create size param").

Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Cc: <Hiroyuki.Mach@gmail.com>
Cc: rohit verma <rohit.170309@gmail.com>
Cc: Ulrich Drepper <drepper@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoviafb: make it work on x86_64
Harald Welte [Tue, 12 May 2009 20:19:42 +0000 (13:19 -0700)]
viafb: make it work on x86_64

Fix a bug in viafb on x86_64 builds (e.g. for VIA Nano CPU).

You cannot make the assumption that sizeof(unsigned int) ==
sizeof(unsigned long), so the parsing of the default mode (640x480) fails,
leading to a division by zero during insmod of the driver.

Signed-off-by: Harald Welte <HaraldWelte@viatech.com>
Cc: <JosephChan@via.com.tw>
Cc: <ScottFang@viatech.com.cn>
Cc: Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agofbdev: remove outdated advice about I2C configuration
Jean Delvare [Tue, 12 May 2009 20:19:41 +0000 (13:19 -0700)]
fbdev: remove outdated advice about I2C configuration

The required I2C modules are now selected automatically by the means
of select statements in Kconfig, so there is no point in confusing the
users with options he/she would be supposed to enable manually.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoalpha: unbreak percpu again
Tejun Heo [Tue, 12 May 2009 20:19:39 +0000 (13:19 -0700)]
alpha: unbreak percpu again

Commit 9b8de7479d0dbab1ed98b5b015d44232c9d3d08e ("FRV: Fix the section
attribute on UP DECLARE_PER_CPU()") cleaned up DECLARE/DEFINE_PER_CPU()
macros and in the process made alpha percpu.h include
include/asm-generic/percpu.h which breaks compilation due to duplicate
definitions.

Remove inclusion of generic asm helper file and define whatever necessary
in alpha header proper.

In the longer term, percpu definitions will be unified and all these
little subtlties will be removed.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: David Howells <dhowells@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc: rtc-twl4030 don't mask alarm interrupts on suspend
Kim Kyuwon [Tue, 12 May 2009 20:19:38 +0000 (13:19 -0700)]
rtc: rtc-twl4030 don't mask alarm interrupts on suspend

This patch enables the alarm interrupt of TWL4030 RTC to wake up the
system from suspend. You can test this patch with following command.

# echo +10 > /sys/class/rtc/rtc0/wakealarm; echo mem > /sys/power/state;

Signed-off-by: Kim Kyuwon <q1.kim@samsung.com>
Acked-by: David Brownell <david-b@pacbell.net>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agosyscalls.h add the missing sys_pipe2 declaration
Arnd Bergmann [Tue, 12 May 2009 20:19:37 +0000 (13:19 -0700)]
syscalls.h add the missing sys_pipe2 declaration

In order to build the generic syscall table, we need a declaration for
every system call.  sys_pipe2 was added without a proper declaration, so
add this to syscalls.h now.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agopxa2xx_spi: prevent panic case setup() fails
Daniel Ribeiro [Tue, 12 May 2009 20:19:36 +0000 (13:19 -0700)]
pxa2xx_spi: prevent panic case setup() fails

setup() may fail before ctldata is set, causing a kernel panic on
cleanup().

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoext4: Use a fake block number for delayed new buffer_head
Aneesh Kumar K.V [Tue, 12 May 2009 18:40:37 +0000 (14:40 -0400)]
ext4: Use a fake block number for delayed new buffer_head

Use a very large unsigned number (~0xffff) as as the fake block number
for the delayed new buffer. The VFS should never try to write out this
number, but if it does, this will make it obvious.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoext4: Fix sub-block zeroing for writes into preallocated extents
Aneesh Kumar K.V [Wed, 13 May 2009 22:36:58 +0000 (18:36 -0400)]
ext4: Fix sub-block zeroing for writes into preallocated extents

We need to mark the buffer_head mapping preallocated space as new
during write_begin. Otherwise we don't zero out the page cache content
properly for a partial write. This will cause file corruption with
preallocation.

Now that we mark the buffer_head new we also need to have a valid
buffer_head blocknr so that unmap_underlying_metadata() unmaps the
correct block.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoMerge branch 'i2c-for-2630-rc5' of git://aeryn.fluff.org.uk/bjdooks/linux
Linus Torvalds [Tue, 12 May 2009 18:21:51 +0000 (11:21 -0700)]
Merge branch 'i2c-for-2630-rc5' of git://aeryn.fluff.org.uk/bjdooks/linux

* 'i2c-for-2630-rc5' of git://aeryn.fluff.org.uk/bjdooks/linux:
  i2c-cpm: Pass dev ptr to dma_*_coherent rather than NULL
  i2c: Enable i2c-s3c2410 for S3C64XX too
  i2c-mpc: bug fix for MPC52xx clock setting and printout
  i2c-pxa.c: timeouts off by 1

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Tue, 12 May 2009 18:21:24 +0000 (11:21 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: tsc2007 - fix locking in hrtimer handler
  Input: atkbd - add force release keys quirk for Amilo Xi 3650
  Input: ff-memless - fix signed to unsigned bit overflow
  Input: joydev - blacklist digitizers

14 years agodrm/i915: automatically select FRAMEBUFFER_CONSOLE if !EMBEDDED
Jesse Barnes [Tue, 12 May 2009 16:08:31 +0000 (09:08 -0700)]
drm/i915: automatically select FRAMEBUFFER_CONSOLE if !EMBEDDED

People keep getting bitten by this, so just auto-select it by default,
assuming most configurations will actually want a console.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agoRemove unreached code in drivers/net/mlx4/en_rx.c
Dan Carpenter [Tue, 12 May 2009 10:33:39 +0000 (11:33 +0100)]
Remove unreached code in drivers/net/mlx4/en_rx.c

Remove the return after the goto.  We want the goto because it frees
memory as well as returning err.

Found by smatch (http://repo.or.cz/w/smatch.git).

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoviocd: needs to depend on BLOCK
Alexander Beregalov [Tue, 12 May 2009 11:28:23 +0000 (13:28 +0200)]
viocd: needs to depend on BLOCK

Fix this build error when CONFIG_BLOCK is not set:
drivers/cdrom/viocd.c: In function 'viocd_blk_open':
drivers/cdrom/viocd.c:156: error: dereferencing pointer to incomplete type
drivers/cdrom/viocd.c: In function 'viocd_blk_release':
drivers/cdrom/viocd.c:162: error: dereferencing pointer to incomplete type
drivers/cdrom/viocd.c: In function 'viocd_blk_ioctl':
drivers/cdrom/viocd.c:170: error: dereferencing pointer to incomplete type
drivers/cdrom/viocd.c: In function 'viocd_blk_media_changed':
drivers/cdrom/viocd.c:176: error: dereferencing pointer to incomplete type
...

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblock: fix the bio_vec array index out-of-bounds test
Kazuhisa Ichikawa [Tue, 12 May 2009 11:27:45 +0000 (13:27 +0200)]
block: fix the bio_vec array index out-of-bounds test

Current bio_vec array index out-of-bounds test within
__end_that_request_first() does not seem correct.
It checks bio->bi_idx against bio->bi_vcnt, but the subsequent code
uses idx (which is, bio->bi_idx + next_idx) as the array index into
bio_vec array. This means that the test really make sense only at
the first iteration of !(nr_bytes >=bio->bi_size) case (when next_idx
== zero). Fix this by replacing bio->bi_idx with idx.
(This patch applies to 2.6.30-rc4.)

Signed-off-by: Kazuhisa Ichikawa <ki@epsilou.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoxtensa: Fix linker script to include .literal sections
Chris Zankel [Tue, 21 Apr 2009 07:34:15 +0000 (00:34 -0700)]
xtensa: Fix linker script to include .literal sections

Fix resembles implementation from Marc Gauthier and Piet Denaly:

In the Xtensa architecture, assembly generates literals which must always
precede the code (the L32R instruction that loads them only uses negative
PC-relative offsets).  For any *.text section, literals are placed in a
corresponding *.literal section.  The linker script (vmlinux.lds) must
place these in the correct order.  It must also combine them, when the
*.text section can be larger than L32R's 256 kB range.

For example, this doesn't work:  *(.literal) *(.text) because L32R
instructions at the end of .text can't reach the literals.

The linker can solve this if they are combined in parentheses, like this:
       *(.literal .text)
because it is now allowed mix literals in .text to bring them in range.

None of this is done by standard vmlinux.lds.h macros such as TEXT_TEXT
and INIT_TEXT.  To avoid replicating the logic of that header file, we
instead post-process the generated linker script to convert *(xxx.text)
to *(xxx.literal xxx.text) for the following text sections:
       .text .ref.text .*init.text .*exit.text .text.*
using a sed script.  To do this we must override the default rule for
vmlinux.lds (see scripts/Makefile.build and the top-level Makefile)
to insert this extra step.

Signed-off-by: Marc Gauthier <marc@tensilica.com>
Signed-off-by: Pete Delaney <piet@tensilica.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
14 years agoxtensa: update s6105_defconfig for ccount calibration
Oskar Schirmer [Mon, 11 May 2009 13:43:37 +0000 (15:43 +0200)]
xtensa: update s6105_defconfig for ccount calibration

The previous patch enabled ccount calibration for the s6000 variant.
This patch updates the defconfig for the s6105 platform to reflect this
change.

Signed-off-by: Oskar Schirmer <os@emlix.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
14 years agoxtensa: implement ccount calibration for s6000
Oskar Schirmer [Mon, 11 May 2009 13:43:36 +0000 (15:43 +0200)]
xtensa: implement ccount calibration for s6000

Calculate core frequency from timers at boot time
instead of assuming a fixed frequency. This is
useful as the true frequency is set up by the
boot loader, thus variable.

Signed-off-by: Oskar Schirmer <os@emlix.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
14 years agoxtensa: fix wrong extern declaration renamed in code using it
Oskar Schirmer [Mon, 11 May 2009 13:43:35 +0000 (15:43 +0200)]
xtensa: fix wrong extern declaration renamed in code using it

The variable ccount_nsec has been renamed to nsec_per_ccount
in arch/xtensa/kernel/time.c in 2b8aea74 (2007-08-05),
but the fix failed to rename the variable in
arch/xtensa/include/asm/timex.h as well.

Signed-off-by: Oskar Schirmer <os@emlix.com>
Signed-off-by: Chris Zankel <chris@zankel.net>