]> err.no Git - linux-2.6/log
linux-2.6
18 years agoMerge kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git with fixups
Linus Torvalds [Tue, 21 Mar 2006 17:01:08 +0000 (09:01 -0800)]
Merge kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git with fixups

This merges the DVB tree, but fixes up the history that had gotten
screwed up by a broken commit.

The history is fixed up by re-doing the commit properly (taking the
resolve from the final result of the original), and then cherry-picking
the commits that followed the broken merge.

* dvb: (190 commits)
  V4L/DVB (3545): Fixed no_overlay option and quirks on saa7134 driver
  V4L/DVB (3543): Fix Makefile to adapt to bt8xx/ conversion
  V4L/DVB (3538): Bt8xx documentation update
  V4L/DVB (3537a): Whitespace cleanup
  V4L/DVB (3533): Add WSS (wide screen signalling) module parameters
  V4L/DVB (3532): Moved duplicated code of ALPS BSRU6 tuner to a standalone file.
  V4L/DVB (3530): Kconfig: remove VIDEO_AUDIO_DECODER
  V4L/DVB (3529): Kconfig: add menu items for cs53l32a and wm8775 A/D converters
  V4L/DVB (3528): Kconfig: fix ATSC frontend menu item names by manufacturer
  V4L/DVB (3527): VIDEO_CPIA2 must depend on USB
  V4L/DVB (3525): Kconfig: remove VIDEO_DECODER
  V4L/DVB (3524): Kconfig: add menu items for saa7115 and saa7127
  V4L/DVB (3494): Kconfig: select VIDEO_MSP3400 to build msp3400.ko
  V4L/DVB (3522): Fixed a trouble with other PAL standards
  V4L/DVB (3521): Avoid warnings at video-buf.c
  V4L/DVB (3514): SAA7113 doesn't have auto std chroma detection mode
  V4L/DVB (3513): Remove saa711x driver
  V4L/DVB (3509): Make a needlessly global function static.
  V4L/DVB (3506): Cinergy T2 dmx cleanup on disconnect
  V4L/DVB (3504): Medion 7134: Autodetect second bridge chip
  ...

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoV4L/DVB (3545): Fixed no_overlay option and quirks on saa7134 driver
Mauro Carvalho Chehab [Fri, 17 Mar 2006 23:54:32 +0000 (20:54 -0300)]
V4L/DVB (3545): Fixed no_overlay option and quirks on saa7134 driver

Some chipsets have several problems when pci to pci transfers are activated
on overlay mode. the option no_overlay allows disabling such feature of
the driver, in favor of keeping the system stable.
The default is to use pcipci_fail flag defined on drivers/pci/quirks.c.
It also allows the user to override it by forcing disable overlay or forcing
enable. Forcing enable may generate PCI transfer corruption, including disk
mass corruption, so should be used with care.
Added a text description to this option and make messages looks the same at
both bttv and saa7134 drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3543): Fix Makefile to adapt to bt8xx/ conversion
Manu Abraham [Fri, 17 Mar 2006 21:21:17 +0000 (18:21 -0300)]
V4L/DVB (3543): Fix Makefile to adapt to bt8xx/ conversion

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3538): Bt8xx documentation update
Uwe Bugla [Thu, 16 Mar 2006 23:37:05 +0000 (20:37 -0300)]
V4L/DVB (3538): Bt8xx documentation update

Signed-off-by: Uwe Bugla <uwe.bugla@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3537a): Whitespace cleanup
Mauro Carvalho Chehab [Fri, 17 Mar 2006 13:37:02 +0000 (10:37 -0300)]
V4L/DVB (3537a): Whitespace cleanup

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3533): Add WSS (wide screen signalling) module parameters
Oliver Endriss [Fri, 17 Mar 2006 08:29:15 +0000 (05:29 -0300)]
V4L/DVB (3533): Add WSS (wide screen signalling) module parameters

Add wss_cfg_4_3 and wss_cfg_16_9 configuration options.
Firmware 2623 or later required.
Both parameters are bit masks:
- bit 15: disable WSS
- bit 14: send short WSS burst, then turn off WSS
- bit 13..0: WSS bits as specified by the standard
These parameters are useful if you own a broken tv set which
does not handle wss correctly.
Default settings:
- wss_cfg_4_3: 0x4008
- wss_cfg_16_9: 0x0007
These should work with most devices.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3532): Moved duplicated code of ALPS BSRU6 tuner to a standalone file.
Perceval Anichini [Thu, 16 Mar 2006 14:22:47 +0000 (11:22 -0300)]
V4L/DVB (3532): Moved duplicated code of ALPS BSRU6 tuner to a standalone file.

Moved duplicated code of ALPS BSRU6 tuner to a standalone file.
Modified av7110 and budget drivers to include the new file.

Signed-off-by: Perceval Anichini <perceval.anichini@streamvision.fr>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3530): Kconfig: remove VIDEO_AUDIO_DECODER
Michael Krufky [Thu, 16 Mar 2006 17:53:23 +0000 (14:53 -0300)]
V4L/DVB (3530): Kconfig: remove VIDEO_AUDIO_DECODER

- removed VIDEO_AUDIO_DECODER Kconfig menu item.
  VIDEO_MSP3400, VIDEO_CS53L32A and VIDEO_WM8775 now
  each have their own menu items.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3529): Kconfig: add menu items for cs53l32a and wm8775 A/D converters
Michael Krufky [Thu, 16 Mar 2006 17:48:38 +0000 (14:48 -0300)]
V4L/DVB (3529): Kconfig: add menu items for cs53l32a and wm8775 A/D converters

- created Kconfig item, VIDEO_CS53L32A, for the cs53l32a module which supports
  the Cirrus Logic CS53L32A Low Voltage Stereo A/D Converter.
- created Kconfig item, VIDEO_WM8775, for the wm8775 module which supports
  the Wolfson Microelectronics WM8775 high performance stereo A/D Converter.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3528): Kconfig: fix ATSC frontend menu item names by manufacturer
Michael Krufky [Thu, 16 Mar 2006 16:18:25 +0000 (13:18 -0300)]
V4L/DVB (3528): Kconfig: fix ATSC frontend menu item names by manufacturer

- Corrected typo for NxtWave NXT200X
- Added "Oren" manufacturer name to menu items for OR51132 and OR51211
- Removed "(pcHDTV HDx000 card)" from Oren frontends menu item names,
  This isn't necessary, as these frontends are selected by the card drivers,
  build configuration (DVB_BT8XX and VIDEO_CX88_DVB).

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3527): VIDEO_CPIA2 must depend on USB
Adrian Bunk [Thu, 16 Mar 2006 15:53:53 +0000 (12:53 -0300)]
V4L/DVB (3527): VIDEO_CPIA2 must depend on USB

CONFIG_VIDEO_CPIA2=y, CONFIG_USB=n results in the following compile
<--  snip  -->
...
  LD      .tmp_vmlinux1
drivers/built-in.o: In function `set_alternate':cpia2_usb.c:(.text+0x443aa2): undefined reference to `usb_set_interface'
drivers/built-in.o: In function `cpia2_usb_stream_resume': undefined reference to `usb_alloc_urb'
drivers/built-in.o: In function `cpia2_usb_stream_resume': undefined reference to `usb_submit_urb'
drivers/built-in.o: In function `cpia2_usb_stream_pause': undefined reference to `usb_kill_urb'
drivers/built-in.o: In function `cpia2_usb_stream_pause': undefined reference to `usb_free_urb'
drivers/built-in.o: In function `cpia2_usb_disconnect':cpia2_usb.c:(.text+0x443e14): undefined reference to `usb_driver_release_interface'
drivers/built-in.o: In function `cpia2_usb_transfer_cmd': undefined reference to `usb_control_msg'
drivers/built-in.o: In function `cpia2_usb_transfer_cmd': undefined reference to `usb_control_msg'
drivers/built-in.o: In function `cpia2_usb_complete':cpia2_usb.c:(.text+0x444836): undefined reference to `usb_submit_urb'
drivers/built-in.o: In function `cpia2_usb_cleanup': undefined reference to `usb_deregister'
drivers/built-in.o: In function `cpia2_usb_init': undefined reference to `usb_register_driver'

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3525): Kconfig: remove VIDEO_DECODER
Michael Krufky [Thu, 16 Mar 2006 05:59:09 +0000 (02:59 -0300)]
V4L/DVB (3525): Kconfig: remove VIDEO_DECODER

- removed VIDEO_DECODER Kconfig menu item.
  VIDEO_CX25840, VIDEO_SAA711X and VIDEO_SAA7127 now
  each have their own menu items.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3524): Kconfig: add menu items for saa7115 and saa7127
Michael Krufky [Thu, 16 Mar 2006 05:53:14 +0000 (02:53 -0300)]
V4L/DVB (3524): Kconfig: add menu items for saa7115 and saa7127

- created Kconfig menu item, VIDEO_SAA711X, for the saa7115 module,
  which supports SAA7113, SAA7114 and SAA7115 video decoders.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3494): Kconfig: select VIDEO_MSP3400 to build msp3400.ko
Michael Krufky [Tue, 14 Mar 2006 02:44:31 +0000 (23:44 -0300)]
V4L/DVB (3494): Kconfig: select VIDEO_MSP3400 to build msp3400.ko

The msp3400 driver is currently only being built if
the bttv driver is selected. There are new drivers
that will be needing msp3400, so simply including
msp3400 in the Makefile is no longer appropriate.
This patch creates VIDEO_MSP3400, and alters VIDEO_BT848, VIDEO_PVRUSB2
and VIDEO_AUDIO_DECODER each to select VIDEO_MSP3400.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3522): Fixed a trouble with other PAL standards
Mauro Carvalho Chehab [Thu, 16 Mar 2006 21:44:07 +0000 (18:44 -0300)]
V4L/DVB (3522): Fixed a trouble with other PAL standards

V4L2_STD_PAL define is not correct. It specifies only 50Hz PAL standards.
This patch fixes saa7113 color config for other PAL video standards.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3521): Avoid warnings at video-buf.c
Mauro Carvalho Chehab [Wed, 15 Mar 2006 20:52:14 +0000 (17:52 -0300)]
V4L/DVB (3521): Avoid warnings at video-buf.c

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3514): SAA7113 doesn't have auto std chroma detection mode
Mauro Carvalho Chehab [Tue, 14 Mar 2006 19:33:33 +0000 (16:33 -0300)]
V4L/DVB (3514): SAA7113 doesn't have auto std chroma detection mode

This patch makes chroma standard selection based at possible values,
according with datasheet.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3513): Remove saa711x driver
Mauro Carvalho Chehab [Mon, 13 Mar 2006 16:31:31 +0000 (13:31 -0300)]
V4L/DVB (3513): Remove saa711x driver

Now, em28xx uses saa7115 instead of saa711x.
saa7115 driver is capable of handling saa 7113, 7114 and 7115.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3509): Make a needlessly global function static.
Adrian Bunk [Wed, 15 Mar 2006 19:17:11 +0000 (16:17 -0300)]
V4L/DVB (3509): Make a needlessly global function static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3506): Cinergy T2 dmx cleanup on disconnect
Markus Rechberger [Wed, 15 Mar 2006 12:31:31 +0000 (09:31 -0300)]
V4L/DVB (3506): Cinergy T2 dmx cleanup on disconnect

Detaching the device didn't clean up several device files in /dev/dvb,
after applying that patch all dvb devices disappeared as expected.

Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3504): Medion 7134: Autodetect second bridge chip
Michael Krufky [Tue, 14 Mar 2006 22:02:12 +0000 (19:02 -0300)]
V4L/DVB (3504): Medion 7134: Autodetect second bridge chip

The device, Medion 7134, has two saa7134 chips on it, but only one of them
is functional in the current saa7134 driver.
This patch adds autodetection for the second, unsupported saa7134 chip,
as SAA7134_BOARD_MD7134_BRIDGE_2, and displays a message to the user
(in dmesg) indicating that the second chip isn't yet functional.
This is useful for users, since two instances of the saa7134 driver
will spawn. This patch will prevent confusion by warning the user that
only one of the chips on the board are functional.
There are other versions of the SAA7134_BOARD_MD7134 with only a single
saa7134 bridge/decoder -- those devices will not be affected by this patch.
Only devices containing the second chip will display the warning.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3503): Whitespace: fix incorrect indentation of curly bracket
Michael Krufky [Tue, 14 Mar 2006 19:18:49 +0000 (16:18 -0300)]
V4L/DVB (3503): Whitespace: fix incorrect indentation of curly bracket

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3502): Saa7134: make unsupported secondary decoder message generic
Michael Krufky [Tue, 14 Mar 2006 19:07:42 +0000 (16:07 -0300)]
V4L/DVB (3502): Saa7134: make unsupported secondary decoder message generic

There are already some supported devices that contain two
saa713x chips on-board, where only one of these chips is
currently functional in the driver.
We are already printing a warning message for the second
saa7134 decoder in SAA7134_BOARD_AVERMEDIA_A169_B. This
patch alters that case to make it generic, so that other
cards in the same situation can use it.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3501): Dmxdev: use dvb_ringbuffer
Andreas Oberritter [Tue, 14 Mar 2006 20:31:01 +0000 (17:31 -0300)]
V4L/DVB (3501): Dmxdev: use dvb_ringbuffer

Use dvb_ringbuffer instead of an own buffer implementation in
dmxdev.[ch].

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3500): Ringbuffer: don't reset pointers to zero
Andreas Oberritter [Tue, 14 Mar 2006 20:30:09 +0000 (17:30 -0300)]
V4L/DVB (3500): Ringbuffer: don't reset pointers to zero

Oliver Endriss spotted, that resetting read and write pointers on
flush() requires additional locking and breaks the av7110 driver.
Therefore this patch partially reverts the previous patch titled "make
dvb_ringbuffer compatible to dmxdev_buffer".

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3499): Fix a bug when more than MAXBOARDS were plugged on em28xx
Mauro Carvalho Chehab [Tue, 14 Mar 2006 20:24:57 +0000 (17:24 -0300)]
V4L/DVB (3499): Fix a bug when more than MAXBOARDS were plugged on em28xx

Coverity reported a bug at checking max number of supported boards by
em28xx init code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3497): Remove redundant makefile inclusion of tuner.o
Michael Krufky [Tue, 14 Mar 2006 04:25:01 +0000 (01:25 -0300)]
V4L/DVB (3497): Remove redundant makefile inclusion of tuner.o

VIDEO_MXB selects VIDEO_TUNER, so we don't have to include tuner.o
in the Makefile.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3496): Cpia2: move Kconfig build logic into cpia2/Kconfig
Michael Krufky [Tue, 14 Mar 2006 03:52:20 +0000 (00:52 -0300)]
V4L/DVB (3496): Cpia2: move Kconfig build logic into cpia2/Kconfig

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3495): Kconfig: select VIDEO_CX25840 to build cx25840 a/v decoder module
Michael Krufky [Tue, 14 Mar 2006 03:35:07 +0000 (00:35 -0300)]
V4L/DVB (3495): Kconfig: select VIDEO_CX25840 to build cx25840 a/v decoder module

The cx25840 module requires external firmware in order to function,
so it must select FW_LOADER, but saa7115 and saa7129 do not require it.
This patch creates VIDEO_CX25840, and alters VIDEO_DECODER to select it.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3488): Snd_cx88_create: don't dereference NULL core
Duncan Sands [Tue, 14 Mar 2006 15:12:39 +0000 (12:12 -0300)]
V4L/DVB (3488): Snd_cx88_create: don't dereference NULL core

If the call to cx88_core_get returns a NULL value, it is dereferenced
by cx88_reset, and perhaps by cx88_core_put.  Spotted by the Coverity
checker.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3485): BUG_ON() Conversion in drivers/video/media
Eric Sesterhenn [Mon, 13 Mar 2006 16:17:11 +0000 (13:17 -0300)]
V4L/DVB (3485): BUG_ON() Conversion in drivers/video/media

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3484): Make dvb_ringbuffer compatible to dmxdev_buffer
Andreas Oberritter [Mon, 13 Mar 2006 16:14:34 +0000 (13:14 -0300)]
V4L/DVB (3484): Make dvb_ringbuffer compatible to dmxdev_buffer

Added variable 'error' to struct dvb_ringbuffer, which is set to zero on
init() and flush(). Also reset read an write pointers to zero on flush()
to get less fragmented data.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3479): Cleanup mangled whitespace
Michael Krufky [Mon, 13 Mar 2006 06:41:44 +0000 (03:41 -0300)]
V4L/DVB (3479): Cleanup mangled whitespace

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3449): Cx88 default picture controls values
Marcin Rudowski [Sun, 12 Mar 2006 03:03:47 +0000 (00:03 -0300)]
V4L/DVB (3449): Cx88 default picture controls values

This patch fixes default values for some picture controls:
 - brightness set to 50% by default (now is 0%)
 - hue set to 50% by default (now is 0%)
 - sets saturation to datasheet value
 - volume set to 0dB (now is -32dB)
and some left small fixes:
 - twice offset adding
 - balance didn't follow datasheet (bits[0:5] = attenuation;
   bit[6] = channel to provide attenuation)

Signed-off-by: Marcin Rudowski <mar_rud@poczta.onet.pl>
Signed-off-by: Ian Pickworth <ian@pickworth.me.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3448): Cx88-input.c: add IR remote control support to CX88_BOARD_PROLINK_PLA...
Matheus Izvekov [Sun, 12 Mar 2006 02:54:58 +0000 (23:54 -0300)]
V4L/DVB (3448): Cx88-input.c: add IR remote control support to CX88_BOARD_PROLINK_PLAYTVPVR

This patch adds support for the IR remote control found in the card
CX88_BOARD_PROLINK_PLAYTVPVR.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3447): Cx88-cards.c: fix values of gpio0 for card CX88_BOARD_PROLINK_PLAYTVPVR
Matheus Izvekov [Sun, 12 Mar 2006 02:54:24 +0000 (23:54 -0300)]
V4L/DVB (3447): Cx88-cards.c: fix values of gpio0 for card CX88_BOARD_PROLINK_PLAYTVPVR

This patch changes the gpio0 values for the card CX88_BOARD_PROLINK_PLAYTVPVR
to the ones observed using RegSpy from the dscaler project.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3446): Saa7134: add support for AVerMedia A169 Dual Analog tuner card
Rickard Osser [Sat, 11 Mar 2006 20:14:12 +0000 (17:14 -0300)]
V4L/DVB (3446): Saa7134: add support for AVerMedia A169 Dual Analog tuner card

- Added support for AVerMedia A169 Dual Analog tuner card
  (dual saa7134 decoders - only 1 working right now)
- Added autodetection for both parts of the card.
  It shows up like 2 cards, B1 and B
- Enabled tuner B1, SVIDEO on B1 and composite1 through SVIDEO,
  FIXME: B is more or less dead at this point and I suspect the
  FM-radio is on the B part of the board

Signed-off-by: Rickard Osser <ricky@osser.se>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3445): LG TALN series: add PAL / SECAM support
Michael Krufky [Sat, 11 Mar 2006 20:02:01 +0000 (17:02 -0300)]
V4L/DVB (3445): LG TALN series: add PAL / SECAM support

- added tuner_lg_taln_pal_secam_ranges
- renamed tuner 66 from TUNER_LG_NTSC_TALN_MINI to TUNER_LG_TALN
- updated FlyTV mini Asus Digimatrix with new tuner

Thanks-to: Rickard Osser <ricky@osser.se>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3444): Saa7134: small whitespace cleanup
Michael Krufky [Sat, 11 Mar 2006 19:21:36 +0000 (16:21 -0300)]
V4L/DVB (3444): Saa7134: small whitespace cleanup

- matched indents on quotes within a printk

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3443): Thomson FE6600: add missing "count" array element
Michael Krufky [Sat, 11 Mar 2006 19:12:35 +0000 (16:12 -0300)]
V4L/DVB (3443): Thomson FE6600: add missing "count" array element

- added missing "count" element in Thomson FE6600

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3439): Added no_overlay option and quirks to saa7134
Mauro Carvalho Chehab [Fri, 10 Mar 2006 19:46:50 +0000 (16:46 -0300)]
V4L/DVB (3439): Added no_overlay option and quirks to saa7134

Some chipsets have several problems when pci to pci transfers are activated
on overlay mode. the option no_overlay allows disabling such feature of
the driver, in favor of keeping the system stable.
The default is to use pcipci_fail flag defined on drivers/pci/quirks.c.
It also allows the user to override it by forcing disable overlay or forcing
enable. Forcing enable may generate PCI transfer corruption, including disk
mass corruption, so should be used with care.
Added a text description to this option and make messages looks the same at
both bttv and saa7134 drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3438): Optical cleanup for dmxdev.c
Andreas Oberritter [Fri, 10 Mar 2006 18:22:31 +0000 (15:22 -0300)]
V4L/DVB (3438): Optical cleanup for dmxdev.c

Used Lindent, manually changed some line breaks. Removed invalid email
addresses, useless casts and useless initialization of return values.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3437): Fix typo in enum name and use enum in struct dmxdev_filter
Andreas Oberritter [Fri, 10 Mar 2006 18:21:58 +0000 (15:21 -0300)]
V4L/DVB (3437): Fix typo in enum name and use enum in struct dmxdev_filter

Rename 'enum dmxdevype' to 'enum dmxdev_type' and use this enum instead
of int for the member 'type' of struct dmxdev_filter.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3436): Remove 'dvbdev' from struct dmxdev_filter
Andreas Oberritter [Fri, 10 Mar 2006 18:21:43 +0000 (15:21 -0300)]
V4L/DVB (3436): Remove 'dvbdev' from struct dmxdev_filter

The member dvbdev gets initialized once but is never used after that.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3435): Remove 'pid' from struct dmxdev_filter
Andreas Oberritter [Fri, 10 Mar 2006 18:21:28 +0000 (15:21 -0300)]
V4L/DVB (3435): Remove 'pid' from struct dmxdev_filter

The PID value is already stored in struct dmx_sct_filter_params which is
a member of struct dmxdev_filter.
Acked-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3425): Correct gpio values for Aver 303 Studio in v4l-dvb tree
Marcin Rudowski [Thu, 9 Mar 2006 19:09:51 +0000 (16:09 -0300)]
V4L/DVB (3425): Correct gpio values for Aver 303 Studio in v4l-dvb tree

Old values generally works in A2 mono, but new ones allows:
- detect and use Nicam stereo
- mute in tv
- use radio FM

Signed-off-by: Marcin Rudowski <mar_rud@poczta.onet.pl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3424): Updated CARDLIST.tuner with newer tenna string
Mauro Carvalho Chehab [Thu, 9 Mar 2006 19:09:20 +0000 (16:09 -0300)]
V4L/DVB (3424): Updated CARDLIST.tuner with newer tenna string

Also Removed whitespaces introduced by previous tena patch

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3423): Fix cx88 error messages on balance change
Ian Pickworth [Thu, 9 Mar 2006 15:03:40 +0000 (12:03 -0300)]
V4L/DVB (3423): Fix cx88 error messages on balance change

There is an error in the cx88 code that causes this message in the syslog when
balance is changed at full volume:
Mar  4 18:35:08 ian2 kernel: cx88[0]: irq pci [0x1] vid*
Mar  4 18:35:39 ian2 last message repeated 348 times
Mar  4 18:36:01 ian2 last message repeated 564 times
... and so on
The attached patch cures this problem.

Signed-off-by: Ian Pickworth <ian@pickworth.me.uk>
Signed-off-by: Marcin Rudowski <mar_rud@poczta.onet.pl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3420): Nskips maybe used uninitialized in bttv_risc_overlay
Duncan Sands [Thu, 9 Mar 2006 14:20:14 +0000 (11:20 -0300)]
V4L/DVB (3420): Nskips maybe used uninitialized in bttv_risc_overlay

The Coverity checker (previously Stanford checker) noticed that
the value of nskips could be read even if it was never written.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3419): This patch fixes Tuner TNF5335 family
Mauro Carvalho Chehab [Thu, 9 Mar 2006 14:17:43 +0000 (11:17 -0300)]
V4L/DVB (3419): This patch fixes Tuner TNF5335 family

Radio now works.
Tuner now supports both PAL/D and STD/MN models

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoMerge branch 'origin'
Linus Torvalds [Tue, 21 Mar 2006 16:52:18 +0000 (08:52 -0800)]
Merge branch 'origin'

Conflicts:
Documentation/video4linux/CARDLIST.cx88
drivers/media/video/cx88/Kconfig
drivers/media/video/em28xx/em28xx-video.c
drivers/media/video/saa7134/saa7134-dvb.c

Resolved as in the original merge by Mauro Carvalho Chehab

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Mon, 20 Mar 2006 19:57:50 +0000 (11:57 -0800)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: (230 commits)
  [SPARC64]: Update defconfig.
  [SPARC64]: Fix 2 bugs in huge page support.
  [SPARC64]: CONFIG_BLK_DEV_RAM fix
  [SPARC64]: Optimized TSB table initialization.
  [SPARC64]: Allow CONFIG_MEMORY_HOTPLUG to build.
  [SPARC64]: Use SLAB caches for TSB tables.
  [SPARC64]: Don't kill the page allocator when growing a TSB.
  [SPARC64]: Randomize mm->mmap_base when PF_RANDOMIZE is set.
  [SPARC64]: Increase top of 32-bit process stack.
  [SPARC64]: Top-down address space allocation for 32-bit tasks.
  [SPARC64] bbc_i2c: Fix cpu check and add missing module license.
  [SPARC64]: Fix and re-enable dynamic TSB sizing.
  [SUNSU]: Fix missing spinlock initialization.
  [TG3]: Do not try to access NIC_SRAM_DATA_SIG on Sun parts.
  [SPARC64]: First cut at VIS simulator for Niagara.
  [SPARC64]: Fix system type in /proc/cpuinfo and remove bogus OBP check.
  [SPARC64]: Add SMT scheduling support for Niagara.
  [SPARC64]: Fix 32-bit truncation which broke sparsemem.
  [SPARC64]: Move over to sparsemem.
  [SPARC64]: Fix new context version SMP handling.
  ...

18 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy...
Linus Torvalds [Mon, 20 Mar 2006 18:32:33 +0000 (10:32 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6:
  JFS: add uid, gid, and umask mount options
  JFS: Take logsync lock before testing mp->lsn
  JFS: kzalloc conversion
  JFS: Add missing file from fa3241d24cf1182b0ffb6e4d412c3bc2a2ab7bf6
  JFS: Use the kthread_ API
  JFS: Fix regression.  fsck complains if symlinks do not have INLINEEA attribute
  JFS: ext2 inode attributes for jfs
  JFS: semaphore to mutex conversion.
  JFS: make buddy table static
  JFS: Add back directory i_size calculations for legacy partitions

18 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Mon, 20 Mar 2006 18:30:31 +0000 (10:30 -0800)]
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (150 commits)
  [PATCH] ipw2100: Update version ipw2100 stamp to 1.2.2
  [PATCH] ipw2100: move mutex.h include from ipw2100.c to ipw2100.h
  [PATCH] ipw2100: semaphore to mutexes conversion
  [PATCH] ipw2100: Fix radiotap code gcc warning
  [PATCH] ipw2100: add radiotap headers to packtes captured in monitor mode
  [PATCH] ipw2x00: expend Copyright to 2006
  [PATCH] drivers/net/wireless/ipw2200.c: fix an array overun
  [PATCH] ieee80211: Don't update network statistics from off-channel packets.
  [PATCH] ipw2200: Update ipw2200 version stamp to 1.1.1
  [PATCH] ipw2200: switch to the new ipw2200-fw-3.0 image format
  [PATCH] ipw2200: wireless extension sensitivity threshold support
  [PATCH] ipw2200: Enables the "slow diversity" algorithm
  [PATCH] ipw2200: Set a meaningful silence threshold value
  [PATCH] ipw2200: export `debug' module param only if CONFIG_IPW2200_DEBUG
  [PATCH] ipw2200: Change debug level for firmware error logging
  [PATCH] ipw2200: Filter unsupported channels out in ad-hoc mode
  [PATCH] ipw2200: Fix ipw_sw_reset() implementation inconsistent with comment
  [PATCH] ipw2200: Fix rf_kill is activated after mode change with 'disable=1'
  [PATCH] ipw2200: remove the WPA card associates to non-WPA AP checking
  [PATCH] ipw2200: Add signal level to iwlist scan output
  ...

18 years agoMerge branch 'block-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro...
Linus Torvalds [Mon, 20 Mar 2006 18:28:51 +0000 (10:28 -0800)]
Merge branch 'block-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/block

* 'block-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/block:
  [PATCH] fix rmmod problems with elevator attributes, clean them up
  [PATCH] elevator_t lifetime rules and sysfs fixes
  [PATCH] noise removal: cfq-iosched.c
  [PATCH] don't bother with refcounting for cfq_data
  [PATCH] fix sysfs interaction and lifetime rules handling for queues
  [PATCH] regularize blk_cleanup_queue() use
  [PATCH] fix cfq_get_queue()/ioprio_set(2) races
  [PATCH] deal with rmmod/put_io_context() races
  [PATCH] stop elv_unregister() from rogering other iosched's data, fix locking
  [PATCH] stop cfq from pinning queue down
  [PATCH] make cfq_exit_queue() prune the cfq_io_context for that queue
  [PATCH] fix the exclusion for ioprio_set()
  [PATCH] keep sync and async cfq_queue separate
  [PATCH] switch to use of ->key to get cfq_data by cfq_io_context
  [PATCH] stop leaking cfq_data in cfq_set_request()
  [PATCH] fix cfq hash lookups
  [PATCH] fix locking in queue_requests_store()
  [PATCH] fix double-free in blk_init_queue_node()
  [PATCH] don't do exit_io_context() until we know we won't be doing any IO

18 years agoMerge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
Jeff Garzik [Mon, 20 Mar 2006 09:38:50 +0000 (04:38 -0500)]
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

18 years agoMerge branch 'master'
Jeff Garzik [Mon, 20 Mar 2006 09:38:03 +0000 (04:38 -0500)]
Merge branch 'master'

18 years ago[SPARC64]: Update defconfig.
David S. Miller [Mon, 20 Mar 2006 09:23:43 +0000 (01:23 -0800)]
[SPARC64]: Update defconfig.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Fix 2 bugs in huge page support.
David S. Miller [Mon, 20 Mar 2006 09:17:17 +0000 (01:17 -0800)]
[SPARC64]: Fix 2 bugs in huge page support.

1) huge_pte_offset() did not check the page table hierarchy
   elements as being empty correctly, resulting in an OOPS

2) Need platform specific hugetlb_get_unmapped_area() to handle
   the top-down vs. bottom-up address space allocation strategies.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: CONFIG_BLK_DEV_RAM fix
Andrew Morton [Sun, 19 Mar 2006 20:46:55 +0000 (12:46 -0800)]
[SPARC64]: CONFIG_BLK_DEV_RAM fix

init/do_mounts_rd.c depends upon CONFIG_BLK_DEV_RAM, not CONFIG_BLK_DEV_INITRD.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Optimized TSB table initialization.
David S. Miller [Sun, 19 Mar 2006 07:55:11 +0000 (23:55 -0800)]
[SPARC64]: Optimized TSB table initialization.

We only need to write an invalid tag every 16 bytes,
so taking advantage of this can save many instructions
compared to the simple memset() call we make now.

A prefetching implementation is implemented for sun4u
and a block-init store version if implemented for Niagara.

The next trick is to be able to perform an init and
a copy_tsb() in parallel when growing a TSB table.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Allow CONFIG_MEMORY_HOTPLUG to build.
David S. Miller [Sun, 19 Mar 2006 03:16:23 +0000 (19:16 -0800)]
[SPARC64]: Allow CONFIG_MEMORY_HOTPLUG to build.

online_page() is straightforward, and then add a dummy
remove_memory() that returns -EINVAL just like i386.

There is no point in implementing remove_memory() since
__remove_pages() has no implementation either.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Use SLAB caches for TSB tables.
David S. Miller [Sun, 19 Mar 2006 02:12:42 +0000 (18:12 -0800)]
[SPARC64]: Use SLAB caches for TSB tables.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Don't kill the page allocator when growing a TSB.
David S. Miller [Sat, 18 Mar 2006 07:40:47 +0000 (23:40 -0800)]
[SPARC64]: Don't kill the page allocator when growing a TSB.

Try only lightly on > 1 order allocations.

If a grow fails, we are under memory pressure, so do not try
to grow the TSB for this address space any more.

If a > 0 order TSB allocation fails on a new fork, retry using
a 0 order allocation.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Randomize mm->mmap_base when PF_RANDOMIZE is set.
David S. Miller [Sat, 18 Mar 2006 01:42:57 +0000 (17:42 -0800)]
[SPARC64]: Randomize mm->mmap_base when PF_RANDOMIZE is set.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Increase top of 32-bit process stack.
David S. Miller [Sat, 18 Mar 2006 01:33:56 +0000 (17:33 -0800)]
[SPARC64]: Increase top of 32-bit process stack.

Put it one page below the top of the 32-bit address space.
This gives us ~16MB more address space to work with.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Top-down address space allocation for 32-bit tasks.
David S. Miller [Fri, 17 Mar 2006 22:41:03 +0000 (14:41 -0800)]
[SPARC64]: Top-down address space allocation for 32-bit tasks.

Currently allocations are very constrained for 32-bit processes.
It grows down-up from 0x70000000 to 0xf0000000 which gives about
2GB of stack + dynamic mmap() space.

So support the top-down method, and we need to override the
generic helper function in order to deal with D-cache coloring.

With these changes I was able to squeeze out a mmap() just over
3.6GB in size in a 32-bit process.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64] bbc_i2c: Fix cpu check and add missing module license.
David S. Miller [Fri, 17 Mar 2006 21:23:56 +0000 (13:23 -0800)]
[SPARC64] bbc_i2c: Fix cpu check and add missing module license.

Should allow cheetah_plus cpu types and don't taint
the kernel.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Fix and re-enable dynamic TSB sizing.
David S. Miller [Thu, 16 Mar 2006 10:02:32 +0000 (02:02 -0800)]
[SPARC64]: Fix and re-enable dynamic TSB sizing.

This is good for up to %50 performance improvement of some test cases.
The problem has been the race conditions, and hopefully I've plugged
them all up here.

1) There was a serious race in switch_mm() wrt. lazy TLB
   switching to and from kernel threads.

   We could erroneously skip a tsb_context_switch() and thus
   use a stale TSB across a TSB grow event.

   There is a big comment now in that function describing
   exactly how it can happen.

2) All code paths that do something with the TSB need to be
   guarded with the mm->context.lock spinlock.  This makes
   page table flushing paths properly synchronize with both
   TSB growing and TLB context changes.

3) TSB growing events are moved to the end of successful fault
   processing.  Previously it was in update_mmu_cache() but
   that is deadlock prone.  At the end of do_sparc64_fault()
   we hold no spinlocks that could deadlock the TSB grow
   sequence.  We also have dropped the address space semaphore.

While we're here, add prefetching to the copy_tsb() routine
and put it in assembler into the tsb.S file.  This piece of
code is quite time critical.

There are some small negative side effects to this code which
can be improved upon.  In particular we grab the mm->context.lock
even for the tsb insert done by update_mmu_cache() now and that's
a bit excessive.  We can get rid of that locking, and the same
lock taking in flush_tsb_user(), by disabling PSTATE_IE around
the whole operation including the capturing of the tsb pointer
and tsb_nentries value.  That would work because anyone growing
the TSB won't free up the old TSB until all cpus respond to the
TSB change cross call.

I'm not quite so confident in that optimization to put it in
right now, but eventually we might be able to and the description
is here for reference.

This code seems very solid now.  It passes several parallel GCC
bootstrap builds, and our favorite "nut cruncher" stress test which is
a full "make -j8192" build of a "make allmodconfig" kernel.  That puts
about 256 processes on each cpu's run queue, makes lots of process cpu
migrations occur, causes lots of page table and TLB flushing activity,
incurs many context version number changes, and it swaps the machine
real far out to disk even though there is 16GB of ram on this test
system. :-)

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SUNSU]: Fix missing spinlock initialization.
David S. Miller [Thu, 16 Mar 2006 08:55:30 +0000 (00:55 -0800)]
[SUNSU]: Fix missing spinlock initialization.

Caught by CONFIG_DEBUG_SPINLOCK.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: Do not try to access NIC_SRAM_DATA_SIG on Sun parts.
David S. Miller [Tue, 14 Mar 2006 22:11:48 +0000 (14:11 -0800)]
[TG3]: Do not try to access NIC_SRAM_DATA_SIG on Sun parts.

Sun does't put an SEEPROM behind the tigon3 chip, among other things,
so accesses to these areas just give bus timeouts.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: First cut at VIS simulator for Niagara.
David S. Miller [Mon, 13 Mar 2006 09:27:34 +0000 (01:27 -0800)]
[SPARC64]: First cut at VIS simulator for Niagara.

Niagara does not implement some of the VIS instructions in
hardware, so we have to emulate them.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Fix system type in /proc/cpuinfo and remove bogus OBP check.
David S. Miller [Thu, 9 Mar 2006 01:18:19 +0000 (17:18 -0800)]
[SPARC64]: Fix system type in /proc/cpuinfo and remove bogus OBP check.

Report 'sun4v' when appropriate in /proc/cpuinfo

Remove all the verifications of the OBP version string.  Just
make sure it's there, and report it raw in the bootup logs and
via /proc/cpuinfo.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Add SMT scheduling support for Niagara.
David S. Miller [Thu, 9 Mar 2006 00:09:19 +0000 (16:09 -0800)]
[SPARC64]: Add SMT scheduling support for Niagara.

The mapping is a simple "(cpuid >> 2) == core" for now.
Later we'll add more sophisticated code that will walk
the sun4v machine description and figure this out from
there.

We should also add core mappings for jaguar and panther
processors.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Fix 32-bit truncation which broke sparsemem.
David S. Miller [Wed, 8 Mar 2006 23:57:03 +0000 (15:57 -0800)]
[SPARC64]: Fix 32-bit truncation which broke sparsemem.

The page->flags manipulations done by the D-cache dirty
state tracking was broken because the constants were not
marked with "UL" to make them 64-bit, which means we were
clobbering the upper 32-bits of page->flags all the time.

This doesn't jive well with sparsemem which stores the
section and indexing information in the top 32-bits of
page->flags.

This is yet another sparc64 bug which has been with us
forever.

While we're here, tidy up some things in bootmem_init()
and paginig_init():

1) Pass min_low_pfn to init_bootmem_node(), it's identical
   to (phys_base >> PAGE_SHIFT) but we should use consistent
   with the variable names we print in CONFIG_BOOTMEM_DEBUG

2) max_mapnr, although no longer used, was being set
   inaccurately, we shouldn't subtract pfn_base any more.

3) All the games with phys_base in the zones_*[] arrays
   we pass to free_area_init_node() are no longer necessary.

Thanks to Josh Grebe and Fabbione for the bug reports
and testing.  Fix also verified locally on an SB2500
which had a memory layout that triggered the same problem.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Move over to sparsemem.
David S. Miller [Wed, 8 Mar 2006 10:16:07 +0000 (02:16 -0800)]
[SPARC64]: Move over to sparsemem.

This has been pending for a long time, and the fact
that we waste a ton of ram on some configurations
kind of pushed things over the edge.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Fix new context version SMP handling.
David S. Miller [Tue, 7 Mar 2006 06:50:44 +0000 (22:50 -0800)]
[SPARC64]: Fix new context version SMP handling.

Don't piggy back the SMP receive signal code to do the
context version change handling.

Instead allocate another fixed PIL number for this
asynchronous cross-call.  We can't use smp_call_function()
because this thing is invoked with interrupts disabled
and a few spinlocks held.

Also, fix smp_call_function_mask() to count "cpus" correctly.
There is no guarentee that the local cpu is in the mask
yet that is exactly what this code was assuming.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Bulletproof MMU context locking.
David S. Miller [Tue, 7 Mar 2006 03:59:50 +0000 (19:59 -0800)]
[SPARC64]: Bulletproof MMU context locking.

1) Always spin_lock_init() in init_context().  The caller essentially
   clears it out, or copies the mm info from the parent.  In both
   cases we need to explicitly initialize the spinlock.

2) Always do explicit IRQ disabling while taking mm->context.lock
   and ctx_alloc_lock.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: kzalloc() conversion
Eric Sesterhenn [Mon, 6 Mar 2006 21:48:40 +0000 (13:48 -0800)]
[SPARC64]: kzalloc() conversion

this patch converts arch/sparc64 to kzalloc usage.
Crosscompile tested with allyesconfig.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Fix loop termination in mark_kpte_bitmap()
David S. Miller [Mon, 6 Mar 2006 06:18:50 +0000 (22:18 -0800)]
[SPARC64]: Fix loop termination in mark_kpte_bitmap()

If we were aligned, but didn't have at least 256MB left
to process, we would loop forever.

Thanks to fabbione for the report and testing the fix.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Simplify TSB insert checks.
David S. Miller [Mon, 6 Mar 2006 02:26:24 +0000 (18:26 -0800)]
[SPARC64]: Simplify TSB insert checks.

Don't try to avoid putting non-base page sized entries
into the user TSB.  It actually costs us more to check
this than it helps.

Eventually we'll have a multiple TSB scheme for user
processes.  Once a process starts using larger pages,
we'll allocate and use such a TSB.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: More SUN4V cpu mondo bug fixing.
David S. Miller [Fri, 3 Mar 2006 05:50:47 +0000 (21:50 -0800)]
[SPARC64]: More SUN4V cpu mondo bug fixing.

This cpu mondo sending interface isn't all that easy to
use correctly...

We were clearing out the wrong bits from the "mask" after getting
something other than EOK from the hypervisor.

It turns out the hypervisor can just be resent the same cpu_list[]
array, with the 0xffff "done" entries still in there, and it will do
the right thing.

So don't update or try to rebuild the cpu_list[] array to condense it.

This requires the "forward_progress" check to be done slightly
differently, but this new scheme is less bug prone than what we were
doing before.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Fix sun4v mna winfixup handling.
David S. Miller [Fri, 3 Mar 2006 04:42:53 +0000 (20:42 -0800)]
[SPARC64]: Fix sun4v mna winfixup handling.

We were clobbering a base register before we were done
using it.  Fix a comment typo while we're here.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Fix mini RTC driver reading.
David S. Miller [Fri, 3 Mar 2006 04:28:34 +0000 (20:28 -0800)]
[SPARC64]: Fix mini RTC driver reading.

Need to subtract 1900 from year and 1 from month before
giving it back to userspace.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Do not allow mapping pages within 4GB of 64-bit VA hole.
David S. Miller [Fri, 3 Mar 2006 02:12:27 +0000 (18:12 -0800)]
[SPARC64]: Do not allow mapping pages within 4GB of 64-bit VA hole.

The UltraSPARC T1 manual recommends this because the chip
could instruction prefetch into the VA hole, and this would
also make decoding  certain kinds of memory access traps
more difficult (because the chip sign extends certain pieces
of trap state).

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Fix _PAGE_EXEC handling.
David S. Miller [Thu, 2 Mar 2006 06:42:18 +0000 (22:42 -0800)]
[SPARC64]: Fix _PAGE_EXEC handling.

First of all, use the known _PAGE_EXEC_{4U,4V} value instead
of loading _PAGE_EXEC from memory.  We either know which one
to use by context, or we can code patch the test.

Next, we need to check executability of a PTE in the generic
TSB miss handler.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Fix typo in SUN4V D-TLB miss handler.
David S. Miller [Thu, 2 Mar 2006 06:27:09 +0000 (22:27 -0800)]
[SPARC64]: Fix typo in SUN4V D-TLB miss handler.

Should put FAULT_CODE_DTLB into %g3 not FAULT_CODE_ITLB.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Kill bogus function externs in asm/pgtable.h
David S. Miller [Thu, 2 Mar 2006 06:25:43 +0000 (22:25 -0800)]
[SPARC64]: Kill bogus function externs in asm/pgtable.h

These are all implemented inline earlier in the file.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Add mini-RTC driver for Starfire and SUN4V.
David S. Miller [Thu, 2 Mar 2006 01:32:46 +0000 (17:32 -0800)]
[SPARC64]: Add mini-RTC driver for Starfire and SUN4V.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Fix bugs in SUN4V cpu mondo dispatch.
David S. Miller [Tue, 28 Feb 2006 23:10:26 +0000 (15:10 -0800)]
[SPARC64]: Fix bugs in SUN4V cpu mondo dispatch.

There were several bugs in the SUN4V cpu mondo dispatch code.

In fact, if we ever got a EWOULDBLOCK or other error from
the hypervisor call, we'd potentially send a cpu mondo multiple
times to the same cpu and even worse we could loop until the
timeout resending the same mondo over and over to such cpus.

So let's bulletproof this thing as follows:

1) Implement cpu_mondo_send() and cpu_state() hypervisor calls
   in arch/sparc64/kernel/entry.S, add prototypes to asm/hypervisor.h

2) Don't build and update the cpulist using inline functions, this
   was causing the cpu mask to not get updated in the caller.

3) Disable interrupts during the entire mondo send, otherwise our
   cpu list and/or mondo block could get overwritten if we take
   an interrupt and do a cpu mondo send on the current cpu.

4) Check for all possible error return types from the cpu_mondo_send()
   hypervisor call.  In particular:

   HV_EOK) Our work is done, all cpus have received the mondo.
   HV_CPUERROR) One or more of the cpus in the cpu list we passed
                to the hypervisor are in error state.  Use cpu_state()
                calls over the entries in the cpu list to see which
ones.  Record them in "error_mask" and report this
after we are done sending the mondo to cpus which are
not in error state.
   HV_EWOULDBLOCK) We need to keep trying.

   Any other error we consider fatal, we report the event and exit
   immediately.

5) We only timeout if forward progress is not made.  Forward progress
   is defined as having at least one cpu get the mondo successfully
   in a given cpu_mondo_send() call.  Otherwise we bump a counter
   and delay a little.  If the counter hits a limit, we signal an
   error and report the event.

Also, smp_call_function_mask() error handling reports the number
of cpus incorrectly.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Fix bugs in SMP TLB context version expiration handling.
David S. Miller [Tue, 28 Feb 2006 01:56:51 +0000 (17:56 -0800)]
[SPARC64]: Fix bugs in SMP TLB context version expiration handling.

1) We must flush the TLB, duh.

2) Even if the sw context was seen to be valid, the local cpu's
   hw context can be out of date, so reload it unconditionally.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Fix indexing into kpte_linear_bitmap.
David S. Miller [Mon, 27 Feb 2006 07:09:37 +0000 (23:09 -0800)]
[SPARC64]: Fix indexing into kpte_linear_bitmap.

Need to shift back up by 3 bits to get 8-byte entry
index.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Use 13-bit context size always.
David S. Miller [Mon, 27 Feb 2006 04:37:41 +0000 (20:37 -0800)]
[SPARC64]: Use 13-bit context size always.

We no longer have the problems that require using the smaller
sizes.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Avoid dcache-dirty page state management on sun4v.
David S. Miller [Mon, 27 Feb 2006 03:44:50 +0000 (19:44 -0800)]
[SPARC64]: Avoid dcache-dirty page state management on sun4v.

It is totally wasted work, since we have no D-cache aliasing
issues on sun4v.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Bulletproof hypervisor TLB flushing.
David S. Miller [Mon, 27 Feb 2006 03:31:49 +0000 (19:31 -0800)]
[SPARC64]: Bulletproof hypervisor TLB flushing.

Check TLB flush hypervisor calls for errors and report them.

Pass HV_MMU_ALL always for now, we can add back the optimization
to avoid the I-TLB flush later.

Always explicitly page align the virtual address arguments.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Report mondo error correctly in hypervisor_xcall_deliver().
David S. Miller [Sun, 26 Feb 2006 22:51:29 +0000 (14:51 -0800)]
[SPARC64]: Report mondo error correctly in hypervisor_xcall_deliver().

It's in "arg0" not "func".

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Niagara optimized XOR functions for RAID.
David S. Miller [Sun, 26 Feb 2006 01:16:29 +0000 (17:16 -0800)]
[SPARC64]: Niagara optimized XOR functions for RAID.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Fix binfmt_aout32.c build.
Andrew Morton [Fri, 24 Feb 2006 21:21:18 +0000 (13:21 -0800)]
[SPARC64]: Fix binfmt_aout32.c build.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: destroy_context() needs to disable interrupts.
David S. Miller [Fri, 24 Feb 2006 05:40:15 +0000 (21:40 -0800)]
[SPARC64]: destroy_context() needs to disable interrupts.

get_new_mmu_context() can be invoked from interrupt context
now for the new SMP version wrap handling.

So disable interrupt while taking ctx_alloc_lock in destroy_context()
so we don't deadlock.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Fix TLB context allocation with SMT style shared TLBs.
David S. Miller [Thu, 23 Feb 2006 22:19:28 +0000 (14:19 -0800)]
[SPARC64]: Fix TLB context allocation with SMT style shared TLBs.

The context allocation scheme we use depends upon there being a 1<-->1
mapping from cpu to physical TLB for correctness.  Chips like Niagara
break this assumption.

So what we do is notify all cpus with a cross call when the context
version number changes, and if necessary this makes them allocate
a valid context for the address space they are running at the time.

Stress tested with make -j1024, make -j2048, and make -j4096 kernel
builds on a 32-strand, 8 core, T2000 with 16GB of ram.

Signed-off-by: David S. Miller <davem@davemloft.net>