Commit graph

167788 commits

Author SHA1 Message Date
Alan Cox 317c68c04d Staging: et131x: Fix the add_10bit macro
Duh.. we need to preserve the wrap bit when adding.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-14 14:14:39 -07:00
Alan Cox b9d2dde055 Staging: et131x: Correct WRAP bit handling
add_10bit loses the existing wrap value

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-14 14:14:38 -07:00
Jeff Mahoney 4439c93535 staging: Complete sched.h removal from interrupt.h
Commit d43c36dc removed sched.h from interrupt.h and distributed sched.h
to users which needed it. This finishes it up for staging.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-14 14:14:37 -07:00
Greg Kroah-Hartman 6af783c8ba Staging: vme: fix sched.h build breakage
commit d43c36dc removed sched.h from interrupt.h.  This broke the
vme drivers.  This patch fixes them.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-14 14:14:36 -07:00
Greg Kroah-Hartman 8037cdade7 Staging: poch: fix sched.h build breakage
commit d43c36dc removed sched.h from interrupt.h.  This broke the
poch driver.  This patch fixes this.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-14 14:14:36 -07:00
Greg Kroah-Hartman db8fd2887c Staging: b3dfg: fix sched.h build breakage
commit d43c36dc removed sched.h from interrupt.h.  This broke the
b3dfg driver.  This patch fixes this.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-14 14:14:36 -07:00
Greg Kroah-Hartman 4377a02650 Staging: comedi: fix sched.h build breakage
commit d43c36dc removed sched.h from interrupt.h.  This broke some of
the comedi drivers.  This patch fixes this.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-14 14:14:36 -07:00
Jonathan Cameron ffc18afa11 Staging: iio: Fix missing include <linux/sched.h>
linux/sched.h include was removed form linux/poll.h by
commmit a99bbaf5ee

Required for definition of TASK_INTERRUPTIBLE amongst others

From: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-14 14:14:35 -07:00
Stefan Richter eaf76e0d02 firewire: sbp2: provide fallback if mgt_ORB_timeout is missing
The Unit_Characteristics entry of an SBP-2 unit directory is not
mandatory as far as I can tell.  If it is missing, we would probably
fail to log in into the target because firewire-sbp2 would not wait for
status after it sent the login request.

The fix moves the cleanup of tgt->mgt_orb_timeout into a place where it
is executed exactly once before login, rather than 0..n times depending
on the target's config ROM.  With targets with one or more
Unit_Characteristics entries, the result is the same as before.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-10-14 21:55:19 +02:00
Jarkko Nikula a93d4ed205 omap: McBSP: Fix incorrect receiver stop in omap_mcbsp_stop
This small typo written by author causes that McBSP receiver is disabled on
OMAP2430 and OMAP3430 even if only transmitter is stopped. This was noted
with ALSA SoC where simultaneous recording halted if playback was stopped
first.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-10-14 09:56:35 -07:00
Teerth Reddy 02563a5d56 omap: Initialization of SDRC params on Zoom2
This patch initializes the correct SDRC settings required
for DVFS on Zoom2.

Signed-off-by: Teerth Reddy <teerth@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-10-14 09:56:35 -07:00
Aaro Koskinen cb3cc45ad9 omap: RX-51: Drop I2C-1 speed to 2200
The I2C-1 bus frequency on RX-51 should be 2.2 MHz. The speed is limited
by TWL5030/GAIA; a higher speed could lead to errors on the interface. The
maximum speed depends on the system clock for GAIA: 2.2 MHz (if 19.2 MHz),
2.4 MHz (26 MHz) or 2.9 MHz (38.4 MHz).

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-10-14 09:56:34 -07:00
Anuj Aggarwal 70cf644c34 omap: SDMA: Fixing bug in omap_dma_set_global_params()
Argument tparams was not being used to program
global register GCR.HI_THREAD_RESERVED. This patch fixes the same.

Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-10-14 09:56:34 -07:00
Sanjeev Premi dc6e56b199 omap: CONFIG_ISP1301_OMAP redefined in Beagle defconfig
The symbol CONFIG_ISP1301_OMAP was defined twice in the
defconfig. This was causing the warning:
arch/arm/configs/omap3_beagle_defconfig:972:warning:
 override: reassigning to symbol ISP1301_OMAP

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-10-14 09:56:33 -07:00
Linus Torvalds 514fc01d38 tty: use the new 'flush_delayed_work()' helper to do ldisc flush
This way all flush_to_ldisc work is always done through the workqueues,
and we thus have a single point of serialization.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-14 09:20:41 -07:00
Linus Torvalds 43046b6066 workqueue: add 'flush_delayed_work()' to run and wait for delayed work
It basically turns a delayed work into an immediate work, and then waits
for it to finish.
2009-10-14 09:16:42 -07:00
Linus Torvalds 45242006e1 Make flush_to_ldisc properly handle parallel calls 2009-10-14 08:59:49 -07:00
Chris Mason 444528b3e6 Btrfs: always pin metadata in discard mode
We have an optimization in btrfs to allow blocks to be
immediately freed if they were allocated in this transaction and never
written.  Otherwise they are pinned and freed when the transaction
commits.

This isn't optimal for discard mode because immediately freeing
them means immediately discarding them.  It is better to give the
block to the pinning code and letting the (slow) discard happen later.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
2009-10-14 10:32:50 -04:00
Christoph Hellwig 0634857488 Btrfs: enable discard support
The discard support code in btrfs currently is guarded by ifdefs for
BIO_RW_DISCARD, which is never defines as it's the name of an enum
memeber.  Just remove the useless ifdefs to actually enable the code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2009-10-14 10:32:49 -04:00
Christoph Hellwig e244a0aeb6 Btrfs: add -o discard option
Enable discard by default is not a good idea given the the trim speed
of SSD prototypes we've seen, and the carecteristics for many high-end
arrays.  Turn of discards by default and require the -o discard option
to enable them on.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2009-10-14 10:32:49 -04:00
Yan, Zheng 86df7eb921 Btrfs: properly wait log writers during log sync
A recently fsync optimization make btrfs_sync_log skip calling
wait_for_writer in the single log writer case. This is incorrect
since the writer count can also be increased by btrfs_pin_log.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2009-10-14 10:32:48 -04:00
Josef Bacik 5d5e103a70 Btrfs: fix possible ENOSPC problems with truncate
There's a problem where we don't do any space reservation for truncates, which
can cause you to OOPs because you will be allowed to go off in the weeds a bit
since we don't account for the delalloc bytes that are created as a result of
the truncate.

Signed-off-by: Josef Bacik <jbacik@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2009-10-14 10:32:47 -04:00
Peter Zijlstra 92f6a5e37a sched: Do less agressive buddy clearing
Yanmin reported a hackbench regression due to:

 > commit de69a80be3
 > Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
 > Date:   Thu Sep 17 09:01:20 2009 +0200
 >
 >     sched: Stop buddies from hogging the system

I really liked de69a80b, and it affecting hackbench shows I wasn't
crazy ;-)

So hackbench is a multi-cast, with one sender spraying multiple
receivers, who in their turn don't spray back.

This would be exactly the scenario that patch 'cures'. Previously
we would not clear the last buddy after running the next task,
allowing the sender to get back to work sooner than it otherwise
ought to have been, increasing latencies for other tasks.

Now, since those receivers don't poke back, they don't enforce the
buddy relation, which means there's nothing to re-elect the sender.

Cure this by less agressively clearing the buddy stats. Only clear
buddies when they were not chosen. It should still avoid a buddy
sticking around long after its served its time.

Reported-by: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
CC: Mike Galbraith <efault@gmx.de>
LKML-Reference: <1255084986.8802.46.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-10-14 15:02:34 +02:00
Peter Zijlstra 799e2205ec sched: Disable SD_PREFER_LOCAL for MC/CPU domains
Yanmin reported that both tbench and hackbench were significantly
hurt by trying to keep tasks local on these domains, esp on small
cache machines.

So disable it in order to promote spreading outside of the cache
domains.

Reported-by: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
CC: Mike Galbraith <efault@gmx.de>
LKML-Reference: <1255083400.8802.15.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-10-14 15:02:34 +02:00
Li Hong 89ccf465ab x86, perf_event: Rename 'performance counter interrupt'
In 'cdd6c482c9ff9c55475ee7392ec8f672eddb7be6', we renamed
Performance Counters -> Performance Events.

The name showed up in /proc/interrupts also needs a change. I use
PMI (Performance monitoring interrupt) here, since it is the
official name used in Intel's documents.

Signed-off-by: Li Hong <lihong.hi@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <20091014105039.GA22670@uhli>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-10-14 14:37:24 +02:00
Michael Holzheu ac522b638d [S390] sclp_vt220 build fix
Fix this build error:

	next-20091013 randconfig build on s390x build breaks with

drivers/s390/built-in.o:(.data+0x3354): undefined reference to `sclp_vt220_pm_event_fn'

Reported-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <michael.holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-10-14 12:43:54 +02:00
Peter Oberparleiter 6d7c5afc89 [S390] cio: change misleading console logic
Use cio_is_console() in io_subchannel_probe to indicate that the
special handling is console specific. As long as there is no other
subchannel for which this might be true, it is misleading to speak
of "early devices". Should more of these devices be introduced,
a cleanup of all console special handling is in order anyway.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-10-14 12:43:53 +02:00
Heiko Carstens d3acf71fb8 [S390] call home support: fix proc handler
8d65af78 "sysctl: remove "struct file *" argument of ->proc_handler"
removed the struct file argument from all proc_handlers but didn't
change the call home proc handler (or call home was merged later).

So fix this now.

Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Hans-Joachim Picht <hans@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-10-14 12:43:53 +02:00
Stefan Haberland d9fa9441ed [S390] dasd: use idal for device characteristics
If the rdc_buffer is above 2G we need indirect addresssing so we have
to use an idaw to give the rdc_buffer to the ccw.
If the rdc_buffer is under 2G nothing changes.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-10-14 12:43:53 +02:00
Andreas Krebbel be6e3f9cd6 [S390] Add highgprs facility to /proc/cpuinfo
This patch makes the hwcap bit for the high gprs feature to be visible
in /proc/cpuinfo.

Signed-off-by: Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-10-14 12:43:53 +02:00
Stefan Haberland a7602f6c16 [S390] dasd: fix locking bug
Replace spin_lock with spin_lock_irqsave in dasd_eckd_restore_device.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-10-14 12:43:52 +02:00
Michael Holzheu 03cadd36d5 [S390] tape390: Fix request queue handling in block driver
When setting a channel attached tape online under Linux 2.6.31, the

"vol_id" process from udev hangs in sync_page():
 2 sync_page+144 [0x1dfaac]
 3 __wait_on_bit_lock+194 [0x58c23e]
 4 __lock_page+116 [0x1df9dc]
 5 truncate_inode_pages_range+728 [0x1ed7cc]
 6 __blkdev_put+244 [0x25f738]
 7 __fput+300 [0x229c4c]
 8 filp_close+122 [0x225a3a]

The reason for that is an error in the request queue handling. It can
happen that we fetch a request, but do not process it further because
the number of queued requests exceeds TAPEBLOCK_MIN_REQUEUE.
To fix this, we should call blk_peek_request() instead of
blk_fetch_request() in the while condition and fetch the request in
the loop body afterwards.

This bug was introduced with the patch "block: implement and enforce
request peek/start/fetch" (9934c8c045)

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-10-14 12:43:52 +02:00
Michael Holzheu 7874b1b66a [S390] hypfs: Use subcode 6 if subcode 7 is not available
Hypfs never worked on systems that only provide D204 subcode 6.
In these cases we nevertheless used subcode 7. With this fix, we
use subcode 6, if it is available and the system does not provide
subcode 7.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-10-14 12:43:52 +02:00
Thomas Gleixner 03717e3d12 watchdog: Fix rio watchdog probe function
After sucessfully registering the misc device the driver iounmaps the
hardware registers and kfree's the device data structure. Ouch !

This was introduced with commit e42311d75 (riowatchdog: Convert to
pure OF driver) and went unnoticed for more than a year :)

Return success instead of dropping into the error cleanup code path.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-14 01:18:26 -07:00
Dmitry Torokhov 1572ca2a84 Input: fix locking issue in /proc/bus/input/ handlers
input_devices_seq_start() uses mutex_lock_interruptible() to acquire
the input_mutex, but doesn't properly handle the situation when the
call fails (for example due to interrupt). Instead of returning NULL
(which indicates that there is no more data) we should return
ERR_PTR()-encoded error.

We also need explicit flag indicating whether input_mutex was acquired
since input_devices_seq_stop() is called whether input_devices_seq_start()
was successful or not.

The same applies to input_handlers_seq_start().

Reported-by: iceberg <strakh@ispras.ru>
Reviewed-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-10-14 00:36:33 -07:00
Dmitry Torokhov 94dfb0d633 Input: atkbd - postpone restoring LED/repeat rate at resume
We need to postpone restoring LED state and typematic settings until
keyboard is finished reconnecting upon resume. Normally driver core
and PM infrastructure takes care of proper ordering and dependencies,
but or case actual reconnect is done asynchronously from kseriod.
So while driver core thinks that keyboard was resumed and it is time
to let input core run it's resume handlers in reality keyboard is not
ready yet. The solution is to keep rescheduling work that adjusts LED
and rate settings until keyboard is fully enabled.

Reported-by: Carlos R. Mafra <crmafra2@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-10-14 00:01:19 -07:00
Paul Mundt 457b646189 sh: Fix a TRACE_IRQS_OFF typo.
The resume_userspace path had TRACE_IRQS_OFF written incorrectly and so
never handled the transition properly. This was fixed once before but
seems to have made it back in the tree. Fix it for good.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-14 15:50:28 +09:00
Paul Mundt 4d2947f7c6 sh: Optimize the setup_rt_frame() I-cache flush.
This only needs to flush the return code via the legacy path, and just
invalidates uselessly otherwise. This makes the behaviour consistent for
all of the trampoline setup paths.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-14 15:49:45 +09:00
Paul Mundt a66c2edea5 sh: Populate initial secondary CPU info from boot_cpu_data.
The secondary CPU info was seeing corrupted results due to not entering
all of the setup paths taken by the boot CPU. So we just memcpy() the
boot cpu data over directly, and then fix up the per-CPU bits.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-14 15:44:12 +09:00
Paul Mundt 2908df9e2c sh: Tidy up SMP cpuinfo.
Trivial change for cleaning up the cpuinfo pretty printing on SMP, adds a
newline between CPUs.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-14 15:43:52 +09:00
Paul Mundt eaa47704d9 sh: Use boot_cpu_data for FPU tests in sigcontext paths.
We do not want to use smp_processor_id() from these paths, as they trip
preempt BUGs. Switch the test over to the boot cpu directly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-14 15:43:41 +09:00
Paul Mackerras 03541f8b69 perf_event: Adjust frequency and unthrottle for non-group-leader events
The loop in perf_ctx_adjust_freq checks the frequency of sampling
event counters, and adjusts the event interval and unthrottles the
event if required, and resets the interrupt count for the event.
However, at present it only looks at group leaders.

This means that a sampling event that is not a group leader will
eventually get throttled, once its interrupt count reaches
sysctl_perf_event_sample_rate/HZ --- and that is guaranteed to
happen, if the event is active for long enough, since the interrupt
count never gets reset.  Once it is throttled it never gets
unthrottled, so it basically just stops working at that point.

This fixes it by making perf_ctx_adjust_freq use ctx->event_list
rather than ctx->group_list.  The existing spin_lock/spin_unlock
around the loop makes it unnecessary to put rcu_read_lock/
rcu_read_unlock around the list_for_each_entry_rcu().

Reported-by: Mark W. Krentel <krentel@cs.rice.edu>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <19157.26731.855609.165622@cargo.ozlabs.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-10-14 08:39:32 +02:00
Heiko Schocher 0f6023d599 powerpc/pci: Fix MODPOST warning
making a powerpc target with PCI support, shows the
following warning:

  MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x10430): Section mismatch in reference from the
function pcibios_allocate_bus_resources() to the function .init.text:reparent_resources()

The function pcibios_allocate_bus_resources() references
the function __init reparent_resources().

This is often because pcibios_allocate_bus_resources lacks a __init
annotation or the annotation of reparent_resources is wrong.

This patch fix this warning by removing the __init
annotation before reparent_resources.

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-10-14 16:58:40 +11:00
Dragos Tatulea 04f5653477 powerpc/oprofile: Add ppc750 CL as supported by oprofile
Here's a patch that adds the ppc750 CL cpu as supported by oprofile.

Signed-off-by: Dragos Tatulea <dtatulea@ixiacom.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-10-14 16:58:39 +11:00
Sean MacLennan 5be2a213b1 powerpc: warning: allocated section `.data_nosave' not in segment
We need to align before the output section. Having the align inside
the output section causes the linker to put some filler in there,
which makes it a non-empty section, but this section isn't assigned to
a segment so you get a warning from the linker.

Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
Acked-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-10-14 16:58:39 +11:00
Anton Vorontsov cf50f447b2 powerpc/kgdb: Fix build failure caused by "kgdb.c: unused variable 'acc'"
'acc' isn't used anywhere and thus triggers gcc warning, which causes
build error with CONFIG_PPC_DISABLE_WERROR=n (default):

  cc1: warnings being treated as errors
  arch/powerpc/kernel/kgdb.c: In function 'gdb_regs_to_pt_regs':
  arch/powerpc/kernel/kgdb.c:289: warning: unused variable 'acc'
  make[1]: *** [arch/powerpc/kernel/kgdb.o] Error 1

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-10-14 16:58:38 +11:00
Anton Blanchard b6dcde5c74 powerpc: Fix hypervisor TLB batching
Profiling of a page fault scalability microbenchmark shows flush_hash_range
is not calling the batch hpte invalidate hcall (H_BULK_REMOVE).

It turns out we have a duplicate firmware feature for hcall-bulk and the
current setup code stops after finding the first match. This meant we never
batch and always do individual invalidates.

The patch below removes the duplicate and shifts FW_FEATURE_CMO to close
the gap. With the patch applied the single threaded page fault rate improves
from 217169 to 238755 per second on a POWER5 test box, a 10% improvement.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-10-14 16:58:37 +11:00
Benjamin Herrenschmidt 8d8997f34e powerpc/mm: Fix hang accessing top of vmalloc space
On pSeries, we always force the IO space to be mapped using 4K
pages even with a 64K base page size to cope with some limitations
in the HV interface to some devices.

However, the SLB miss handler code to discriminate between vmalloc
and ioremap space uses a CPU feature section such that the code
is nop'ed out when the processor support large pages non-cachable
mappings.

Thus, we end up always using the ioremap page size for vmalloc
segments on such processors, causing a discrepency between the
segment and the hash table, and thus a hang continously hashing
the page.

It works for the first segment of the vmalloc space since that
segment is "bolted" in by C code correctly, and thankfully we
almost never use the vmalloc space beyond the first segment,
but the new percpu code made the bug happen.

This fixes it by removing the feature section from the assembly,
we now always do the comparison between vmalloc and ioremap.

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

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-10-14 16:58:36 +11:00
Michael Ellerman aee7a283bb powerpc: Fix memory leak in axon_msi.c
cppcheck found a memory leak in axon_msi, if dcr_base or dcr_len are zero,
we have already allocated msic, so we should free it in the error path.

Signed-off-by: Eric Sesterhenn <eric.sesterhenn@lsexperts.de>
Acked-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-10-14 16:58:36 +11:00
Benjamin Herrenschmidt 11a50873ef powerpc/pmac: Fix issues with sleep on some powerbooks
Since the change of how interrupts are disabled during suspend,
certain PowerBook models started exhibiting various issues during
suspend or resume from sleep.

I finally tracked it down to the code that runs various "platform"
functions (kind of little scripts extracted from the device-tree),
which uses our i2c and PMU drivers expecting interrutps to work,
and at a time where with the new scheme, they have been disabled.

This causes timeouts internally which for some reason results in
the PMU being unable to see the trackpad, among other issues, really
it depends on the machine. Most of the time, we fail to properly adjust
some clocks for suspend/resume so the results are not always
predictable.

This patch fixes it by using IRQF_TIMER for both the PMU and the I2C
interrupts. I prefer doing it this way than moving the call sites since
I really want those platform functions to still be called after all
drivers (and before sysdevs).

We also do a slight cleanup to via-pmu.c driver to make sure the
ADB autopoll mask is handled correctly when doing bus resets

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-10-14 16:58:35 +11:00