Dave Airlie [Wed, 20 Feb 2008 00:02:20 +0000 (10:02 +1000)]
drm: add support for passing state into the suspend hooks.
fix i915 driver to use state for hibernate save avoidance.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Jesse Barnes [Tue, 29 Jan 2008 05:05:22 +0000 (21:05 -0800)]
drm/i915: Fix hibernate save/restore of VGA attribute regs
In hibernate, we may end up calling the VGA save regs function twice, so we need to make sure it's idempotent. That means leaving ARX in index mode after the first save operation. Fixes hibernate on 965.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Keith Packard [Sun, 17 Feb 2008 03:19:29 +0000 (19:19 -0800)]
drm/i915 more registers for S3 (DSPCLK_GATE_D, CACHE_MODE_0, MI_ARB_STATE)
Failing to preserve the MI_ARB_STATE register was causing FIFO underruns on
the VGA output on my HP 2510p after resume.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Jesse Barnes [Fri, 8 Feb 2008 01:33:28 +0000 (17:33 -0800)]
drm/i915: restore pipeconf regs unconditionally
On many chipsets, the checks for DPLL enable or VGA mode will prevent the pipeconf regs from being restored, which could result in a blank display or X failing to come back after resume. So restore them unconditionally along with actually restoring pipe B's palette correctly.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Jesse Barnes [Tue, 19 Feb 2008 23:39:58 +0000 (09:39 +1000)]
drm/i915: save/restore interrupt state
On resume, if the interrupt state isn't restored correctly, we may end
up with a flood of unexpected or ill-timed interrupts, which could cause
the kernel to disable the interrupt or vblank events to happen at the
wrong time. So save/restore them properly.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Nick Piggin [Thu, 7 Feb 2008 06:20:50 +0000 (16:20 +1000)]
drm: convert drm from nopage to fault.
Remove redundant vma range checks.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Zhenyu Wang [Tue, 19 Feb 2008 10:59:09 +0000 (20:59 +1000)]
i915: wrap chipset types requiring hw status set ioctl
Also applys to recent added new chipset.
Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Maciej Cencora [Tue, 19 Feb 2008 11:32:45 +0000 (21:32 +1000)]
drm/radeon: add initial rs690 support to drm.
This adds support for configuring the RS690 GART.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Linus Torvalds [Tue, 19 Feb 2008 17:08:49 +0000 (09:08 -0800)]
Revert "SLUB: Alternate fast paths using cmpxchg_local"
This reverts commit
1f84260c8ce3b1ce26d4c1d6dedc2f33a3a29c0c, which is
suspected to be the reason for some very occasional and hard-to-trigger
crashes that usually look related to memory allocation (mostly reported
in networking, but since that's generally the most common source of
shortlived allocations - and allocations in interrupt contexts - that in
itself is not a big clue).
See for example
http://bugzilla.kernel.org/show_bug.cgi?id=9973
http://lkml.org/lkml/2008/2/19/278
etc.
One promising suspicion for what the root cause of bug is (which also
explains why it's so hard to trigger in practice) came from Eric
Dumazet:
"I wonder how SLUB_FASTPATH is supposed to work, since it is affected
by a classical ABA problem of lockless algo.
cmpxchg_local(&c->freelist, object, object[c->offset]) can succeed,
while an interrupt came (on this cpu), and several allocations were
done, and one free was performed at the end of this interruption, so
'object' was recycled.
c->freelist can then contain the previous value (object), but
object[c->offset] was changed by IRQ.
We then put back in freelist an already allocated object."
but another reason for the revert is simply that everybody agrees that
this code was the main suspect just by virtue of the pattern of oopses.
Cc: Torsten Kaiser <just.for.lkml@googlemail.com>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 19 Feb 2008 16:04:23 +0000 (08:04 -0800)]
Merge branch 'for-linus' of git://git390.osdl.marist.edu/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
[S390] qdio: FCP/SCSI write I/O stagnates on LPAR
[S390] Fix futex_atomic_cmpxchg_std inline assembly.
[S390] dcss: Fix Unlikely(x) != y
[S390] sclp: clean up send/receive naming scheme
[S390] etr: fix compile error on !SMP
[S390] qdio: fix qdio_activate timeout handling.
[S390] Initialize per cpu lowcores on cpu hotplug.
[S390] find bit corner case.
[S390] dasd: fix locking in __dasd_device_process_final_queue
[S390] Make sure enabled wait psw is loaded in default_idle.
[S390] Let NR_CPUS default to 32/64 on s390/s390x.
[S390] cio: Do timed recovery on workqueue.
[S390] cio: Remember to initialize recovery_lock.
Linus Torvalds [Tue, 19 Feb 2008 16:03:02 +0000 (08:03 -0800)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
libata: implement drain buffers
libata: eliminate the home grown dma padding in favour of
block: clear drain buffer if draining for write command
block: implement request_queue->dma_drain_needed
block: add request->raw_data_len
block: update bio according to DMA alignment padding
libata: update ATAPI overflow draining
elevator: make elevator_get() attempt to load the appropriate module
cfq-iosched: add hlist for browsing parallel to the radix tree
block: make blk_rq_map_user() clear ->bio if it unmaps it
fs/block_dev.c: remove #if 0'ed code
make struct def_blk_aops static
make blk_settings_init() static
make blk_ioc_init() static
make blk-core.c:request_cachep static again
Linus Torvalds [Tue, 19 Feb 2008 16:02:04 +0000 (08:02 -0800)]
Merge git://git./linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
[WATCHDOG] HP ProLiant WatchDog driver
[WATCHDOG] blackfin Watchdog driver: relocate all strings used in __init functions to __initdata
[WATCHDOG] Convert mtx1 wdt to be a platform device and use generic GPIO API
[WATCHDOG] Add support for SB1 hardware watchdog
Linus Torvalds [Tue, 19 Feb 2008 15:54:02 +0000 (07:54 -0800)]
Merge git://git./linux/kernel/git/tglx/linux-2.6-genirq
* git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-genirq:
genirq: do not leave interupts enabled on free_irq
genirq: spurious.c: use time_* macros
Linus Torvalds [Tue, 19 Feb 2008 15:53:28 +0000 (07:53 -0800)]
Merge git://git./linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC64]: Add regs_return_value().
[SPARC64]: Kill pcic_present().
[SPARC]: Kill 'prom_palette'.
[ATYFB]: Kill 'prom_palette' sparc code.
[SPARC64]: Kill 'prom_keyboard'.
[SPARC]: Kill extern decl of 'panic_setup'.
[SPARC64]: Delete 'boot_flags'.
[SPARC64]: Kill unused function 'kernel_enter_debugger'.
[SPARC64] arch/sparc64/kernel/unaligned.c: Use time_* macros
[SPARC64]: Always register a PROM based early console.
[SPARC64]: Update defconfig.
[SPARC64]: Add -mtune=ultrasparc3 if possible.
[SPARC64]: Remove Makefile code for ancient gcc and binutils.
[SPARC64]: Remove DEBUG_BOOTMEM.
[SPARC64]: Use shorter "get_zeroed_page" call.
[SPARC]: Use shorter form of "get_zeroed_page".
[SPARC]: video/cg14.c and video/sbuslib.c build fixes
Linus Torvalds [Tue, 19 Feb 2008 15:52:45 +0000 (07:52 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (60 commits)
[NIU]: Bump driver version and release date.
[NIU]: Fix BMAC alternate MAC address indexing.
net: fix kernel-doc warnings in header files
[IPV6]: Use BUG_ON instead of if + BUG in fib6_del_route.
[IPV6]: dst_entry leak in ip4ip6_err. (resend)
bluetooth: do not move child device other than rfcomm
bluetooth: put hci dev after del conn
[NET]: Elminate spurious print_mac() calls.
[BLUETOOTH] hci_sysfs.c: Kill build warning.
[NET]: Remove MAC_FMT
net/8021q/vlan_dev.c: Use print_mac.
[XFRM]: Fix ordering issue in xfrm_dst_hash_transfer().
[BLUETOOTH] net/bluetooth/hci_core.c: Use time_* macros
[IPV6]: Fix hardcoded removing of old module code
[NETLABEL]: Move some initialization code into __init section.
[NETLABEL]: Shrink the genl-ops registration code.
[AX25] ax25_out: check skb for NULL in ax25_kick()
[TCP]: Fix tcp_v4_send_synack() comment
[IPV4]: fix alignment of IP-Config output
Documentation: fix tcp.txt
...
Casey Schaufler [Fri, 15 Feb 2008 23:24:25 +0000 (15:24 -0800)]
Smack: unlabeled outgoing ambient packets
Smack uses CIPSO labeling, but allows for unlabeled packets by
specifying an "ambient" label that is applied to incoming unlabeled
packets.
Because the other end of the connection may dislike IP options, and ssh
is one know application that behaves thus, it is prudent to respond in
kind.
This patch changes the network labeling behavior such that an outgoing
packet that would be given a CIPSO label that matches the ambient label
is left unlabeled. An "unlbl" domain is added and the netlabel
defaulting mechanism invoked rather than assuming that everything is
CIPSO. Locking has been added around changes to the ambient label as
the mechanisms used to do so are more involved.
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Acked-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ursula Braun [Tue, 19 Feb 2008 14:29:35 +0000 (15:29 +0100)]
[S390] qdio: FCP/SCSI write I/O stagnates on LPAR
If running on LPAR, qdio might overlook an incoming buffer in certain
scenarios. The patch makes sure that incoming buffers are detected
immediately in all situations.
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Heiko Carstens [Tue, 19 Feb 2008 14:29:34 +0000 (15:29 +0100)]
[S390] Fix futex_atomic_cmpxchg_std inline assembly.
Add missing exception table entry so that the kernel can handle
proctection exceptions as well on the cs instruction. Currently only
specification exceptions are handled correctly.
The missing entry allows user space to crash the kernel.
Cc: stable <stable@kernel.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Roel Kluin [Tue, 19 Feb 2008 14:29:33 +0000 (15:29 +0100)]
[S390] dcss: Fix Unlikely(x) != y
Fix Unlikely(x) != y
Cc: Gerald Schaefer <geraldsc@de.ibm.com>
Cc: Stefan Weinhuber <wein@de.ibm.com>
Cc: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Peter Oberparleiter [Tue, 19 Feb 2008 14:29:32 +0000 (15:29 +0100)]
[S390] sclp: clean up send/receive naming scheme
Make state change events adjust the correct mask by cleaning up
naming inconsistencies. Also remove chance for lockup by removing
unnecessary mask related check before reading events.
Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Heiko Carstens [Tue, 19 Feb 2008 14:29:31 +0000 (15:29 +0100)]
[S390] etr: fix compile error on !SMP
Since
a5fbb6d1064be885d2a6b82f625186753cf74848
"KVM: fix !SMP build error" smp_call_function isn't a define anymore
that folds into nothing but a define that calls up_smp_call_function
with all parameters. Hence we cannot #ifdef out the unused code
anymore...
This seems to be the preferred method, so do this for s390 as well.
arch/s390/kernel/time.c: In function 'etr_sync_clock':
arch/s390/kernel/time.c:825: error: 'clock_sync_cpu_start' undeclared
arch/s390/kernel/time.c:862: error: 'clock_sync_cpu_end' undeclared
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Heiko Carstens [Tue, 19 Feb 2008 14:29:30 +0000 (15:29 +0100)]
[S390] qdio: fix qdio_activate timeout handling.
Current code in qdio_activate waits for at least 5 seconds
until it returns. It may return earlier if an error occurs,
but not if everything is ok. This large timeout value
became visible with commit
dfa77f611ff295598e218aa0eb6efa73a5cf26d0
"qdio: set QDIO_ACTIVATE_TIMEOUT to 5s", which intended to
fix the timeout value which was zero. In turn setting an
FCP adapter online took 5 seconds.
In practice waiting for 5ms before continuing is sufficient
as pointed out by Utz Bacher and Cornelia Huck.
Cc: Utz Bacher <utz.bacher@de.ibm.com>
Cc: Jan Glauber <jan.glauber@de.ibm.com>
Cc: Ursula Braun <braunu@de.ibm.com>
Cc: Martin Peschke <mp3@de.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Heiko Carstens [Tue, 19 Feb 2008 14:29:29 +0000 (15:29 +0100)]
[S390] Initialize per cpu lowcores on cpu hotplug.
Just copy the first 512 read-only bytes of the current cpu lowcore if
a new cpu gets onlined. The rest is zeroed out and must be explicitly
initialized. Current code just copies the entire lowcore and
initializes the needed fields.
This should reveal bugs in future enhancements quite early.
Also when the lowcore of the first cpu is replaced this is now done
atomically (no interrupts, no machine checks).
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Martin Schwidefsky [Tue, 19 Feb 2008 14:29:28 +0000 (15:29 +0100)]
[S390] find bit corner case.
Fix [ext2_]find_first_[zero_]bit for the corner case of an all clear
or all set bit field by always handling that last word of the bit field
with __ffz_word/__ffs_word.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Stefan Weinhuber [Tue, 19 Feb 2008 14:29:27 +0000 (15:29 +0100)]
[S390] dasd: fix locking in __dasd_device_process_final_queue
After setting the status of the cqr and releasing the lock for the
block cqr queue, we call the cqr callback function, which will usually
just trigger the dasd_block_tasklet. But when the tasklet is already
running the cqr might be processed before we invoke the callback
function. In rare cases the callback pointer may already be invalid
by the time we want to call it, which will result in a panic.
Solution: Call the callback function first and then release the lock.
Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Heiko Carstens [Tue, 19 Feb 2008 14:29:26 +0000 (15:29 +0100)]
[S390] Make sure enabled wait psw is loaded in default_idle.
If both NO_IDLE_HZ and VIRT_TIMER are disabled default_idle won't load
an enabled wait psw and busy loop instead. This is because the
idle_chain is empty and the return value of atomic_notifier_call_chain
will be NOTIFY_DONE, which causes default_idle to return instead of
loading an enabled wait psw.
Fix this by calling __atomic_notifier_call_chain instead and add proper
return value handling.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Heiko Carstens [Tue, 19 Feb 2008 14:29:25 +0000 (15:29 +0100)]
[S390] Let NR_CPUS default to 32/64 on s390/s390x.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cornelia Huck [Tue, 19 Feb 2008 14:29:24 +0000 (15:29 +0100)]
[S390] cio: Do timed recovery on workqueue.
We can't do our recovery in softirq context, so we schedule it from
our timer function.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cornelia Huck [Tue, 19 Feb 2008 14:29:23 +0000 (15:29 +0100)]
[S390] cio: Remember to initialize recovery_lock.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
James Bottomley [Tue, 19 Feb 2008 10:36:57 +0000 (11:36 +0100)]
libata: implement drain buffers
This just updates the libata slave configure routine to take advantage
of the block layer drain buffers. It also adjusts the size lengths in
the atapi code to add the drain buffer to the DMA length so the driver
knows it can rely on it.
I suspect I should also be checking for AHCI as well as ATA_DEV_ATAPI,
but I couldn't see how to do that easily.
tj: * atapi_drain_needed() added such that draining is applied to only
misc ATAPI commands.
* q->bounce_gfp used when allocating drain buffer.
* Now duplicate ATAPI PIO drain logic dropped.
* ata_dev_printk() used instead of sdev_printk().
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
James Bottomley [Tue, 19 Feb 2008 10:36:56 +0000 (11:36 +0100)]
libata: eliminate the home grown dma padding in favour of
that provided by the block layer
ATA requires that all DMA transfers begin and end on word boundaries.
Because of this, a large amount of machinery grew up in ide to adjust
scatterlists on this basis. However, as of 2.5, the block layer has a
dma_alignment variable which ensures both the beginning and length of a
DMA transfer are aligned on the dma_alignment boundary. Although the
block layer does adjust the beginning of the transfer to ensure this
happens, it doesn't actually adjust the length, it merely makes sure
that space is allocated for transfers beyond the declared length. The
upshot of this is that scatterlists may be padded to any size between
the actual length and the length adjusted to the dma_alignment safely
knowing that memory is allocated in this region.
Right at the moment, SCSI takes the default dma_aligment which is on a
512 byte boundary. Note that this aligment only applies to transfers
coming in from user space. However, since all kernel allocations are
automatically aligned on a minimum of 32 byte boundaries, it is safe to
adjust them in this manner as well.
tj: * Adjusting sg after padding is done in block layer. Make libata
set queue alignment correctly for ATAPI devices and drop broken
sg mangling from ata_sg_setup().
* Use request->raw_data_len for ATAPI transfer chunk size.
* Killed qc->raw_nbytes.
* Separated out killing qc->n_iter.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Tejun Heo [Tue, 19 Feb 2008 10:36:55 +0000 (11:36 +0100)]
block: clear drain buffer if draining for write command
Clear drain buffer before chaining if the command in question is a
write.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Tejun Heo [Tue, 19 Feb 2008 10:36:53 +0000 (11:36 +0100)]
block: implement request_queue->dma_drain_needed
Draining shouldn't be done for commands where overflow may indicate
data integrity issues. Add dma_drain_needed callback to
request_queue. Drain buffer is appened iff this function returns
non-zero.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Tejun Heo [Tue, 19 Feb 2008 10:36:35 +0000 (11:36 +0100)]
block: add request->raw_data_len
With padding and draining moved into it, block layer now may extend
requests as directed by queue parameters, so now a request has two
sizes - the original request size and the extended size which matches
the size of area pointed to by bios and later by sgs. The latter size
is what lower layers are primarily interested in when allocating,
filling up DMA tables and setting up the controller.
Both padding and draining extend the data area to accomodate
controller characteristics. As any controller which speaks SCSI can
handle underflows, feeding larger data area is safe.
So, this patch makes the primary data length field, request->data_len,
indicate the size of full data area and add a separate length field,
request->raw_data_len, for the unmodified request size. The latter is
used to report to higher layer (userland) and where the original
request size should be fed to the controller or device.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Tejun Heo [Tue, 19 Feb 2008 10:35:38 +0000 (11:35 +0100)]
block: update bio according to DMA alignment padding
DMA start address and transfer size alignment for PC requests are
achieved using bio_copy_user() instead of bio_map_user(). This works
because bio_copy_user() always uses full pages and block DMA alignment
isn't allowed to go over PAGE_SIZE.
However, the implementation didn't update the last bio of the request
to make this padding visible to lower layers. This patch makes
blk_rq_map_user() extend the last bio such that it includes the
padding area and the size of area pointed to by the request is
properly aligned.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Tejun Heo [Tue, 19 Feb 2008 10:35:37 +0000 (11:35 +0100)]
libata: update ATAPI overflow draining
For misc ATAPI commands which transfer variable length data to the
host, overflow can occur due to application or hardware bug. Such
overflows can be ignored safely as long as overflow data is properly
drained. libata HSM implementation has this implemented in
__atapi_pio_bytes() and recently updated for 2.6.24-rc but it requires
further improvements. Improve drain logic such that...
* Report overflow errors using ehi desc mechanism instead of printing
directly.
* Properly calculate the number of bytes to be drained considering
actual number of consumed bytes for partial draining.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Thomas Gleixner [Mon, 18 Feb 2008 17:25:17 +0000 (18:25 +0100)]
genirq: do not leave interupts enabled on free_irq
The default_disable() function was changed in commit:
76d2160147f43f982dfe881404cfde9fd0a9da21
genirq: do not mask interrupts by default
It removed the mask function in favour of the default delayed
interrupt disabling. Unfortunately this also broke the shutdown in
free_irq() when the last handler is removed from the interrupt for
those architectures which rely on the default implementations. Now we
can end up with a enabled interrupt line after the last handler was
removed, which can result in spurious interrupts.
Fix this by adding a default_shutdown function, which is only
installed, when the irqchip implementation does provide neither a
shutdown nor a disable function.
[@stable: affected versions: .21 - .24 ]
Pointed-out-by: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: stable@kernel.org
Tested-by: Michael Hennerich <Michael.Hennerich@analog.com>
S.Caglar Onur [Thu, 14 Feb 2008 15:36:51 +0000 (17:36 +0200)]
genirq: spurious.c: use time_* macros
The functions time_before, time_before_eq, time_after, and
time_after_eq are more robust for comparing jiffies against other
values.
So following patch implements usage of the time_after() macro, defined
at linux/jiffies.h, which deals with wrapping correctly
Signed-off-by: S.Caglar Onur <caglar@pardus.org.tr>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Jens Axboe [Tue, 19 Feb 2008 09:20:37 +0000 (10:20 +0100)]
elevator: make elevator_get() attempt to load the appropriate module
Currently we fail if someone requests a valid io scheduler, but it's
modular and not currently loaded. That can happen from a driver init
asking for a different scheduler, or online switching through sysfs
as requested by a user.
This patch makes elevator_get() request_module() to attempt to load
the appropriate module, instead of requiring that done manually.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Jens Axboe [Tue, 19 Feb 2008 09:02:29 +0000 (10:02 +0100)]
cfq-iosched: add hlist for browsing parallel to the radix tree
It's cumbersome to browse a radix tree from start to finish, especially
since we modify keys when a process exits. So add a hlist for the single
purpose of browsing over all known cfq_io_contexts, used for exit,
io prio change, etc.
This fixes http://bugzilla.kernel.org/show_bug.cgi?id=9948
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Jens Axboe [Mon, 18 Feb 2008 12:51:56 +0000 (13:51 +0100)]
block: make blk_rq_map_user() clear ->bio if it unmaps it
That way the interface is symmetric, and calling blk_rq_unmap_user()
on the request wont oops.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Adrian Bunk [Mon, 18 Feb 2008 12:48:32 +0000 (13:48 +0100)]
fs/block_dev.c: remove #if 0'ed code
Commit
b2e895dbd80c420bfc0937c3729b4afe073b3848 #if 0'ed this code stating:
<-- snip -->
[PATCH] revert blockdev direct io back to 2.6.19 version
Andrew Vasquez is reporting as-iosched oopses and a 65% throughput
slowdown due to the recent special-casing of direct-io against
blockdevs. We don't know why either of these things are occurring.
The patch minimally reverts us back to the 2.6.19 code for a 2.6.20
release.
<-- snip -->
It has since been dead code, and unless someone wants to revive it now
it's time to remove it.
This patch also makes bio_release_pages() static again and removes the
ki_bio_count member from struct kiocb, reverting changes that had been
done for this dead code.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
Adrian Bunk [Mon, 18 Feb 2008 12:48:31 +0000 (13:48 +0100)]
make struct def_blk_aops static
This patch makes the needlessly global struct def_blk_aops static.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
Adrian Bunk [Mon, 18 Feb 2008 12:45:55 +0000 (13:45 +0100)]
make blk_settings_init() static
blk_settings_init() can become static.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
Adrian Bunk [Mon, 18 Feb 2008 12:45:53 +0000 (13:45 +0100)]
make blk_ioc_init() static
blk_ioc_init() can become static.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
Adrian Bunk [Mon, 18 Feb 2008 12:45:51 +0000 (13:45 +0100)]
make blk-core.c:request_cachep static again
request_cachep needlessly became global.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
David S. Miller [Tue, 19 Feb 2008 08:31:22 +0000 (00:31 -0800)]
[SPARC64]: Add regs_return_value().
Needed for kretprobes.
Noticed by Ananth N Mavinakayanahalli.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 19 Feb 2008 05:30:48 +0000 (21:30 -0800)]
[NIU]: Bump driver version and release date.
Signed-off-by: David S. Miller <davem@davemloft.net>
Matheos Worku [Tue, 19 Feb 2008 05:30:03 +0000 (21:30 -0800)]
[NIU]: Fix BMAC alternate MAC address indexing.
BMAC port alternate MAC address index needs to start at 1. Index 0 is
used for the main MAC address.
Signed-off-by: Matheos Worku <matheos.worku@sun.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Randy Dunlap [Tue, 19 Feb 2008 04:52:13 +0000 (20:52 -0800)]
net: fix kernel-doc warnings in header files
Add missing structure kernel-doc descriptions to sock.h & skbuff.h
to fix kernel-doc warnings.
(I think that Stephen H. sent a similar patch, but I can't find it.
I just want to kill the warnings, with either patch.)
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Emelyanov [Tue, 19 Feb 2008 04:50:42 +0000 (20:50 -0800)]
[IPV6]: Use BUG_ON instead of if + BUG in fib6_del_route.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Denis V. Lunev [Tue, 19 Feb 2008 04:49:36 +0000 (20:49 -0800)]
[IPV6]: dst_entry leak in ip4ip6_err. (resend)
The result of the ip_route_output is not assigned to skb. This means that
- it is leaked
- possible OOPS below dereferrencing skb->dst
- no ICMP message for this case
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dave Young [Tue, 19 Feb 2008 04:45:41 +0000 (20:45 -0800)]
bluetooth: do not move child device other than rfcomm
hci conn child devices other than rfcomm tty should not be moved here.
This is my lost, thanks for Barnaby's reporting and testing.
Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dave Young [Tue, 19 Feb 2008 04:44:01 +0000 (20:44 -0800)]
bluetooth: put hci dev after del conn
Move hci_dev_put to del_conn to avoid hci dev going away before hci conn.
Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Tue, 19 Feb 2008 02:46:56 +0000 (18:46 -0800)]
Merge git://git./linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
ide-cd: fix missing residual count setting in DMA mode
ht6560b: force prefetch for some devices
ht6560b can only do up to PIO mode 4
linux/hdsmart.h: fix goofups (take 2)
via82cxxx: add new PCI id for cx700
falconide: locking bugfix
MAINTAINERS: update ide-cd maintainer's email address
ide/libata: ST310211A has buggy HPA too
ide: Add missing base addresses for falconide and macide
Eric Paris [Mon, 18 Feb 2008 23:23:16 +0000 (18:23 -0500)]
Audit: use == not = in if statements
Clearly this was supposed to be an == not an = in the if statement.
This patch also causes us to stop processing execve args once we have
failed rather than continuing to loop on failure over and over and over.
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David S. Miller [Tue, 19 Feb 2008 00:50:22 +0000 (16:50 -0800)]
[NET]: Elminate spurious print_mac() calls.
Patrick McHardy notes that print_mac() can get invoked
even if the result it unused (f.e. as an argument to
pr_debug() when DEBUG is not defined).
Mark this function as "__pure" to eliminate this problem.
Signed-off-by: David S. Miller <davem@davemloft.net>
Kiyoshi Ueda [Tue, 19 Feb 2008 00:41:26 +0000 (01:41 +0100)]
ide-cd: fix missing residual count setting in DMA mode
This patch fixes the missing residual count setting in DMA mode,
which was introduced during the conversion to blk-end-request.
The residual count could be used by the request submitter.
So if it isn't set correctly, some upper layers does not work.
(e.g. wodim for CD burning.)
The bug is in only DMA mode.
In PIO mode, we are setting the residual count correctly,
so no need to fix.
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Reported-by: Andreas Schwab <schwab@suse.de>
Tested-by: Andreas Schwab <schwab@suse.de>
Tested-by: Laura Garcia <nevola@gmail.com>
Tested-by: Borislav Petkov <petkovbb@googlemail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Jan Evert van Grootheest [Tue, 19 Feb 2008 00:41:26 +0000 (01:41 +0100)]
ht6560b: force prefetch for some devices
Prefetch needs to be set for some ide devices to work when connected to
a ht6560b interface. This was not always done properly, causing a system
with a HD and CD on the primary interface to not work properly. Or, in
effect, hang hard.
This patch forces prefetch on devices before checking whether it
is necessary to change the settings in the interface
This patch should also be applied to 2.4. I don't currently have a
2.4 tree around.
(also change my email address)
Signed-off-by: Jan Evert van Grootheest <janevert@caiway.nl>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Jan Evert van Grootheest [Tue, 19 Feb 2008 00:41:26 +0000 (01:41 +0100)]
ht6560b can only do up to PIO mode 4
According to the datasheet, ht6560b only supports up to PIO mode 4.
[bart: manually ported it over 2.6.25-rc2]
Signed-off-by: Jan Evert van Grootheest <janevert@caiway.nl>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Tue, 19 Feb 2008 00:41:26 +0000 (01:41 +0100)]
linux/hdsmart.h: fix goofups (take 2)
Fix goofups of commit
76166952bbc81dda1c8a8c14e75a2aa06f6c052c
("<linux/hdsmart.h> is not used by kernel code").
Also update include/linux/Kbuild to reflect the fact that hdsmart.h
uses __KERNEL__ ifdefs now.
Reported-by: "Robert P. J. Day" <rpjday@crashcourse.ca>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Andrew Smith [Tue, 19 Feb 2008 00:41:26 +0000 (01:41 +0100)]
via82cxxx: add new PCI id for cx700
[bart: manually ported it over via82cxxx changes]
From: Andrew Smith <asmith@tranquility.fsbusiness.co.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Tue, 19 Feb 2008 00:41:25 +0000 (01:41 +0100)]
falconide: locking bugfix
commit
8ac4ce742c66100931b6f2d7a36b0df08bc721fe ("ide: fix host drivers
depending on ide_generic to probe for interfaces (take 2)") moved probing
to falconide but forgot to take care of Atari specific locking - fix it.
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Borislav Petkov [Tue, 19 Feb 2008 00:41:25 +0000 (01:41 +0100)]
MAINTAINERS: update ide-cd maintainer's email address
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Mikko Rapeli [Tue, 19 Feb 2008 00:41:25 +0000 (01:41 +0100)]
ide/libata: ST310211A has buggy HPA too
Signed-off-by: Mikko Rapeli <mikko.rapeli@teleca.com>
Tested-by: Bart Champagne <bart@as35701.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Geert Uytterhoeven [Tue, 19 Feb 2008 00:41:24 +0000 (01:41 +0100)]
ide: Add missing base addresses for falconide and macide
commit
29dd59755a849cc6475faa6a75f3b804e23a6fc2 ("ide: remove ide_setup_ports")
forgot to take into account the base addresses for the CONTROL registers for
falconide and macide, as pointed out by Michael Schmitz.
Falconide was tested on Aranym.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
David S. Miller [Tue, 19 Feb 2008 00:40:10 +0000 (16:40 -0800)]
[SPARC64]: Kill pcic_present().
And also it's helper function pci_is_controller(). Both
are unused.
I can't remove the equivalent from sparc32 yet as some
ancient bus probing code still uses that platform's version.
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Mon, 18 Feb 2008 23:52:40 +0000 (15:52 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
RDMA/nes: Fix possible array overrun
RDMA/nes: Fix VLAN support
RDMA/nes: Fix MAC interrupt erroneously masked on ifdown
IB: Fix return value in ib_device_register_sysfs()
Linus Torvalds [Mon, 18 Feb 2008 23:51:40 +0000 (15:51 -0800)]
Merge git://git./linux/kernel/git/x86/linux-2.6-x86
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
x86: fix lguest build failure
x86: reenable support for system without on node0
x86: CPA: avoid double checking of alias ranges
x86: CPA no alias checking for _NX
x86: zap invalid and unused pmds in early boot
x86: CPA, fix alias checks
Linus Torvalds [Mon, 18 Feb 2008 23:49:47 +0000 (15:49 -0800)]
Merge git://git./linux/kernel/git/mchehab/v4l-dvb
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (59 commits)
V4L/DVB (7219): zoran: Fix namespace conflicts with Zoran 'GPIO_MAX' enum
V4L/DVB (7205): tuner-xc2028 depends on FW_LOADER
V4L/DVB (7201): cx88-mpeg: Fix race condition in variable access
V4L/DVB (7200): Fix FM firmware loading
V4L/DVB (7198): V4L, include ioctl.h in videodev headers
V4L/DVB (7197): bttv: Fix overlay divide error
V4L/DVB (7195): xc5000: fix build error when built as module
V4L/DVB (7194): cx88-mpeg: Allow concurrent access to cx88-mpeg devices
V4L/DVB (7193): tveeprom: Add proper tuner mapping for hauppauge eeprom id 133
V4L/DVB (7192): Adds support for Genius TVGo A11MCE
V4L/DVB (7189): autosuspend support
V4L/DVB (7188): radio-si470x version 1.0.6
V4L/DVB (7186): tda10086: make the 22kHz tone for DISEQC a config option
V4L/DVB (7183): radio-si470x: fix build warning
V4L/DVB (7180): em28xx: add URB_NO_TRANSFER_DMA_MAP, since urb->transfer_dma is set
V4L/DVB (7179): Allow more than one em28xx board
V4L/DVB (7164): em28xx-alsa: Add a missing mutex
V4L/DVB (7163): em28xx: makes audio settings more stable
V4L/DVB (7162): em28xx: Fix endian and returns the correct values
V4L/DVB (7161): em28xx: Fix printing debug values higher than 127
...
Linus Torvalds [Mon, 18 Feb 2008 23:46:21 +0000 (15:46 -0800)]
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
* 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6:
[XFS] Added quota targets and removed dmapi directory
[XFS] Fix up xfs out-of-tree builds. (a.k.a. external modules)
[XFS] Remove Makefile wrappers in XFS
Linus Torvalds [Mon, 18 Feb 2008 23:46:03 +0000 (15:46 -0800)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
[CRYPTO] null: Add missing Kconfig dependency on BLKCIPHER
[CRYPTO] tcrypt: Add missing Kconfig dependency on BLKCIPHER
[HIFN]: Fix invalid config ifdefs for RNG support
Linus Torvalds [Mon, 18 Feb 2008 23:45:48 +0000 (15:45 -0800)]
Merge git://git./linux/kernel/git/tglx/linux-2.6-hrt
* git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt:
timer_list: print relative expiry time signed
Linus Torvalds [Mon, 18 Feb 2008 23:41:05 +0000 (15:41 -0800)]
Merge git://git./linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
kbuild: explain why DEBUG_SECTION_MISMATCH is UNDEFINED
kbuild: fix building vmlinux.o
kbuild: allow -fstack-protector to take effect
kconfig: fix select in combination with default
David S. Miller [Mon, 18 Feb 2008 23:28:16 +0000 (15:28 -0800)]
[SPARC]: Kill 'prom_palette'.
The idea of this thing is we could save/restore the firmware's
palette when breaking in and out of the firmware prompt.
Only one driver implemented this (atyfb) and it's value is
questionable. If you're just debugging you don't really
care that the characters end up being purple or whatever.
And we can provide better debugging and firmware command
facilities with minimal in-kernel console I/O drivers.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 18 Feb 2008 23:26:43 +0000 (15:26 -0800)]
[ATYFB]: Kill 'prom_palette' sparc code.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 18 Feb 2008 23:21:30 +0000 (15:21 -0800)]
[SPARC64]: Kill 'prom_keyboard'.
Nothing ever sets it, so it just takes up space.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 18 Feb 2008 23:17:58 +0000 (15:17 -0800)]
[SPARC]: Kill extern decl of 'panic_setup'.
This was made static in kernel/panic.c a long time ago.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 18 Feb 2008 23:16:20 +0000 (15:16 -0800)]
[SPARC64]: Delete 'boot_flags'.
It is write-only, nothing tests it's value.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 18 Feb 2008 23:13:48 +0000 (15:13 -0800)]
[SPARC64]: Kill unused function 'kernel_enter_debugger'.
Signed-off-by: David S. Miller <davem@davemloft.net>
Rusty Russell [Sun, 3 Feb 2008 20:11:10 +0000 (07:11 +1100)]
x86: fix lguest build failure
drivers/lguest/x86/switcher_32.S:(.text+0x3815f8):
undefined reference to `LGUEST_PAGES_regs_trapnum'
This problem was caused by asm-offsets.c only having the offsets when
lguest *guest* support was set, not lguest host (host support used to
imply guest support, so now they're separate these bugs come out).
Lguest guest support and host support are separate config options:
they used to be tied together. Sort out which parts of asm-offsets are
needed for Guest and Host.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Yinghai Lu [Sun, 17 Feb 2008 10:02:21 +0000 (02:02 -0800)]
x86: reenable support for system without on node0
One system doesn't have RAM for node0 installed.
SRAT: PXM 0 -> APIC 0 -> Node 0
SRAT: PXM 0 -> APIC 1 -> Node 0
SRAT: PXM 1 -> APIC 2 -> Node 1
SRAT: PXM 1 -> APIC 3 -> Node 1
SRAT: Node 1 PXM 1 0-a0000
SRAT: Node 1 PXM 1 0-
dd000000
SRAT: Node 1 PXM 1 0-
123000000
ACPI: SLIT: nodes = 2
10 13
13 10
mapped APIC to
ffffffffff5fb000 (
fee00000)
Bootmem setup node 1
0000000000000000-
0000000123000000
NODE_DATA [
000000000000e000 -
0000000000014fff]
bootmap [
0000000000015000 -
00000000000395ff] pages 25
Could not find start_pfn for node 0
Pid: 0, comm: swapper Not tainted
2.6.24-smp-g5a514e21-dirty #14
Call Trace:
[<
ffffffff80bab498>] free_area_init_node+0x22/0x381
[<
ffffffff8045ffc5>] generic_swap+0x0/0x17
[<
ffffffff80bab0cc>] find_zone_movable_pfns_for_nodes+0x54/0x271
[<
ffffffff80baba5f>] free_area_init_nodes+0x239/0x287
[<
ffffffff80ba6311>] paging_init+0x46/0x4c
[<
ffffffff80b9dda5>] setup_arch+0x3c3/0x44e
[<
ffffffff80b978be>] start_kernel+0x6f/0x2c7
[<
ffffffff80b971cc>] _sinittext+0x1cc/0x1d3
This happens because node 0 is not online, but the node state in
mm/page_alloc.c has node 0 set.
nodemask_t node_states[NR_NODE_STATES] __read_mostly = {
[N_POSSIBLE] = NODE_MASK_ALL,
[N_ONLINE] = { { [0] = 1UL } },
So we need to clear node_online_map before initializing the memory.
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Thomas Gleixner [Fri, 15 Feb 2008 21:17:57 +0000 (22:17 +0100)]
x86: CPA: avoid double checking of alias ranges
When the CPA code is called with an virtual address in the range of
the direct mapping or the high alias then we do not need to run
through the alias check for this range.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Thomas Gleixner [Fri, 15 Feb 2008 20:49:46 +0000 (21:49 +0100)]
x86: CPA no alias checking for _NX
NX settings are not required to be consistent across alias mappings.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Thomas Gleixner [Fri, 15 Feb 2008 16:29:12 +0000 (17:29 +0100)]
x86: zap invalid and unused pmds in early boot
The early boot code maps KERNEL_TEXT_SIZE (currently 40MB) starting
from __START_KERNEL_map. The kernel itself only needs _text to _end
mapped in the high alias. On relocatible kernels the ASM setup code
adjusts the compile time created high mappings to the relocation. This
creates invalid pmd entries for negative offsets:
0xffffffff80000000 -> pmd entry:
ffffffffff2001e3
It points outside of the physical address space and is marked present.
This starts at the virtual address __START_KERNEL_map and goes up to
the point where the first valid physical address (0x0) is mapped.
Zap the mappings before _text and after _end right away in early
boot. This removes also the invalid entries.
Furthermore it simplifies the range check for high aliases.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Thomas Gleixner [Mon, 18 Feb 2008 19:54:14 +0000 (20:54 +0100)]
x86: CPA, fix alias checks
c_p_a() did not discover all aliases correctly. (such as when called
on vmalloc()-ed areas or ioremap()-ed areas)
Push the alias checks to the lower, physical level and consistently
discover all aliases that might exist: the low direct mappings and
the high linear kernel-text mappings (on 64-bit).
Thanks to Andi Kleen for pointing out that this was buggy.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Roland Dreier [Mon, 18 Feb 2008 18:33:59 +0000 (10:33 -0800)]
RDMA/nes: Fix possible array overrun
In nes_create_qp(), the test
if (nesqp->mmap_sq_db_index > NES_MAX_USER_WQ_REGIONS) {
is used to error out if the db_index is too large; however, if the
test doesn't trigger, then the index is used as
nes_ucontext->mmap_nesqp[nesqp->mmap_sq_db_index] = nesqp;
and mmap_nesqp is declared as
struct nes_qp *mmap_nesqp[NES_MAX_USER_WQ_REGIONS];
which leads to an array overrun if the index is exactly equal to
NES_MAX_USER_WQ_REGIONS. Fix this by bailing out if the index is
greater than or equal to NES_MAX_USER_WQ_REGIONS.
This was spotted by the Coverity checker (CID 2162).
Acked-by: Glenn Streiff <gstreiff@neteffect.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Thomas Mingarelli [Tue, 4 Dec 2007 17:41:54 +0000 (17:41 +0000)]
[WATCHDOG] HP ProLiant WatchDog driver
Hp is providing a Hardware WatchDog Timer driver that will only work with the
specific HW Timer located in the HP ProLiant iLO 2 ASIC. The iLO 2 HW Timer
will generate a Non-maskable Interrupt (NMI) 9 seconds before physically
resetting the server, by removing power, so that the event can be logged to
the HP Integrated Management Log (IML), a Non-Volatile Random Access Memory
(NVRAM). The logging of the event is performed using the HP ProLiant ROM via
an Industry Standard access known as a BIOS Service Directory Entry.
Signed-off-by: Thomas Mingarelli <thomas.mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Mike Frysinger [Wed, 30 Jan 2008 09:38:21 +0000 (17:38 +0800)]
[WATCHDOG] blackfin Watchdog driver: relocate all strings used in __init functions to __initdata
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Florian Fainelli [Mon, 7 Jan 2008 18:08:49 +0000 (19:08 +0100)]
[WATCHDOG] Convert mtx1 wdt to be a platform device and use generic GPIO API
This patch converts the MTX-1 to be a platform device, use the available
generic GPIO API for the MTX-1 board and register the miscdev alias.
Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Andrew Sharp [Fri, 14 Dec 2007 00:16:42 +0000 (16:16 -0800)]
[WATCHDOG] Add support for SB1 hardware watchdog
Support watchdog timers built into SiByte MIPS SoCs.
Signed-off-by: Andy Sharp <andy.sharp@onstor.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Mauro Carvalho Chehab [Fri, 15 Feb 2008 21:41:06 +0000 (18:41 -0300)]
V4L/DVB (7219): zoran: Fix namespace conflicts with Zoran 'GPIO_MAX' enum
Thanks to Martin Michlmayr <tbm@cyrius.com> for reporting this issue:
The zoran driver fails to compile on the ARM Orion platform with:
In file included from drivers/media/video/zoran_procfs.c:50:
drivers/media/video/zoran.h:232: error: expected identifier before numeric
constant
The reason is that drivers/media/video/zoran.h defines an enum with
GPIO_MAX in it, but Orion contains a #define GPIO_MAX 32 in
include/asm-arm/arch-orion/orion.h
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Paul Mundt [Thu, 14 Feb 2008 10:24:22 +0000 (07:24 -0300)]
V4L/DVB (7205): tuner-xc2028 depends on FW_LOADER
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Ricardo Cerqueira [Thu, 14 Feb 2008 01:41:15 +0000 (22:41 -0300)]
V4L/DVB (7201): cx88-mpeg: Fix race condition in variable access
There was a possible race condition in the increment/decrement of
the active device references counter.
Thanks to Trent Piepho (xyzzy@speakeasy.org) for bringing it up.
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Mauro Carvalho Chehab [Thu, 14 Feb 2008 04:52:48 +0000 (01:52 -0300)]
V4L/DVB (7200): Fix FM firmware loading
There's no need to load SCode table for FM.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Jiri Slaby [Wed, 13 Feb 2008 23:04:49 +0000 (20:04 -0300)]
V4L/DVB (7198): V4L, include ioctl.h in videodev headers
Fix compilation of user processes which includes videodev*.h but
not includes linux/ioctl.h:
v4l2ext_helper.c: In function 'process_ioctl':
v4l2ext_helper.c:183: warning: implicit declaration of function '_IOWR'
v4l2ext_helper.c:183: error: expected expression before 'struct'
v4l2ext_helper.c:183: error: case label does not reduce to an integer constant
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Robert Fitzsimons [Wed, 13 Feb 2008 19:38:11 +0000 (16:38 -0300)]
V4L/DVB (7197): bttv: Fix overlay divide error
The initial work to convert the bttv driver to V4L2 "Partial conversion
from V4L1 to V4L2" (
e84619b17440ccca4e4db7583d126c4189b987e5), missed
the line which set the appropriate overlay crop structure in the newly
allocated bttv_buffer. This then causes a divide error in the
bttv_calc_geo function.
Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Tony Breeds [Tue, 12 Feb 2008 05:54:33 +0000 (02:54 -0300)]
V4L/DVB (7195): xc5000: fix build error when built as module
drivers/built-in.o: In function `set_type':
tuner-core.c:(.text+0x8879d): undefined reference to `xc5000_attach'
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Roland Stoll [Mon, 11 Feb 2008 16:00:34 +0000 (13:00 -0300)]
V4L/DVB (7194): cx88-mpeg: Allow concurrent access to cx88-mpeg devices
It currently isn't possible to open the frontend device of cx88-mpeg devices
(DVB or Blackbird) multiple times concurrently. (for instance, to attach a
signal monitoring tool while reading a stream, or to send a frequency change
ioctl) This patch fixes that condition.
Signed-off-by: Roland Stoll <roland@xindex.de>
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Ricardo Cerqueira [Wed, 16 Jan 2008 22:56:55 +0000 (19:56 -0300)]
V4L/DVB (7193): tveeprom: Add proper tuner mapping for hauppauge eeprom id 133
Do away with the need to set tuner=63 on cx88xx with recent HVR-1300 boards
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>