safe/jmp/linux-2.6
16 years agoatyfb: kill dead code
Antonino A. Daplas [Tue, 8 May 2007 07:37:34 +0000 (00:37 -0700)]
atyfb: kill dead code

Coverity Bug 68, kill dead code.

Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoneofb: fill transp->msb_right with the correct value
Antonino A. Daplas [Tue, 8 May 2007 07:37:31 +0000 (00:37 -0700)]
neofb: fill transp->msb_right with the correct value

Fill transp->msb_right with the correct value.  fbcon ignores this, but user
apps may not.

Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofbdev: fix obvious bug in show_pan()
Antonino A. Daplas [Tue, 8 May 2007 07:37:30 +0000 (00:37 -0700)]
fbdev: fix obvious bug in show_pan()

show_pan will display the value of the xoffset twice, instead of the xoffset
and yoffset.  Fix.

Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofbdev: ignore VESA modes if framebuffer is disabled
Antonino A. Daplas [Tue, 8 May 2007 07:37:29 +0000 (00:37 -0700)]
fbdev: ignore VESA modes if framebuffer is disabled

If the option vga=<VESA graphics mode> is added to the boot parameter, it will
activate graphics mode, but without any framebuffer support, the user is left
with an unusable display.

Change the behavior such that the user is instead prompted for another mode
(ala vga=ask).

NOTE: People can always use vbetool to set a graphics mode if this is really
desired, but the number of people doing this approaches zero.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agonvidiafb: bring back generic ddc reading
Antonino A. Daplas [Tue, 8 May 2007 07:37:27 +0000 (00:37 -0700)]
nvidiafb: bring back generic ddc reading

Make nvidiafb use fb_ddc_read().  This patch was submitted before but was
reverted due to problems in a non-x86 platform.  This includes a fix for that
where ddc reading is bypassed if there is no DDC bus (duh).

Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agointelfb: fix ring space calculation
Orczykowski, Juergen [Tue, 8 May 2007 07:37:25 +0000 (00:37 -0700)]
intelfb: fix ring space calculation

If there is less than RING_MIN_FREE available in the ring buffer,
dinfo->ring_space is set to a big value forcing wait_ring to return.

Fix by making ring space = 0 if ring space < RING_MIN_FREE.

Signed-off-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofbdev: add Ultrasharp UXGA to broken monitor database
Antonino A. Daplas [Tue, 8 May 2007 07:37:23 +0000 (00:37 -0700)]
fbdev: add Ultrasharp UXGA to broken monitor database

This particular monitor does not have a limits block and has only one set of
monitor timings.  Fix by adding a limits block to the EDID and extend the
horizontal sync frequency range to 30 kHz and 75 Khz.

Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomake drivers/video/display/display-sysfs.c:display_class static
Adrian Bunk [Tue, 8 May 2007 07:37:21 +0000 (00:37 -0700)]
make drivers/video/display/display-sysfs.c:display_class static

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: James Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofbdev: display class
James Simmons [Tue, 8 May 2007 07:37:15 +0000 (00:37 -0700)]
fbdev: display class

Add the new display class.  This is meant to unite the various solutions to
display units ie acpi output device, auxdisplay and the defunct lcd class
in the backlight directory.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agochange rivafb_remove to __devexit
Prarit Bhargava [Tue, 8 May 2007 07:37:10 +0000 (00:37 -0700)]
change rivafb_remove to __devexit

Change rivafb_remove to __deviexit to fix MODPOST warnings:

WARNING: drivers/video/riva/rivafb.o - Section mismatch: reference to
.exit.text:rivafb_remove from .data.rel.local after 'rivafb_driver' (at offset 0x28)

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Acked-by: James Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoaty128fb: fix blanking
Witold Filipczyk [Tue, 8 May 2007 07:37:07 +0000 (00:37 -0700)]
aty128fb: fix blanking

I have a problem with blanking. The soundcard uses speakers of the monitor.
Sound is muted when the screen blanks due to a bug in aty128fb.c.

Here is a fragment of linux/fb.h
/* VESA Blanking Levels */
#define VESA_NO_BLANKING        0
#define VESA_VSYNC_SUSPEND      1
#define VESA_HSYNC_SUSPEND      2
#define VESA_POWERDOWN          3

enum {
        /* screen: unblanked, hsync: on,  vsync: on */
        FB_BLANK_UNBLANK       = VESA_NO_BLANKING,

        /* screen: blanked,   hsync: on,  vsync: on */
        FB_BLANK_NORMAL        = VESA_NO_BLANKING + 1,

        /* screen: blanked,   hsync: on,  vsync: off */
        FB_BLANK_VSYNC_SUSPEND = VESA_VSYNC_SUSPEND + 1,

        /* screen: blanked,   hsync: off, vsync: on */
        FB_BLANK_HSYNC_SUSPEND = VESA_HSYNC_SUSPEND + 1,

        /* screen: blanked,   hsync: off, vsync: off */
        FB_BLANK_POWERDOWN     = VESA_POWERDOWN + 1
};

So FB_BLANK_NORMAL is 1, FB_BLANK_VSYNC_SUSPEND is 2,
FB_BLANK_HSYNC_SUSPEND is 3, FB_BLANK_POWERDOWN is 4.
And now:
blank = FB_BLANK_NORMAL (1)
blank & FB_BLANK_HSYNC_SUSPEND (1 & 3) is true,
so normal blank caused hsync suspend and sound is muted.

Cc: James Simmons <jsimmons@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, copyright and version changes
Jiri Slaby [Tue, 8 May 2007 07:37:05 +0000 (00:37 -0700)]
Char: cyclades, copyright and version changes

- add copyright
- move version one number upper and use MODULE_VERSION

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, probe cleanup
Jiri Slaby [Tue, 8 May 2007 07:37:04 +0000 (00:37 -0700)]
Char: cyclades, probe cleanup

- add fail paths
- merge 3 similar initializations into one (Z, Ze, Y)

[akpm@linux-foundation.org: build fix]
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, dynamic ports
Jiri Slaby [Tue, 8 May 2007 07:37:02 +0000 (00:37 -0700)]
Char: cyclades, dynamic ports

and save thus approx. 160k of .bss

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, fix tty device unregister
Jiri Slaby [Tue, 8 May 2007 07:37:01 +0000 (00:37 -0700)]
Char: cyclades, fix tty device unregister

put_tty_driver after unregistering devices

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, conditions cleanup
Jiri Slaby [Tue, 8 May 2007 07:36:59 +0000 (00:36 -0700)]
Char: cyclades, conditions cleanup

- 0 is not NULL
- use unlikely to hit the icache in isr more likely
- remove or comment empty if/else paths

[akpm@linux-foundation.org: build fix]
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, remove locking macros
Jiri Slaby [Tue, 8 May 2007 07:36:57 +0000 (00:36 -0700)]
Char: cyclades, remove locking macros

and use locally stored card structure if possible

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, remove unused timestamps
Jiri Slaby [Tue, 8 May 2007 07:36:55 +0000 (00:36 -0700)]
Char: cyclades, remove unused timestamps

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, timers cleanup
Jiri Slaby [Tue, 8 May 2007 07:36:54 +0000 (00:36 -0700)]
Char: cyclades, timers cleanup

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, fix blockmove
Jiri Slaby [Tue, 8 May 2007 07:36:53 +0000 (00:36 -0700)]
Char: cyclades, fix blockmove

tty has no longer flip buffers accessible externally. Fix it by moving the
code to the tty_*flip* helpers.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, remove sleep_on
Jiri Slaby [Tue, 8 May 2007 07:36:51 +0000 (00:36 -0700)]
Char: cyclades, remove sleep_on

convert to wait_* and completion

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, make info->card a pointer
Jiri Slaby [Tue, 8 May 2007 07:36:49 +0000 (00:36 -0700)]
Char: cyclades, make info->card a pointer

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, get rid of phys addresses
Jiri Slaby [Tue, 8 May 2007 07:36:47 +0000 (00:36 -0700)]
Char: cyclades, get rid of phys addresses

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, simplify variables initialization
Jiri Slaby [Tue, 8 May 2007 07:36:46 +0000 (00:36 -0700)]
Char: cyclades, simplify variables initialization

- do not init static variables to 0
- simplify cy_init_card -- use memset(0) and do not zero each element
  separately, also reorder init, so that same entries are inited at one
  place

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, mark cyy_init_card as __devinit, not __init
Jiri Slaby [Tue, 8 May 2007 07:36:44 +0000 (00:36 -0700)]
Char: cyclades, mark cyy_init_card as __devinit, not __init

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, printk cleanups
Jiri Slaby [Tue, 8 May 2007 07:36:42 +0000 (00:36 -0700)]
Char: cyclades, printk cleanups

- add printk KERN_ levels to each printk
- substitute printk with dev_* when device struct is available

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, irq is int
Jiri Slaby [Tue, 8 May 2007 07:36:41 +0000 (00:36 -0700)]
Char: cyclades, irq is int

don't fetch it to uchar

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, remove useless fileds from cyclades_card
Jiri Slaby [Tue, 8 May 2007 07:36:40 +0000 (00:36 -0700)]
Char: cyclades, remove useless fileds from cyclades_card

pde, ctl_phys and base_phys are useless -- they are never used.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, unexport struct cyclades_card
Jiri Slaby [Tue, 8 May 2007 07:36:38 +0000 (00:36 -0700)]
Char: cyclades, unexport struct cyclades_card

Do not export internal card data to userspace. cytune doesn't use this
anyway.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, depends on PCI or ISA
Jiri Slaby [Tue, 8 May 2007 07:36:36 +0000 (00:36 -0700)]
Char: cyclades, depends on PCI or ISA

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, switch to pci probing
Jiri Slaby [Tue, 8 May 2007 07:36:34 +0000 (00:36 -0700)]
Char: cyclades, switch to pci probing

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, use IS_CYC_Z macro
Jiri Slaby [Tue, 8 May 2007 07:36:32 +0000 (00:36 -0700)]
Char: cyclades, use IS_CYC_Z macro

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: isicom, use pr_debug
Jiri Slaby [Tue, 8 May 2007 07:36:29 +0000 (00:36 -0700)]
Char: isicom, use pr_debug

isicom, use pr_debug

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: mxser, schedule for removal
Jiri Slaby [Tue, 8 May 2007 07:36:28 +0000 (00:36 -0700)]
Char: mxser, schedule for removal

mxser, schedule for removal

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, allow DEBUG_SHIRQ
Jiri Slaby [Tue, 8 May 2007 07:36:24 +0000 (00:36 -0700)]
Char: cyclades, allow DEBUG_SHIRQ

Test if base addr is non-null in ISR to prove the card has been correctly
initialized.  This is needed for DEBUG_SHIRQ for example.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, clear interrupts before releasing
Jiri Slaby [Tue, 8 May 2007 07:36:23 +0000 (00:36 -0700)]
Char: cyclades, clear interrupts before releasing

Without this patch, the driver sometimes causes "IRQXX: Nobody cares".  Fix it
by turning off irqs when releasing.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, tty_register_device separately for each device
Jiri Slaby [Tue, 8 May 2007 07:36:22 +0000 (00:36 -0700)]
Char: cyclades, tty_register_device separately for each device

Do not register all tty devices at the init time, delay it for the time until
some device is found.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, cy_init error handling
Jiri Slaby [Tue, 8 May 2007 07:36:20 +0000 (00:36 -0700)]
Char: cyclades, cy_init error handling

- do not panic if tty_register_driver fails
- handle fail paths properly

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, remove some global vars
Jiri Slaby [Tue, 8 May 2007 07:36:18 +0000 (00:36 -0700)]
Char: cyclades, remove some global vars

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, init card struct immediately
Jiri Slaby [Tue, 8 May 2007 07:36:16 +0000 (00:36 -0700)]
Char: cyclades, init card struct immediately

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, move card entries init into function
Jiri Slaby [Tue, 8 May 2007 07:36:14 +0000 (00:36 -0700)]
Char: cyclades, move card entries init into function

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, create cy_pci_probe
Jiri Slaby [Tue, 8 May 2007 07:36:13 +0000 (00:36 -0700)]
Char: cyclades, create cy_pci_probe

Move probing code to separate function for easy pci probing conversion.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, init Ze immediately
Jiri Slaby [Tue, 8 May 2007 07:36:12 +0000 (00:36 -0700)]
Char: cyclades, init Ze immediately

There will be no other choice after introducing pci probing anyway.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, use pci_iomap/unmap
Jiri Slaby [Tue, 8 May 2007 07:36:10 +0000 (00:36 -0700)]
Char: cyclades, use pci_iomap/unmap

fork remove code for pci -- move it to separate, new, function and don't care
about pci in the former.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, create cy_init_Ze
Jiri Slaby [Tue, 8 May 2007 07:36:09 +0000 (00:36 -0700)]
Char: cyclades, create cy_init_Ze

Move Ze init code into new cy_init_Ze, because we will need it in another
place and it will make the code totally unreadable.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agox86, serial: convert legacy COM ports to platform devices
Bjorn Helgaas [Tue, 8 May 2007 07:36:07 +0000 (00:36 -0700)]
x86, serial: convert legacy COM ports to platform devices

Make x86 COM ports into platform devices and don't probe for them
if we have PNP.

This prevents double discovery, where a device was found both by
the legacy probe and by 8250_pnp, e.g.,

    serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
    00:02: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

This also means IRDA devices without a UART PNP ID will no longer be
claimed by the serial driver, which might require changes in IRDA
drivers and administration.

In addition to this patch, you may need to configure a setserial init
script, e.g., /etc/init.d/setserial, so it doesn't poke legacy UART
stuff back in.  On Debian, "dpkg-reconfigure setserial" with the "kernel"
option does this.

To force the old legacy probe behavior even when we have PNPBIOS or
ACPI, load the new legacy_serial module (or build 8250 static) with
the "legacy_serial.force" option.

[akpm@linux-foundation.org: fix makefiles]
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Keith Owens <kaos@ocs.com.au>
Cc: Len Brown <lenb@kernel.org>
Cc: Adam Belay <ambx1@neo.rr.com>
Cc: Matthieu CASTET <castet.matthieu@free.fr>
Cc: Jean Tourrilhes <jt@hpl.hp.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Ville Syrjala <syrjala@sci.fi>
Cc: Russell King <rmk+serial@arm.linux.org.uk>
Cc: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosmsc-ircc2: add PNP support
Bjorn Helgaas [Tue, 8 May 2007 07:36:05 +0000 (00:36 -0700)]
smsc-ircc2: add PNP support

Claim devices using PNP, unless the user explicitly specified device
addresses.  This can be disabled with the "smsc-ircc2.nopnp" option.

This removes the need for probing legacy addresses and helps untangle IR
devices from serial8250 devices.

Sometimes the SMC device is at a legacy COM port address but does not use the
legacy COM IRQ.  In this case, claiming the device using PNP rather than 8250
legacy probe means we can automatically use the correct IRQ rather than
forcing the user to use "setserial" to set the IRQ manually.

If the PNP claim doesn't work, make sure you don't have a setserial init
script, e.g., /etc/init.d/setserial, configured to poke in legacy COM port
resources for the IRDA device.  That causes the serial driver to claim
resources needed by this driver.

Based on this patch by Ville Syrjälä:
    http://www.hpl.hp.com/personal/Jean_Tourrilhes/IrDA/ir260_smsc_pnp.diff

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Keith Owens <kaos@ocs.com.au>
Cc: Len Brown <lenb@kernel.org>
Cc: Adam Belay <ambx1@neo.rr.com>
Cc: Matthieu CASTET <castet.matthieu@free.fr>
Cc: Jean Tourrilhes <jt@hpl.hp.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Ville Syrjala <syrjala@sci.fi>
Cc: Russell King <rmk+serial@arm.linux.org.uk>
Acked-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosmsc-ircc2: tidy up module parameter checking
Bjorn Helgaas [Tue, 8 May 2007 07:36:02 +0000 (00:36 -0700)]
smsc-ircc2: tidy up module parameter checking

To determine whether the user specified a module parameter, use some #defines
instead of checking for bare magic numbers.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Keith Owens <kaos@ocs.com.au>
Cc: Len Brown <lenb@kernel.org>
Cc: Adam Belay <ambx1@neo.rr.com>
Cc: Matthieu CASTET <castet.matthieu@free.fr>
Cc: Jean Tourrilhes <jt@hpl.hp.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Ville Syrjala <syrjala@sci.fi>
Cc: Russell King <rmk+serial@arm.linux.org.uk>
Cc: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoPNP: workaround HP BIOS defect that leaves SMCF010 device partly enabled
Bjorn Helgaas [Tue, 8 May 2007 07:36:00 +0000 (00:36 -0700)]
PNP: workaround HP BIOS defect that leaves SMCF010 device partly enabled

Some HP/Compaq firmware reports via ACPI that the SMCF010 IR device is
enabled, but in fact, it leaves the device partly disabled.

HP nw8240 BIOS 68DTV Ver.  F.0F, released 9/15/2005 is one BIOS that has this
problem.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Keith Owens <kaos@ocs.com.au>
Cc: Len Brown <lenb@kernel.org>
Cc: Adam Belay <ambx1@neo.rr.com>
Cc: Matthieu CASTET <castet.matthieu@free.fr>
Cc: Jean Tourrilhes <jt@hpl.hp.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Ville Syrjala <syrjala@sci.fi>
Cc: Russell King <rmk+serial@arm.linux.org.uk>
Cc: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoPNP: notice whether we have PNP devices (PNPBIOS or PNPACPI)
Bjorn Helgaas [Tue, 8 May 2007 07:35:54 +0000 (00:35 -0700)]
PNP: notice whether we have PNP devices (PNPBIOS or PNPACPI)

This series converts i386 and x86_64 legacy serial ports to be platform
devices and prevents probing for them if we have PNP.

This prevents double discovery, where a device was found both by the legacy
probe and by 8250_pnp.

This also prevents the serial driver from claiming IRDA devices (unless they
have a UART PNP ID).  The serial legacy probe sometimes assumed the wrong IRQ,
so the user had to use "setserial" to fix it.

Removing the need for setserial to make IRDA devices work seems good, but it
does break some things.  In particular, you may need to keep setserial from
poking legacy UART stuff back in by doing something like "dpkg-reconfigure
setserial" with the "kernel" option.  Otherwise, the setserial-discovered
"UART" will claim resources and prevent the IRDA driver from loading.

This patch:

If we can discover devices using PNP, we can skip some legacy probes.  This
flag ("pnp_platform_devices") indicates that PNPBIOS or PNPACPI is enabled and
should tell us about builtin devices.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Keith Owens <kaos@ocs.com.au>
Cc: Len Brown <lenb@kernel.org>
Cc: Adam Belay <ambx1@neo.rr.com>
Cc: Matthieu CASTET <castet.matthieu@free.fr>
Cc: Jean Tourrilhes <jt@hpl.hp.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Ville Syrjala <syrjala@sci.fi>
Cc: Russell King <rmk+serial@arm.linux.org.uk>
Cc: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, remove useless casts
Jiri Slaby [Tue, 8 May 2007 07:35:51 +0000 (00:35 -0700)]
Char: cyclades, remove useless casts

cyclades, remove useless casts

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, remove volatiles
Jiri Slaby [Tue, 8 May 2007 07:35:49 +0000 (00:35 -0700)]
Char: cyclades, remove volatiles

cyclades, remove volatiles

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, timer cleanup
Jiri Slaby [Tue, 8 May 2007 07:35:48 +0000 (00:35 -0700)]
Char: cyclades, timer cleanup

cyclades, timer cleanup

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, cy_readX/writeX cleanup
Jiri Slaby [Tue, 8 May 2007 07:35:46 +0000 (00:35 -0700)]
Char: cyclades, cy_readX/writeX cleanup

cyclades, cy_readX/writeX cleanup

- cy_readX are placeholders for readX, remove it
- move cy_writeX macros into do {} while(0) to be safe

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, remove PAUSE
Jiri Slaby [Tue, 8 May 2007 07:35:43 +0000 (00:35 -0700)]
Char: cyclades, remove PAUSE

cyclades, remove PAUSE

PAUSE expands to do {} while (0), it's useless.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoAdd IRQF_IRQPOLL flag on arm
Bernhard Walle [Tue, 8 May 2007 07:35:39 +0000 (00:35 -0700)]
Add IRQF_IRQPOLL flag on arm

Add IRQF_IRQPOLL for each timer interrupt.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoAdd IRQF_IRQPOLL flag on parisc
Bernhard Walle [Tue, 8 May 2007 07:35:36 +0000 (00:35 -0700)]
Add IRQF_IRQPOLL flag on parisc

Add IRQF_IRQPOLL to the timer interrupt on parisc.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Matthew Wilcox <willy@debian.org>
Cc: Grant Grundler <grundler@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoAdd IRQF_IRQPOLL flag on sh
Bernhard Walle [Tue, 8 May 2007 07:35:34 +0000 (00:35 -0700)]
Add IRQF_IRQPOLL flag on sh

Add IRQF_IRQPOLL on each timer interrupt on SH2.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoAdd IRQF_IRQPOLL flag on IA64
Bernhard Walle [Tue, 8 May 2007 07:35:31 +0000 (00:35 -0700)]
Add IRQF_IRQPOLL flag on IA64

Add IRQF_IRQPOLL for the timer interrupt on IA64.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoAdd IRQF_IRQPOLL flag on i386
Bernhard Walle [Tue, 8 May 2007 07:35:29 +0000 (00:35 -0700)]
Add IRQF_IRQPOLL flag on i386

Add IRQF_IRQPOLL to timer interrupts on i386.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Cc: Andi Kleen <ak@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoAdd IRQF_IRQPOLL flag on x86_64
Bernhard Walle [Tue, 8 May 2007 07:35:28 +0000 (00:35 -0700)]
Add IRQF_IRQPOLL flag on x86_64

Add IRQF_IRQPOLL for the timer interrupt on x86_64.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Cc: Andi Kleen <ak@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoAdd IRQF_IRQPOLL flag (common code)
Bernhard Walle [Tue, 8 May 2007 07:35:24 +0000 (00:35 -0700)]
Add IRQF_IRQPOLL flag (common code)

irqpoll is broken on some architectures that don't use the IRQ 0 for the timer
interrupt like IA64.  This patch adds a IRQF_IRQPOLL flag.

Each architecture is handled in a separate pach.  As I left the irq == 0 as
condition, this should not break existing architectures that use timer_irq ==
0 and that I did't address with that patch (because I don't know).

This patch:

This patch adds a IRQF_IRQPOLL flag that the interrupt registration code could
use for the interrupt it wants to use for IRQ polling.

Because this must not be the timer interrupt, an additional flag was added
instead of re-using the IRQF_TIMER constant.  Until all architectures will
have an IRQF_IRQPOLL interrupt, irq == 0 will stay as alternative as it should
not break anything.

Also, note_interrupt() is called on CPU-specific interrupts to be used as
interrupt source for IRQ polling.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Matthew Wilcox <willy@debian.org>
Cc: Grant Grundler <grundler@google.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoudf: possible null pointer dereference while load_partition
Dmitriy Monakhov [Tue, 8 May 2007 07:35:22 +0000 (00:35 -0700)]
udf: possible null pointer dereference while load_partition

sb_read may return NULL, let's explicitly check it.

Signed-off-by: Dmitriy Monakhov <dmonakhov@openvz.org>
Cc: Jan Kara <jack@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoudf: support files larger than 1G
Jan Kara [Tue, 8 May 2007 07:35:21 +0000 (00:35 -0700)]
udf: support files larger than 1G

Make UDF work correctly for files larger than 1GB.  As no extent can be
longer than (1<<30)-blocksize bytes, we have to create several extents if a
big hole is being created.  As a side-effect, we now don't discard
preallocated blocks when creating a hole.

Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoudf: add assertions
Jan Kara [Tue, 8 May 2007 07:35:18 +0000 (00:35 -0700)]
udf: add assertions

Add a few assertions into udf_discard_prealloc() to check that the file is
sane (mostly helps debugging further patches ;).

Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoudf: use get_bh()
Jan Kara [Tue, 8 May 2007 07:35:16 +0000 (00:35 -0700)]
udf: use get_bh()

Make UDF use get_bh() instead of directly accessing b_count and use
brelse() instead of udf_release_data() which does just brelse()...

Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoUDF: introduce struct extent_position
Jan Kara [Tue, 8 May 2007 07:35:14 +0000 (00:35 -0700)]
UDF: introduce struct extent_position

Introduce a structure extent_position to store a position of an extent and
the corresponding buffer_head in one place.

Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoudf: use sector_t and loff_t for file offsets
Jan Kara [Tue, 8 May 2007 07:35:13 +0000 (00:35 -0700)]
udf: use sector_t and loff_t for file offsets

Use sector_t and loff_t for file offsets in UDF filesystem.  Otherwise an
overflow may occur for long files.  Also make inode_bmap() return offset in
the extent in number of blocks instead of number of bytes - for most
callers this is more convenient.

Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agonfs: fix congestion control: use atomic_longs
Peter Zijlstra [Tue, 8 May 2007 07:35:12 +0000 (00:35 -0700)]
nfs: fix congestion control: use atomic_longs

Change the atomic_t in struct nfs_server to atomic_long_t in anticipation
of machines that can handle 8+TB of (4K) pages under writeback.

However I suspect other things in NFS will start going *bang* by then.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agono longer #include <asm/kdebug.h>
Adrian Bunk [Tue, 8 May 2007 07:35:10 +0000 (00:35 -0700)]
no longer #include <asm/kdebug.h>

Include the new linux/kdebug.h instead of asm/kdebug.h.

Simply remove the asm/kdebug.h include if both had been included.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoSome grammatical fixups and additions to atomic.h kernel-doc content
Robert P. J. Day [Tue, 8 May 2007 07:35:08 +0000 (00:35 -0700)]
Some grammatical fixups and additions to atomic.h kernel-doc content

Tweak and add content for extractable documentation in asm-i386/atomic.h.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: pcap devices should get MACs from command line
Jeff Dike [Tue, 8 May 2007 07:35:06 +0000 (00:35 -0700)]
uml: pcap devices should get MACs from command line

Allow a pcap device to be assigned a MAC on the command line.  They don't
really need one, but it is handy to be able to do when your distro assigns a
new ethernet device whenever it sees a new MAC.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: network and pcap cleanup
Jeff Dike [Tue, 8 May 2007 07:35:04 +0000 (00:35 -0700)]
uml: network and pcap cleanup

Some network device cleanup.

When setup_etheraddr found a globally valid MAC being assigned to an
interface, it went ahead and used it rather than assigning a random MAC like
the other cases do.  This isn't really an error like the others, but it seems
consistent to make it behave the same.

We were getting some duplicate kfree() in the error case in eth_configure
because platform_device_unregister frees buffers that the error cases
following tried to free again.

The pcap initialization routine wasn't doing the proper printk of its
information, causing a printk of the first part of that line to be
unterminated by a newline.

The pcap code had a bunch of style violations, which are now fixed.

pcap_setup wasn't returning false when it detected an unrecognized
option.

The printks in pcap_user all got UM_KERN_BLAH prepended to their
format strings.

pcap_remove now checks for a non-NULL pcap structure before it calls
pcap_close.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Acked-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agox86: create asm/cmpxchg.h
Jeff Dike [Tue, 8 May 2007 07:35:02 +0000 (00:35 -0700)]
x86: create asm/cmpxchg.h

i386:

  Rearrange the cmpxchg code to allow atomic.h to get it without needing to
  include system.h.  This kills warnings in the UML build from atomic.h about
  implicit declarations of cmpxchg symbols.  The i386 build presumably isn't
  seeing this because a separate inclusion of system.h is covering it over.

  The cmpxchg stuff is moved to asm-i386/cmpxchg.h, with an include left in
  system.h for the benefit of generic code which expects cmpxchg there.

  Meanwhile, atomic.h includes cmpxchg.h.

  This causes no noticable damage to the i386 build.

x86_64:

  Move cmpxchg into its own header.  atomic.h already included system.h, so
  this is changed to include cmpxchg.h.

  This is purely cleanup - it's not fixing any warnings - so if the x86_64
  system.h isn't considered as cleanup-worthy as i386, then this can be
  dropped.

  It causes no noticable damage to the x86_64 build.

uml:

  The i386 and x86_64 cmpxchg patches require an asm-um/cmpxchg.h for the
  UML build.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoRemove tas()
Jeff Dike [Tue, 8 May 2007 07:34:59 +0000 (00:34 -0700)]
Remove tas()

tas() has no users, so get rid of it.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: <linux-arch@vger.kernel.org>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agolocal_t: x86_64 extension
Mathieu Desnoyers [Tue, 8 May 2007 07:34:58 +0000 (00:34 -0700)]
local_t: x86_64 extension

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agolocal_t: sparc64 cleanup
Mathieu Desnoyers [Tue, 8 May 2007 07:34:55 +0000 (00:34 -0700)]
local_t: sparc64 cleanup

sparc64 local_t cleanup : simply use asm-generic/local.h.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agolocal_t: powerpc extension
Mathieu Desnoyers [Tue, 8 May 2007 07:34:53 +0000 (00:34 -0700)]
local_t: powerpc extension

[akpm@linux-foundation.org: build fixes]
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agolocal_t: parisc cleanup
Mathieu Desnoyers [Tue, 8 May 2007 07:34:51 +0000 (00:34 -0700)]
local_t: parisc cleanup

parisc architecture local_t cleanup : use asm-generic/local.h.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Matthew Wilcox <willy@debian.org>
Cc: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agolocal_t: mips extension
Mathieu Desnoyers [Tue, 8 May 2007 07:34:47 +0000 (00:34 -0700)]
local_t: mips extension

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agolocal_t: ia64 extension
Mathieu Desnoyers [Tue, 8 May 2007 07:34:46 +0000 (00:34 -0700)]
local_t: ia64 extension

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agolocal_t: i386 extension
Mathieu Desnoyers [Tue, 8 May 2007 07:34:44 +0000 (00:34 -0700)]
local_t: i386 extension

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agolocal_t: alpha extension
Mathieu Desnoyers [Tue, 8 May 2007 07:34:41 +0000 (00:34 -0700)]
local_t: alpha extension

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agolocal_t: architecture independent extension
Mathieu Desnoyers [Tue, 8 May 2007 07:34:40 +0000 (00:34 -0700)]
local_t: architecture independent extension

This series extena and standardises local_t operations on each architecture,
allowing a rich set of atomic operations to be done on per-cpu data with
minimal performance impact.  On architectures where there seems to be no
difference between the SMP and UP operation (same memory barriers, same
LOCKing), local.h simply includes asm-generic/local.h, which removes
duplicated code from the current kernel tree.

This patch:

local_t: architecture independent extension

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoatomic.h: atomic_add_unless as inline. Remove system.h atomic.h circular dependency
Mathieu Desnoyers [Tue, 8 May 2007 07:34:38 +0000 (00:34 -0700)]
atomic.h: atomic_add_unless as inline. Remove system.h atomic.h circular dependency

atomic_add_unless as inline. Remove system.h atomic.h circular dependency.
I agree (with Andi Kleen) this typeof is not needed and more error
prone. All the original atomic.h code that uses cmpxchg (which includes
the atomic_add_unless) uses defines instead of inline functions,
probably to circumvent a circular dependency between system.h and
atomic.h on powerpc (which my patch addresses). Therefore, it makes
sense to use inline functions that will provide type checking.

atomic_add_unless as inline. Remove system.h atomic.h circular dependency.
Digging into the FRV architecture shows me that it is also affected by
such a circular dependency. Here is the diff applying this against the
rest of my atomic.h patches.

It applies over the atomic.h standardization patches.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoatomic.h: add atomic64 cmpxchg, xchg and add_unless to x86_64
Mathieu Desnoyers [Tue, 8 May 2007 07:34:36 +0000 (00:34 -0700)]
atomic.h: add atomic64 cmpxchg, xchg and add_unless to x86_64

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoatomic.h: add atomic64 cmpxchg, xchg and add_unless to sparc64
Mathieu Desnoyers [Tue, 8 May 2007 07:34:34 +0000 (00:34 -0700)]
atomic.h: add atomic64 cmpxchg, xchg and add_unless to sparc64

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoatomic.h: add atomic64 cmpxchg, xchg and add_unless to powerpc
Mathieu Desnoyers [Tue, 8 May 2007 07:34:27 +0000 (00:34 -0700)]
atomic.h: add atomic64 cmpxchg, xchg and add_unless to powerpc

[akpm@linux-foundation.org: build fixes]
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoatomic.h: add atomic64 cmpxchg, xchg and add_unless to parisc
Mathieu Desnoyers [Tue, 8 May 2007 07:34:26 +0000 (00:34 -0700)]
atomic.h: add atomic64 cmpxchg, xchg and add_unless to parisc

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Matthew Wilcox <willy@debian.org>
Acked-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoatomic.h: add atomic64 cmpxchg, xchg and add_unless to mips
Mathieu Desnoyers [Tue, 8 May 2007 07:34:24 +0000 (00:34 -0700)]
atomic.h: add atomic64 cmpxchg, xchg and add_unless to mips

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoatomic.h: add atomic64 cmpxchg, xchg and add_unless to ia64
Mathieu Desnoyers [Tue, 8 May 2007 07:34:22 +0000 (00:34 -0700)]
atomic.h: add atomic64 cmpxchg, xchg and add_unless to ia64

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoatomic.h: i386 type safety fix
Mathieu Desnoyers [Tue, 8 May 2007 07:34:20 +0000 (00:34 -0700)]
atomic.h: i386 type safety fix

Remove an explicit cast to an integer type for the result returned by cmpxchg.
 It is not per se a problem on the i386 architecture, because sizeof(int) ==
sizeof(long), but whenever this code is cut'n'pasted to a accept passing an
atomic64_t value as parameter to cmpxchg, xchg and add_unless, having 64 bits
inputs casted to 32 bits.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoatomic.h: complete atomic_long operations in asm-generic
Mathieu Desnoyers [Tue, 8 May 2007 07:34:19 +0000 (00:34 -0700)]
atomic.h: complete atomic_long operations in asm-generic

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoatomic.h: add atomic64 cmpxchg, xchg and add_unless to alpha
Mathieu Desnoyers [Tue, 8 May 2007 07:34:18 +0000 (00:34 -0700)]
atomic.h: add atomic64 cmpxchg, xchg and add_unless to alpha

This series mainly adds support for missing 64 bits cmpxchg and 64 bits atomic
add unless.  Therefore, principally 64 bits architectures are targeted by
these patches.  It also adds the complete list of atomic operations on the
atomic_long type.

This patch:

atomic.h: add atomic64 cmpxchg, xchg and add_unless to alpha

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoKprobes: The ON/OFF knob thru debugfs
Ananth N Mavinakayanahalli [Tue, 8 May 2007 07:34:16 +0000 (00:34 -0700)]
Kprobes: The ON/OFF knob thru debugfs

This patch provides a debugfs knob to turn kprobes on/off

o A new file /debug/kprobes/enabled indicates if kprobes is enabled or
  not (default enabled)
o Echoing 0 to this file will disarm all installed probes
o Any new probe registration when disabled will register the probe but
  not arm it. A message will be printed out in such a case.
o When a value 1 is echoed to the file, all probes (including ones
  registered in the intervening period) will be enabled
o Unregistration will happen irrespective of whether probes are globally
  enabled or not.
o Update Documentation/kprobes.txt to reflect these changes. While there
  also update the doc to make it current.

We are also looking at providing sysrq key support to tie to the disabling
feature provided by this patch.

[akpm@linux-foundation.org: Use bool like a bool!]
[akpm@linux-foundation.org: add printk facility levels]
[cornelia.huck@de.ibm.com: Add the missing arch_trampoline_kprobe() for s390]
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Srinivasa DS <srinivasa@in.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokprobes: kretprobes simplifications
Christoph Hellwig [Tue, 8 May 2007 07:34:14 +0000 (00:34 -0700)]
kprobes: kretprobes simplifications

 - consolidate duplicate code in all arch_prepare_kretprobe instances
   into common code
 - replace various odd helpers that use hlist_for_each_entry to get
   the first elemenet of a list with either a hlist_for_each_entry_save
   or an opencoded access to the first element in the caller
 - inline add_rp_inst into it's only remaining caller
 - use kretprobe_inst_table_head instead of opencoding it

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokprobes: codingstyle cleanups
Christoph Hellwig [Tue, 8 May 2007 07:34:13 +0000 (00:34 -0700)]
kprobes: codingstyle cleanups

Remove superflous braces and fix indentation aswell as comments.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokprobes: use hlist_for_each_entry
Christoph Hellwig [Tue, 8 May 2007 07:34:11 +0000 (00:34 -0700)]
kprobes: use hlist_for_each_entry

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agortc-cmos: make it load on PNPBIOS systems
Marko Vrh [Tue, 8 May 2007 07:34:09 +0000 (00:34 -0700)]
rtc-cmos: make it load on PNPBIOS systems

Replace CONFIG_PNPACPI with CONFIG_PNP, so it loads on ACPI-less PNPBIOS
systems.

Signed-off-by: Marko Vrh <mvrh@freeshells.ch>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agortc: remove "RTC_ALM_SET mode" bugs
David Brownell [Tue, 8 May 2007 07:34:07 +0000 (00:34 -0700)]
rtc: remove "RTC_ALM_SET mode" bugs

This fixes a common glitch in how RTC drivers handle two "set alarm" modes,
by getting rid of the surprising/hidden one that was rarely implemented
correctly (and which could expose nonportable hardware-specific behavior).

The glitch comes from the /dev/rtcX logic implementing the legacy
RTC_ALM_SET (limited to 24 hours, needing RTC_AIE_ON) ioctl on top of the
RTC driver call providing access to the newer RTC_WKALM_SET (without those
limitations) by initializing the day/month/year fields to be invalid ...
that second mode.

Now, since few RTC drivers check those fields, and most hardware misbehaves
when faced with invalid date fields, many RTC drivers will set bogus alarm
times on those RTC_ALM_SET code paths.  (Several in-tree drivers have that
issue, and I also noticed it with code reviews on several new RTC drivers.)

This patch ensures that RTC drivers never see such invalid alarm fields, by
moving some logic out of rtc-omap into the RTC_ALM_SET code and adding an
explicit check (which will prevent the issue on other code paths).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>