Commit graph

310,704 commits

Message SHA1
OMAPFB: remove compiler warnings when CONFIG_BUG=n
If CONFIG_BUG is not enabled, BUG() does not stop the execution. Many
places in code expect the execution to stop, and this causes compiler
warnings about uninitialized variables and returning from a non-void
function without a return value.

This patch fixes the warnings by initializing the variables and
returning properly after BUG() lines. However, the behaviour is still
undefined after the BUG, but this is the choice the user makes when
using CONFIG_BUG=n.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Tomi Valkeinen   commited 2012-05-22 10:59:15 +03:00
4a75cb857d
OMAPDSS: remove compiler warnings when CONFIG_BUG=n
If CONFIG_BUG is not enabled, BUG() does not stop the execution. Many
places in code expect the execution to stop, and this causes compiler
warnings about uninitialized variables and returning from a non-void
function without a return value.

This patch fixes the warnings by initializing the variables and
returning properly after BUG() lines. However, the behaviour is still
undefined after the BUG, but this is the choice the user makes when
using CONFIG_BUG=n.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Tomi Valkeinen   commited 2012-05-22 10:59:14 +03:00
c6eee968d4
OMAPDSS: DISPC: fix usage of dispc_ovl_set_accu_uv
Commit 05dd0f5308 ("OMAPDSS: DISPC: Update
Accumulator configuration for chroma plane") adds
dispc_ovl_set_accu_uv() function that sets the accu, but the function
only handles YUV and NV12 modes, and BUGs otherwise.

The patch also adds a call to the function, but unfortunately the place
of call was such that the mode could be other than YUV or NV12, thus
crashing the driver.

This patchs moves the call to a slightly later spot, at which point only
YUV and NV12 modes are handled.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Chandrabhanu Mahapatra <cmahapatra@ti.com>

Tomi Valkeinen   commited 2012-05-22 10:59:14 +03:00
36377357db
OMAPDSS: use DSI_FIFO_BUG workaround only for manual update displays
There is a problem related to DSS FIFO thresholds and power management
on OMAP3. It seems that when the full PM hits in, we get underflows. The
core reason is unknown, but after experiments it looks like only
particular FIFO thresholds work correctly.

This bug is related to an earlier patch, which added special FIFO
threshold configuration for OMAP3, because DSI command mode output
didn't work with the normal threshold configuration.

However, as the above work-around worked fine for other output types
also, we currently always configure thresholds in this special way on
OMAP3. In theory there should be negligible difference with this special
way and the standard way. The first paragraph explains what happens in
practice.

This patch changes the driver to use the special threshold configuration
only when the output is a manual update display on OMAP3. This does
include RFBI displays also, and although it hasn't been tested (no
boards using RFBI) I suspect the similar behaviour is present there
also, as the DISPC side should work similarly for DSI command mode and
RFBI.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Joe Woodward <jw@terrafix.co.uk>

Tomi Valkeinen   commited 2012-05-22 10:59:13 +03:00
3568f2a46f
drm/i915: fix module unload since error_state rework
We need to remove the debugfs file. Regression introduce in

commit d54423037f
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Fri Apr 27 15:17:40 2012 +0200

    drm/i915: allow the existing error_state to be destroyed

Reported-and-Tested-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Daniel Vetter   commited 2012-05-22 09:22:36 +02:00
6bd459df96
Merge branch 'for-next-arm-dma' into for-linus
Conflicts:
	arch/arm/Kconfig
	arch/arm/mm/dma-mapping.c

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

Marek Szyprowski   commited 2012-05-22 08:55:43 +02:00
0f51596bd3
powerpc: Fix irq distribution
setting CONFIG_IRQ_ALL_CPUS distributes IRQs to CPUs only when
the number of online CPUs equals NR_CPUS.  See commit
280ff97494 "sparc64: fix and
optimize irq distribution" for more details.

Using the online mask fixes IRQ-to-CPU distribution on systems
that boot with less than NR_CPUS.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Kim Phillips   authored and   Benjamin Herrenschmidt   commited 2012-05-22 14:38:26 +10:00
2074b1d9d5
Revert "powerpc/hw-breakpoint: Use generic hw-breakpoint interfaces for new PPC ptrace flags"
This reverts commit 1b788400bb.

It causes oopses when passed incorrect arguments and has a
design fault using IPIs with interrupts disabled.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

Benjamin Herrenschmidt   commited 2012-05-22 14:37:24 +10:00
6749ef0b8b
powerpc: Fixing a cputhread code documentation
--
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Anshuman Khandual   authored and   Benjamin Herrenschmidt   commited 2012-05-22 14:37:00 +10:00
933b90a988
ktest: Add README to explain what is in the examples directory
Add a README that explains what the different example configs in the
ktest example directory are about.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Steven Rostedt   commited 2012-05-22 00:15:12 -04:00
24d0c03014
ktest: Add the snowball.conf example config
I used the snowball.conf in a live demo that demonstrated how to use
ktest.pl with a snowball ARM board. I've been asked to included that
config in the ktest repository.

Here it is.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Steven Rostedt   commited 2012-05-22 00:13:32 -04:00
b6d300361b
ktest: Add an example config that does cross compiling of several archs
Add the config that I use to test several archs. I downloaded several
cross compilers from:

 http://kernel.org/pub/tools/crosstool/files/bin/x86_64/

and this config is an example to crosscompile several archs to make sure
that your changes do not break archs that you are not working on.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Steven Rostedt   commited 2012-05-22 00:11:00 -04:00
2e10952622
ktest: Add kvm.conf example config
Add an example config that explains how to use ktest with a virtual
guest as the target.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Steven Rostedt   commited 2012-05-22 00:10:12 -04:00
3a7bef7917
ktest: Add useful example configs
I've been asked several times to provide more useful example configs for
ktest.pl, as the sample.conf is too complex (because it explains all
configs). This adds configs broken up by use case, and these configs are
based on actual configs that I use on a daily basis.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Steven Rostedt   commited 2012-05-22 00:08:30 -04:00
6d76f469c8
ktest: Add USE_OUTPUT_MIN_CONFIG to avoid prompt on make_min_config
If the file that OUTPUT_MIN_CONFIG exists then ktest.pl will prompt the
user and ask them if the OUTPUT_MIN_CONFIG should be used as the
starting point for make_min_config instead of MIN_CONFIG.

This is usually the case, and to allow the user to do so, which is
helpful if the user is creating different min configs based on tests,
and they know one is a superset of another test, they can set
USE_OUTPUT_MIN_CONFIG to one, which will prevent kest.pl from prompting
to use the OUTPUT_MIN_CONFIG and it will just use it.

If USE_OUTPUT_MIN_CONIFG is set to zero, then ktest.pl will continue to
use MIN_CONFIG instead.

The default is that USE_OUTPUT_MIN_CONFIG is undefined.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Steven Rostedt   commited 2012-05-22 00:07:34 -04:00
43de3316e9
unicore32: if there's no handler we need to restore sigmask, syscall or no syscall
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-22 00:01:09 -04:00
415d04d08f
xtensa: add handling of TIF_NOTIFY_RESUME
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:59:48 -04:00
a53bb24e76
microblaze: drop 'oldset' argument of do_notify_resume()
never used...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:59:48 -04:00
8314019141
microblaze: handle TIF_NOTIFY_RESUME
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:59:47 -04:00
969a961680
score: add handling of NOTIFY_RESUME to do_notify_resume()
It's already called if TIF_NOTIFY_RESUME is set, so we only
need to add the actual work.  Note that checking for RESTORE_SIGMASK
was not needed - set_restore_sigmask() also sets SIGPENDING, so
we never RESTORE_SIGMASK without SIGPENDING.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:59:47 -04:00
1d5d4dbe81
m68k: add TIF_NOTIFY_RESUME and handle it.
TIF_NOTIFY_RESUME added (as bit 5).  That way nommu glue needs no changes at
all; mmu one needs just to replace jmi do_signal_return to jne do_signal_return
There we have flags shifted up, until bit 6 (SIGPENDING) is in MSBit; instead
of checking that MSBit is set (jmi) we check that MSBit or something below it
is set (jne); bits 0..4 are never set, so that's precisely "bit 6 or bit 5 is
set".

Usual handling of NOTIFY_RESUME/SIGPENDING is done in do_notify_resume(); glue
calls it instead of do_signal().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:59:47 -04:00
a54f1655be
fbdev: sh_mobile_lcdc: Don't confuse line size with pitch
When using the MERAM the LCDC line size needs to be programmed with a
MERAM-specific value different than the real frame buffer pitch. Fix it.

Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: stable@vger.kernel.org  # for 3.4
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Laurent Pinchart   authored and   Linus Torvalds   commited 2012-05-21 20:59:32 -07:00
72c04af9a2
sparc: kill ancient comment in sparc_sigaction()
It used to be true, until 2.1.78 (14 years ago) when we switched to
do_sigaction()...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:59:23 -04:00
899dfaa7e7
h8300: missing checks of __get_user()/__put_user() return values
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:59:23 -04:00
79afd8efdb
frv: missing checks of __get_user()/__put_user() return values
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:59:22 -04:00
f0c22cddb3
cris: missing checks of __get_user()/__put_user() return values
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:59:22 -04:00
24d696a776
powerpc: missing checks of __get_user()/__put_user() return values
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:59:22 -04:00
43f16819d5
sh: missing checks of __get_user()/__put_user() return values
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:59:21 -04:00
a46808e1b7
sparc: missing checks of __get_user()/__put_user() return values
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:59:21 -04:00
187cd44e14
avr32: struct old_sigaction is never used
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:59:20 -04:00
9a07880222
m32r: struct old_sigaction is never used
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:59:20 -04:00
fe2eff8b87
xtensa: xtensa_sigaction doesn't exist
... and struct old_sigaction never used

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:59:20 -04:00
b1175ed223
alpha: tidy signal delivery up
* move force_sigsegv() (from setup...frame()) and clearing RESTART_SIGMASK
(from do_signal()) into hanlde_signal()
* get rid of handle_signal() return value and oldset argument
* checking for TIF_SIGPENDING is enough; set_restart_sigmask() sets this
one as well.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:59:19 -04:00
cbdfb9ff55
score: don't open-code force_sigsegv()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:59:19 -04:00
cf4a0ce45c
cris: don't open-code force_sigsegv()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:59:19 -04:00
6eef019002
blackfin: don't open-code force_sigsegv()
... especially since we don't have the right k_sigaction here,
so resetting sa_handler won't work.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:58:33 -04:00
5d71c55bdb
avr32: need to clear RESTORE_SIGMASK on successful signal delivery
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:58:08 -04:00
fe49c1cebf
microblaze: bury sys_rt_sigsuspend_wrapper in nommu case too
It's been a dead code since commit 571202f50f
Author: Michal Simek <monstr@monstr.eu>
Date:   Fri Dec 11 12:54:04 2009 +0100

    microblaze: Remove rt_sigsuspend wrapper

    Generic rt_sigsuspend syscalls doesn't need any asm wrapper.

but that commit has only removed it from entry.S, missing one in entry-nommu.S.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:58:08 -04:00
ae28b38ca1
cris: SA_ONESHOT handling is done by get_signal_to_deliver()
... and resetting sa_handler in local copy filled by get_signal_to_deliver()
is obviously pointless anyway.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:58:07 -04:00
a4e075c43e
h8300: switch to saved_sigmask-based sigsuspend/rt_sigsuspend
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:58:07 -04:00
7ae4e32a65
h8300: don't change blocked signals' mask if setting frame up fails
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:58:07 -04:00
8b6c3309c9
sh: switch to saved_sigmask-based sigsuspend()/rt_sigsuspend()
Complete the move of sh64 to it, trim the crap from prototypes,
tidy up a bit.  Infrastructure in do_signal() had already been
there, in signal_64 as well as in signal_32 (where it was already
used).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:58:06 -04:00
9ef461adf9
xtensa: switch to generic rt_sigsuspend(2)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-05-21 23:58:06 -04:00
9ccc9c75c9
md/bitmap: record the space available for the bitmap in the superblock.
Now that bitmaps can grow and shrink it is best if we record
how much space is available.  This means that when
we reduce the size of the bitmap we won't "lose" the space
for late when we might want to increase the size of the bitmap
again.

Signed-off-by: NeilBrown <neilb@suse.de>

NeilBrown   commited 2012-05-22 13:55:34 +10:00
1dff2b87a3
md/raid10: Remove extras after reshape to smaller number of devices.
When a reshape which reduced the number of devices finishes
we must remove the extra devices.

So ensure  that raid10_remove_disk won't try to keep them, and
have raid10_finish_reshape clear the 'in_sync' flag.  Then
remove_and_add_spares will be able to remove them.

Reported-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: NeilBrown <neilb@suse.de>

NeilBrown   commited 2012-05-22 13:55:33 +10:00
63aced6102
md/raid5: improve removal of extra devices after reshape.
After a reshape which reduced the number of devices we need
to disconnect the extra devices.
The code for this doesn't currently handle 'replacement' devices.
It is very unlikely that such devices will be present, but it is
safest to handle them anyway.

So simplify the handling.  Just clear In_sync and leave it
to remove_and_add_spaces (which will be called soon) to do
the real works.

Signed-off-by: NeilBrown <neilb@suse.de>

NeilBrown   commited 2012-05-22 13:55:33 +10:00
da7613b8b0
md: check the return of mddev_find()
Check the return of mddev_find(), since it may fail due to out of
memeory or out of usable minor number.

The reason I chose -ENODEV instead of -ENOMEM or something else is
md_alloc() function chose that ;)

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>

Yuanhan Liu   authored and   NeilBrown   commited 2012-05-22 13:55:32 +10:00
0c098220e2
MD RAID1: Further conditionalize 'fullsync'
A RAID1 device does not necessarily need a fullsync if the bitmap can be used instead.

Similar to commit d6b212f4b1 in raid5.c, if a raid1
device can be brought back (i.e. from a transient failure) it shouldn't need a
complete resync.  Provided the bitmap is not to old, it will have recorded the areas
of the disk that need recovery.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>

Jonathan Brassow   authored and   NeilBrown   commited 2012-05-22 13:55:31 +10:00
4f0a5e012c
DM RAID: Use md_error() in place of simply setting Faulty bit
When encountering an error while reading the superblock, call md_error.

We are currently setting the 'Faulty' bit on one of the array devices when an
error is encountered while reading the superblock of a dm-raid array.  We should
be calling md_error(), as it handles the error more completely.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>

Jonathan Brassow   authored and   NeilBrown   commited 2012-05-22 13:55:31 +10:00
c32fb9e7ec
DM RAID: Record and handle missing devices
Missing dm-raid devices should be recorded in the superblock

When specifying the devices that compose a DM RAID array, it is possible to denote
failed or missing devices with '-'s.  When this occurs, we must record this in the
superblock.  We do this by checking if the array position's data device is missing
and then forcing MD to record the superblock by setting 'MD_CHANGE_DEVS' in
'raid_resume'.  If we do not cause the superblock to be rewritten by the resume
function, it is possible for a stale superblock to be written by an out-going
in-active table (during 'raid_dtr').

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>

Jonathan Brassow   authored and   NeilBrown   commited 2012-05-22 13:55:30 +10:00
81f382f9e0