Checkin 939b787130bf22887a09d8fd2641a094dcef8c22 changed the
"interrupt" macro, but the "interrupt" macro is also invoked
indirectly from the "apicinterrupt" macro.
The "apicinterrupt" macro probably should have its own collection of
systematic stubs for the same reason the main IRQ code does; as is it
is a huge amount of replicated code.
Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 12 Nov 2008 18:27:35 +0000 (10:27 -0800)]
x86: fix up the new IRQ code for older versions of gas
Older versions of gas don't implement the C-style != operator, they
instead want the Pascal-style <> operator. Change != to <> so we
don't break compilation with those old versions of gas.
H. Peter Anvin [Tue, 11 Nov 2008 21:51:52 +0000 (13:51 -0800)]
x86: 64 bits: shrink and align IRQ stubs
Move the IRQ stub generation to assembly to simplify it and for
consistency with 32 bits. Doing it in a C file with asm() statements
doesn't help clarity, and it prevents some optimizations.
Shrink the IRQ stubs down to just over four bytes per (we fit seven
into a 32-byte chunk.) This shrinks the total icache consumption of
the IRQ stubs down to an even kilobyte, if all of them are in active
use.
The downside is that we end up with a double jump, which could have a
negative effect on some pipelines. The double jump is always inside
the same cacheline on any modern chips.
To get the most effect, cache-align the IRQ stubs.
This makes the 64-bit code match changes already done to the 32-bit
code, and should open up irqinit*.c for unification.
H. Peter Anvin [Tue, 11 Nov 2008 21:24:58 +0000 (13:24 -0800)]
x86: 32 bits: shrink and align IRQ stubs
Shrink the IRQ stubs on 32 bits down to just over four bytes per (we
fit seven into a 32-byte chunk.) This shrinks the total icache
consumption of the IRQ stubs down to an even kilobyte, if all of them
are in active use.
The downside is that we end up with a double jump, which could have a
negative effect on some pipelines. The double jump is always inside
the same cacheline on any modern chips (the exception being
486/Elan/Geode which have only 16-byte cachelines, but are unlikely to
have too many interrupt sources.)
To get the most effect, cache-align the IRQ stubs.
H. Peter Anvin [Tue, 11 Nov 2008 21:03:07 +0000 (13:03 -0800)]
x86: 32 bit: interrupt stub consistency with 64 bit
Don't generate interrupt stubs for interrupt vectors below
FIRST_EXTERNAL_VECTOR, and make the table of interrupt vectors
(interrupt[]) __initconst. Both of these changes both conserve memory
and improve consistency with 64 bits.
Linus Torvalds [Tue, 11 Nov 2008 18:53:50 +0000 (10:53 -0800)]
Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
timers: handle HRTIMER_CB_IRQSAFE_UNLOCKED correctly from softirq context
nohz: disable tick_nohz_kick_tick() for now
irq: call __irq_enter() before calling the tick_idle_check
x86: HPET: enter hpet_interrupt_handler with interrupts disabled
x86: HPET: read from HPET_Tn_CMP() not HPET_T0_CMP
x86: HPET: convert WARN_ON to WARN_ON_ONCE
Linus Torvalds [Tue, 11 Nov 2008 18:52:25 +0000 (10:52 -0800)]
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sched: release buddies on yield
fix for account_group_exec_runtime(), make sure ->signal can't be freed under rq->lock
sched: clean up debug info
Linus Torvalds [Tue, 11 Nov 2008 18:51:50 +0000 (10:51 -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:
ring-buffer: prevent infinite looping on time stamping
ftrace: disable tracing on resize
ftrace: fix breakage in bin_fmt results
ftrace: ftrace.txt version update
ftrace: update txt document
Linus Torvalds [Tue, 11 Nov 2008 17:32:58 +0000 (09:32 -0800)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
* 'for-linus' of git://oss.sgi.com/xfs/xfs:
[XFS] XFS: Check for valid transaction headers in recovery
[XFS] handle memory allocation failures during log initialisation
[XFS] Account for allocated blocks when expanding directories
[XFS] Wait for all I/O on truncate to zero file size
[XFS] Fix use-after-free with log and quotas
Linus Torvalds [Tue, 11 Nov 2008 17:31:32 +0000 (09:31 -0800)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2: (21 commits)
ocfs2: Check search result in ocfs2_xattr_block_get()
ocfs2: fix printk related build warnings in xattr.c
ocfs2: truncate outstanding block after direct io failure
ocfs2/xattr: Proper hash collision handle in bucket division
ocfs2: return 0 in page_mkwrite to let VFS retry.
ocfs2: Set journal descriptor to NULL after journal shutdown
ocfs2: Fix check of return value of ocfs2_start_trans() in xattr.c.
ocfs2: Let inode be really deleted when ocfs2_mknod_locked() fails
ocfs2: Fix checking of return value of new_inode()
ocfs2: Fix check of return value of ocfs2_start_trans()
ocfs2: Fix some typos in xattr annotations.
ocfs2: Remove unused ocfs2_restore_xattr_block().
ocfs2: Don't repeat ocfs2_xattr_block_find()
ocfs2: Specify appropriate journal access for new xattr buckets.
ocfs2: Check errors from ocfs2_xattr_update_xattr_search()
ocfs2: Don't return -EFAULT from a corrupt xattr entry.
ocfs2: Check xattr block signatures properly.
ocfs2: add handler_map array bounds checking
ocfs2: remove duplicate definition in xattr
ocfs2: fix function declaration and definition in xattr
...
Linus Torvalds [Tue, 11 Nov 2008 17:25:21 +0000 (09:25 -0800)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (35 commits)
V4L/DVB (9516): cx18: Move DVB buffer transfer handling from irq handler to work_queue
V4L/DVB (9557): gspca: Small changes for the sensor HV7131B in zc3xx.
V4L/DVB (9556): gspca: Bad init sequence for sensor HV7131B in zc3xx.
V4L/DVB (9549): gspca: Fix a typo in one of gspca chips name.
V4L/DVB (9515): cx18: Use correct Mailbox IRQ Ack values and misc IRQ handling cleanup
V4L/DVB (9493): kconfig patch
V4L/DVB (9527): af9015: fix compile warnings
V4L/DVB (9524): af9013: fix bug in status reading
V4L/DVB (9511): cx18: Mark CX18_CPU_DE_RELEASE_MDL as a slow API call
V4L/DVB (9510): cx18: Fix write retries for registers that always change - part 2.
V4L/DVB (9506): ivtv/cx18: fix test whether modules should be loaded or not.
V4L/DVB (9499): cx88-mpeg: final fix for analogue only compilation + de-alloc fix
V4L/DVB (9496): cx88-blackbird: bugfix: cx88-blackbird-mpeg-users
V4L/DVB (9495): cx88-blackbird: bugfix: cx88-blackbird-poll-fix
V4L/DVB (9494): anysee: initialize anysee_usb_mutex statically
V4L/DVB (9492): unplug oops from dvb_frontend_init...
V4L/DVB (9486): ivtv/ivtvfb: no longer experimental
V4L/DVB (9485): ivtv: remove incorrect V4L1 & tvaudio dependency
V4L/DVB (9482): Documentation, especially regarding audio and informational links
V4L/DVB (9475): cx18: Disable write retries for registers that always change - part 1.
...
Linus Torvalds [Tue, 11 Nov 2008 17:22:24 +0000 (09:22 -0800)]
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm/i915: Move legacy breadcrumb out of the reserved status page area
drm/i915: Filter pci devices based on PCI_CLASS_DISPLAY_VGA
drm/radeon: map registers at load time
drm: Remove infrastructure for supporting i915's vblank swapping.
i915: Remove racy delayed vblank swap ioctl.
i915: Don't whine when pci_enable_msi() fails.
i915: Don't attempt to short-circuit object_wait_rendering by checking domains.
i915: Clean up sarea pointers on leavevt
i915: Save/restore MCHBAR_RENDER_STANDBY on GM965/GM45
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
dsa: fix master interface allmulti/promisc handling
dsa: fix skb->pkt_type when mac address of slave interface differs
net: fix setting of skb->tail in skb_recycle_check()
net: fix /proc/net/snmp as memory corruptor
mac80211: fix a buffer overrun in station debug code
netfilter: payload_len is be16, add size of struct rather than size of pointer
ipv6: fix ip6_mr_init error path
[4/4] dca: fixup initialization dependency
[3/4] I/OAT: fix async_tx.callback checking
[2/4] I/OAT: fix dma_pin_iovec_pages() error handling
[1/4] I/OAT: fix channel resources free for not allocated channels
ssb: Fix DMA-API compilation for non-PCI systems
SSB: hide empty sub menu
vlan: Fix typos in proc output string
[netdrvr] usb/hso: Cleanup rfkill error handling
sfc: Correct address of gPXE boot configuration in EEPROM
el3_common_init() should be __devinit, not __init
hso: rfkill type should be WWAN
mlx4_en: Start port error flow bug fix
af_key: mark policy as dead before destroying
Andy Walls [Wed, 5 Nov 2008 03:49:14 +0000 (00:49 -0300)]
V4L/DVB (9516): cx18: Move DVB buffer transfer handling from irq handler to work_queue
cx18: Move DVB buffer transfer handling from irq handler to work_queue thread.
In order to properly lock the epu2cpu mailbox for driver to CX23418 commands,
the DVB/TS buffer handling needs to be moved from the IRQ handler and IRQ
context to a work queue. This work_queue implmentation is strikingly similar
to the ivtv implementation - for better or worse.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Wed, 5 Nov 2008 01:02:23 +0000 (22:02 -0300)]
V4L/DVB (9515): cx18: Use correct Mailbox IRQ Ack values and misc IRQ handling cleanup
cx18: Use correct Mailbox IRQ Ack values and misc IRQ handling cleanup.
The SCB field definitions for Ack IRQ's for mailboxes were inconsistent with
the bitmasks being loaded into those SCB fields and the SW2 Ack IRQ handling
logic. Renamed fields in SCB to make things consistent and did misc IRQ
handling cleanups: removing legacy ivtv dma_reg_lock, HPU IRQ flags, etc.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Frederic CAND [Wed, 29 Oct 2008 17:37:49 +0000 (14:37 -0300)]
V4L/DVB (9493): kconfig patch
Ok I made a patch that converts gspca kconfig file to a more standard=
one, with tabs + 2 white spaces, so that if a warning is added it still
compiles
please find it attached
Andy Walls [Sat, 1 Nov 2008 04:07:36 +0000 (01:07 -0300)]
V4L/DVB (9511): cx18: Mark CX18_CPU_DE_RELEASE_MDL as a slow API call
cx18: Mark CX18_CPU_DE_RELEASE_MDL as a slow API call.
Give the encoder time to complete the MDL release before destroying the
encoder internal task. This avoids an encoder lockup on the next digital
capture and error messages about buffers being returned for an inactive
encoder task handle.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Fri, 31 Oct 2008 23:49:12 +0000 (20:49 -0300)]
V4L/DVB (9510): cx18: Fix write retries for registers that always change - part 2.
cx18: Fix write retries for registers that always change - part 2.
Some registers, especially interrupt related ones, will never read
back the value just written. Modified interrupt register readback
checks to make sure the intended effect was achieved.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
anysee_usb_mutex is initialized at every time the anysee device is probed.
If the second anysee device is probed while anysee_usb_mutex is locked by
the first anysee device, the mutex is broken.
This patch fixes by initialize anysee_usb_mutex statically rather
than initialize at probe time.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L/DVB (9492): unplug oops from dvb_frontend_init...
When inadvertently hot-unplugging a WT-220U USB DVB-T receiver with
2.6.24, I was met with an oops [1]. The problem is relevant to
2.6.25/26-rc also.
dvb_frontend_init() was called either from re-creation of the kdvb-fe0
thread - seems unlikely, or someone called
dvb_frontend_reinitialise(), causing this path in the thread - really
unlikely, as I can't find any call-site for it.
Either way, quite a number of drivers call dvb_usb_generic_rw() [2]
without checking the validity of the relevant member in the
dvb_usb_device struct - which had changed. Having dvb_usb_generic_rw()
sanity-check and fail (rather than loading from 0x120) seems
reasonable defensive programming [3], in light of it being called in
this way.
The problem with this, is that drivers don't check the return code of
the init call [4]. Does it make sense to cook a patch which allows the
failure to be propagated back up, or am I missing something else?
ivtv used tvaudio in the past and at the time tvaudio required V4L1.
Since tvaudio is no longer dependent on V4L1 and since ivtv actually
no longer uses tvaudio at all, this is no removed from Kconfig.
Without this patch ivtv won't be build if V4L1 is disabled.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Sun, 26 Oct 2008 02:27:06 +0000 (23:27 -0300)]
V4L/DVB (9475): cx18: Disable write retries for registers that always change - part 1.
cx18: Disable write retries for registers that always change - part 1.
Interrupt related registers will likely not read back the value we just wrote.
Disable retries for these registers for now to avoid accidently discarding
interrupts. More intelligent read back verification criteria are needed for
these and other registers (e.g. GPIO line registers), which will be addressed in
subsequent changes.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean Delvare [Fri, 24 Oct 2008 18:08:28 +0000 (15:08 -0300)]
V4L/DVB (9372): Minor fixes to the saa7110 driver
* Apparently the author of the saa7110 driver was confused by the
number of outputs returned by DECODER_GET_CAPABILITIES. Of course a
decoder chip has no analog ouputs, but it must have at least one
digital output.
* Fix an off-by-one error when checking the input value of
DECODER_SET_INPUT.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Rafael Diniz [Sat, 25 Oct 2008 02:07:57 +0000 (23:07 -0300)]
V4L/DVB (9368): VBI fix for cx88 cards
The attached patch fix VBI support cx88 card.
I'm running a capture for hours, getting the closed caption from it[1], and
it's working perfect - the output is the same of a bttv card.
Please apply this patch as soon as possible.
[1] - using zvbi-ntsc-cc of zvbi project.
Signed-off-by: Rafael Diniz <diniz@wimobilis.com.br> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L/DVB (9357): cx88-dvb: Fix Oops in case i2c bus failed to register
There already is an report at kernel bugzilla about this issue:
http://bugzilla.kernel.org/show_bug.cgi?id=9455
When enabling extra checks for the i2c-bus of cx88 based cards by
loading i2c_algo_bit with bit_test=1 this may trigger an oops
when loading cx88_dvb.
This is caused by the extra check code that detects that the
sda-line is stuck high and thus does not register the i2c-bus.
cx88-dvb however does not check if the i2c-bus is valid and just
uses core->i2c_adap to attach dvb frontend modules.
This leads to an oops at the first call to i2c_transfer:
Impact: driver could possibly stomp on resources outside of its scope
{mchehab@redhat.com: I got two versions of the same patch (identical,
except for whitespacing). One authored by Andy Burns and another
authored by Suresh Siddha. Due to that, I'm applying the one that has
less CodingStyle errors. I'm also adding both comments and the SOB's for
both patches, since they are both interesting}
BAR base is located in the middle of the 4K page and the hardcoded
size argument makes the request span two pages causing the conflict.
Fix the hard coded size argument in ioremap().
Andy Burns commented:
I have already sent this patch on the linux-dvb list, but it didn't get
much attention, so re-sending direct, I hope you all don't mind.
While attempting to run mythtv in a xen domU, I encountered problems
loading the driver for my saa7134 card, with an error from ioremap().
This error was due to the driver allocating an incorrectly sized mmio
area, which was trapped by xen's permission checks, but this would go
un-noticed on a kernel without xen.
My card has a 1K sized mmio area, I've had information that other cards
have 2K areas, perhaps others have different sizes, yet the driver
always attempts to map 4K. I realise that the granularity of mapping is
the page size, which typically would be 4K, but unless the card's base
address happens to fall on a 4K boundary (mine does not) then the
base+4K will end up spanning two pages, and this is when the error
occurs under xen.
My patch uses the pci_resource_len macro to determine the size required
for the user's particular card, instead of the hardcoded 4K value. I've
tested with a couple of printk() inside ioremap() that the start address
and size do get rounded to the closest page boundary.
With this patch I am able to successfully load the saa7134 driver and
run mythtv under xen with my card, subject to correct pollirq settings
in case of shared IRQ, I am still seeing occasional DMA panics, which I
think are related to swiotlb handling by dom0/domU, usually the panic
occurs when changing mux, once tuned to a mux, 12 hour continuous
recordings are possible without errors.
Jonathan Corbet [Fri, 17 Oct 2008 23:19:29 +0000 (20:19 -0300)]
V4L/DVB (9355): de-BKL cafe_ccic.c
Remove lock_kernel() call from cafe_ccic.c
Commit d56dc61265d2527a63ab5b0f03199a43cd89ca36 added lock_kernel()
calls to cafe_ccic.c. But that driver was written with proper locking
and does not need the BKL, so take it back out.
Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
As reported by David Ellingsworth:
> I'm not sure if it matters or not, but the ibmcam driver in the
> Mauro's linux-2.6 git tree in the for_linus branch is currently
> broken.
uvd is equal to NULL during most of ibmcam_probe. Due to that, an OOPS is
generated at dev_info. This patch replaces uvd->dev->dev to dev->dev
inside this routine.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Reviewed-by: David Ellingsworth <david@identd.dyndns.org>
Manu Abraham [Mon, 20 Oct 2008 21:14:14 +0000 (18:14 -0300)]
V4L/DVB (9346): Optimization: Enable gate in a symmetric/disciplined way,
rather than implementing different ways leading to confusion.
This allows multiple gate_enable/disable's in the tuner_read/write
functions, thereby lesser number of I/O operations throughout,
eventually leading to better results. As a side effect demods that
detect the STOP bit for auto closing of the gate can be avoided, thereby
a very minimal gain in disabling the auto detect feature as well.
Improves readability on the device control.
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean Delvare [Sat, 18 Oct 2008 14:05:58 +0000 (11:05 -0300)]
V4L/DVB (9337b): remove tuner-3036 and dpc7146 drivers from feature-removal-schedule.txt
The tuner-3036 and dpc7146 drivers have been deleted now so we can
remove the corresponding entries from feature-removal-schedule.txt.
(Thanks for doing this, BTW.)
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Gautham R Shenoy [Sat, 25 Oct 2008 04:52:38 +0000 (10:22 +0530)]
timers: handle HRTIMER_CB_IRQSAFE_UNLOCKED correctly from softirq context
Impact: fix incorrect locking triggered during hotplug-intense stress-tests
While migrating the the CB_IRQSAFE_UNLOCKED timers during a cpu-offline,
we queue them on the cb_pending list, so that they won't go
stale.
Thus, when the callbacks of the timers run from the softirq context,
they could run into potential deadlocks, since these callbacks
assume that they're running with irq's disabled, thereby annoying
lockdep!
Fix this by emulating hardirq context while running these callbacks from
the hrtimer softirq.
=================================
[ INFO: inconsistent lock state ]
2.6.27 #2
--------------------------------
inconsistent {in-hardirq-W} -> {hardirq-on-W} usage.
ksoftirqd/0/4 [HC0[0]:SC1[1]:HE1:SE0] takes:
(&rq->lock){++..}, at: [<c011db84>] sched_rt_period_timer+0x9e/0x1fc
{in-hardirq-W} state was registered at:
[<c014103c>] __lock_acquire+0x549/0x121e
[<c0107890>] native_sched_clock+0x88/0x99
[<c013aa12>] clocksource_get_next+0x39/0x3f
[<c0139abc>] update_wall_time+0x616/0x7df
[<c0141d6b>] lock_acquire+0x5a/0x74
[<c0121724>] scheduler_tick+0x3a/0x18d
[<c047ed45>] _spin_lock+0x1c/0x45
[<c0121724>] scheduler_tick+0x3a/0x18d
[<c0121724>] scheduler_tick+0x3a/0x18d
[<c012c436>] update_process_times+0x3a/0x44
[<c013c044>] tick_periodic+0x63/0x6d
[<c013c062>] tick_handle_periodic+0x14/0x5e
[<c010568c>] timer_interrupt+0x44/0x4a
[<c0150c9f>] handle_IRQ_event+0x13/0x3d
[<c0151c14>] handle_level_irq+0x79/0xbd
[<c0105634>] do_IRQ+0x69/0x7d
[<c01041e4>] common_interrupt+0x28/0x30
[<c047007b>] aac_probe_one+0x1a3/0x3f3
[<c047ec2d>] _spin_unlock_irqrestore+0x36/0x39
[<c01512b4>] setup_irq+0x1be/0x1f9
[<c065d70b>] start_kernel+0x259/0x2c5
[<ffffffff>] 0xffffffff
irq event stamp: 50102
hardirqs last enabled at (50102): [<c047ebf4>] _spin_unlock_irq+0x20/0x23
hardirqs last disabled at (50101): [<c047edc2>] _spin_lock_irq+0xa/0x4b
softirqs last enabled at (50088): [<c0128ba6>] do_softirq+0x37/0x4d
softirqs last disabled at (50099): [<c0128ba6>] do_softirq+0x37/0x4d
other info that might help us debug this:
no locks held by ksoftirqd/0/4.
Paul Mackerras [Tue, 11 Nov 2008 08:39:26 +0000 (19:39 +1100)]
powerpc: Update desktop/server defconfigs
Turned off CONFIG_PCI_LEGACY and turned on EXT4, and otherwise mostly
took the defaults. This also updates ppc6xx_defconfig, which covers
the 6xx/7xx/7xxx-based embedded boards.
Andreas Schwab [Thu, 6 Nov 2008 00:49:00 +0000 (00:49 +0000)]
powerpc: Fix msr check in compat_sys_swapcontext
The new context may not be 16-byte aligned, so the real address of the
mcontext structure should be read from the uc_regs pointer instead of
directly using the (unaligned) uc_mcontext field.
Signed-off-by: Andreas Schwab <schwab@suse.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
Keith Packard [Sat, 8 Nov 2008 01:44:14 +0000 (11:44 +1000)]
drm/i915: Move legacy breadcrumb out of the reserved status page area
Addresses in the hardware status page below index 0x20 are reserved for use
by the hardware. The legacy breadcrumb was sitting at index 5. Move it to
index 0x21, and make sure everyone uses the defined value instead of
hard-coded constants.
Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
Dave Airlie [Tue, 11 Nov 2008 08:02:12 +0000 (18:02 +1000)]
drm/i915: Filter pci devices based on PCI_CLASS_DISPLAY_VGA
This fixes hangs on 855-class hardware by avoiding double attachment of the
driver due to the stub second head device having the same pci id as the real
device.
Other DRM drivers probably want this treatment as well, but I'm applying it
just to this one for safety. But we should clean up the drm_pciids.h mess
now so that each driver has its own pci id list header in its own directory.
Lets do that in the next release.
Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
Tejun Heo [Tue, 4 Nov 2008 08:08:40 +0000 (17:08 +0900)]
libata: fix last_reset timestamp handling
ehc->last_reset is used to ensure that resets are not issued too
close to each other. It's initialized to jiffies minus one minute
on EH entry. However, when new links are initialized after PMP is
probed, new links have zero for this timestamp resulting in long wait
depending on the current jiffies.
This patch makes last_set considered iff ATA_EHI_DID_RESET is set, in
which case last_reset is always initialized. As an added precaution,
WARN_ON() is added so that warning is printed if last_reset is
in future.
This problem is spotted and debugged by Shane Huang.
Roland Dreier [Tue, 4 Nov 2008 18:34:48 +0000 (10:34 -0800)]
libata: Avoid overflow in ata_tf_read_block() when tf->hba_lbal > 127
Phillip O'Donnell <phillip.odonnell@gmail.com> pointed out that the same
sign extension bug that was fixed in commit ba14a9c2 ("libata: Avoid
overflow in ata_tf_to_lba48() when tf->hba_lbal > 127") also appears to
exist in ata_tf_read_block(). Fix this by adding a cast to u64.
Signed-off-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Dave Airlie [Tue, 11 Nov 2008 07:56:16 +0000 (17:56 +1000)]
drm/radeon: map registers at load time
Now that the radeon driver has suspend/resume functions, it needs to map its
registers at load time or it will likely crash if a suspend operation occurs
before the driver has been initialized.
This patch moves the register mapping code from firstopen to load and makes
the mapping into a _DRM_DRIVER one so that the core won't remove it at
lastclose time.
Fixes (at least partially) kernel bz #11891.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
Eric Anholt [Tue, 4 Nov 2008 20:01:24 +0000 (12:01 -0800)]
i915: Remove racy delayed vblank swap ioctl.
When userland detected that this ioctl was supported (by version number check),
it used it in a racy way -- dispatch delayed swap, wait for vblank, continue
rendering. As there was no mechanism for it to wait for the swap to finish,
sometimes it would render before the swap and garbage would be displayed on
the screen.
By removing the ioctl and returning -EINVAL, userland returns to its previous,
correct rendering path of waiting for a vblank then dispatching a swap. The
only path that could have used this ioctl correctly was page flipping, which
relied on only one client running and emitting wait-for-vblank-before-rendering
in the command stream. That path also falls back correctly, at the performance
cost of not being able to queue up rendering before the flip occurs.
Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
Owen Taylor [Mon, 3 Nov 2008 22:38:17 +0000 (14:38 -0800)]
i915: Don't attempt to short-circuit object_wait_rendering by checking domains.
This could return early when reading after writing a buffer, if somebody
had already put it on the flushing list (write domains are 0, but still
active), leading to glReadPixels failure.
Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
Keith Packard [Mon, 3 Nov 2008 07:38:20 +0000 (23:38 -0800)]
i915: Clean up sarea pointers on leavevt
This corresponds to the setup of the sarea pointers in DMA initialization,
though neither is exactly the point at which the sarea is set up or torn down.
Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
Oleg Nesterov [Mon, 10 Nov 2008 14:39:30 +0000 (15:39 +0100)]
fix for account_group_exec_runtime(), make sure ->signal can't be freed under rq->lock
Impact: fix hang/crash on ia64 under high load
This is ugly, but the simplest patch by far.
Unlike other similar routines, account_group_exec_runtime() could be
called "implicitly" from within scheduler after exit_notify(). This
means we can race with the parent doing release_task(), we can't just
check ->signal != NULL.
Change __exit_signal() to do spin_unlock_wait(&task_rq(tsk)->lock)
before __cleanup_signal() to make sure ->signal can't be freed under
task_rq(tsk)->lock. Note that task_rq_unlock_wait() doesn't care
about the case when tsk changes cpu/rq under us, this should be OK.
Thanks to Ingo who nacked my previous buggy patch.
Before commit b6c40d68ff6498b7f63ddf97cf0aa818d748dee7 ("net: only
invoke dev->change_rx_flags when device is UP"), the dsa driver could
sort-of get away with only fiddling with the master interface's
allmulti/promisc counts in ->change_rx_flags() and not touching them
in ->open() or ->stop(). After this commit (note that it was merged
almost simultaneously with the dsa patches, which is why this wasn't
caught initially), the breakage that was already there became more
apparent.
Since it makes no sense to keep the master interface's allmulti or
promisc count pinned for a slave interface that is down, copy the vlan
driver's sync logic (which does exactly what we want) over to dsa to
fix this.
Bug report from Dirk Teurlings <dirk@upexia.nl> and Peter van Valderen
<linux@ddcrew.com>.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Tested-by: Dirk Teurlings <dirk@upexia.nl> Tested-by: Peter van Valderen <linux@ddcrew.com> Signed-off-by: David S. Miller <davem@davemloft.net>
dsa: fix skb->pkt_type when mac address of slave interface differs
When a dsa slave interface has a mac address that differs from that
of the master interface, eth_type_trans() won't explicitly set
skb->pkt_type back to PACKET_HOST -- we need to do this ourselves
before calling eth_type_trans().
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
net: fix setting of skb->tail in skb_recycle_check()
Since skb_reset_tail_pointer() reads skb->data, we need to set
skb->data before calling skb_reset_tail_pointer(). This was causing
spurious skb_over_panic()s from skb_put() being called on a recycled
skb that had its skb->tail set to beyond where it should have been.
Bug report from Peter van Valderen <linux@ddcrew.com>.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Tue, 11 Nov 2008 05:43:08 +0000 (21:43 -0800)]
net: fix /proc/net/snmp as memory corruptor
icmpmsg_put() can happily corrupt kernel memory, using a static
table and forgetting to reset an array index in a loop.
Remove the static array since its not safe without proper locking.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Steven Rostedt [Tue, 11 Nov 2008 02:46:01 +0000 (21:46 -0500)]
ring-buffer: prevent infinite looping on time stamping
Impact: removal of unnecessary looping
The lockless part of the ring buffer allows for reentry into the code
from interrupts. A timestamp is taken, a test is preformed and if it
detects that an interrupt occurred that did tracing, it tries again.
The problem arises if the timestamp code itself causes a trace.
The detection will detect this and loop again. The difference between
this and an interrupt doing tracing, is that this will fail every time,
and cause an infinite loop.
Currently, we test if the loop happens 1000 times, and if so, it will
produce a warning and disable the ring buffer.
The problem with this approach is that it makes it difficult to perform
some types of tracing (tracing the timestamp code itself).
Each trace entry has a delta timestamp from the previous entry.
If a trace entry is reserved but and interrupt occurs and traces before
the previous entry is commited, the delta timestamp for that entry will
be zero. This actually makes sense in terms of tracing, because the
interrupt entry happened before the preempted entry was commited, so
one may consider the two happening at the same time. The order is
still preserved in the buffer.
With this idea, instead of trying to get a new timestamp if an interrupt
made it in between the timestamp and the test, the entry could simply
make the delta zero and continue. This will prevent interrupts or
tracers in the timer code from causing the above loop.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Steven Rostedt [Tue, 11 Nov 2008 02:46:00 +0000 (21:46 -0500)]
ftrace: disable tracing on resize
Impact: fix for bug on resize
This patch addresses the bug found here:
http://bugzilla.kernel.org/show_bug.cgi?id=11996
When ftrace converted to the new unified trace buffer, the resizing of
the buffer was not protected as much as it was originally. If tracing
is performed while the resize occurs, then the buffer can be corrupted.
This patch disables all ftrace buffer modifications before a resize
takes place.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Benjamin Thery [Tue, 11 Nov 2008 00:34:11 +0000 (16:34 -0800)]
ipv6: fix ip6_mr_init error path
The order of cleanup operations in the error/exit section of ip6_mr_init()
is completely inversed. It should be the other way around.
Also a del_timer() is missing in the error path.
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Dan Williams [Fri, 7 Nov 2008 01:47:17 +0000 (01:47 +0000)]
[4/4] dca: fixup initialization dependency
Mark dca_init as a subsys_initcall since it needs to be ready to go
before dependent drivers start registering themselves.
Cc: <stable@kernel.org> Reported-and-tested-by: Mark Rustad <mark_rustad@Xiotech.com> Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Error handling needs to be modified in dma_pin_iovec_pages().
It should return NULL instead of ERR_PTR
(pinned_list is checked for NULL in tcp_recvmsg() to determine
if iovec pages have been successfully pinned down).
In case of error for the first iovec,
local_list->nr_iovecs needs to be initialized.
Cc: <stable@kernel.org> Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
[1/4] I/OAT: fix channel resources free for not allocated channels
If the ioatdma driver is loaded but not used it does not allocate descriptors.
Before it frees channel resources it should first be sure
that they have been previously allocated.
Cc: <stable@kernel.org> Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Tested-by: Tom Picard <tom.s.picard@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
While the patch is correct it does not take into account that spurious
wakeups happen on x86. A fix for this issue is available, but we just
revert to the .27 behaviour and let long running softirqs screw
themself.
Disable it for now.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Thomas Gleixner [Fri, 7 Nov 2008 10:06:00 +0000 (11:06 +0100)]
irq: call __irq_enter() before calling the tick_idle_check
Impact: avoid spurious ksoftirqd wakeups
The tick idle check which is called from irq_enter() was run before
the call to __irq_enter() which did not set the in_interrupt() bits in
preempt_count. That way the raise of a softirq woke up softirqd for
nothing as the softirq was handled on return from interrupt.
Call __irq_enter() before calling into the tick idle check code.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
While investigating the failure of hibernation on 32-bit x86 with
CONFIG_NUMA set, as described in this message
http://marc.info/?l=linux-kernel&m=122634118116226&w=4
I asked some people for help and I was told that it wasn't really
worth the effort, because CONFIG_NUMA was generally broken on 32-bit
x86 systems and it shouldn't be used in such configs. For this
reason, make CONFIG_NUMA depend on BROKEN instead of EXPERIMENTAL on
x86-32.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Andi Kleen <andi@firstfloor.org> Cc: Pavel Machek <pavel@suse.cz> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Howells [Mon, 10 Nov 2008 19:00:05 +0000 (19:00 +0000)]
KEYS: Make request key instantiate the per-user keyrings
Make request_key() instantiate the per-user keyrings so that it doesn't oops
if it needs to get hold of the user session keyring because there isn't a
session keyring in place.
Signed-off-by: David Howells <dhowells@redhat.com> Tested-by: Steve French <smfrench@gmail.com> Tested-by: Rutger Nijlunsing <rutger.nijlunsing@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Trent Piepho [Mon, 10 Nov 2008 21:09:21 +0000 (13:09 -0800)]
powerpc: Repair device bindings documentation
Commit d0fc2eaaf4c56a95f5ed29b6bfb609e19714fc16 "powerpc/fsl: Refactor
device bindings" split out a number of device bindings from
booting-without-of.txt into separate files. Having them all in one file
was a frequent source of merge conflicts.
However, in the next merge, 49997d75152b3d23c53b0fa730599f2f74c92c65, there
was another conflict. Some of the bindings removed from
booting-without-of.txt were mistakenly added back in and the copies in
dts-bindings were kept as well.
This patch re-removes "Freescale Display Interface" and "Freescale on board
FPGA" and fixes the table of contents.
Signed-off-by: Trent Piepho <tpiepho@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Tiger Yang [Sun, 2 Nov 2008 11:04:21 +0000 (19:04 +0800)]
ocfs2: Check search result in ocfs2_xattr_block_get()
ocfs2_xattr_block_get() calls ocfs2_xattr_search() to find an external
xattr, but doesn't check the search result that is passed back via struct
ocfs2_xattr_search. Add a check for search result, and pass back -ENODATA if
the xattr search failed. This avoids a later NULL pointer error.
Signed-off-by: Tiger Yang <tiger.yang@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Dmitri Monakhov [Mon, 27 Oct 2008 20:01:49 +0000 (13:01 -0700)]
ocfs2: truncate outstanding block after direct io failure
Signed-off-by: Dmitri Monakhov <dmonakhov@openvz.org> Cc: Jeff Moyer <jmoyer@redhat.com> Cc: Mark Fasheh <mark.fasheh@oracle.com> Cc: Joel Becker <Joel.Becker@oracle.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Tao Ma [Sun, 26 Oct 2008 22:06:24 +0000 (06:06 +0800)]
ocfs2/xattr: Proper hash collision handle in bucket division
In ocfs2/xattr, we must make sure the xattrs which have the same hash value
exist in the same bucket so that the search schema can work. But in the old
implementation, when we want to extend a bucket, we just move half number of
xattrs to the new bucket. This works in most cases, but if we are lucky
enough we will move 2 xattrs into 2 different buckets. This means that an
xattr from the previous bucket cannot be found anymore. This patch fix this
problem by finding the right position during extending the bucket and extend
an empty bucket if needed.
Signed-off-by: Tao Ma <tao.ma@oracle.com> Cc: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>