pandora-kernel.git
14 years agon_tty: honor opost flag for echoes
Joe Peterson [Wed, 9 Sep 2009 21:03:13 +0000 (15:03 -0600)]
n_tty: honor opost flag for echoes

Fixes the following bug:

      http://bugs.linuxbase.org/show_bug.cgi?id=2692

Causes processing of echoed characters (output from the echo buffer) to
honor the O_OPOST flag, which is consistent with the old behavior.

Note that this and the next patch ("n_tty: move echoctl check and
clean up logic") were verified together by the bug reporters, and
the test now passes.

Signed-off-by: Joe Peterson <joe@skyrush.com>
Cc: Linux Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: USB serial termios bits
Alan Cox [Sat, 19 Sep 2009 20:13:33 +0000 (13:13 -0700)]
tty: USB serial termios bits

Various drivers have hacks to mangle termios structures. This stems from
the fact there is no nice setup hook for configuring the termios settings
when the port is created

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoSet proper console speed on resume if console suspend is disabled
Deepak Saxena [Sat, 19 Sep 2009 20:13:33 +0000 (13:13 -0700)]
Set proper console speed on resume if console suspend is disabled

Commit b5b82df6, from May 2007, breaks no_console_suspend on the OLPC
XO laptop. Basically what happens is that upon returning from resume,
serial8250_resume_port() will reconfigure the port for high speed
mode and all console output will be garbled, making debug of the
resume path painful. This patch modifies uart_resume_port() to
reset the port to the state it was in before we suspended.

Original patch by Marcelo Tosatti

Second patch by Deepak then reworked by Alan to fit with the tty changes
before it got submitted. Also fixed the console path to set c_i/ospeed as
some drivers require the termios fields are valid

Signed-off-by: Deepak Saxena <dsaxena@laptop.org>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoserial: introduce tty krefs
Alan Cox [Sat, 19 Sep 2009 20:13:33 +0000 (13:13 -0700)]
serial: introduce tty krefs

Initially just use the helper and thus krefs when we set and clear the
port values.

Signed-off-by: Alan Cox <alan@linux.intel.com>
14 years agoserial: kill USF_CLOSING_* definitions
Alan Cox [Sat, 19 Sep 2009 20:13:32 +0000 (13:13 -0700)]
serial: kill USF_CLOSING_* definitions

The serial layer for some reason uses different defines for the special
case close delays and then conditionally switches to/from the normal ones
in the ioctls.

Remove this rather pointless abstraction

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoserial: move port users helper
Alan Cox [Sat, 19 Sep 2009 20:13:32 +0000 (13:13 -0700)]
serial: move port users helper

This little helper is now tty_port specific and useful generally so move it

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoserial: move delta_msr_wait into the tty_port
Alan Cox [Sat, 19 Sep 2009 20:13:31 +0000 (13:13 -0700)]
serial: move delta_msr_wait into the tty_port

This is used by various drivers not just serial and can be extracted
as commonality

Signed-off-by: Alan Cox <alan@linux.intel.com>
14 years agoserial: replace the state mutex with the tty port mutex
Alan Cox [Sat, 19 Sep 2009 20:13:31 +0000 (13:13 -0700)]
serial: replace the state mutex with the tty port mutex

They cover essentially the same stuff and we can therefore fold it into the
tty_port one.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoserial: kill off uif_t
Alan Cox [Sat, 19 Sep 2009 20:13:30 +0000 (13:13 -0700)]
serial: kill off uif_t

This typedef is now extinct

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoserial: move the flags into the tty_port field
Alan Cox [Sat, 19 Sep 2009 20:13:30 +0000 (13:13 -0700)]
serial: move the flags into the tty_port field

Fortunately the serial layer was designed to use the same flag values but
with different names. It has its own SUSPENDED flag which is a free slot in
the ASYNC flags so we allocate it in the ASYNC flags instead.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoserial: move count into the tty_port version
Alan Cox [Sat, 19 Sep 2009 20:13:29 +0000 (13:13 -0700)]
serial: move count into the tty_port version

Remove more stuff from the serial special case code

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoserial: use tty_port pointers in the core code
Alan Cox [Sat, 19 Sep 2009 20:13:29 +0000 (13:13 -0700)]
serial: use tty_port pointers in the core code

Extract out a lot of the x.port. uses and also show up where there are
things left to be isolated that prevent use using the port helpers in the
serial layer at this point

Signed-off-by: Alan Cox <alan@linux.intel.com>
14 years agoserial: Fold closing_* fields into the tty_port ones
Alan Cox [Sat, 19 Sep 2009 20:13:28 +0000 (13:13 -0700)]
serial: Fold closing_* fields into the tty_port ones

Remove some more serial specific use

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoserial: kill off uart_info
Alan Cox [Sat, 19 Sep 2009 20:13:28 +0000 (13:13 -0700)]
serial: kill off uart_info

We moved this into uart_state, now move the fields out of the separate
structure and kill it off.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoisicom: split the open method for the isicom device
Alan Cox [Sat, 19 Sep 2009 20:13:27 +0000 (13:13 -0700)]
isicom: split the open method for the isicom device

Again moving towards being able to add a common open method

Signed-off-by: Alan Cox <alan@linux.intel.com>
14 years agotty: USB does not need the filp argument in the drivers
Alan Cox [Sat, 19 Sep 2009 20:13:26 +0000 (13:13 -0700)]
tty: USB does not need the filp argument in the drivers

And indeed none of them use it. Clean this up as it will make moving to a
standard open method rather easier.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agovt: add an activate and lock
Alan Cox [Sat, 19 Sep 2009 20:13:26 +0000 (13:13 -0700)]
vt: add an activate and lock

X and other graphical interfaces need to be able to flip to a console
and lock it into graphics mode without races.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agovt: move kernel stuff out of vt.h
Alan Cox [Sat, 19 Sep 2009 20:13:25 +0000 (13:13 -0700)]
vt: move kernel stuff out of vt.h

We have vt_kern.h for this

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agovt: remove power stuff from kernel/power
Alan Cox [Sat, 19 Sep 2009 20:13:25 +0000 (13:13 -0700)]
vt: remove power stuff from kernel/power

In the past someone gratuitiously borrowed chunks of kernel internal vt
code and dumped them in kernel/power. They have all sorts of deep relations
with the vt code so put them in the vt tree instead

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agovt: add an event interface
Alan Cox [Sat, 19 Sep 2009 20:13:24 +0000 (13:13 -0700)]
vt: add an event interface

This is needed and requested in various forms for ConsoleKit, screenblank
handling and the like so do the job with a single interface. Also build the
interface so that unlike VT_WAITACTIVE and friends it won't miss events.

FIXME: Should this be a waitactive ioctl or a new device file you can poll
and read events from. We need the code anyway to fix up the existing broken
wait for console switch logic but the ConsoleKit people would prefer the
new device to the ioctl we have here

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: USB can now use the shutdown method for kref based freeing of ports
Alan Cox [Sat, 19 Sep 2009 20:13:24 +0000 (13:13 -0700)]
tty: USB can now use the shutdown method for kref based freeing of ports

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: remove dtr/rts use from the driver open methods
Alan Cox [Sat, 19 Sep 2009 20:13:24 +0000 (13:13 -0700)]
tty: remove dtr/rts use from the driver open methods

These are handled by the tty_port core code which will raise and lower the
carrier correctly in tty_wait_until_ready

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: USB hangup is racy
Alan Cox [Sat, 19 Sep 2009 20:13:23 +0000 (13:13 -0700)]
tty: USB hangup is racy

The USB layer uses tty_hangup to deal with unplugs of the physical hardware
(analogous to loss of carrier) and then frees the resources. However the
tty_hangup is asynchronous. As the hangup can sleep we can use tty_vhangup
which is the non async version to avoid freeing resources too early.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agocdc_acm: Fix to use modern speed interfaces
Alan Cox [Sat, 19 Sep 2009 20:13:23 +0000 (13:13 -0700)]
cdc_acm: Fix to use modern speed interfaces

This changed in 2006 so its about time the ACM driver caught up

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: make the kref destructor occur asynchronously
Alan Cox [Sat, 19 Sep 2009 20:13:22 +0000 (13:13 -0700)]
tty: make the kref destructor occur asynchronously

We want to be able to sleep in the destructor for USB at least. It isn't a
hot path so just pushing it to a work queue doesn't really cause any
difficulty.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agocyclades: use the full port_close function
Alan Cox [Sat, 19 Sep 2009 20:13:22 +0000 (13:13 -0700)]
cyclades: use the full port_close function

Convert cyclades to use the full tty_port_close helper

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: riscom8 kref and tty_port_close
Alan Cox [Sat, 19 Sep 2009 20:13:22 +0000 (13:13 -0700)]
tty: riscom8 kref and tty_port_close

We need to kref this driver in order to use port_close

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoisicom: Split the close hardware bits out
Alan Cox [Sat, 19 Sep 2009 20:13:21 +0000 (13:13 -0700)]
isicom: Split the close hardware bits out

Start to extract and build a model for a common tty_port_close()

Signed-off-by: Alan Cox <alan@linux.intel.com>
14 years agomxser: Split close ready for a standard tty_port_close method
Alan Cox [Sat, 19 Sep 2009 20:13:21 +0000 (13:13 -0700)]
mxser: Split close ready for a standard tty_port_close method

Prepare for the tty_port_close function by splitting out methods

Signed-off-by: Alan Cox <alan@linux.intel.com>
14 years agoriscom8: split open and close methods up
Alan Cox [Sat, 19 Sep 2009 20:13:21 +0000 (13:13 -0700)]
riscom8: split open and close methods up

Moving towards a tty_port method for open/close

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: Add a full port_close function
Alan Cox [Sat, 19 Sep 2009 20:13:20 +0000 (13:13 -0700)]
tty: Add a full port_close function

Now we are extracting out methods for shutdown and the like we can add a
proper tty_port_close method that knows all the innards of the tty closing
process and hides the lot from the caller.

At some point in the future this will be paired with a similar open()
helper and the drivers can stick to hardware management.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years ago8250: Now honours baud rate lower bounds
Anton Vorontsov [Sat, 19 Sep 2009 20:13:20 +0000 (13:13 -0700)]
8250: Now honours baud rate lower bounds

A platform clock drives 8250 ports in most SOC systems, the clock
might run at high frequencies, and so it's not always possible to
downscale uart clock to a desired value.

Currently the 8250 uart driver accepts not supported baud rates, and
what is worse, it is doing this silently, and then passes not accepted
values to a new termios, so userspace has no chance to catch this kind
of errors (userspace verifies that settings were accepted by reading
back and comparing the settings).

This patch fixes the issue by passing minimum baud rate to the
uart_get_baud_rate() call, the call should take care of all bounds,
so userspace should now report:

  # stty -F /dev/ttyS0 speed 300
  115200
  stty: /dev/ttyS0: unable to perform all requested operations

p.s. uart_get_baud_rate() falls back to 9600, which still might be too
     low for some 10 GHz platforms, but that's a separate issue, and
     we can wait with fixing this till we find such a platform.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoserial: 8250: add IRQ trigger support
Vikram Pandita [Sat, 19 Sep 2009 20:13:19 +0000 (13:13 -0700)]
serial: 8250: add IRQ trigger support

There is currently no provision for passing IRQ trigger flags for
serial IRQs with triggering requirements (such as GPIO IRQs)

This patch adds irqflags to plat_serial8250_port that can be passed
from board file to reqest_irq() of 8250 driver

Changes are backward compatible with boards passing UPF_SHARE_IRQ flag

Tested on Zoom2 board that has IRQF_TRIGGER_RISING requirement for 8250 irq

[Moved new flag to end to fix bugs in the original with the old_serial array
-- Alan]

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agomos7840: remove old dead modem logic
Alan Cox [Sat, 19 Sep 2009 20:13:19 +0000 (13:13 -0700)]
mos7840: remove old dead modem logic

The modem ioctls are not routed via the ioctl method so kill the old dead
code. The correct code is also already present and hooked in.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: Fix a typo noted in passing
Alan Cox [Sat, 19 Sep 2009 20:13:19 +0000 (13:13 -0700)]
tty: Fix a typo noted in passing

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: usb_serial_mos7720: Fix get_lsr_info
Kees Schoenmakers [Sat, 19 Sep 2009 20:13:18 +0000 (13:13 -0700)]
tty: usb_serial_mos7720: Fix get_lsr_info

I made a correction for get_lsr_info, now it returns some meaningful
information. I tested it with two simultaneous simplex modem channels.

it is attached

Signed-off-by: Kees Schoenmakers <k.schoenmakers@sigmae.nl>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoMOS7720 has no tiocmget method
Kees Schoenmakers [Sat, 19 Sep 2009 20:13:18 +0000 (13:13 -0700)]
MOS7720 has no tiocmget method

Fix the tiocmget/mset handling on the mos7720 USB serial port.

[Minor space reformatting for coding style - Alan]

Signed-off-by: Kees Schoenmakers <k.schoenmakers@sigmae.nl>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agokfifo: Use "const" definitions
Alan Cox [Sat, 19 Sep 2009 20:13:17 +0000 (13:13 -0700)]
kfifo: Use "const" definitions

Currently kfifo cannot be used by parts of the kernel that use "const"
properly as kfifo itself does not use const for passed data blocks which
are indeed const.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoslip: Clean up create and destroy
Alan Cox [Sat, 19 Sep 2009 20:13:17 +0000 (13:13 -0700)]
slip: Clean up create and destroy

The network layer now has a destructor we can hook to clean up the slip
devices array. That needs us to initiate unregister events in the right
places which with the current tty layer we can do, and with network
refcounting is safe to do.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agocyclades: remove more duplicated code
Jiri Slaby [Sat, 19 Sep 2009 20:13:17 +0000 (13:13 -0700)]
cyclades: remove more duplicated code

Remove duplicated code from cy_set_line_char. There were 2 if
branches with same contents except flags.

Branch only for the flags computation and use them in the only copy
of the code.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agocyclades: introduce cyy_readb/writeb
Jiri Slaby [Sat, 19 Sep 2009 20:13:16 +0000 (13:13 -0700)]
cyclades: introduce cyy_readb/writeb

Add helpers for io operations, so that we can eliminate huge
amount of supporting code. It is now centralized in those
helpers and used values are precomputed in the init phase.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agocyclades: tiocm cleanup
Jiri Slaby [Sat, 19 Sep 2009 20:13:16 +0000 (13:13 -0700)]
cyclades: tiocm cleanup

- save one indent level by inverting !fw_loaded condition
- read rs_status on Z and write it after we change all the flags,
  don't do that separately
- remove Y inverted rts/dtr branching, precompute registers and use
  them

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agocyclades: ioctls cleanup
Jiri Slaby [Sat, 19 Sep 2009 20:13:15 +0000 (13:13 -0700)]
cyclades: ioctls cleanup

- add a cy_ prefix to functions with changed prototypes
- cy_get_serial_info: initialize serial_struct by initializer,
  save a memset
- inline simple functions (get_mon_info, {s,g}et_default_threshold,
  {s,g}et_default_timeout) directly in the ioctl handler
- add a cy_cflags_changed helper to not copy its code by
  wait_event_interruptible
- remove some ret_val = 0 assignments, it's preset to 0
- TIOCGICOUNT: don't do many put_user's, do one copy_to_user

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agocyclades: merge cy_startup tails
Jiri Slaby [Sat, 19 Sep 2009 20:13:15 +0000 (13:13 -0700)]
cyclades: merge cy_startup tails

There is a duplicated code for Y and Z in cy_startup, merge the paths.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agocyclades: use dtr_rts helpers
Jiri Slaby [Sat, 19 Sep 2009 20:13:15 +0000 (13:13 -0700)]
cyclades: use dtr_rts helpers

For Z cards, use tty helpers for dtr_rts.

If we did the same for Y cards, it will cause a deadlock, because
cyy_dtr_rts takes a lock which we already hold.

Instead, we introduce a Y helper expecting card lock to be held.
It may then be called with set/clear masks from other places.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agocyclades: sleep instead busy-wait
Jiri Slaby [Sat, 19 Sep 2009 20:13:14 +0000 (13:13 -0700)]
cyclades: sleep instead busy-wait

Avoid long busy loops (5 ms) which may be replaced by sleeps.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agocyclades: overall cleanup
Jiri Slaby [Sat, 19 Sep 2009 20:13:14 +0000 (13:13 -0700)]
cyclades: overall cleanup

- remove changelog from the file. we don't care about ancient
  history
- update copyright year
- update version
- constify some stuff
- empty lines removal
- unused variables and macros removal
- remove some asm/ includes, they are sucked by linux/ variants

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agocyclades: close cleanup
Jiri Slaby [Sat, 19 Sep 2009 20:13:13 +0000 (13:13 -0700)]
cyclades: close cleanup

Use new tty helpers for close, which allows much code removal.

The only real change is locking. card_lock for protecting was
used inappropriately (just to have a critical section, no matter
which lock is used), so the change to port->lock is fine.

Remove also useless debug printks while being there.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agocyclades: switch to tty_port_hangup
Jiri Slaby [Sat, 19 Sep 2009 20:13:13 +0000 (13:13 -0700)]
cyclades: switch to tty_port_hangup

Do not duplicate common tty_port_hangup code. Use it instead.

Also do not unset ASYNC_NORMAL_ACTIVE and wake up from the
tty_hangup() caller. It makes no sense since we don't check that
flag in sleepers. tty_port_hangup() performed later will do the
right job.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agocyclades: avoid addresses recomputation
Jiri Slaby [Sat, 19 Sep 2009 20:13:13 +0000 (13:13 -0700)]
cyclades: avoid addresses recomputation

Don't fetch firmware address and recompute channel control on each
port access. Precompute the values on init and use them later all
the time.

The same for board control.

This simplify code and improves readability.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agocyclades: remove block_til_ready
Jiri Slaby [Sat, 19 Sep 2009 20:13:12 +0000 (13:13 -0700)]
cyclades: remove block_til_ready

Use a tty_port common instead. This saves lots of .text and makes the
code a lot more readable.

This involves separation of a dtr_rts handling, next patches will use
that to not duplicate the code all over the place.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agocyclades: add tty refcounting
Jiri Slaby [Sat, 19 Sep 2009 20:13:12 +0000 (13:13 -0700)]
cyclades: add tty refcounting

While this is not problem for Y card handlers (they are protected
by card_lock), Z handlers and other functions may dereference NULL
at any point after hangup/close. Even if (tty == NULL) was already
performed in the handler.

Note that it's not an issue for Y cards just for now. After
switching to tty_port_close_* et al. this will be a problem. So
add refcounting to them all.

Also proc .show doesn't take a tty reference and it should (along
with a ldisc one).

While at it and changing prototypes (adding tty param), prepend
cy_ to functions which don't have it yet.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: icom: bit and/or confusion?
Roel Kluin [Fri, 14 Aug 2009 12:02:34 +0000 (14:02 +0200)]
tty: icom: bit and/or confusion?

Previously, if any bit other than CMD_SND_BREAK was set, CMD_SND_BREAK
was not unset.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: includecheck fix: drivers/char, vt.c
Jaswinder Singh Rajput [Thu, 13 Aug 2009 08:26:20 +0000 (13:56 +0530)]
tty: includecheck fix: drivers/char, vt.c

fix the following 'make includecheck' warning:

  drivers/char/vt.c: linux/device.h is included more than once.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty-ldisc: get rid of tty_ldisc_try_get() helper function
Linus Torvalds [Mon, 3 Aug 2009 23:01:28 +0000 (16:01 -0700)]
tty-ldisc: get rid of tty_ldisc_try_get() helper function

Now that the /proc/tty/ldiscs handling doesn't play games with 'struct
ldisc' any more, the only remaining user of 'tty_ldisc_try_get()' is
'tty_ldisc_get()' (note the lack of 'try').

And we're actually much better off folding the logic directly into that
file, since the 'try' part was always about trying to get the ldisc
operations, not the ldisc itself: and making that explicit inside of
'tty_ldisc_get()' clarifies the whole semantics.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
Tested-by: Sergey Senozhatsky <sergey.senozhatsky@mail.by>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty-ldisc: make /proc/tty/ldiscs use ldisc_ops instead of ldiscs
Linus Torvalds [Mon, 3 Aug 2009 23:00:15 +0000 (16:00 -0700)]
tty-ldisc: make /proc/tty/ldiscs use ldisc_ops instead of ldiscs

The /proc/tty/ldiscs file is totally and utterly un-interested in the
"struct tty_ldisc" structures, and only cares about the underlying ldisc
operations.

So don't make it create a dummy 'struct ldisc' only to get a pointer to
the operations, and then destroy it.  Instead, we split up the function
'tty_ldisc_try_get()', and create a 'get_ldops()' helper that just looks
up the ldisc operations based on the ldisc number.

That makes the code simpler to read (smaller and more well-defined
helper functions), and allows the /proc functions to avoid creating that
useless dummy only to immediately free it again.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: Sergey Senozhatsky <sergey.senozhatsky@mail.by>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: serial/pcmcia: add ID for Advantech card
Wolfram Sang [Sat, 1 Aug 2009 13:28:35 +0000 (15:28 +0200)]
tty: serial/pcmcia: add ID for Advantech card

Add ID as reported in:

http://lists.infradead.org/pipermail/linux-pcmcia/2009-May/006127.html

Reported-by: Kenneth Moorman <KMoorman@transy.edu>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoserial: bfin_5xx: fix building as module when early printk is enabled
Mike Frysinger [Thu, 6 Aug 2009 22:20:05 +0000 (15:20 -0700)]
serial: bfin_5xx: fix building as module when early printk is enabled

Since early printk only makes sense/works when the serial driver is built
into the kernel, disable the option for this driver when it is going to be
built as a module.  Otherwise we get build failures due to the ifdef
handling.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: gigaset: really fix chars_in_buffer
Tilman Schmidt [Fri, 7 Aug 2009 03:33:33 +0000 (20:33 -0700)]
tty: gigaset: really fix chars_in_buffer

The tty_operation chars_in_buffer() is not allowed to return a negative
value to signal an error.  Corrects the problem flagged by commit
23198fda7182969b619613a555f8645fdc3dc334, "tty: fix chars_in_buffers".

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoDriver-Core: extend devnode callbacks to provide permissions
Kay Sievers [Fri, 18 Sep 2009 21:01:12 +0000 (23:01 +0200)]
Driver-Core: extend devnode callbacks to provide permissions

This allows subsytems to provide devtmpfs with non-default permissions
for the device node. Instead of the default mode of 0600, null, zero,
random, urandom, full, tty, ptmx now have a mode of 0666, which allows
non-privileged processes to access standard device nodes in case no
other userspace process applies the expected permissions.

This also fixes a wrong assignment in pktcdvd and a checkpatch.pl complain.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoRevert 'x86: Fix system crash when loading with "reservetop" parameter'
Yinghai Lu [Sat, 19 Sep 2009 18:07:57 +0000 (11:07 -0700)]
Revert 'x86: Fix system crash when loading with "reservetop" parameter'

After close looking, commit 8126dec3 will break:

 1. some cpu feature  in early stage too, like cpu_has_x2apic
 2. will break built-in-command line
 3. will break other memmap= and mem=
 4. early_dbgp and early_console that will use early_ioremap to access mmio (?)

So revert it.

Reported-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>,
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Cc: Andrew Morton <akpm@linux-foundation.org>,
LKML-Reference: <4AB51DFD.2000904@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agox86, mce: Fix compile warning in case of CONFIG_SMP=n
Andreas Herrmann [Tue, 15 Sep 2009 15:17:27 +0000 (17:17 +0200)]
x86, mce: Fix compile warning in case of CONFIG_SMP=n

Fix following compile warning:

  arch/x86/kernel/cpu/mcheck/mce_amd.c: In function 'threshold_create_bank':
  arch/x86/kernel/cpu/mcheck/mce_amd.c:492: warning: unused variable 'c'

which shows up when kernel is compiled with CONFIG_SMP=n.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
LKML-Reference: <20090915151727.GB21670@alberich.amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf_counter: Fix perf_copy_attr() pointer arithmetic
Ian Schram [Fri, 18 Sep 2009 19:26:26 +0000 (21:26 +0200)]
perf_counter: Fix perf_copy_attr() pointer arithmetic

There is still some weird code in per_copy_attr(). Which supposedly
checks that all bytes trailing a struct are zero.

It doesn't seem to get pointer arithmetic right. Since it
increments an iterating pointer by sizeof(unsigned long) rather
than 1.

Signed-off-by: Ian Schram <ischram@telenet.be>
[ v2: clean up the messy PTR_ALIGN logic as well. ]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: <stable@kernel.org> # for v2.6.31.x
LKML-Reference: <4AB3DEE2.3030600@telenet.be>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branch 'tip/tracing/core' of git://git.kernel.org/pub/scm/linux/kernel/git...
Ingo Molnar [Sat, 19 Sep 2009 17:21:15 +0000 (19:21 +0200)]
Merge branch 'tip/tracing/core' of git://git./linux/kernel/git/rostedt/linux-2.6-trace into tracing/urgent

14 years agoperf utils: Use a define for the maximum length of a trace event
Arjan van de Ven [Sat, 19 Sep 2009 11:36:30 +0000 (13:36 +0200)]
perf utils: Use a define for the maximum length of a trace event

As per Ingo's review: use a #define rather than an open coded constant
for the maximum length of a trace event for storing in the perf.data file.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: fweisbec@gmail.com
Cc: peterz@infradead.org
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <20090919133630.10533d3e@infradead.org>
[ add a few comments to nearby functions ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf: Add timechart help text and add timechart to "perf help"
Arjan van de Ven [Sat, 19 Sep 2009 11:36:04 +0000 (13:36 +0200)]
perf: Add timechart help text and add timechart to "perf help"

As suggested by Ingo, add a timechart man page help text, as well
as add it to the "perf help" overview.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: fweisbec@gmail.com
Cc: peterz@infradead.org
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <20090919133604.3767fa35@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agotracing, x86, cpuidle: Move the end point of a C state in the power tracer
Arjan van de Ven [Sat, 19 Sep 2009 11:35:33 +0000 (13:35 +0200)]
tracing, x86, cpuidle: Move the end point of a C state in the power tracer

The "end of a C state" trace point currently happens before
the code runs that corrects the TSC for having stopped during idle.

The result of this is that the timestamp of the end-of-C-state event
is garbage on cpus where the TSC stops during idle.

This patch moves the end point of the C state to after the timekeeping
engine of the kernel has been corrected.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: Len Brown <len.brown@intel.com>
Cc: fweisbec@gmail.com
Cc: peterz@infradead.org
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <20090919133533.139c2a46@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf utils: Be consistent about minimum text size in the svghelper
Arjan van de Ven [Sat, 19 Sep 2009 11:35:07 +0000 (13:35 +0200)]
perf utils: Be consistent about minimum text size in the svghelper

Be more consistent in the svghelper about the minimum text size
by having a global #define for this.

There needs to be a minimum text size in order to keep the size
of the SVG file within the reach of what current SVG viewers can
cope with.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: fweisbec@gmail.com
Cc: peterz@infradead.org
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arjan van de Ven <arjan@infradead.org>
LKML-Reference: <20090919133507.7374ef8b@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf timechart: Add "perf timechart record"
Arjan van de Ven [Sat, 19 Sep 2009 11:34:42 +0000 (13:34 +0200)]
perf timechart: Add "perf timechart record"

Add a command line option to record a trace, similar to "perf sched record".

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: fweisbec@gmail.com
Cc: peterz@infradead.org
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <20090919133442.0dc2c7f5@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agotracing/events: use list_for_entry_continue
Li Zefan [Fri, 18 Sep 2009 06:07:05 +0000 (14:07 +0800)]
tracing/events: use list_for_entry_continue

Simplify s_next() and t_next().

Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4AB32389.1030005@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
14 years agotracing: remove max_tracer_type_len
Li Zefan [Fri, 18 Sep 2009 06:06:47 +0000 (14:06 +0800)]
tracing: remove max_tracer_type_len

Limit the length of a tracer's name within 100 chars, and then we
don't have to play with max_tracer_type_len.

Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4AB32377.9020601@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
14 years agofunction-graph: use ftrace_graph_funcs directly
Li Zefan [Fri, 18 Sep 2009 06:06:28 +0000 (14:06 +0800)]
function-graph: use ftrace_graph_funcs directly

No need to store ftrace_graph_funcs in file->private.

Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4AB32364.7020602@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
14 years agosched: Re-add lost cpu_allowed check to sched_fair.c::select_task_rq_fair()
Mike Galbraith [Sat, 19 Sep 2009 14:52:35 +0000 (16:52 +0200)]
sched: Re-add lost cpu_allowed check to sched_fair.c::select_task_rq_fair()

While doing some testing, I pinned mplayer, only to find it
following X around like a puppy. Looking at commit c88d591, I found
a cpu_allowed check that went AWOL.  I plugged it back in where it
looks like it needs to go, and now when I say "sit, stay!", mplayer
obeys again.

'c88d591 sched: Merge select_task_rq_fair() and
sched_balance_self()' accidentally dropped the check, causing
wake_affine() to pull pinned tasks - put it back.

[ v2: use a cheaper version from Peter ]

Signed-off-by: Mike Galbraith <efault@gmx.de>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branch 'tracing/core-v3' of git://git.kernel.org/pub/scm/linux/kernel/git/frede...
Ingo Molnar [Sat, 19 Sep 2009 10:05:25 +0000 (12:05 +0200)]
Merge branch 'tracing/core-v3' of git://git./linux/kernel/git/frederic/random-tracing into tracing/urgent

14 years agoperf: Add the timechart tool
Arjan van de Ven [Sat, 12 Sep 2009 05:53:05 +0000 (07:53 +0200)]
perf: Add the timechart tool

timechart is a tool to visualize what is going on in the system.

The user makes a trace of what is going on with

 > perf record --timechart /usr/bin/some_command

and then can turn the output of this into an svg file

 > perf timechart

which then can be viewed with any SVG view; inkscape works well
enough for me.

The idea behind timechart is to create a "infinitely zoomable"
picture; something that has high level information on a 1:1 zoom
level, but which exposes more details every time you zoom into a
specific area.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20090912130713.6a77bbc0@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf: Add a SVG helper library file
Arjan van de Ven [Sat, 12 Sep 2009 10:52:11 +0000 (12:52 +0200)]
perf: Add a SVG helper library file

The timechart tool writes out SVG format output; this patch adds a
set of helper functions to abstract dealing with SVG from the core
timechart code.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20090912130613.677f0516@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agotracing, perf: Convert the power tracer into an event tracer
Arjan van de Ven [Thu, 17 Sep 2009 14:11:28 +0000 (16:11 +0200)]
tracing, perf: Convert the power tracer into an event tracer

This patch converts the existing power tracer into an event tracer,
so that power events (C states and frequency changes) can be
tracked via "perf".

This also removes the perl script that was used to demo the tracer;
its functionality is being replaced entirely with timechart.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20090912130542.6d314860@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf: Add a sample_event type to the event_union
Arjan van de Ven [Sat, 12 Sep 2009 05:53:00 +0000 (07:53 +0200)]
perf: Add a sample_event type to the event_union

Add a sample_event type to the event_union so that raw samples can
be processed easily.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20090912130511.411434b5@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf: Allow perf utilities to have "callback" options without arguments
Arjan van de Ven [Sat, 12 Sep 2009 05:52:54 +0000 (07:52 +0200)]
perf: Allow perf utilities to have "callback" options without arguments

timechart needs to add a "callback" type command line argument that
does not take arguments.

This patch adds the parse-options.h infrastructure to make this
possible.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20090912130440.548666c1@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf: Store trace event name/id pairs in perf.data
Arjan van de Ven [Sat, 12 Sep 2009 05:52:51 +0000 (07:52 +0200)]
perf: Store trace event name/id pairs in perf.data

The trace event name<->id mapping is dynamic for each kernel
compile. In order for perf.data to be useable outside the actual
system, we thus need to store a table of this mapping for later
use.

This patch adds this table to perf.data, and provides helper
functions for lookup up fields from this table.

To avoid mistakes, lookup-from-table is kept completely seprate
from lookup-from-local-debugfs.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20090912130405.6960d099@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf: Add a timestamp to fork events
Arjan van de Ven [Sat, 12 Sep 2009 05:52:47 +0000 (07:52 +0200)]
perf: Add a timestamp to fork events

perf timechart needs to know when a process forked, in order to be
able to visualize properly when tasks start.

This patch adds a time field to the event structure, and fills it
in appropriately.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20090912130341.51ad2de2@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branch 'linus' into perfcounters/core
Ingo Molnar [Sat, 19 Sep 2009 09:27:32 +0000 (11:27 +0200)]
Merge branch 'linus' into perfcounters/core

Merge reason: Bring in tracing changes we depend on.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agox86, apic: Use logical flat on intel with <= 8 logical cpus
Suresh Siddha [Sat, 19 Sep 2009 02:29:59 +0000 (19:29 -0700)]
x86, apic: Use logical flat on intel with <= 8 logical cpus

On Intel platforms, we can use logical flat mode if there are <= 8
logical cpu's (irrespective of physical apic id values). This will
enable simplified and efficient IPI and device interrupt routing on
such platforms.

Fix the relevant comments while we are at it.

We can clean up default_setup_apic_routing() by using apic->probe()
but that is a different item.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "yinghai@kernel.org" <yinghai@kernel.org>
LKML-Reference: <1253327399.3948.747.camel@sbs-t61.sc.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agorcu: Fix whitespace inconsistencies
Paul E. McKenney [Fri, 18 Sep 2009 17:28:19 +0000 (10:28 -0700)]
rcu: Fix whitespace inconsistencies

Fix a number of whitespace ^Ierrors in the include/linux/rcu*
and the kernel/rcu* files.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: akpm@linux-foundation.org
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
LKML-Reference: <20090918172819.GA24405@linux.vnet.ibm.com>
[ did more checkpatch fixlets ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agorcu: Fix thinko, actually initialize full tree
Paul E. McKenney [Fri, 18 Sep 2009 16:50:19 +0000 (09:50 -0700)]
rcu: Fix thinko, actually initialize full tree

Commit de078d8 ("rcu: Need to update rnp->gpnum if preemptable RCU
is to be reliable") repeatedly and incorrectly initializes the root
rcu_node structure's ->gpnum field rather than initializing the
->gpnum field of each node in the tree.  Fix this.  Also add an
additional consistency check to catch this in the future.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: akpm@linux-foundation.org
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
LKML-Reference: <125329262011-git-send-email->
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agorcu: Apply results of code inspection of kernel/rcutree_plugin.h
Paul E. McKenney [Fri, 18 Sep 2009 16:50:18 +0000 (09:50 -0700)]
rcu: Apply results of code inspection of kernel/rcutree_plugin.h

o Drop the calls to cpu_quiet() from the online/offline code.
  These are unnecessary, since force_quiescent_state() will
  clean up, and removing them simplifies the code a bit.

o Add a warning to check that we don't enqueue the same blocked
  task twice onto the ->blocked_tasks[] lists.

o Rework the phase computation in rcu_preempt_note_context_switch()
  to be more readable, as suggested by Josh Triplett.

o Disable irqs to close a race between the scheduling clock
  interrupt and rcu_preempt_note_context_switch() WRT the
  ->rcu_read_unlock_special field.

o Add comments to rnp->lock acquisition and release within
  rcu_read_unlock_special() noting that irqs are already
  disabled.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: akpm@linux-foundation.org
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
LKML-Reference: <12532926201851-git-send-email->
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agorcu: Add WARN_ON_ONCE() consistency checks covering state transitions
Paul E. McKenney [Fri, 18 Sep 2009 16:50:17 +0000 (09:50 -0700)]
rcu: Add WARN_ON_ONCE() consistency checks covering state transitions

o Verify that qsmask bits stay clear through GP
  initialization.

o Verify that cpu_quiet_msk_finish() is never invoked unless
  there actually is an RCU grace period in progress.

o Verify that all internal-node rcu_node structures have empty
  blocked_tasks[] lists.

o Verify that child rcu_node structure's bits remain clear after
  acquiring parent's lock.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: akpm@linux-foundation.org
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
LKML-Reference: <12532926191947-git-send-email->
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoV4L/DVB (13033): pt1: Don't use a deprecated DMA_BIT_MASK macro
Mauro Carvalho Chehab [Sat, 19 Sep 2009 04:01:26 +0000 (01:01 -0300)]
V4L/DVB (13033): pt1: Don't use a deprecated DMA_BIT_MASK macro

drivers/media/dvb/pt1/pt1.c: In function ‘pt1_probe’:
drivers/media/dvb/pt1/pt1.c:915: warning: ‘DMA_nnBIT_MASK’ is deprecated

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13029): radio-si4713: remove #include <linux/version.h>
Huang Weiyi [Sat, 19 Sep 2009 02:33:47 +0000 (23:33 -0300)]
V4L/DVB (13029): radio-si4713: remove #include <linux/version.h>

Remove #include <linux/version.h>

Cc: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13027): go7007: convert printks to v4l2_info
Pete Eberlein [Sat, 19 Sep 2009 02:06:15 +0000 (23:06 -0300)]
V4L/DVB (13027): go7007: convert printks to v4l2_info

Use v4l2_info and v4l2_err where appropriate.

Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13026): s2250-board: Implement brightness and contrast controls
Pete Eberlein [Sat, 19 Sep 2009 01:55:13 +0000 (22:55 -0300)]
V4L/DVB (13026): s2250-board: Implement brightness and contrast controls

The brightness and contrast controls were added to the Sensoray 2250 device.
A read register function was added to set the correct bit fields.

Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13025): s2250-board: Fix memory leaks
Pete Eberlein [Sat, 19 Sep 2009 01:05:19 +0000 (22:05 -0300)]
V4L/DVB (13025): s2250-board: Fix memory leaks

In some error cases, allocated buffers need to be freed before returning.

Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13024): go7007: Implement vidioc_g_std and vidioc_querystd
Pete Eberlein [Sat, 19 Sep 2009 00:59:29 +0000 (21:59 -0300)]
V4L/DVB (13024): go7007: Implement vidioc_g_std and vidioc_querystd

Implemented the vidio_g_std and vidio_querystd ioctls.

Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13023): go7007: Merge struct gofh and go declarations
Pete Eberlein [Sat, 19 Sep 2009 00:50:54 +0000 (21:50 -0300)]
V4L/DVB (13023): go7007: Merge struct gofh and go declarations

The declarations for struct go7007_file *gofh and struct go7007 *go can
be merged when gofh isn't used by the function.

Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13022): go7007: Fix mpeg controls
Pete Eberlein [Sat, 19 Sep 2009 00:36:45 +0000 (21:36 -0300)]
V4L/DVB (13022): go7007: Fix mpeg controls

MPEG controls were disabled by Mauro's ioctl conversion patch.  They are now
re-enabled and cleaned up.

Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13021): go7007: Fix whitespace and line lengths
Pete Eberlein [Sat, 19 Sep 2009 00:28:59 +0000 (21:28 -0300)]
V4L/DVB (13021): go7007: Fix whitespace and line lengths

Trailing whitespace is removed.
Source lines wrap at 80 columns.

Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13020): go7007: Updates to Kconfig and Makefile
Pete Eberlein [Sat, 19 Sep 2009 00:21:55 +0000 (21:21 -0300)]
V4L/DVB (13020): go7007: Updates to Kconfig and Makefile

Replace "weird device" with accurate descriptions. Add menu options and
makefile lines for the i2c modules. Added comment about why dvb-usb is
included. Added include sound/config.h for Ubuntu 8.04 distro kernel.

Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13019): video: initial support for ADV7180
Richard Röjfors [Sat, 19 Sep 2009 00:17:20 +0000 (21:17 -0300)]
V4L/DVB (13019): video: initial support for ADV7180

This is an initial driver for Analog Devices ADV7180 Video Decoder.
So far it only supports query standard.

[akpm@linux-foundation.org: remove unneeded cast]
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Richard Röjfors <richard.rojfors.ext@mocean-labs.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13018): kzalloc failure ignored in au8522_probe()
Roel Kluin [Sat, 19 Sep 2009 00:03:34 +0000 (21:03 -0300)]
V4L/DVB (13018): kzalloc failure ignored in au8522_probe()

Prevent NULL dereference if kzalloc() fails.

Cc: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13017): gspca: kmalloc failure ignored in sd_start()
Roel Kluin [Fri, 18 Sep 2009 23:33:27 +0000 (20:33 -0300)]
V4L/DVB (13017): gspca: kmalloc failure ignored in sd_start()

Prevent NULL dereference if kmalloc() fails.

Cc: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>