]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
15 years agosched: prevent divide by zero error in cpu_avg_load_per_task
Steven Rostedt [Thu, 27 Nov 2008 02:04:24 +0000 (21:04 -0500)]
sched: prevent divide by zero error in cpu_avg_load_per_task

Impact: fix divide by zero crash in scheduler rebalance irq

While testing the branch profiler, I hit this crash:

divide error: 0000 [#1] PREEMPT SMP
[...]
RIP: 0010:[<ffffffff8024a008>]  [<ffffffff8024a008>] cpu_avg_load_per_task+0x50/0x7f
[...]
Call Trace:
 <IRQ> <0> [<ffffffff8024fd43>] find_busiest_group+0x3e5/0xcaa
 [<ffffffff8025da75>] rebalance_domains+0x2da/0xa21
 [<ffffffff80478769>] ? find_next_bit+0x1b2/0x1e6
 [<ffffffff8025e2ce>] run_rebalance_domains+0x112/0x19f
 [<ffffffff8026d7c2>] __do_softirq+0xa8/0x232
 [<ffffffff8020ea7c>] call_softirq+0x1c/0x3e
 [<ffffffff8021047a>] do_softirq+0x94/0x1cd
 [<ffffffff8026d5eb>] irq_exit+0x6b/0x10e
 [<ffffffff8022e6ec>] smp_apic_timer_interrupt+0xd3/0xff
 [<ffffffff8020e4b3>] apic_timer_interrupt+0x13/0x20

The code for cpu_avg_load_per_task has:

if (rq->nr_running)
rq->avg_load_per_task = rq->load.weight / rq->nr_running;

The runqueue lock is not held here, and there is nothing that prevents
the rq->nr_running from going to zero after it passes the if condition.

The branch profiler simply made the race window bigger.

This patch saves off the rq->nr_running to a local variable and uses that
for both the condition and the division.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoftrace: prevent recursion
Lai Jiangshan [Thu, 27 Nov 2008 02:21:46 +0000 (10:21 +0800)]
ftrace: prevent recursion

Impact: prevent unnecessary stack recursion

if the resched flag was set before we entered, then don't reschedule.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoACPICA: disable _BIF warning
Lin Ming [Thu, 27 Nov 2008 06:42:30 +0000 (14:42 +0800)]
ACPICA: disable _BIF warning

A generic work-around from ACPICA is in the queue,
but since Linux has a work-around in its battery
driver, we can disable this warning now.

Allow _BIF method to return an Package with Buffer elements

http://bugzilla.kernel.org/show_bug.cgi?id=11822

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPI: delete OSI(Linux) DMI dmesg spam
Len Brown [Sat, 8 Nov 2008 06:21:10 +0000 (01:21 -0500)]
ACPI: delete OSI(Linux) DMI dmesg spam

Linux will continue to ignore OSI(Linux),
except for a white-list containing a few systems.

So delete the black-list,
and stop soliciting user-feedback on the console.

Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Allow _WAK method to return an Integer
Bob Moore [Thu, 13 Nov 2008 03:01:34 +0000 (11:01 +0800)]
ACPICA: Allow _WAK method to return an Integer

This can happen if the _WAK method returns nothing (as per ACPI
1.0) but does return an integer if the implicit return mechanism
is enabled.  This is the only method that has this problem,
since it is also defined to return a package of two integers
(ACPI 1.0b+). In all other cases, if a method returns an object
when one was not expected, no warning is issued.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPI: thinkpad-acpi: fix fan sleep/resume path
Henrique de Moraes Holschuh [Sun, 9 Nov 2008 12:54:02 +0000 (10:54 -0200)]
ACPI: thinkpad-acpi: fix fan sleep/resume path

This fixes a regression from v2.6.27, caused by commit
5814f737e1cd2cfa2893badd62189acae3e1e1fd, "ACPI: thinkpad-acpi:
attempt to preserve fan state on resume".

It is possible for fan_suspend() to fail to properly initialize
fan_control_desired_level as required by fan_resume(), resulting on
the fan always being set to level 7 on resume if the user didn't
touch the fan controller.

In order to get fan sleep/resume handling to work right:

1. Fix the fan_suspend handling of the T43 firmware quirk. If it is
still undefined, we didn't touch the fan yet and that means we have no
business doing it on resume.

2. Store the fan level on its own variable to avoid any possible
issues with hijacking fan_control_desired_level (which isn't supposed
to have anything other than 0-7 in it, anyway).

3. Change the fan_resume code to me more straightforward to understand
(although we DO optimize the boolean logic there, otherwise it looks
disgusting).

4. Add comments to help understand what the code is supposed to be
doing.

5. Change fan_set_level to be less strict about how auto and
full-speed modes are requested.

http://bugzilla.kernel.org/show_bug.cgi?id=11982

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Reported-by: Tino Keitel <tino.keitel@tikei.de>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agosony-laptop: printk tweak
Alessandro Guido [Wed, 12 Nov 2008 22:13:35 +0000 (23:13 +0100)]
sony-laptop: printk tweak

There's no need to print "Sony: " just after "sony-laptop: " (DRV_PFX).

Signed-off-by: Alessandro Guido <ag@alessandroguido.name>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agosony-laptop: brightness regression fix
Alessandro Guido [Wed, 12 Nov 2008 22:03:28 +0000 (23:03 +0100)]
sony-laptop: brightness regression fix

After commit 540b8bb9c33935183ceb5bed466a42ad72b2af56:

  sony-laptop: fingers off backlight if video.ko is serving this functionality

I can't set brightness on my sony laptop (nothing in /sys/class/backlight).
dmesg says "sony-laptop: Sony: Brightness ignored, must be controlled by ACPI
video driver".

The function acpi_video_backlight_support returns 0 if we should use the
vendor-specific backlight support, while non-0 if the ACPI generic should
be used. Because of this, the check introduced by the said commit appears
reversed.

Signed-off-by: Alessandro Guido <ag@alessandroguido.name>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoRevert "ACPI: don't enable control method power button as wakeup device when Fixed...
Len Brown [Wed, 26 Nov 2008 22:55:15 +0000 (17:55 -0500)]
Revert "ACPI: don't enable control method power button as wakeup device when Fixed Power button is used"

This reverts commit faee816b1502385dc9bc5abf2960d1cc645844d1.

http://bugzilla.kernel.org/show_bug.cgi?id=12091

Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPI suspend: Blacklist boxes that require us to set SCI_EN directly on resume
Rafael J. Wysocki [Wed, 26 Nov 2008 22:53:13 +0000 (17:53 -0500)]
ACPI suspend: Blacklist boxes that require us to set SCI_EN directly on resume

Some Apple boxes evidently require us to set SCI_EN on resume
directly, because if we don't do that, they hung somewhere in the
resume code path.  Moreover, on these boxes it is not sufficient to
use acpi_enable() to turn ACPI on during resume.  All of this is
against the ACPI specification which states that (1) the BIOS is
supposed to return from the S3 sleep state with ACPI enabled
(SCI_EN set) and (2) the SCI_EN bit is owned by the hardware and we
are not supposed to change it.

For this reason, blacklist the affected systems so that the SCI_EN
bit is set during resume on them.

[NOTE: Unconditional setting SCI_EN for all system on resume doesn't
 work, because it makes some other systems crash (that's to be
 expected).  Also, it is not entirely clear right now if all of the
 Apple boxes require this workaround.]

This patch fixes the recent regression tracked as
http://bugzilla.kernel.org/show_bug.cgi?id=12038

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Tino Keitel <tino.keitel@gmx.de>
Tested-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPI: scheduling in atomic via acpi_evaluate_integer ()
Pavel Machek [Tue, 25 Nov 2008 11:05:08 +0000 (12:05 +0100)]
ACPI: scheduling in atomic via acpi_evaluate_integer ()

Now I know why I had strange "scheduling in atomic" problems:
acpi_evaluate_integer() does malloc(..., irqs_disabled() ? GFP_ATOMIC
: GFP_KERNEL)... which is (of course) broken.

There's no way to reliably tell if we need GFP_ATOMIC or not from
code, this one for example fails to detect spinlocks held.

Fortunately, allocation seems small enough to be done on stack.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Acked-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoARM: OMAP: Fixes for suspend / resume GPIO wake-up handling
Tero Kristo [Wed, 26 Nov 2008 22:35:16 +0000 (14:35 -0800)]
ARM: OMAP: Fixes for suspend / resume GPIO wake-up handling

Use the correct wake-up enable register, and make it
work with 34xx also.

Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoACPI: battery: Convert discharge energy rate to current properly
Alexey Starikovskiy [Fri, 21 Nov 2008 14:41:01 +0000 (22:41 +0800)]
ACPI: battery: Convert discharge energy rate to current properly

ACPI battery interface reports its state either in mW or in mA, and
discharge rate in your case is reported in mW. power_supply interface
does not have such a parameter, so current_now parameter is used
for all cases. But in case of mW, reported discharge should
be converted into mA.

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Tested-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoparisc: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Fri, 7 Nov 2008 00:42:46 +0000 (01:42 +0100)]
parisc: struct device - replace bus_id with dev_name(), dev_set_name()

(I did not compile or test it, please let me know, or help fixing
 it, if something is wrong with the conversion)

This patch is part of a larger patch series which will remove
the "char bus_id[20]" name string from struct device. The device
name is managed in the kobject anyway, and without any size
limitation, and just needlessly copied into "struct device".

To set and read the device name dev_name(dev) and dev_set_name(dev)
must be used. If your code uses static kobjects, which it shouldn't
do, "const char *init_name" can be used to statically provide the
name the registered device should have. At registration time, the
init_name field is cleared, to enforce the use of dev_name(dev) to
access the device name at a later time.

We need to get rid of all occurrences of bus_id in the entire tree
to be able to enable the new interface. Please apply this patch,
and possibly convert any remaining remaining occurrences of bus_id.

We want to submit a patch to -next, which will remove bus_id from
"struct device", to find the remaining pieces to convert, and finally
switch over to the new api, which will remove the 20 bytes array
and does no longer have a size limitation.

Thanks,
Kay

Cc: Matthew Wilcox <matthew@wil.cx>
Cc: linux-parisc@vger.kernel.org
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
15 years agoparisc: fix kernel crash when unwinding a userspace process
Helge Deller [Wed, 26 Nov 2008 20:46:22 +0000 (12:46 -0800)]
parisc: fix kernel crash when unwinding a userspace process

Any user on existing parisc 32- and 64bit-kernels can easily crash
the kernel and as such enforce a DSO.
A simple testcase is available here:
        http://gsyprf10.external.hp.com/~deller/crash.tgz

The problem is introduced by the fact, that the handle_interruption()
crash handler calls the show_regs() function, which in turn tries to
unwind the stack by calling parisc_show_stack().  Since the stack contains
userspace addresses, a try to unwind the stack is dangerous and useless
and leads to the crash.

The fix is trivial: For userspace processes
a) avoid to unwind the stack, and
b) avoid to resolve userspace addresses to kernel symbol names.

While touching this code, I converted print_symbol() to %pS
printk formats and made parisc_show_stack() static.

An initial patch for this was written by Kyle McMartin back in August:
http://marc.info/?l=linux-parisc&m=121805168830283&w=2

Compile and run-tested with a 64bit parisc kernel.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: Grant Grundler <grundler@parisc-linux.org>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x, 2.6.27.x, earlier...]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
15 years agoparisc: __kernel_time_t is always long
Geert Uytterhoeven [Sun, 16 Nov 2008 11:04:13 +0000 (12:04 +0100)]
parisc: __kernel_time_t is always long

__kernel_time_t is always long on PA-RISC, irrespective of CONFIG_64BIT,
hence move it out of the #ifdef CONFIG_64BIT / #else / #endif block.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
15 years agoACPI: EC: count interrupts only if called from interrupt handler.
Alexey Starikovskiy [Thu, 13 Nov 2008 09:00:03 +0000 (12:00 +0300)]
ACPI: EC: count interrupts only if called from interrupt handler.

fix 2.6.28 EC interrupt storm regression

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years ago[CIFS] fix regression in cifs_write_begin/cifs_write_end
Jeff Layton [Wed, 26 Nov 2008 19:32:33 +0000 (19:32 +0000)]
[CIFS] fix regression in cifs_write_begin/cifs_write_end

The conversion to write_begin/write_end interfaces had a bug where we
were passing a bad parameter to cifs_readpage_worker. Rather than
passing the page offset of the start of the write, we needed to pass the
offset of the beginning of the page. This was reliably showing up as
data corruption in the fsx-linux test from LTP.

It also became evident that this code was occasionally doing unnecessary
read calls. Optimize those away by using the PG_checked flag to indicate
that the unwritten part of the page has been initialized.

CC: Nick Piggin <npiggin@suse.de>
Acked-by: Dave Kleikamp <shaggy@us.ibm.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agoInput: wacom - add support for new USB Tablet PCs
Ping Cheng [Mon, 24 Nov 2008 16:44:27 +0000 (11:44 -0500)]
Input: wacom - add support for new USB Tablet PCs

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
15 years agodrm/i915: Save/restore HWS_PGA on suspend/resume
Peng Li [Tue, 18 Nov 2008 04:39:02 +0000 (12:39 +0800)]
drm/i915: Save/restore HWS_PGA on suspend/resume

It fixes suspend/resume failure of xf86-video-intel dri2
branch. As dri2 branch doesn't call I830DRIResume() to restore
hardware status page anymore, we need to preserve
this register across suspend/resume.

Signed-off-by: Peng Li <peng.li@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years ago[ARM] pxa/corgi: update default config to exclude tosa from being built
Eric Miao [Wed, 26 Nov 2008 04:51:42 +0000 (12:51 +0800)]
[ARM] pxa/corgi: update default config to exclude tosa from being built

Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa/pcm990: use negative number for an invalid GPIO in camera data
Guennadi Liakhovetski [Tue, 25 Nov 2008 17:57:08 +0000 (18:57 +0100)]
[ARM] pxa/pcm990: use negative number for an invalid GPIO in camera data

0 is a valid GPIO number, use a negative number to specify, that this camera
doesn't have a GPIO for bus-width switching.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years agox86: fixup config space size of CPU functions for AMD family 11h
Andreas Herrmann [Tue, 25 Nov 2008 16:18:03 +0000 (17:18 +0100)]
x86: fixup config space size of CPU functions for AMD family 11h

Impact: extend allowed configuration space access on 11h CPUs from 256 to 4K

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoARM: OMAP: Typo fix for clock_allow_idle
Amit Kucheria [Tue, 25 Nov 2008 23:11:12 +0000 (15:11 -0800)]
ARM: OMAP: Typo fix for clock_allow_idle

The second clk_deny_idle instance should be clk_allow_idle instead.

Signed-off-by: Amit Kucheria <amit.kucheria@verdurent.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agofirewire: fw-sbp2: another iPod mini quirk entry
Stefan Richter [Sat, 22 Nov 2008 11:38:58 +0000 (12:38 +0100)]
firewire: fw-sbp2: another iPod mini quirk entry

Add another model ID of a broken firmware to prevent early I/O errors
by acesses at the end of the disk.  Reported at linux1394-user,
http://marc.info/?t=122670842900002

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
15 years agoieee1394: sbp2: another iPod mini quirk entry
Stefan Richter [Sat, 22 Nov 2008 11:38:24 +0000 (12:38 +0100)]
ieee1394: sbp2: another iPod mini quirk entry

Add another model ID of a broken firmware to prevent early I/O errors
by acesses at the end of the disk.  Reported at linux1394-user,
http://marc.info/?t=122670842900002

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
15 years ago[CPUFREQ] powernow-k8: ignore out-of-range PstateStatus value
Andreas Herrmann [Fri, 21 Nov 2008 13:49:25 +0000 (14:49 +0100)]
[CPUFREQ] powernow-k8: ignore out-of-range PstateStatus value

A workaround for AMD CPU family 11h erratum 311 might cause that the
P-state Status Register shows a "current P-state" which is larger than
the "current P-state limit" in P-state Current Limit Register. For the
wrong P-state value there is no ACPI _PSS object defined and
powernow-k8/cpufreq can't determine the proper CPU frequency for that
state.

As a consequence this can cause a panic during boot (potentially with
all recent kernel versions -- at least I have reproduced it with
various 2.6.27 kernels and with the current .28 series), as an
example:

powernow-k8: Found 1 AMD Turion(tm)X2 Ultra DualCore Mobile ZM-82 processors (2 \
)
powernow-k8:    0 : pstate 0 (2200 MHz)
powernow-k8:    1 : pstate 1 (1100 MHz)
powernow-k8:    2 : pstate 2 (600 MHz)
BUG: unable to handle kernel paging request at ffff88086e7528b8
IP: [<ffffffff80486361>] cpufreq_stats_update+0x4a/0x5f
PGD 202063 PUD 0
Oops: 0002 [#1] SMP
last sysfs file:
CPU 1
Modules linked in:
Pid: 1, comm: swapper Not tainted 2.6.28-rc3-dirty #16
RIP: 0010:[<ffffffff80486361>]  [<ffffffff80486361>] cpufreq_stats_update+0x4a/0\
f
Synaptics claims to have extended capabilities, but I'm not able to read them.<6\
6
RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffff88006e7528c0
RDX: 00000000ffffffff RSI: ffff88006e54af00 RDI: ffffffff808f056c
RBP: 00000000fffee697 R08: 0000000000000003 R09: ffff88006e73f080
R10: 0000000000000001 R11: 00000000002191c0 R12: ffff88006fb83c10
R13: 00000000ffffffff R14: 0000000000000001 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff88006fb50740(0000) knlGS:0000000000000000
Unable to initialize Synaptics hardware.
CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: ffff88086e7528b8 CR3: 0000000000201000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process swapper (pid: 1, threadinfo ffff88006fb82000, task ffff88006fb816d0)
Stack:
 ffff88006e74da50 0000000000000000 ffff88006e54af00 ffffffff804863c7
 ffff88006e74da50 0000000000000000 00000000ffffffff 0000000000000000
 ffff88006fb83c10 ffffffff8024b46c ffffffff808f0560 ffff88006fb83c10
Call Trace:
 [<ffffffff804863c7>] ? cpufreq_stat_notifier_trans+0x51/0x83
 [<ffffffff8024b46c>] ? notifier_call_chain+0x29/0x4c
 [<ffffffff8024b561>] ? __srcu_notifier_call_chain+0x46/0x61
 [<ffffffff8048496d>] ? cpufreq_notify_transition+0x93/0xa9
 [<ffffffff8021ab8d>] ? powernowk8_target+0x1e8/0x5f3
 [<ffffffff80486687>] ? cpufreq_governor_performance+0x1b/0x20
 [<ffffffff80484886>] ? __cpufreq_governor+0x71/0xa8
 [<ffffffff80484b21>] ? __cpufreq_set_policy+0x101/0x13e
 [<ffffffff80485bcd>] ? cpufreq_add_dev+0x3f0/0x4cd
 [<ffffffff8048577a>] ? handle_update+0x0/0x8
 [<ffffffff803c2062>] ? sysdev_driver_register+0xb6/0x10d
 [<ffffffff8056592c>] ? powernowk8_init+0x0/0x7e
 [<ffffffff8048604c>] ? cpufreq_register_driver+0x8f/0x140
 [<ffffffff80209056>] ? _stext+0x56/0x14f
 [<ffffffff802c2234>] ? proc_register+0x122/0x17d
 [<ffffffff802c23a0>] ? create_proc_entry+0x73/0x8a
 [<ffffffff8025c259>] ? register_irq_proc+0x92/0xaa
 [<ffffffff8025c2c8>] ? init_irq_proc+0x57/0x69
 [<ffffffff807fc85f>] ? kernel_init+0x116/0x169
 [<ffffffff8020cc79>] ? child_rip+0xa/0x11
 [<ffffffff807fc749>] ? kernel_init+0x0/0x169
 [<ffffffff8020cc6f>] ? child_rip+0x0/0x11
Code: 05 c5 83 36 00 48 c7 c2 48 5d 86 80 48 8b 04 d8 48 8b 40 08 48 8b 34 02 48\

RIP  [<ffffffff80486361>] cpufreq_stats_update+0x4a/0x5f
 RSP <ffff88006fb83b20>
CR2: ffff88086e7528b8
---[ end trace 0678bac75e67a2f7 ]---
Kernel panic - not syncing: Attempted to kill init!

In short, aftereffect of the wrong P-state is that
cpufreq_stats_update() uses "-1" as index for some array in

cpufreq_stats_update (unsigned int cpu)
{
...
     if (stat->time_in_state)
                stat->time_in_state[stat->last_index] =
                        cputime64_add(stat->time_in_state[stat->last_index],
                                      cputime_sub(cur_time, stat->last_time));
...
}

Fortunately, the wrong P-state value is returned only if the core is
in P-state 0. This fix solves the problem by detecting the
out-of-range P-state, ignoring it, and using "0" instead.

Cc: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Dave Jones <davej@redhat.com>
15 years ago[CPUFREQ] Documentation: Add Blackfin to list of supported processors
Robin Getz [Thu, 16 Oct 2008 17:36:43 +0000 (01:36 +0800)]
[CPUFREQ] Documentation: Add Blackfin to list of supported processors

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Dave Jones <davej@redhat.com>
15 years agox86, bts: fix wrmsr and spinlock over kmalloc
Markus Metzger [Tue, 25 Nov 2008 07:52:56 +0000 (08:52 +0100)]
x86, bts: fix wrmsr and spinlock over kmalloc

Impact: fix sleeping-with-spinlock-held bugs/crashes

- Turn a wrmsr to write the DS_AREA MSR into a wrmsrl.
- Use irqsave variants of spinlocks.
- Do not allocate memory while holding spinlocks.

Reported-by: Stephane Eranian <eranian@googlemail.com>
Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, pebs: fix PEBS record size configuration
Markus Metzger [Tue, 25 Nov 2008 07:49:06 +0000 (08:49 +0100)]
x86, pebs: fix PEBS record size configuration

Impact: fix DS hw enablement on 64-bit x86

Fix the PEBS record size in the DS configuration.

Reported-by: Stephane Eranian <eranian@googlemail.com>
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, bts: turn macro into static inline function
Markus Metzger [Tue, 25 Nov 2008 07:47:19 +0000 (08:47 +0100)]
x86, bts: turn macro into static inline function

Impact: cleanup

Replace a macro with a static inline function.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, bts: exclude ds.c from build when disabled
Markus Metzger [Tue, 25 Nov 2008 07:45:13 +0000 (08:45 +0100)]
x86, bts: exclude ds.c from build when disabled

Impact: cleanup

Move the CONFIG guard from the .c file into the makefile.

Reported-by: Andi Kleen <andi-suse@firstfloor.org>
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'topic/fix/hda' into for-linus
Takashi Iwai [Tue, 25 Nov 2008 16:21:32 +0000 (17:21 +0100)]
Merge branch 'topic/fix/hda' into for-linus

15 years agoarch/x86/kernel/pci-calgary_64.c: change simple_strtol to simple_strtoul
Julia Lawall [Tue, 25 Nov 2008 13:13:03 +0000 (14:13 +0100)]
arch/x86/kernel/pci-calgary_64.c: change simple_strtol to simple_strtoul

Impact: fix theoretical option string parsing overflow

Since bridge is unsigned, it would seem better to use simple_strtoul that
simple_strtol.

A simplified version of the semantic patch that makes this change is as
follows: (http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r2@
long e;
position p;
@@

e = simple_strtol@p(...)

@@
position p != r2.p;
type T;
T e;
@@

e =
- simple_strtol@p
+ simple_strtoul
  (...)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: muli@il.ibm.com
Cc: jdmason@kudzu.us
Cc: discuss@x86-64.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: use limited register constraint for setnz
Steven Rostedt [Tue, 25 Nov 2008 05:42:37 +0000 (00:42 -0500)]
x86: use limited register constraint for setnz

Impact: build fix with certain compilers

GCC can decide to use %dil when "r" is used, which is not valid for
setnz.

This bug was brought out by Stephen Rothwell's merging of the
branch tracer into linux-next.

[ Thanks to Uros Bizjak for recommending 'q' over 'Q' ]

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoALSA: hda - Check model for Dell 92HD73xx laptops
Takashi Iwai [Tue, 25 Nov 2008 14:18:29 +0000 (15:18 +0100)]
ALSA: hda - Check model for Dell 92HD73xx laptops

Check the model type instead of PCI SSID for detection of the mic types
on Dell laptops with IDT 92HD73xx codecs.  In this way, a new laptop
can be tested via model module option.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - mark Dell studio 1535 quirk
Takashi Iwai [Fri, 21 Nov 2008 17:01:44 +0000 (18:01 +0100)]
ALSA: hda - mark Dell studio 1535 quirk

Fixed the quirk string for Dell studio 1535 (the product name wasn't
published at the time the patch was made).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - No 'Headphone as Line-out' swich without line-outs
Takashi Iwai [Mon, 24 Nov 2008 06:51:11 +0000 (07:51 +0100)]
ALSA: hda - No 'Headphone as Line-out' swich without line-outs

STAC/IDT driver creates "Headphone as Line-Out" switch even if there
is no line-out pins on the machine.  For devices only with headpohnes
and speaker-outs, this switch shouldn't be created.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix AFG power management on IDT 92HD* codecs
Takashi Iwai [Tue, 25 Nov 2008 07:21:51 +0000 (08:21 +0100)]
ALSA: hda - Fix AFG power management on IDT 92HD* codecs

The AFG pin power-mapping isn't properly set for the fixed I/O pins
on IDT 92HD* codecs.  This resulted in the low power mode after the
boot until any jack detection is executed, thus no output from the
speaker.

This patch fixes the power mapping for the fixed pins, and also fixes
the GPIO bits and digital I/O pin settings properly in stac92xx_ini().

Reference: Novell bnc#446025
https://bugzilla.novell.com/show_bug.cgi?id=446025

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix caching of SPDIF status bits
Takashi Iwai [Tue, 25 Nov 2008 07:17:20 +0000 (08:17 +0100)]
ALSA: hda - Fix caching of SPDIF status bits

SPDIF status bits controls are written via snd_hda_codec_write()
without caching.  This causes a regression at resume that the bits
are lost.

Simply replacing it with the cached version fixes the problem.

Reference:
http://lkml.org/lkml/2008/11/24/324

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoARM: OMAP: Remove broken LCD driver for SX1
Tony Lindgren [Tue, 25 Nov 2008 02:11:16 +0000 (18:11 -0800)]
ARM: OMAP: Remove broken LCD driver for SX1

Recently the omap McBSP code was cleaned up to get rid of
direct McBSP register tinkering by the drivers. Looks like
lcd_sx1.c never got converted, and now it breaks builds.

It seems the lcd_sx1.c driver is attempting SPI mode, but
doing it in a different way compared to omap_mcbsp_set_spi_mode().

Remove the broken driver, patches welcome to add it back when
done properly by patching both mcbsp.c and lcd_sx1.c.

Cc: Vovan888@gmail.com
Cc: linux-fbdev-devel@lists.sourceforge.net
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agodrm: move drm vblank initialization/cleanup to driver load/unload
Keith Packard [Tue, 18 Nov 2008 17:30:25 +0000 (09:30 -0800)]
drm: move drm vblank initialization/cleanup to driver load/unload

drm vblank initialization keeps track of the changes in driver-supplied
frame counts across vt switch and mode setting, but only if you let it by
not tearing down the drm vblank structure.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/i915: execbuffer pins objects, no need to ensure they're still in the GTT
Keith Packard [Fri, 21 Nov 2008 07:14:48 +0000 (23:14 -0800)]
drm/i915: execbuffer pins objects, no need to ensure they're still in the GTT

Before we had the notion of pinning objects, we had a kludge around to make
sure all of the objects were still resident in the GTT before we committed
to executing a batch buffer. We don't need this any longer, and it sticks an
error return in the middle of object domain computations that must be
associated with a subsequent flush/invalidate emmission into the ring.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/i915: Always read pipestat in irq_handler
Keith Packard [Wed, 19 Nov 2008 22:03:05 +0000 (14:03 -0800)]
drm/i915: Always read pipestat in irq_handler

Because we write pipestat before iir, it's possible that a pipestat
interrupt will occur between the pipestat write and the iir write. This
leaves pipestat with an interrupt status not visible in iir. This may cause
an interrupt flood as we never clear the pipestat event.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/i915: Subtract total pinned bytes from available aperture size
Keith Packard [Fri, 21 Nov 2008 06:54:54 +0000 (22:54 -0800)]
drm/i915: Subtract total pinned bytes from available aperture size

The old code was wandering through the active list looking for pinned
buffers; there may be other pinned buffers around. Fortunately, we keep a
count of the total amount of pinned memory and can use that instead.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/i915: Avoid BUG_ONs on VT switch with a wedged chipset.
Eric Anholt [Thu, 13 Nov 2008 23:00:55 +0000 (15:00 -0800)]
drm/i915: Avoid BUG_ONs on VT switch with a wedged chipset.

Instead, just warn that bad things are happening and do our best to clean up
the mess without the GPU's help.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/i915: Remove IMR masking during interrupt handler, and restart it if needed.
Eric Anholt [Tue, 4 Nov 2008 23:50:30 +0000 (15:50 -0800)]
drm/i915: Remove IMR masking during interrupt handler, and restart it if needed.

The IMR masking was a technique recommended for avoiding getting stuck with
no interrupts generated again in MSI mode.  It kept new IIR bits from getting
set between the IIR read and the IIR write, which would have otherwise
prevented an MSI from ever getting generated again.  However, this caused a
problem for vblank as the IMR mask would keep the pipe event interrupt from
getting reflected in IIR, even after the IMR mask was brought back down.

Instead, just check the state of IIR after we ack the interrupts we're going
to handle, and restart if we didn't get IIR all the way to zero.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/i915: Manage PIPESTAT to control vblank interrupts instead of IMR.
Keith Packard [Tue, 4 Nov 2008 10:03:27 +0000 (02:03 -0800)]
drm/i915: Manage PIPESTAT to control vblank interrupts instead of IMR.

The pipestat fields affect reporting of all vblank-related interrupts, so we
have to reset them during the irq_handler, and while enabling vblank
interrupts.  Otherwise, if a pipe status field had been set to non-zero
before enabling reporting, we would never see an interrupt again.

This patch adds i915_enable_pipestat and i915_disable_pipestat to abstract
out the steps needed to change the reported interrupts.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoInput: replace spin_lock_bh with spin_lock_irqsave in ml_ff_playback
Arjan van de Ven [Mon, 24 Nov 2008 03:35:57 +0000 (22:35 -0500)]
Input: replace spin_lock_bh with spin_lock_irqsave in ml_ff_playback

ml_ff_playback() uses spin_(un)lock_bh. However this function is
called with interrupts disabled from erase_effect() in
drivers/input/ff-core.c:196.

This is not permitted, and will result in a WARN_ON in the bottom
half handling code. This patch changes this function to just use
spin_lock_irqsave() instead, solving the problem and simplifying
the locking logic.

This was reported as entry #106559 in kerneloops.org

Reported-by: kerneloops.org
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
15 years agoMIPS: Make BUG() __noreturn.
David Daney [Fri, 21 Nov 2008 01:26:36 +0000 (17:26 -0800)]
MIPS: Make BUG() __noreturn.

Often we do things like put BUG() in the default clause of a case
statement.  Since it was not declared __noreturn, this could sometimes
lead to bogus compiler warnings that variables were used
uninitialized.

There is a small problem in that we have to put a magic while(1); loop to
fool GCC into really thinking it is noreturn.  This makes the new
BUG() function 3 instructions long instead of just 1, but I think it
is worth it as it is now unnecessary to do extra work to silence the
'used uninitialized' warnings.

I also re-wrote BUG_ON so that if it is given a constant condition, it
just does BUG() instead of loading a constant value in to a register
and testing it.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/jk/spufs into...
Paul Mackerras [Mon, 24 Nov 2008 00:54:08 +0000 (11:54 +1100)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/jk/spufs into merge

15 years agoMerge branch 'merge' of ssh://master.kernel.org/pub/scm/linux/kernel/git/jwboyer...
Paul Mackerras [Mon, 24 Nov 2008 00:53:58 +0000 (11:53 +1100)]
Merge branch 'merge' of ssh://master.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx into merge

15 years agoMerge branch 'merge' of git://git.secretlab.ca/git/linux-2.6-mpc52xx into merge
Paul Mackerras [Mon, 24 Nov 2008 00:53:44 +0000 (11:53 +1100)]
Merge branch 'merge' of git://git.secretlab.ca/git/linux-2.6-mpc52xx into merge

15 years agotracing, doc: update mmiotrace documentation
Pekka Paalanen [Sun, 23 Nov 2008 19:24:59 +0000 (21:24 +0200)]
tracing, doc: update mmiotrace documentation

Impact: update documentation

Update to reflect the current state of the tracing framework:

 - "none" tracer has been replaced by "nop" tracer
 - tracing_enabled must be toggled when changing buffer size

Signed-off-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, mmiotrace: fix buffer overrun detection
Pekka Paalanen [Sun, 23 Nov 2008 19:24:30 +0000 (21:24 +0200)]
x86, mmiotrace: fix buffer overrun detection

Impact: fix mmiotrace overrun tracing

When ftrace framework moved to use the ring buffer facility, the buffer
overrun detection was broken after 2.6.27 by commit

| commit 3928a8a2d98081d1bc3c0a84a2d70e29b90ecf1c
| Author: Steven Rostedt <rostedt@goodmis.org>
| Date:   Mon Sep 29 23:02:41 2008 -0400
|
|     ftrace: make work with new ring buffer
|
|     This patch ports ftrace over to the new ring buffer.

The detection is now fixed by using the ring buffer API.

When mmiotrace detects a buffer overrun, it will report the number of
lost events. People reading an mmiotrace log must know if something was
missed, otherwise the data may not make sense.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years ago[ARM] 5335/1: pxa25x_udc: Fix is_vbus_present to return 1 or 0
Jaya Kumar [Tue, 18 Nov 2008 01:32:36 +0000 (02:32 +0100)]
[ARM] 5335/1: pxa25x_udc: Fix is_vbus_present to return 1 or 0

the use of is_blah() suggests a 1 or 0 return. This assumption is made in
pxa25x_udc code such as:
dev->vbus = is_vbus_present();
where dev->vbus is a bitfield. This fix allows pxa25x_udc_probe to correctly
detect vbus. Other changes were to make its use consistent in the rest of
the code.

Signed-off-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoxen: pin correct PGD on suspend
Ian Campbell [Fri, 21 Nov 2008 10:21:33 +0000 (10:21 +0000)]
xen: pin correct PGD on suspend

Impact: fix Xen guest boot failure

commit eefb47f6a1e855653d275cb90592a3587ea93a09 ("xen: use
spin_lock_nest_lock when pinning a pagetable") changed xen_pgd_walk to
walk over mm->pgd rather than taking pgd as an argument.

This breaks xen_mm_(un)pin_all() because it makes init_mm.pgd readonly
instead of the pgd we are interested in and therefore the pin subsequently
fails.

(XEN) mm.c:2280:d15 Bad type (saw 00000000e8000001 != exp 0000000060000000) for mfn bc464 (pfn 21ca7)
(XEN) mm.c:2665:d15 Error while pinning mfn bc464

[   14.586913] 1 multicall(s) failed: cpu 0
[   14.586926] Pid: 14, comm: kstop/0 Not tainted 2.6.28-rc5-x86_32p-xenU-00172-gee2f6cc #200
[   14.586940] Call Trace:
[   14.586955]  [<c030c17a>] ? printk+0x18/0x1e
[   14.586972]  [<c0103df3>] xen_mc_flush+0x163/0x1d0
[   14.586986]  [<c0104bc1>] __xen_pgd_pin+0xa1/0x110
[   14.587000]  [<c015a330>] ? stop_cpu+0x0/0xf0
[   14.587015]  [<c0104d7b>] xen_mm_pin_all+0x4b/0x70
[   14.587029]  [<c022bcb9>] xen_suspend+0x39/0xe0
[   14.587042]  [<c015a330>] ? stop_cpu+0x0/0xf0
[   14.587054]  [<c015a3cd>] stop_cpu+0x9d/0xf0
[   14.587067]  [<c01417cd>] run_workqueue+0x8d/0x150
[   14.587080]  [<c030e4b3>] ? _spin_unlock_irqrestore+0x23/0x40
[   14.587094]  [<c014558a>] ? prepare_to_wait+0x3a/0x70
[   14.587107]  [<c0141918>] worker_thread+0x88/0xf0
[   14.587120]  [<c01453c0>] ? autoremove_wake_function+0x0/0x50
[   14.587133]  [<c0141890>] ? worker_thread+0x0/0xf0
[   14.587146]  [<c014509c>] kthread+0x3c/0x70
[   14.587157]  [<c0145060>] ? kthread+0x0/0x70
[   14.587170]  [<c0109d1b>] kernel_thread_helper+0x7/0x10
[   14.587181]   call  1/3: op=14 arg=[c0415000] result=0
[   14.587192]   call  2/3: op=14 arg=[e1ca2000] result=0
[   14.587204]   call  3/3: op=26 arg=[c1808860] result=-22

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'oprofile-for-tip' of git://git.kernel.org/pub/scm/linux/kernel/git...
Ingo Molnar [Sun, 23 Nov 2008 11:16:57 +0000 (12:16 +0100)]
Merge branch 'oprofile-for-tip' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into x86/urgent

15 years agoHID: remove setup mutex, fix possible deadlock
Jiri Slaby [Sun, 23 Nov 2008 11:03:20 +0000 (12:03 +0100)]
HID: remove setup mutex, fix possible deadlock

It causes recursive locking warning and is unneeded after
introduction of STARTED flag.

* Resume vs. stop is effectively solved by DISCONNECT flag.
* No problem in suspend vs. start -- urb is submitted even after open
  which is possible after connect which is called after start.
* Resume vs. start solved by STARTED flag.
* Suspend vs. stop -- no problem in killing urb and timer twice.

Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agox86: revert irq number limitation
Thomas Gleixner [Fri, 21 Nov 2008 19:16:48 +0000 (11:16 -0800)]
x86: revert irq number limitation

Impact: fix MSIx not enough irq numbers available regression

The manual revert of the sparse_irq patches missed to bring the number
of possible irqs back to the .27 status. This resulted in a regression
when two multichannel network cards were placed in a system with only
one IO_APIC - causing the networking driver to not have the right
IRQ and the device not coming up.

Remove the dynamic allocation logic leftovers and simply return
NR_IRQS in probe_nr_irqs() for now.

Fixes: http://lkml.org/lkml/2008/11/19/354
Reported-by: Jesper Dangaard Brouer <hawk@diku.dk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Jesper Dangaard Brouer <hawk@diku.dk>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoirq.h: fix missing/extra kernel-doc
Randy Dunlap [Sat, 22 Nov 2008 00:59:57 +0000 (16:59 -0800)]
irq.h: fix missing/extra kernel-doc

Impact: fix kernel-doc build

Fix missing & excess irq.h kernel-doc:

Warning(include/linux/irq.h:182): No description found for parameter 'irq'
Warning(include/linux/irq.h:182): Excess struct/union/enum/typedef member 'affinity_entry' description in 'irq_desc'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge commit 'v2.6.28-rc6' into irq/urgent
Ingo Molnar [Sun, 23 Nov 2008 09:52:33 +0000 (10:52 +0100)]
Merge commit 'v2.6.28-rc6' into irq/urgent

15 years ago[ARM] pxa/MioA701: bluetooth resume fix
Robert Jarzmik [Mon, 17 Nov 2008 19:29:04 +0000 (20:29 +0100)]
[ARM] pxa/MioA701: bluetooth resume fix

The G3IPL expects the value at RAM address 0xa020b020 to be
exactly 1 to setup the bluetooth GPIOs properly. The actual
code got a value from gpio_get_value() which was not 1, but
a "not equal to 0" integer.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa/MioA701: fix memory corruption.
Robert Jarzmik [Mon, 17 Nov 2008 19:29:03 +0000 (20:29 +0100)]
[ARM] pxa/MioA701: fix memory corruption.

In the resume bootstrap, the early disable address is wrong.
Fix it to RAM address 0xa020b000 instead of 0xa0200000, and
make it consistent with RESUME_ENABLE_ADDR in mioa701.c.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years agoMerge commit 'v2.6.28-rc6' into x86/urgent
Ingo Molnar [Fri, 21 Nov 2008 19:55:09 +0000 (20:55 +0100)]
Merge commit 'v2.6.28-rc6' into x86/urgent

15 years agolockdep: consistent alignement for lockdep info
Li Zefan [Fri, 21 Nov 2008 07:57:32 +0000 (15:57 +0800)]
lockdep: consistent alignement for lockdep info

Impact: prettify /proc/lockdep_info

Just feel odd that not all lines of lockdep info are aligned.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agofunction tracing: fix wrong position computing of stack_trace
Liming Wang [Fri, 21 Nov 2008 03:00:18 +0000 (11:00 +0800)]
function tracing: fix wrong position computing of stack_trace

Impact: make output of stack_trace complete if buffer overruns

When read buffer overruns, the output of stack_trace isn't complete.

When printing records with seq_printf in t_show, if the read buffer
has overruned by the current record, then this record won't be
printed to user space through read buffer, it will just be dropped in
this printing.

When next printing, t_start should return the "*pos"th record, which
is the one dropped by previous printing, but it just returns
(m->private + *pos)th record.

Here we use a more sane method to implement seq_operations which can
be found in kernel code. Thus we needn't initialize m->private.

About testing, it's not easy to overrun read buffer, but we can use
seq_printf to print more padding bytes in t_show, then it's easy to
check whether or not records are lost.

This commit has been tested on both condition of overrun and non
overrun.

Signed-off-by: Liming Wang <liming.wang@windriver.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branches 'topic/fix/hda' and 'topic/fix/sound-core' into for-linus
Takashi Iwai [Fri, 21 Nov 2008 07:39:36 +0000 (08:39 +0100)]
Merge branches 'topic/fix/hda' and 'topic/fix/sound-core' into for-linus

15 years agoALSA: hda - Add a quirk for Dell Studio 15
Takashi Iwai [Fri, 21 Nov 2008 07:37:03 +0000 (08:37 +0100)]
ALSA: hda - Add a quirk for Dell Studio 15

Added the matching model=dell-m6 for Dell Studio 15 laptop.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda: Add STAC_DELL_M4_3 quirk
Matthew Ranostay [Fri, 21 Nov 2008 02:21:43 +0000 (21:21 -0500)]
ALSA: hda: Add STAC_DELL_M4_3 quirk

Added STAC_DELL_M4_3 quirk for Dell systems, also reorganized the
board config switch to assign number of digital muxes, microphones,
and SPDIF muxes via the PCI quirk defined.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agosound/sound_core: Fix sparse warnings
Hannes Eder [Thu, 20 Nov 2008 20:25:25 +0000 (21:25 +0100)]
sound/sound_core: Fix sparse warnings

Fix the following sparse warnings:

sound/sound_core.c:460:2: warning: returning void-valued expression
sound/sound_core.c:477:2: warning: returning void-valued expression
sound/sound_core.c:510:5: warning: symbol 'soundcore_open' was not
declared. Should it be static?

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Fri, 21 Nov 2008 02:08:09 +0000 (18:08 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 5330/1: mach-pxa: Fixup reset for systems using reboot=cold or other strings
  [ARM] pxa: fix incorrect PCMCIA PSKTSEL pin configuration for spitz
  [ARM] pxa: fix I2C controller device being registered twice on Akita
  pxafb: only initialize the smart panel thread when dealing with a smartpanel
  pxafb: introduce LCD_TYPE_MASK and use it.

15 years agoLinux 2.6.28-rc6 v2.6.28-rc6
Linus Torvalds [Thu, 20 Nov 2008 23:19:22 +0000 (15:19 -0800)]
Linux 2.6.28-rc6

15 years agopowerpc/spufs: Fix spinning in spufs_ps_fault on signal
Jeremy Kerr [Mon, 10 Nov 2008 23:22:22 +0000 (10:22 +1100)]
powerpc/spufs: Fix spinning in spufs_ps_fault on signal

Currently, we can end up in an infinite loop if we get a signal
while the kernel has faulted in spufs_ps_fault. Eg:

 alarm(1);

 write(fd, some_spu_psmap_register_address, 4);

- the write's copy_from_user will fault on the ps mapping, and
signal_pending will be non-zero. Because returning from the fault
handler will never clear TIF_SIGPENDING, so we'll just keep faulting,
resulting in an unkillable process using 100% of CPU.

This change returns VM_FAULT_SIGBUS if there's a fatal signal pending,
letting us escape the loop.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Thu, 20 Nov 2008 23:07:40 +0000 (15:07 -0800)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] xen: fix xen_get_eflags.
  [IA64] ia64/pv_ops/pv_cpu_ops: fix _IA64_REG_IP case.
  [IA64] remove duplicate include iommu.h
  [IA64] use mprintk instead of printk, in ia64_mca_modify_original_stack
  [IA64] Rationalize kernel mode alignment checking

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Thu, 20 Nov 2008 21:53:21 +0000 (13:53 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: ACE1001 patch for cp2101.c
  USB: usbmon: fix read(2)
  USB: gadget rndis: send notifications
  USB: gadget rndis: stop windows self-immolation
  USB: storage: update unusual_devs entries for Nokia 5300 and 5310
  USB: storage: updates unusual_devs entry for the Nokia 6300
  usb: musb: fix bug in musb_schedule
  USB: fix SB700 usb subsystem hang bug

15 years ago[IA64] xen: fix xen_get_eflags.
Isaku Yamahata [Tue, 18 Nov 2008 10:20:51 +0000 (19:20 +0900)]
[IA64] xen: fix xen_get_eflags.

fix xen_get_eflags. It doesn't take any argument.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Tony Luck <tony.luck@intel.com>
15 years ago[IA64] ia64/pv_ops/pv_cpu_ops: fix _IA64_REG_IP case.
Isaku Yamahata [Tue, 18 Nov 2008 10:19:50 +0000 (19:19 +0900)]
[IA64] ia64/pv_ops/pv_cpu_ops: fix _IA64_REG_IP case.

pv_cpu_ops.getreg(_IA64_REG_IP) returned constant.
But the returned ip valued should be the one in the caller, not of the callee.
This patch fixes that.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Tony Luck <tony.luck@intel.com>
15 years ago[IA64] remove duplicate include iommu.h
Huang Weiyi [Thu, 20 Nov 2008 21:38:16 +0000 (13:38 -0800)]
[IA64] remove duplicate include iommu.h

arch/ia64/kernel/pci-dma.c only needs to include iommu once.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
15 years ago[IA64] use mprintk instead of printk, in ia64_mca_modify_original_stack
Hidetoshi Seto [Mon, 17 Nov 2008 01:18:08 +0000 (10:18 +0900)]
[IA64] use mprintk instead of printk, in ia64_mca_modify_original_stack

Using printk from MCA/INIT context is unsafe since it can cause deadlock.
The ia64_mca_modify_original_stack is called from both of mca handler and
init handler, so it should use mprintk instead of printk.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
15 years ago[IA64] Rationalize kernel mode alignment checking
Tony Luck [Thu, 20 Nov 2008 21:27:12 +0000 (13:27 -0800)]
[IA64] Rationalize kernel mode alignment checking

Itanium processors can handle some misaligned data accesses. They
also provide a mode where all such accesses are forced to trap. The
kernel was schizophrenic about use of this mode:

* Base kernel code ran in permissive mode where the only traps
  generated were from those cases that the h/w could not handle.
* Interrupt, syscall and trap code ran in strict mode where all
  unaligned accesses caused traps to the 0x5a00 unaligned reference
  vector.

Use strict alignment checking throughout the kernel, but make
sure that we continue to let user mode use more relaxed mode
as the default.

Signed-off-by: Tony Luck <tony.luck@intel.com>
15 years agox86: Fix interrupt leak due to migration
Matthew Wilcox [Thu, 20 Nov 2008 21:09:33 +0000 (14:09 -0700)]
x86: Fix interrupt leak due to migration

When we migrate an interrupt from one CPU to another, we set the
move_in_progress flag and clean up the vectors later once they're not
being used.  If you're unlucky and call destroy_irq() before the vectors
become un-used, the move_in_progress flag is never cleared, which causes
the interrupt to become unusable.

This was discovered by Jesse Brandeburg for whom it manifested as an
MSI-X device refusing to use MSI-X mode when the driver was unloaded
and reloaded repeatedly.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoSUNRPC: Fix a performance regression in the RPC authentication code
Trond Myklebust [Thu, 20 Nov 2008 21:06:21 +0000 (16:06 -0500)]
SUNRPC: Fix a performance regression in the RPC authentication code

Fix a regression reported by Max Kellermann whereby kernel profiling
showed that his clients were spending 45% of their time in
rpcauth_lookup_credcache.

It turns out that although his processes had identical uid/gid/groups,
generic_match() was failing to detect this, because the task->group_info
pointers were not shared. This again lead to the creation of a huge number
of identical credentials at the RPC layer.

The regression is fixed by comparing the contents of task->group_info
if the actual pointers are not identical.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Thu, 20 Nov 2008 21:14:16 +0000 (13:14 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  [CIFS] Do not attempt to close invalidated file handles
  [CIFS] fix check for dead tcon in smb_init

15 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Thu, 20 Nov 2008 21:13:48 +0000 (13:13 -0800)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  MIPS: csrc-r4k: Fix declaration depending on the wrong CONFIG_ symbol.
  MIPS: csrc-r4k: Fix spelling mistake.
  MIPS: RB532: Provide functions for gpio configuration
  MIPS: IP22: Make indy_sc_ops variable static
  MIPS: RB532: GPIO register offsets are relative to GPIOBASE
  MIPS: Malta: Fix include paths in malta-amon.c

15 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 20 Nov 2008 21:13:03 +0000 (13:13 -0800)]
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  intel-iommu: fix compile warnings

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 20 Nov 2008 21:12:14 +0000 (13:12 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (23 commits)
  net: fix tiny output corruption of /proc/net/snmp6
  atl2: don't request irq on resume if netif running
  ipv6: use seq_release_private for ip6mr.c /proc entries
  pkt_sched: fix missing check for packet overrun in qdisc_dump_stab()
  smc911x: Fix printf format typo in smc911x driver.
  asix: Fix asix-based cards connecting to 10/100Mbs LAN.
  mv643xx_eth: fix recycle check bound
  mv643xx_eth: fix the order of mdiobus_{unregister, free}() calls
  sh: sh_eth: Update to change of mii_bus
  TPROXY: supply a struct flowi->flags argument in inet_sk_rebuild_header()
  TPROXY: fill struct flowi->flags in udp_sendmsg()
  net: ipg.c fix bracing on endian swapping
  phylib: Fix auto-negotiation restart avoidance
  net: jme.c rxdesc.flags is __le16, other missing endian swaps
  phylib: fix phy name example in documentation
  net: Do not fire linkwatch events until the device is registered.
  phonet: fix compilation with gcc-3.4
  ixgbe: fix compilation with gcc-3.4
  pktgen: fix multiple queue warning
  net: fix ip_mr_init() error path
  ...

15 years agoMerge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 20 Nov 2008 21:11:21 +0000 (13:11 -0800)]
Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  ftrace: fix dyn ftrace filter selection
  ftrace: make filtered functions effective on setting
  ftrace: fix set_ftrace_filter
  trace: introduce missing mutex_unlock()
  tracing: kernel/trace/trace.c: introduce missing kfree()

15 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 20 Nov 2008 21:09:32 +0000 (13:09 -0800)]
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: uaccess_64: fix return value in __copy_from_user()
  x86: quirk for reboot stalls on a Dell Optiplex 330

15 years agoparisc: fix bug in compat_arch_ptrace
Helge Deller [Thu, 20 Nov 2008 09:54:09 +0000 (10:54 +0100)]
parisc: fix bug in compat_arch_ptrace

Commit 81e192d6ce303b6792aa38ff35f41a1a7357f23a ("parisc: convert to
generic compat_sys_ptrace") introduced a bug which segfaults the parisc
64bit kernel when stracing 32bit applications:

  Kernel Fault: Code=15 regs=00000000bafa42b0 (Addr=00000001baf5ab57)
       YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
  PSW: 00001000000001101111111100001011 Tainted: G        W
  r00-03  000000ff0806ff0b 000000004068edc0 00000000401203f8 00000000fb3e2508
  r04-07  0000000040686dc0 00000000baf5a800 fffffffffffffffc fffffffffb3e2508
  r08-11  00000000baf5a800 000000000004b068 00000000000402b0 0000000000040d68
  r12-15  0000000000042a9c 0000000000040a9c 0000000000040d60 0000000000042e9c
  r16-19  000000000004b060 000000000004b058 0000000000042d9c ffffffffffffffff
  r20-23  000000000800000b 0000000000000000 000000000800000b fffffffffb3e2508
  r24-27  00000000fffffffc 0000000000000003 00000000fffffffc 0000000040686dc0
  r28-31  00000001baf5a7ff 00000000bafa4280 00000000bafa42b0 00000000000001d7
  sr00-03  0000000000fca000 0000000000000000 0000000000000000 0000000000fca000
  sr04-07  0000000000000000 0000000000000000 0000000000000000 0000000000000000

  IASQ: 0000000000000000 0000000000000000 IAOQ: 0000000040120400 0000000040120404
   IIR: 4b9a06b0    ISR: 0000000000000000  IOR: 00000001baf5ab57
   CPU:        0   CR30: 00000000bafa4000 CR31: 00000000d22344e0
   ORIG_R28: 00000000fb3e2248
   IAOQ[0]: compat_arch_ptrace+0xb8/0x160
   IAOQ[1]: compat_arch_ptrace+0xbc/0x160
   RP(r2): compat_arch_ptrace+0xb0/0x160
  Backtrace:
   [<00000000401612ac>] compat_sys_ptrace+0x15c/0x180
   [<0000000040104ef8>] syscall_exit+0x0/0x14

The problem is that compat_arch_ptrace() enters with an addr value of
type compat_ulong_t and calls translate_usr_offset() to translate the
address offset into a struct pt_regs offset like this:

addr = translate_usr_offset(addr)

this means that any return value of translate_usr_offset() is stored
back as compat_ulong_t type into the addr variable.

But since translate_usr_offset() returns -1 for invalid offsets, addr
can now get the value 0xffffffff which then fails the next return-value
sanity check and thus the kernel tries to access invalid memory:

if (addr < 0)
break;

Fix this bug by modifying translate_usr_offset() to take and return
values of type compat_ulong_t, and by returning the value
"sizeof(struct pt_regs)" as an error indicator.

Additionally change the sanity check to check for return values
for >= sizeof(struct pt_regs).

This patch survived my compile and run-tests.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago[CIFS] Do not attempt to close invalidated file handles
Steve French [Thu, 20 Nov 2008 20:00:44 +0000 (20:00 +0000)]
[CIFS] Do not attempt to close invalidated file handles

If a connection with open file handles has gone down
and come back up and reconnected without reopening
the file handle yet, do not attempt to send an SMB close
request for this handle in cifs_close.  We were
checking for the connection being invalid in cifs_close
but since the connection may have been reconnected
we also need to check whether the file handle
was marked invalid (otherwise we could close the
wrong file handle by accident).

Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agoMIPS: csrc-r4k: Fix declaration depending on the wrong CONFIG_ symbol.
Ralf Baechle [Mon, 3 Nov 2008 11:32:34 +0000 (11:32 +0000)]
MIPS: csrc-r4k: Fix declaration depending on the wrong CONFIG_ symbol.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: csrc-r4k: Fix spelling mistake.
Ralf Baechle [Mon, 3 Nov 2008 11:31:54 +0000 (11:31 +0000)]
MIPS: csrc-r4k: Fix spelling mistake.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: RB532: Provide functions for gpio configuration
Phil Sutter [Sat, 1 Nov 2008 14:13:21 +0000 (15:13 +0100)]
MIPS: RB532: Provide functions for gpio configuration

As gpiolib doesn't support pin multiplexing, it provides no way to
access the GPIOFUNC register. Also there is no support for setting
interrupt status and level. These functions provide access to them and
are needed by the CompactFlash driver.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: IP22: Make indy_sc_ops variable static
Dmitri Vorobiev [Fri, 31 Oct 2008 17:54:11 +0000 (19:54 +0200)]
MIPS: IP22: Make indy_sc_ops variable static

The indy_sc_ops variable in arch/mips/mm/sc-ip22.c is needlessly defined
global, and this patch makes it static.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
---

15 years agoMIPS: RB532: GPIO register offsets are relative to GPIOBASE
Florian Fainelli [Fri, 31 Oct 2008 13:24:29 +0000 (14:24 +0100)]
MIPS: RB532: GPIO register offsets are relative to GPIOBASE

This patch fixes the wrong use of GPIO register offsets
in devices.c. To avoid further problems, use gpio_get_value
to return the NAND status instead of our own expanded code.

Also define the zero offset of the alternate function register to allow
consistent access.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Malta: Fix include paths in malta-amon.c
David Daney [Sat, 20 Sep 2008 17:16:36 +0000 (10:16 -0700)]
MIPS: Malta: Fix include paths in malta-amon.c

On linux-queue, malta doesn't build after the include file relocation.
This should fix it.

There some occurrences of 'asm-mips' in the comments of quite a few
files, but this is the only place I found it in any code.

Signed-off-by: David Daney <ddaney@avtrex.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoALSA: hda: STAC_DELL_M6 EAPD
Matthew Ranostay [Sun, 16 Nov 2008 16:42:34 +0000 (11:42 -0500)]
ALSA: hda: STAC_DELL_M6 EAPD

Add support for EAPD on system suspend and disabling EAPD on headphone jack
detection for STAC_DELL_M6 laptops.

This patch fixes the regressions, the silent output on HP of some Dell
laptops (see Novell bnc#446025):
https://bugzilla.novell.com/show_bug.cgi?id=446025

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agox86: fixing __cpuinit/__init tangle, xsave_cntxt_init()
Rakib Mullick [Thu, 20 Nov 2008 13:12:50 +0000 (19:12 +0600)]
x86: fixing __cpuinit/__init tangle, xsave_cntxt_init()

Annotate xsave_cntxt_init() as "can be called outside of __init".

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fix __cpuinit/__init tangle in init_thread_xstate()
Rakib Mullick [Thu, 20 Nov 2008 13:08:45 +0000 (19:08 +0600)]
x86: fix __cpuinit/__init tangle in init_thread_xstate()

Impact: fix incorrect __init annotation

This patch removes the following section mismatch warning. A patch set
was send previously (http://lkml.org/lkml/2008/11/10/407). But
introduce some other problem, reported by Rufus
(http://lkml.org/lkml/2008/11/11/46). Then Ingo Molnar suggest that,
it's best to remove __init from xsave_cntxt_init(void). Which is the
second patch in this series. Now, this one removes the following
warning.

WARNING: arch/x86/kernel/built-in.o(.cpuinit.text+0x2237): Section
mismatch in reference from the function cpu_init() to the function
.init.text:init_thread_xstate()
The function __cpuinit cpu_init() references
a function __init init_thread_xstate().
If init_thread_xstate is only used by cpu_init then
annotate init_thread_xstate with a matching annotation.

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>