]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years agoARM: OMAP: Fix race in OMAP2/3 DMA IRQ handling
Juha Yrjola [Thu, 29 Jan 2009 16:57:12 +0000 (08:57 -0800)]
ARM: OMAP: Fix race in OMAP2/3 DMA IRQ handling

CSR must be cleared before invoking the callback.

If the callback function starts a new, fast DMA transfer on the same
channel, the completion status might lost if CSR is cleared after
the callback invocation.

Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoARM: OMAP: Fix McBSP spin_lock deadlock
Stanley.Miao [Thu, 29 Jan 2009 16:57:12 +0000 (08:57 -0800)]
ARM: OMAP: Fix McBSP spin_lock deadlock

A spin_lock deadlock will occur when omap_mcbsp_request() is invoked.

omap_mcbsp_request()
\- clk_enable(mcbsp->clk)         [takes and holds clockfw_lock]
    \- omap2_clk_enable()
       \- _omap2_clk_enable()
           \- omap_mcbsp_clk_enable()
              \- clk_enable(child clock)   [tries for clockfw_lock again]

mcbsp_clk is a virtual clock and it comprises several child clocks. when
enable mcbsp_clk in omap_mcbsp_request(), the enable function of mcbsp_clk
will enable its child clocks, then the deadlock occurs.

The solution is to remove the virtual clock and enable these child clocks in
omap_mcbsp_request() directly.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoRevert "generic, x86: fix __per_cpu_load relocation"
Ingo Molnar [Thu, 29 Jan 2009 16:10:12 +0000 (17:10 +0100)]
Revert "generic, x86: fix __per_cpu_load relocation"

This reverts commit 5a611268b69f05262936dd177205acbce4471358.

It is causing occasional boot crashes, caused by certain
linker versions (GNU ld version 2.18.50.0.6-2 20080403) messing up:

 82dcc000 D __per_cpu_load
 c16e6000 A __per_cpu_load_abs

The __per_cpu_load value is out of whack. Hpa noticed the following
detail:

  * (gdb) p/x -(0xc16e6000-0x82dcc000)
  * $2 = 0xc16e6000
  * I.e. one is the other << 1

The two symbols should be equal.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoALSA: hda - make alc882_auto_init_input_src aware of selectors
Herton Ronaldo Krzesinski [Thu, 29 Jan 2009 15:18:31 +0000 (13:18 -0200)]
ALSA: hda - make alc882_auto_init_input_src aware of selectors

In the case of having a selector instead of mixer while initing input
sources, the case that happens with ALC889, we must select instead
of muting input. Problem was found while testing with hda-emu.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agox86: add might_sleep() to do_page_fault()
Peter Zijlstra [Thu, 29 Jan 2009 15:02:12 +0000 (16:02 +0100)]
x86: add might_sleep() to do_page_fault()

Impact: widen debug checks

VirtualBox calls do_page_fault() from an atomic context but runs into a
might_sleep() way pas this point, cure that.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoUBIFS: remove fast unmounting
Artem Bityutskiy [Thu, 29 Jan 2009 14:34:30 +0000 (16:34 +0200)]
UBIFS: remove fast unmounting

This UBIFS feature has never worked properly, and it was a mistake
to add it because we simply have no use-cases. So, lets still accept
the fast_unmount mount option, but ignore it. This does not change
much, because UBIFS commit in sync_fs anyway, and sync_fs is called
while unmounting.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoUBIFS: return sensible error codes
Artem Bityutskiy [Thu, 29 Jan 2009 14:22:54 +0000 (16:22 +0200)]
UBIFS: return sensible error codes

When mounting/re-mounting, UBIFS returns EINVAL even if the ENOSPC
or EROFS codes are are much better, just because we have not found
references to ENOSPC/EROFS in mount (2) man pages. This patch
changes this behaviour and makes UBIFS return real error code,
because:

1. It is just less confusing and more logical
2. mount is not described in SuSv3, so it seems to be not really
   well-standartized
3. we do not cover all cases, and any random undocumented in man
   pages error code may be returned anyway

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoUBIFS: remount ro fixes
Adrian Hunter [Thu, 29 Jan 2009 10:59:33 +0000 (12:59 +0200)]
UBIFS: remount ro fixes

- preserve the idx_gc list - it will be needed in the same
state, should UBIFS be remounted rw again
- prevent remounting ro if we have switched to read only
mode (due to a fatal error)

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoUBIFS: spelling fix 'date' -> 'data'
Adrian Hunter [Thu, 29 Jan 2009 09:53:51 +0000 (11:53 +0200)]
UBIFS: spelling fix 'date' -> 'data'

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoUBIFS: sync wbufs after syncing inodes and pages
Adrian Hunter [Thu, 29 Jan 2009 09:17:24 +0000 (11:17 +0200)]
UBIFS: sync wbufs after syncing inodes and pages

All writes go through wbufs so they must be sync'd
after syncing inodes and pages.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoASoC: TWL4030: Add analog loopback support
Peter Ujfalusi [Thu, 29 Jan 2009 12:57:50 +0000 (14:57 +0200)]
ASoC: TWL4030: Add analog loopback support

This patch adds the analog loopback/bypass support for twl4030 codec.

Details for the implementation:
It seams that the analog loopback needs the DAC powered on on the channel,
where the loopback is selected. The switch for the DACs has been moved from
the DAPM_DAC to the "Analog XX Playback Mixer". In this way the DAC will be
powered while the audio playback is used or/and the loopback is enabled for
the channel.

The twl4030 codec powering has been reworked. Now the codec will be powered as
long as it does not receives the SND_SOC_BIAS_OFF event. The exceptions are
when the given change in the registers needs the codec power down/up cycle in
order to take effect. Otherwise the codec is on.

When the codec enters to STANDBY state and none of the loopback paths are
enabled, than the amplifiers, which are no in the DAPM path are forced to turn
off and the PLL is disabled. When playback/capture starts the disabled gains
are restored and the PLL is enabled.

When one of the loopback enabled in STANDBY mode, the disabled gains are
restored and the PLL is enabled also.

In short: the codec always goes to the lowest power state based on the
bias_level and the bypass_state.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
17 years agoMerge branch 'for-2.6.29' into for-2.6.30
Mark Brown [Thu, 29 Jan 2009 13:57:59 +0000 (13:57 +0000)]
Merge branch 'for-2.6.29' into for-2.6.30

17 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Thu, 29 Jan 2009 13:47:56 +0000 (14:47 +0100)]
Merge branch 'fix/hda' into for-linus

17 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Thu, 29 Jan 2009 13:47:53 +0000 (14:47 +0100)]
Merge branch 'fix/asoc' into for-linus

17 years agointel-iommu: make dma mapping functions static
FUJITA Tomonori [Wed, 28 Jan 2009 12:53:18 +0000 (21:53 +0900)]
intel-iommu: make dma mapping functions static

The dma ops unification enables X86 and IA64 to share intel_dma_ops so
we can make dma mapping functions static. This also remove unused
intel_map_single().

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoIA64: fix VT-d dma_mapping_error
FUJITA Tomonori [Wed, 28 Jan 2009 12:53:17 +0000 (21:53 +0900)]
IA64: fix VT-d dma_mapping_error

dma_mapping_error is used to see if dma_map_single and dma_map_page
succeed. IA64 VT-d dma_mapping_error always says that dma_map_single
is successful even though it could fail. Note that X86 VT-d works
properly in this regard.

This patch fixes IA64 VT-d dma_mapping_error by adding VT-d's own
dma_mapping_error() that works for both X86_64 and IA64. VT-d uses
zero as an error dma address so VT-d's dma_mapping_error returns 1 if
a passed dma address is zero (as x86's VT-d dma_mapping_error does
now).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoIA64: fix swiotlb alloc_coherent for non DMA_64BIT_MASK devices
FUJITA Tomonori [Wed, 28 Jan 2009 12:53:16 +0000 (21:53 +0900)]
IA64: fix swiotlb alloc_coherent for non DMA_64BIT_MASK devices

Before the dma ops unification, IA64 always uses GFP_DMA for
dma_alloc_coherent like:

#define dma_alloc_coherent(dev, size, handle, gfp) \
platform_dma_alloc_coherent(dev, size, handle, (gfp) | GFP_DMA)

This GFP_DMA enforcement doesn't make sense for IOMMUs since they can
do address translation to give addresses that devices can access
to. The IOMMU drivers ignore the zone flag. However, this is still
necessary for swiotlb since it can't do address translation.

We don't always need to use GFP_DMA for swiotlb. We need GFP_DMA for
devices incapable of 64bit DMA.

This patch is sorta updated version of:

http://marc.info/?l=linux-kernel&m=122638215612705&w=2

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: trampoline_64.S - use predefined constants with simplification
Cyrill Gorcunov [Wed, 28 Jan 2009 20:21:25 +0000 (23:21 +0300)]
x86: trampoline_64.S - use predefined constants with simplification

Impact: cleanup

We may use macros from processor-flags.h instead
of hardcoding bits. Actually it's not direct mapping
of old instructions with new ones -- BTS does change
CF flag while MOV does not. But i didn't find any
dependency on CF in this code.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotrace_sched_wakeup: Remove unused variable
Arnaldo Carvalho de Melo [Wed, 28 Jan 2009 15:08:37 +0000 (13:08 -0200)]
trace_sched_wakeup: Remove unused variable

Impact: cleanup

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotrace: Use tracing_reset_online_cpus in more places
Arnaldo Carvalho de Melo [Wed, 28 Jan 2009 15:02:12 +0000 (13:02 -0200)]
trace: Use tracing_reset_online_cpus in more places

Impact: cleanup

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Frédéric Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoblktrace: Use tracing_reset_online_cpus
Arnaldo Carvalho de Melo [Wed, 28 Jan 2009 14:33:56 +0000 (12:33 -0200)]
blktrace: Use tracing_reset_online_cpus

Impact: cleanup

Use tracing_reset_online_cpus instead of open coding it.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'tracing/ftrace' into tracing/core
Ingo Molnar [Thu, 29 Jan 2009 13:27:58 +0000 (14:27 +0100)]
Merge branch 'tracing/ftrace' into tracing/core

17 years agoASoC: OMAP: Initialize XCCR and RCCR registers in McBSP DAI driver
Misael Lopez Cruz [Thu, 29 Jan 2009 11:29:46 +0000 (13:29 +0200)]
ASoC: OMAP: Initialize XCCR and RCCR registers in McBSP DAI driver

This patch explicitly initializes McBSP Transmit Configuration
Control Register (XCCR) and Receive Configuration Control
Register (RCCR) to their reset values. Reset values are 26 ns
of DX delay and Transmit DMA disabled for XCCR register;
receive full cycle mode enabled and Receive DMA disabled for
RCCR register.

This patch requires a counterpart in OMAP McBSP driver before
to apply it. The required changes in McBSP were sent and approved
in linux-omap mailing list and patch is going upstream
(commit 3127f8f8595a064b3f1a1837fea2177902589ac3 from linux-omap-2.6
tree).

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
[ jarkko.nikula@nokia.com: Commit id for counterpart patch corrected ]
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
17 years agox86/Voyager: move to the X86_32_NON_STANDARD code section
Ingo Molnar [Tue, 27 Jan 2009 17:46:23 +0000 (18:46 +0100)]
x86/Voyager: move to the X86_32_NON_STANDARD code section

Make Voyager depend on X86_32_NON_STANDARD - it is a non-standard 32-bit
SMP architecture.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: rename X86_GENERICARCH to X86_32_NON_STANDARD
Ingo Molnar [Tue, 27 Jan 2009 17:43:09 +0000 (18:43 +0100)]
x86: rename X86_GENERICARCH to X86_32_NON_STANDARD

X86_GENERICARCH is a misnomer - it contains non-PC 32-bit architectures
that are not included in the default build.

Rename it to X86_32_NON_STANDARD.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: remove the subarch menu
Ingo Molnar [Tue, 27 Jan 2009 17:31:41 +0000 (18:31 +0100)]
x86: remove the subarch menu

Remove the subarch menu and standardize on X86_PC.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: move X86_VSMP from subarch menu
Ingo Molnar [Tue, 27 Jan 2009 17:29:13 +0000 (18:29 +0100)]
x86: move X86_VSMP from subarch menu

Move X86_VSMP out of the subarch menu - this way it can be enabled
together with standard PC support as well, in the same kernel.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: move non-standard 32-bit platform Kconfig entries
Ingo Molnar [Tue, 27 Jan 2009 17:24:57 +0000 (18:24 +0100)]
x86: move non-standard 32-bit platform Kconfig entries

- make X86_GENERICARCH depend X86_NON_STANDARD

- move X86_SUMMIT, X86_ES7000 and X86_BIGSMP out of the subarchitecture
  menu and under this option

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: move VOYAGER to the NON_STANDARD_PLATFORM section
Ingo Molnar [Tue, 27 Jan 2009 17:20:09 +0000 (18:20 +0100)]
x86: move VOYAGER to the NON_STANDARD_PLATFORM section

Move X86_ELAN (old, NCR hw platform built on Intel CPUs) from the
subarchitecture menu to the non-standard-platform section.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: move ELAN to the NON_STANDARD_PLATFORM section
Ingo Molnar [Tue, 27 Jan 2009 17:18:25 +0000 (18:18 +0100)]
x86: move ELAN to the NON_STANDARD_PLATFORM section

Move X86_ELAN (old, AMD based web-boxes) from the subarchitecture
menu to the non-standard-platform section.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: cleanup, introduce CONFIG_NON_STANDARD_PLATFORMS
Ingo Molnar [Tue, 27 Jan 2009 17:11:43 +0000 (18:11 +0100)]
x86: cleanup, introduce CONFIG_NON_STANDARD_PLATFORMS

Introduce a Y/N Kconfig option for non-PC x86 platforms.

Make VisWS, RDC321 and SGI/UV depend on this.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86/Voyager: remove ISA quirk
Ingo Molnar [Tue, 27 Jan 2009 16:51:37 +0000 (17:51 +0100)]
x86/Voyager: remove ISA quirk

Voyager has this ISA quirk (because Voyager has no ISA support):

 config ISA
  bool "ISA support"
depends on !X86_VOYAGER

There's a ton of x86 hardware that does not support ISA, and because
most ISA drivers cannot auto-detect in a safe way, the convention in
the kernel has always been to not enable ISA drivers if they are not
needed.

Voyager users can do likewise - no need for a Kconfig quirk.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86/Voyager: remove power management Kconfig quirk
Ingo Molnar [Tue, 27 Jan 2009 16:49:22 +0000 (17:49 +0100)]
x86/Voyager: remove power management Kconfig quirk

Voyager has this PM/ACPI Kconfig quirk:

 menu "Power management and ACPI options"
depends on !X86_VOYAGER

Most of the PM features are auto-detect so they should be safe to run
on just about any hardware. (If not, those instances need fixing.)

In any case, if a kernel is built for Voyager, the power management
options can be disabled.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86/Voyager: remove HOTPLUG_CPU Kconfig quirk
Ingo Molnar [Tue, 27 Jan 2009 16:47:24 +0000 (17:47 +0100)]
x86/Voyager: remove HOTPLUG_CPU Kconfig quirk

Voyager has this Kconfig quirk:

 config HOTPLUG_CPU
  bool "Support for hot-pluggable CPUs"
depends on SMP && HOTPLUG && !X86_VOYAGER

But this exception will be moot once Voyager starts using the
generic x86 code.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86/Voyager: remove MCE quirk
Ingo Molnar [Tue, 27 Jan 2009 16:45:17 +0000 (17:45 +0100)]
x86/Voyager: remove MCE quirk

If no MCE code is desired on Voyager hw then the solution
is to turn them off in the .config - and to extend the MCE
code to not initialize on Voyager.

Remove the build-time quirk.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86/Voyager: remove APIC/IO-APIC Kbuild quirk
Ingo Molnar [Tue, 27 Jan 2009 16:40:48 +0000 (17:40 +0100)]
x86/Voyager: remove APIC/IO-APIC Kbuild quirk

The lapic/ioapic code properly auto-detects and is safe to run on CPUs that
have no local APIC. (or which have their lapic turned off in the hardware)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86/Voyager: remove PARAVIRT Kconfig quirk
Ingo Molnar [Tue, 27 Jan 2009 16:38:46 +0000 (17:38 +0100)]
x86/Voyager: remove PARAVIRT Kconfig quirk

Remove this Kconfig quirk:

 config PARAVIRT
  bool "Enable paravirtualization code"
depends on !X86_VOYAGER
  help

Voyager support built into a kernel does not preclude paravirt support.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86/Voyager: remove KVM_GUEST quirk
Ingo Molnar [Tue, 27 Jan 2009 16:37:33 +0000 (17:37 +0100)]
x86/Voyager: remove KVM_GUEST quirk

Voyager has this quirk currently:

 config KVM_GUEST
  bool "KVM Guest support"
  select PARAVIRT
depends on !X86_VOYAGER

Voyager support built into a kernel image does not exclude
KVM paravirt guest support - so remove this quirk.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86/Voyager: remove KVM_CLOCK quirk
Ingo Molnar [Tue, 27 Jan 2009 16:36:31 +0000 (17:36 +0100)]
x86/Voyager: remove KVM_CLOCK quirk

Voyager has this build-time quirk to exclude KVM_CLOCK:

  bool "KVM paravirtualized clock"
  select PARAVIRT
  select PARAVIRT_CLOCK
depends on !X86_VOYAGER

Voyager support built into a kernel image does not exclude
KVM paravirt clock support - so remove this quirk.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86/Voyager: remove VMI Kconfig quirk
Ingo Molnar [Tue, 27 Jan 2009 16:34:56 +0000 (17:34 +0100)]
x86/Voyager: remove VMI Kconfig quirk

x86/Voyager has this build-time quirk:

  bool "VMI Guest support"
  select PARAVIRT
  depends on X86_32
depends on !X86_VOYAGER

Since VMI is auto-detected (and Voyager will be auto-detected) there's no
reason for this quirk.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86/VisWS: remove Kconfig quirk
Ingo Molnar [Tue, 27 Jan 2009 16:33:34 +0000 (17:33 +0100)]
x86/VisWS: remove Kconfig quirk

VisWS has this quirk currently:

 config X86_VISWS
  bool "SGI 320/540 (Visual Workstation)"
depends on X86_32 && PCI && !X86_VOYAGER && X86_MPPARSE && PCI_GODIRECT

The !Voyager quirk is unnecessary.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86/Voyager: remove X86_FIND_SMP_CONFIG Kconfig quirk
Ingo Molnar [Tue, 27 Jan 2009 16:28:08 +0000 (17:28 +0100)]
x86/Voyager: remove X86_FIND_SMP_CONFIG Kconfig quirk

x86/Voyager had this Kconfig quirk:

 config X86_FIND_SMP_CONFIG
def_bool y
depends on X86_MPPARSE || X86_VOYAGER

Which splits off the find_smp_config() callback into a build-time quirk.

Voyager should use the existing x86_quirks.mach_find_smp_config() callback
to introduce SMP-config quirks. NUMAQ-32 and VISWS already use this.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86/Voyager: remove X86_BIOS_REBOOT Kconfig quirk
Ingo Molnar [Tue, 27 Jan 2009 16:17:55 +0000 (17:17 +0100)]
x86/Voyager: remove X86_BIOS_REBOOT Kconfig quirk

Voyager has this Kconfig quirk:

config X86_BIOS_REBOOT
bool
depends on !X86_VOYAGER
default y

Voyager should use the existing machine_ops.emergency_restart reboot
quirk mechanism instead of a build-time quirk.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86/Voyager: remove X86_HT Kconfig quirk
Ingo Molnar [Tue, 27 Jan 2009 16:16:16 +0000 (17:16 +0100)]
x86/Voyager: remove X86_HT Kconfig quirk

Voyager has this Kconfig quirk:

depends on (X86_32 && !X86_VOYAGER) || X86_64

That is unnecessary as HT support is CPUID driven and explicitly
 enumerated.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: generalize boot_cpu_id
Ingo Molnar [Tue, 27 Jan 2009 16:13:05 +0000 (17:13 +0100)]
x86: generalize boot_cpu_id

x86/Voyager can boot on non-zero processors. While that can probably
be fixed by properly remapping the physical CPU IDs, keep boot_cpu_id
for now for easier transition - and expand it to all of x86.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: replace CONFIG_X86_SMP with CONFIG_SMP
Ingo Molnar [Tue, 27 Jan 2009 16:07:08 +0000 (17:07 +0100)]
x86: replace CONFIG_X86_SMP with CONFIG_SMP

The x86/Voyager subarch used to have this distinction between
 'x86 SMP support' and 'Voyager SMP support':

 config X86_SMP
bool
depends on SMP && ((X86_32 && !X86_VOYAGER) || X86_64)

This is a pointless distinction - Voyager can (and already does) use
smp_ops to implement various SMP quirks it has - and it can be extended
more to cover all the specialities of Voyager.

So remove this complication in the Kconfig space.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86/Voyager: remove ARCH_SUSPEND_POSSIBLE Kconfig quirk
Ingo Molnar [Tue, 27 Jan 2009 16:04:39 +0000 (17:04 +0100)]
x86/Voyager: remove ARCH_SUSPEND_POSSIBLE Kconfig quirk

Voyager has this Kconfig quirk for suspend/resume:

 config ARCH_SUSPEND_POSSIBLE
  def_bool y
  depends on !X86_VOYAGER

The proper mechanism to not suspend on a piece of hardware to disable
CONFIG_SUSPEND. Remove the quirk.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86/Voyager: remove HIBERNATION Kconfig quirk
Ingo Molnar [Tue, 27 Jan 2009 16:03:24 +0000 (17:03 +0100)]
x86/Voyager: remove HIBERNATION Kconfig quirk

Voyager has this hibernation quirk:

 config ARCH_HIBERNATION_POSSIBLE
  def_bool y
depends on !SMP || !X86_VOYAGER

Hibernation is a generic facility provided on all x86 platforms. If it
is buggy on Voyager then that bug should be fixed - not worked around.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86/Voyager: remove KGDB Kconfig quirk
Ingo Molnar [Tue, 27 Jan 2009 16:02:29 +0000 (17:02 +0100)]
x86/Voyager: remove KGDB Kconfig quirk

x86/Voyager has this KGDB quirk:

select HAVE_ARCH_KGDB if !X86_VOYAGER

This is completely pointless - there's nothing in KGDB that cannot work
on Voyager. Remove it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86/Voyager: remove KVM Kconfig quirk
Ingo Molnar [Tue, 27 Jan 2009 16:01:14 +0000 (17:01 +0100)]
x86/Voyager: remove KVM Kconfig quirk

Voyager and other subarchitectures have this Kconfig quirk:

  select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64)

This is unnecessary, as KVM cleanly detects based on CPUID capabilities.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86/Voyager: remove NATSEMI Kconfig quirk
Ingo Molnar [Tue, 27 Jan 2009 15:59:11 +0000 (16:59 +0100)]
x86/Voyager: remove NATSEMI Kconfig quirk

x86/Voyager has this quirk for SCx200 support:

 config SCx200
  tristate "NatSemi SCx200 support"
depends on !X86_VOYAGER

Remove it - Voyager users can disable drivers they dont need.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86/Voyager: remove MCA Kconfig quirk
Ingo Molnar [Tue, 27 Jan 2009 15:57:49 +0000 (16:57 +0100)]
x86/Voyager: remove MCA Kconfig quirk

Remove Voyager Kconfig quirk: just like any other hardware platform
users of Voyager systems can configure in the hardware drivers they need.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: disable Voyager temporarily
Ingo Molnar [Wed, 28 Jan 2009 18:55:34 +0000 (19:55 +0100)]
x86: disable Voyager temporarily

x86/Voyager does not build right now and it's unclear whether it will
be cleaned up and ported to the subarch-less 32-bit x86 code - so disable
it for now.

If it's fixed we'll re-enable it - or remove it after some time. There's
a very low number of systems running development kernels on x86/Voyager
currently. (one or two on the whole planet)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86/Voyager: clean up BROKEN Kconfig reference
Ingo Molnar [Tue, 27 Jan 2009 16:54:17 +0000 (17:54 +0100)]
x86/Voyager: clean up BROKEN Kconfig reference

CONFIG_BROKEN has been removed from the upstream kernel years ago,
but X86_VOYAGER still had a stale reference to it - remove it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: remove subarchitecture support
Ingo Molnar [Wed, 28 Jan 2009 18:32:55 +0000 (19:32 +0100)]
x86: remove subarchitecture support

Remove the 32-bit subarchitecture support code.

All subarchitectures but Voyager have been converted. Voyager will be
done later or will be removed.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: move mach-default/*.h files to asm/
Ingo Molnar [Wed, 28 Jan 2009 18:34:09 +0000 (19:34 +0100)]
x86: move mach-default/*.h files to asm/

We are getting rid of subarchitecture support - move the hook files
to asm/. (These are now stale and should be replaced with more explicit
runtime mechanisms - but the transition is simpler this way.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: remove subarchitecture support code
Ingo Molnar [Wed, 28 Jan 2009 18:11:44 +0000 (19:11 +0100)]
x86: remove subarchitecture support code

Remove remaining bits of the subarchitecture code. Now that all the
special platforms are runtime probed and runtime handled, we can remove
these facilities.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, smp: remove mach_ipi.h
Ingo Molnar [Wed, 28 Jan 2009 18:14:52 +0000 (19:14 +0100)]
x86, smp: remove mach_ipi.h

Move mach_ipi.h definitions into genapic.h.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, bigsmp: consolidate header code
Ingo Molnar [Wed, 28 Jan 2009 18:19:12 +0000 (19:19 +0100)]
x86, bigsmp: consolidate header code

Move all the asm/bigsmp/*.h definitions into bigsmp_32.c.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, bigsmp: consolidate code
Ingo Molnar [Wed, 28 Jan 2009 18:04:37 +0000 (19:04 +0100)]
x86, bigsmp: consolidate code

Move all code to arch/x86/kernel/bigsmp_32.c.

With this it ceases to rely on any build-time subarch features.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, NUMAQ: Consolidate code
Ingo Molnar [Wed, 28 Jan 2009 18:01:05 +0000 (19:01 +0100)]
x86, NUMAQ: Consolidate code

Move all NUMAQ code into arch/x86/kernel/numaq.c.

With this it ceases to rely on any build-time subarch features.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, ES7000: Consolidate code
Ingo Molnar [Wed, 28 Jan 2009 18:01:05 +0000 (19:01 +0100)]
x86, ES7000: Consolidate code

Move all ES7000 code into arch/x86/kernel/es7000_32.c.

With this it ceases to rely on any build-time subarch features.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: remove mach_apic.h, fix
Suresh Siddha [Thu, 29 Jan 2009 01:52:57 +0000 (17:52 -0800)]
x86: remove mach_apic.h, fix

Use apic_read() instead of open-coded mmio.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: remove mach_apic.h
Ingo Molnar [Wed, 28 Jan 2009 16:55:37 +0000 (17:55 +0100)]
x86: remove mach_apic.h

Spread mach_apic.h definitions into genapic.h. (with some knock-on effects
on smp.h and apic.h.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, summit: consolidate code, fix
Ingo Molnar [Thu, 29 Jan 2009 10:29:22 +0000 (11:29 +0100)]
x86, summit: consolidate code, fix

Build fix for !NUMA Summit.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoASoC: Fix null string usage with WM8753 DAIs
Mark Brown [Thu, 29 Jan 2009 13:08:20 +0000 (13:08 +0000)]
ASoC: Fix null string usage with WM8753 DAIs

The WM8753 driver multiplexes the DAI structures it exposes to the
outside world, leaving them uninitialised until the codec probes.  Since
the DAI name is used during the registration and setup process provide a
dummy name.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
17 years agoxen: make sysfs files behave as their names suggest
Jeremy Fitzhardinge [Thu, 29 Jan 2009 00:50:20 +0000 (16:50 -0800)]
xen: make sysfs files behave as their names suggest

1: make "target_kb" only accept and produce a memory size in kilobytes.
2: add a second "target" file which produces output in bytes, and will accept
   memparse input (scaled bytes)

This fixes the rather irritating problem that writing the same value
read back into target_kb would end up shrinking the domain by a factor
of 1024, with generally bad results.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Stable Kernel <stable@kernel.org>
Cc: "dan.magenheimer@oracle.com" <dan.magenheimer@oracle.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoV4L/DVB (10229): ivtv: fix memory leak
Hans Verkuil [Mon, 12 Jan 2009 21:10:43 +0000 (18:10 -0300)]
V4L/DVB (10229): ivtv: fix memory leak

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10385): gspca - main: Fix memory leak when USB disconnection while streaming.
Jean-Francois Moine [Sat, 24 Jan 2009 10:45:14 +0000 (07:45 -0300)]
V4L/DVB (10385): gspca - main: Fix memory leak when USB disconnection while streaming.

Resetting the streaming flag on disconnection prevented the URBs to be freed
when streaming was active.
Also, USBs cannot be killed after disconnection (oops in [usbcore] unlink1).

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10325): em28xx: Fix for fail to submit URB with IRQs and Pre-emption Disabled
Robert Krakora [Sun, 25 Jan 2009 16:08:07 +0000 (13:08 -0300)]
V4L/DVB (10325): em28xx: Fix for fail to submit URB with IRQs and Pre-emption Disabled

Trace:  (Provided by Douglas)

BUG: sleeping function called from invalid context at drivers/usb/core/urb.c:558
in_atomic():0, irqs_disabled():1
Pid: 4918, comm: sox Not tainted 2.6.27.5 #1
 [<c04246d8>] __might_sleep+0xc6/0xcb
 [<c058c8b0>] usb_kill_urb+0x1a/0xd8
 [<c0488e68>] ? __kmalloc+0x9b/0xfc
 [<c0488e85>] ? __kmalloc+0xb8/0xfc
 [<c058cd5a>] ? usb_alloc_urb+0xf/0x31
 [<f8dd638c>] em28xx_isoc_audio_deinit+0x2f/0x6c [em28xx_alsa]
 [<f8dd6573>] em28xx_cmd+0x1aa/0x1c5 [em28xx_alsa]
 [<f8dd65e1>] snd_em28xx_capture_trigger+0x53/0x68 [em28xx_alsa]
 [<f8aa8674>] snd_pcm_do_start+0x1c/0x23 [snd_pcm]
 [<f8aa85d7>] snd_pcm_action_single+0x25/0x4b [snd_pcm]
 [<f8aa9833>] snd_pcm_action+0x6a/0x76 [snd_pcm]
 [<f8aa98f5>] snd_pcm_start+0x14/0x16 [snd_pcm]
 [<f8aae10e>] snd_pcm_lib_read1+0x66/0x273 [snd_pcm]
 [<f8aac5a3>] ? snd_pcm_kernel_ioctl+0x46/0x5f [snd_pcm]
 [<f8aae4a7>] snd_pcm_lib_read+0xbf/0xcd [snd_pcm]
 [<f8aad774>] ? snd_pcm_lib_read_transfer+0x0/0xaf [snd_pcm]
 [<f89feeb6>] snd_pcm_oss_read3+0x99/0xdc [snd_pcm_oss]
 [<f89fef9c>] snd_pcm_oss_read2+0xa3/0xbf [snd_pcm_oss]
 [<c064169d>] ? _cond_resched+0x8/0x32
 [<f89ff0be>] snd_pcm_oss_read+0x106/0x150 [snd_pcm_oss]
 [<f89fefb8>] ? snd_pcm_oss_read+0x0/0x150 [snd_pcm_oss]
 [<c048c6e2>] vfs_read+0x81/0xdc
 [<c048c7d6>] sys_read+0x3b/0x60
 [<c04039bf>] sysenter_do_call+0x12/0x34
 =======================

The culprit in the trace is snd_pcm_action() which invokes a spin lock
which disables pre-emption which disables an IRQ which causes the
__might_sleep() function to fail the irqs_disabled() test.  Since
pre-emption is enabled then it is safe to de-allocate the memory if
you first unlink each URB.  In this instance you are safe since
pre-emption is disabled.  If pre-emption and irqs are not disabled then
call usb_kill_urb(), else call usb_unlink_urb().

Thanks to Douglas for tracking down this bug originally!!!

[dougsland@redhat.com: Fixed codyingstyle]
Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10317): radio-mr800: fix radio->muted and radio->stereo
Alexey Klimov [Sun, 25 Jan 2009 23:07:28 +0000 (20:07 -0300)]
V4L/DVB (10317): radio-mr800: fix radio->muted and radio->stereo

Move radio->muted and radio->stereo in section where radio mutex is
locked to avoid possible race condition problems or access to memory.
Thanks to David Ellingsworth <david@identd.dyndns.org> for pointing to
this weak place in driver.

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10314): cx25840: ignore TUNER_SET_CONFIG in the command callback.
Hans Verkuil [Tue, 27 Jan 2009 09:20:34 +0000 (06:20 -0300)]
V4L/DVB (10314): cx25840: ignore TUNER_SET_CONFIG in the command callback.

These days TUNER_SET_CONFIG is broadcast to the other i2c devices
and that triggers a fw load on the cx25840. Ignore this command
since cx25840 isn't a tuner and you really do not want to load
the firmware that early.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10288): af9015: bug fix: stick does not work always when plugged
Antti Palosaari [Tue, 20 Jan 2009 17:56:20 +0000 (14:56 -0300)]
V4L/DVB (10288): af9015: bug fix: stick does not work always when plugged

First control messages to the stick timeouts very often due to probable
hw bug. Repeat first message few times if it fails as workaround.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10287): af9015: fix second FE
Antti Palosaari [Tue, 13 Jan 2009 16:08:29 +0000 (13:08 -0300)]
V4L/DVB (10287): af9015: fix second FE

Bug causes 2nd FE MPEG TS buffer size to be zero and therefore no picture
when 2nd FE was enabled. Configure correct buffer size also for 2nd FE.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoALSA: Add missing description of snd-cmi8330 module parameters
Takashi Iwai [Thu, 29 Jan 2009 10:49:10 +0000 (11:49 +0100)]
ALSA: Add missing description of snd-cmi8330 module parameters

Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoALSA: cmi8330: add MPU-401 support
Krzysztof Helt [Thu, 29 Jan 2009 10:48:14 +0000 (11:48 +0100)]
ALSA: cmi8330: add MPU-401 support

Add MPU-401 port support for the chip.
Also, update some error messages and description.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoV4L/DVB (10270): saa7146: fix unbalanced mutex_lock/unlock
Hans Verkuil [Sun, 18 Jan 2009 18:08:33 +0000 (15:08 -0300)]
V4L/DVB (10270): saa7146: fix unbalanced mutex_lock/unlock

The default case of the switch didn't unlock the mutex.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoALSA: gus: update debug messages
Krzysztof Helt [Thu, 29 Jan 2009 10:46:45 +0000 (11:46 +0100)]
ALSA: gus: update debug messages

Convert some of them to snd_printdd() and
update arguments to make them compilable.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoV4L/DVB (10265): budget.c driver: Kernel oops: "BUG: unable to handle kernel paging...
Tony Broad [Sun, 18 Jan 2009 10:55:38 +0000 (07:55 -0300)]
V4L/DVB (10265): budget.c driver: Kernel oops: "BUG: unable to handle kernel paging request at ffffffff

I'm using a "Hauppauge WinTV-NOVA-T DVB card" of PCI id "13c2:1005" with
kernel 2.6.27.9.

I've recently experienced the following fairly consistent kernel oops on
startup in grundig_29504_401_tuner_set_params from budget.c. As you
might expect, following this failure, the card doesn't work.

I'm not a kernel developer, nevertheless I seem to have managed to track
this down to a non-existent initialisation of
budget->dvb_frontend->tuner_priv.

The attached patch fixes the problem for me (and I've managed to tune
the card successfully as a result), but I don't know of anyone else
using the driver so I can't test it on other people.

Please let me know if this works for you or if I've done something
terribly wrong ;-(

BUG: unable to handle kernel paging request at ffffffff
IP: [<f8981e11>] :budget:grundig_29504_401_tuner_set_params+0x3b/0xf8
*pde = 007e0067 *pte = 00000000
Oops: 0000 [#1] SMP
Modules linked in: bridge stp bnep rfcomm l2cap asb100 hwmon_vid hwmon
fuse ipt_REJECT nf_conntrack_ipv4 iptable_filter ip_tables ip6t_REJECT
xt_tcpudp nf_conntrack_ipv6 xt_state nf_conntrack ip6table_filter
ip6_tables x_tables ipv6 loop dm_multipath scsi_dh ppdev snd_cmipci
gameport snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq
snd_pcm_oss snd_mixer_oss l64781 snd_pcm snd_page_alloc snd_opl3_lib
snd_timer parport_pc snd_hwdep parport btusb snd_mpu401_uart budget
budget_core snd_rawmidi bluetooth saa7146 snd_seq_device ttpci_eeprom
snd soundcore sr_mod i2c_sis96x cdrom dvb_core sis900 i2c_core floppy
pcspkr mii sata_sil sg dm_snapshot dm_zero dm_mirror dm_log dm_mod
pata_sis ata_generic pata_acpi libata sd_mod scsi_mod crc_t10dif ext3
jbd mbcache uhci_hcd ohci_hcd ehci_hcd [last unloaded: microcode]

Pid: 2319, comm: kdvb-fe-0 Not tainted (2.6.27.9-73.fc9.i686 #1)
EIP: 0060:[<f8981e11>] EFLAGS: 00010286 CPU: 0
EIP is at grundig_29504_401_tuner_set_params+0x3b/0xf8 [budget]
EAX: f6417f00 EBX: f6f53808 ECX: 00000000 EDX: ffffffff
ESI: f6f94404 EDI: f6417f00 EBP: f6417f10 ESP: f6417ef0
  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
Process kdvb-fe-0 (pid: 2319, ti=f6417000 task=f642b2c0 task.ti=f6417000)
Stack: f6e39800 00000000 00000004 f6417f00 c064523c f6f53808 f6f53800 f6f94404
        f6417f54 f8b2e45a f6417f24 00000286 f6417f4c f6417f38 00000000 00000286
        f6417f3c c064520f f642b2c0 f6417f6c c064456f 00000001 f6f94400 00000001
Call Trace:
  [<c064523c>] ? _spin_lock_irqsave+0x29/0x30
  [<f8b2e45a>] ? apply_frontend_param+0x27/0x357 [l64781]
  [<c064520f>] ? _spin_lock_irq+0x1c/0x20
  [<c064456f>] ? __down_common+0x91/0xbf
  [<f894f25d>] ? dvb_frontend_swzigzag_autotune+0x17d/0x1a4 [dvb_core]
  [<f894f780>] ? dvb_frontend_swzigzag+0x1ac/0x209 [dvb_core]
  [<f894fcc8>] ? dvb_frontend_thread+0x2eb/0x3b3 [dvb_core]
  [<c043c166>] ? autoremove_wake_function+0x0/0x33
  [<f894f9dd>] ? dvb_frontend_thread+0x0/0x3b3 [dvb_core]
  [<c043bec3>] ? kthread+0x3b/0x61
  [<c043be88>] ? kthread+0x0/0x61
  [<c040494b>] ? kernel_thread_helper+0x7/0x10
  =======================
Code: ec 14 8b 80 00 02 00 00 8b 93 08 02 00 00 8d 7d e4 8b 40 20 89 45
e0 31 c0 85 d2 f3 ab 8d 45 f0 66 c7 45 e8 04 00 89 45 ec 74 09 <0f> b6
02 66 89 45 e4 eb 06 66 c7 45 e4 61 00 8b 0e be 0a 8b 02
EIP: [<f8981e11>] grundig_29504_401_tuner_set_params+0x3b/0xf8 [budget]
SS:ESP 0068:f6417ef0

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoALSA: sscape: update Kconfig description about SoundScape cards
Krzysztof Helt [Thu, 29 Jan 2009 10:44:24 +0000 (11:44 +0100)]
ALSA: sscape: update Kconfig description about SoundScape cards

The SoundScape driver handles more cards then described.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agox86: tone down mtrr_trim_uncached_memory() warning
Ingo Molnar [Thu, 29 Jan 2009 10:45:35 +0000 (11:45 +0100)]
x86: tone down mtrr_trim_uncached_memory() warning

kerneloops.org is reporting a lot of these warnings that come due to
vmware not setting up any MTRRs for emulated CPUs:

| Reported 709 times (14696 total reports)
| BIOS bug (often in VMWare) where the MTRR's are set up incorrectly
| or not at all
|
| This warning was last seen in version 2.6.29-rc2-git1, and first
| seen in 2.6.24.
|
| More info:
|   http://www.kerneloops.org/searchweek.php?search=mtrr_trim_uncached_memory

Keep a one-liner KERN_INFO about it - so that we have so notice if empty
MTRRs are caused by native hardware/BIOS weirdness.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoV4L/DVB (10261): em28xx: fix kernel panic on audio shutdown
Devin Heitmueller [Sat, 17 Jan 2009 16:41:54 +0000 (13:41 -0300)]
V4L/DVB (10261): em28xx: fix kernel panic on audio shutdown

Revert a change made in change 9743 which resulted in a kernel panic in some
cases on shutdown of the audio stream.

First discovered when working on the Pinnacle 880e support, and later
reproduced by a user on the mailing list with the HVR-900 as well.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10257): em28xx: Fix for KWorld 330U Board
Robert Krakora [Mon, 19 Jan 2009 00:59:34 +0000 (21:59 -0300)]
V4L/DVB (10257): em28xx: Fix for KWorld 330U Board

Fix for KWorld 330U Board

Many thanks to Devin and Mauro!!!

Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10256): em28xx: Fix for KWorld 330U AC97
Robert Krakora [Mon, 19 Jan 2009 00:45:28 +0000 (21:45 -0300)]
V4L/DVB (10256): em28xx: Fix for KWorld 330U AC97

Fix for KWorld 330U AC97

Many thanks to Devin and Mauro again!!!

Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10254): em28xx: Fix audio URB transfer buffer race condition
Robert Krakora [Fri, 16 Jan 2009 14:23:25 +0000 (11:23 -0300)]
V4L/DVB (10254): em28xx: Fix audio URB transfer buffer race condition

em28xx: Fix audio URB transfer buffer memory leak and race
condition/corruption of capture pointer

Leak fix kindly contributed by Pádraig Brady.

Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10250): cx25840: fix regression: fw not loaded on first use
Hans Verkuil [Thu, 15 Jan 2009 08:37:14 +0000 (05:37 -0300)]
V4L/DVB (10250): cx25840: fix regression: fw not loaded on first use

With the conversion to v4l2_subdev one bit of code was accidentally dropped:
on receiving the first command the driver has to load the fw. A new init()
command was introduced to do that explicitly for bridge drivers that are
converted to use v4l2_subdev, but old drivers that are not yet converted
no longer worked.

This patch fixes this regression for these old drivers.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10248): v4l-dvb: fix a bunch of compile warnings.
Hans Verkuil [Sat, 17 Jan 2009 16:09:11 +0000 (13:09 -0300)]
V4L/DVB (10248): v4l-dvb: fix a bunch of compile warnings.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10243): em28xx: fix compile warning
Hans Verkuil [Sat, 17 Jan 2009 14:21:02 +0000 (11:21 -0300)]
V4L/DVB (10243): em28xx: fix compile warning

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10240): Fix obvious swapped names in v4l2_subdev logic
Mike Isely [Wed, 14 Jan 2009 07:58:36 +0000 (04:58 -0300)]
V4L/DVB (10240): Fix obvious swapped names in v4l2_subdev logic

The VIDIOC_QUERYCTRL command needs to actually do a queryctrl, not a
querymenu.  Similarly, the VIDIOC_QUERYMENU command needs to actually
do a querymenu not a queryctrl.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10233): [PATCH] Terratec Cinergy DT XS Diversity new USB ID (0ccd:0081)
Nicolas Fournier [Tue, 13 Jan 2009 10:15:25 +0000 (07:15 -0300)]
V4L/DVB (10233): [PATCH] Terratec Cinergy DT XS Diversity new USB ID (0ccd:0081)

The following patch adds support for a new version of the
Terratec Cinergy DT USB XS Diversity Dual DVB-T TV tuner stick.
The USB ID of the new stick is 0ccd:0081.
The hardware of the stick has changed, when compared to the first version of
this stick, but it still uses quite standard components, so that only minor
changes are needed to the sources.

The patch has been successfully tested with hotplugging the device and then
2 x tzap and 2 x mplayer, to watch two different TV programs simultaneously.

The stick works with both, the old and new firmwares:
- dvb-usb-dib0700-1.10.fw and
- dvb-usb-dib0700-1.20.fw

Signed-off-by: Nicolas Fournier <nicolasfournier@yahoo.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10230): v4l2-device: fix buggy macro
Hans Verkuil [Mon, 12 Jan 2009 21:12:13 +0000 (18:12 -0300)]
V4L/DVB (10230): v4l2-device: fix buggy macro

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10229): cx88-dvb: Fix order of frontend allocations
Andy Walls [Mon, 12 Jan 2009 00:18:04 +0000 (21:18 -0300)]
V4L/DVB (10229): cx88-dvb: Fix order of frontend allocations

On Fri, 2009-01-09 at 15:40 +0300, Goga777 wrote:
> hI
>
> With today v4l-dvb I couldn't run my hvr4000 card on 2.6.27 kernel

> [   14.555162] cx88/2: cx2388x dvb driver version 0.0.6 loaded
> [   14.555231] cx88/2: registering cx8802 driver, type: dvb access: shared
> [   14.555303] cx88[0]/2: subsystem: 0070:6900, board: Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [card=68]
> [   14.555374] cx88[0]/2: cx2388x based DVB/ATSC card
> [   14.555446] BUG: unable to handle kernel NULL pointer dereference at 00000000
> [   14.555560] IP: [<c02e6bff>] __mutex_lock_common+0x3c/0xe4
> [   14.555652] *pde = 00000000
> [   14.555735] Oops: 0002 [#1] SMP
> [   14.555851] Modules linked in: cx88_dvb(+) cx88_vp3054_i2c videobuf_dvb wm8775 dvb_core tuner_simple tuner_types snd_seq_dummy tda9887 snd_seq_oss(+) snd_intel8x0(+) tda8290 snd_seq_midi snd_seq_midi_event snd_ac97_codec cx88_alsa(+) snd_seq ac97_bus snd_pcm_oss snd_mixer_oss snd_pcm snd_rawmidi snd_timer tuner snd_seq_device psmouse snd serio_raw ivtv(+) cx8800 cx8802 cx88xx soundcore cx2341x ir_common ns558 i2c_i801 v4l2_common videodev i2c_algo_bit gameport v4l1_compat snd_page_alloc tveeprom pcspkr floppy videobuf_dma_sg videobuf_core btcx_risc i2c_core parport_pc parport button intel_agp agpgart shpchp pci_hotplug rng_core iTCO_wdt sd_mod evdev usbhid hid ff_memless ext3 jbd mbcache ide_cd_mod cdrom ide_disk ata_piix libata dock 8139too usb_storage scsi_mod piix 8139cp mii ide_core uhci_hcd ehci_hcd usbcore thermal processor fan thermal_sys
> [   14.557013]
> [   14.557013] Pid: 2310, comm: modprobe Not tainted (2.6.27.1-custom-default1 #1)
> [   14.557013] EIP: 0060:[<c02e6bff>] EFLAGS: 00010246 CPU: 1
> [   14.557013] EIP is at __mutex_lock_common+0x3c/0xe4
> [   14.557013] EAX: de653e98 EBX: de739118 ECX: de739120 EDX: 00000000
> [   14.557013] ESI: dd4209e0 EDI: de73911c EBP: de653eb0 ESP: de653e88
> [   14.557013]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
> [   14.557013] Process modprobe (pid: 2310, ti=de652000 task=dd4209e0 task.ti=de652000)
> [   14.557013] Stack: 3535352e 5d343733 00000002 de739120 de739120 00000000 c044a6c0 de739110
> [   14.557013]        de739118 00000001 de653ebc c02e6d38 c02e6b88 de653ec4 c02e6b88 de653ed8
> [   14.557013]        e1ac7115 de6a9000 00000001 00000000 de653f0c e1aeca62 de739004 de739000
> [   14.557013] Call Trace:
> [   14.557013]  [<c02e6d38>] ? __mutex_lock_slowpath+0x17/0x1a
> [   14.557013]  [<c02e6b88>] ? mutex_lock+0x12/0x14
> [   14.557013]  [<c02e6b88>] ? mutex_lock+0x12/0x14
> [   14.557013]  [<e1ac7115>] ? videobuf_dvb_get_frontend+0x19/0x40 [videobuf_dvb]
> [   14.557013]  [<e1aeca62>] ? cx8802_dvb_probe+0xc9/0x1945 [cx88_dvb]
> [   14.557013]  [<e09ee41e>] ? cx8802_register_driver+0xbd/0x1ac [cx8802]
> [   14.557013]  [<e09ee467>] ? cx8802_register_driver+0x106/0x1ac [cx8802]
> [   14.557013]  [<e1aee37f>] ? dvb_init+0x22/0x27 [cx88_dvb]
> [   14.557013]  [<c0101132>] ? _stext+0x42/0x11a
> [   14.557013]  [<e1aee35d>] ? dvb_init+0x0/0x27 [cx88_dvb]
> [   14.557013]  [<c013d2ca>] ? __blocking_notifier_call_chain+0xe/0x51
> [   14.557013]  [<c014970b>] ? sys_init_module+0x8c/0x17d
> [   14.557013]  [<c0103b42>] ? syscall_call+0x7/0xb
> [   14.557013]  [<c013007b>] ? round_jiffies_relative+0x14/0x16
> [   14.557013]  =======================
> [   14.557013] Code: 78 04 89 f8 89 55 e0 64 8b 35 00 30 3f c0 e8 2e 0c 00 00 8d 43 08 89 45 e4 8b 53 0c 8d 45 e8 8b 4d e4 89 43 0c 89 4d e8 89 55 ec <89> 02 89 75 f0 83 c8 ff 87 03 48 74 55 8a 45 e0 8b 4d e0 83 e0
> [   14.557013] EIP: [<c02e6bff>] __mutex_lock_common+0x3c/0xe4 SS:ESP 0068:de653e88
> [   14.565211] ---[ end trace 94d8b014e067ac7b ]---

Tested and confirmed to work by several users at linux-media@vger.kernel.org

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10228): em28xx: fix audio output PCM IN selection
Mauro Carvalho Chehab [Tue, 13 Jan 2009 00:50:52 +0000 (21:50 -0300)]
V4L/DVB (10228): em28xx: fix audio output PCM IN selection

Some em28xx devices use the PCM IN AC 97 PIN for digital audio. However,
currently, the PCM IN selection is not set by the driver. This patch allows
specifying the PCM IN expected output, via board description table.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10226): zoran: Get rid of extra module ref count
Trent Piepho [Mon, 12 Jan 2009 16:09:46 +0000 (13:09 -0300)]
V4L/DVB (10226): zoran: Get rid of extra module ref count

The zoran driver does a module_get/put of THIS_MODULE on device open/close.
This isn't necessary as the kernel does this automatically.

Clean up the failure path of zoran_open() somewhat.

Make the dprintk()s on open/close a higher debug level and make the user
count printed take the current open/close into account.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10225): zoran: Remove zr36057_adr field
Trent Piepho [Mon, 12 Jan 2009 16:09:46 +0000 (13:09 -0300)]
V4L/DVB (10225): zoran: Remove zr36057_adr field

The driver should only use the kernel mapped io address, zr36057_mem, and
not the PCI bus address, zr36057_adr.  Since the latter is only printed out
once, there is no need to save it in the driver data structure.

There was some old code that looked like it was for the Alpha architecture
which would use the PCI bus address.  It probably no longer applies to
modern kernels.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10224): zoran: Use pci device table to get card type
Trent Piepho [Mon, 12 Jan 2009 16:09:46 +0000 (13:09 -0300)]
V4L/DVB (10224): zoran: Use pci device table to get card type

Instead of using custom code, just let the device layer look it up for us
from the pci device table.  This requires extending the pci device table to
list each known card, plus a catch-all entry for the cards that don't have
sub-system vendor/device data.

Improve some of the info and error messages too.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10223): zoran: Remove global device array
Trent Piepho [Mon, 12 Jan 2009 16:09:46 +0000 (13:09 -0300)]
V4L/DVB (10223): zoran: Remove global device array

The driver was keeping a global array with an entry for each zoran device
probed.  It was a leftover from when the driver didn't dynamically allocate
the driver data for each device.

There was only one use left, in the video device's ->open() method, looking
up the struct zoran for the opened device from the minor number.  This can
be done better with video_get_drvdata().

Since zoran_num is now only used in the pci driver's ->probe() method, it
doesn't need to be an atomic_t and be static.  There is a race if multiple
zoran cards could be probed at the same time, but currently the probe
method for a given driver is single threaded.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10222): zoran: Better syntax for initializing array module params
Trent Piepho [Mon, 12 Jan 2009 16:09:46 +0000 (13:09 -0300)]
V4L/DVB (10222): zoran: Better syntax for initializing array module params

When initializing a module parameter that is a per-card array, use
"{ [0 ... (BUZ_MAX-1)] = -1 }" instead of "{ -1, -1, -1, -1 }".  This way
all of the entries will be correctly set to -1 if someone changes BUZ_MAX
to a value other than 4.

Adjust some of the parameter help text too.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10219): saa7134: Prevent Oops due to stale IRQ status when enabling interrupts
Andy Walls [Sat, 10 Jan 2009 21:04:45 +0000 (18:04 -0300)]
V4L/DVB (10219): saa7134: Prevent Oops due to stale IRQ status when enabling interrupts

When enabling a shared IRQ line, then saa7134_irq handler could be invoked
before the driver had completely set up internal structures, due to a shared
interrupt line firing.  Clear the saa7134 interrupt status reg, before
requesting the irq line, so that stale IRQ status isn't processed before the
internal structures are set up.

Marcin Slusarz recently brought this Oops to the attention of the v4l-dvb
lists and provided an initial analysis by investigating reports found here:

http://kerneloops.org/guilty.php?guilty=mute_input_7133&version=2.6.27-release&start=1802240&end=1835007&class=oops

Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (10218): cx23885: Fix Oops for mixed install of analog and digital only cards
Andy Walls [Sat, 10 Jan 2009 01:59:27 +0000 (22:59 -0300)]
V4L/DVB (10218): cx23885: Fix Oops for mixed install of analog and digital only cards

Analog support for HVR-1250 has not been completed, but does exist for
the HVR-1800.

Since both cards use the same driver, it tries to create the analog
dev for both devices, which is not possible.

This causes a NULL error to show up in video_open and mpeg_open.

-Mark

Iterations through the cx23885_devlist must check for NULL
pointers as some supported devices only have DVB support at the moment.
Mark Jenks encoutered an Oops in a system with both an HVR-1250 and HVR-1800
installed.

-Andy

Reported-by: Mark Jenks <mjenks1968@gmail.com>
Tested-by: Mark Jenks <mjenks1968@gmail.com>
Signed-off-by: Mark Jenks <mjenks1968@gmail.com>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>