]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
18 years agoAuto-update from upstream
Kyle McMartin [Thu, 27 Oct 2005 03:28:40 +0000 (23:28 -0400)]
Auto-update from upstream

18 years ago[PATCH] Fix cpu timers expiration time
Oleg Nesterov [Wed, 26 Oct 2005 16:26:53 +0000 (20:26 +0400)]
[PATCH] Fix cpu timers expiration time

There's a silly off-by-one error in the code that updates the expiration
of posix CPU timers, causing them to not be properly updated when they
hit exactly on their expiration time (which should be the normal case).

This causes them to then fire immediately again, and only _then_ get
properly updated.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-serial
Linus Torvalds [Wed, 26 Oct 2005 21:02:49 +0000 (14:02 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-serial

18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Wed, 26 Oct 2005 21:01:57 +0000 (14:01 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

18 years agoposix cpu timers: fix timer ordering
Linus Torvalds [Wed, 26 Oct 2005 18:23:06 +0000 (11:23 -0700)]
posix cpu timers: fix timer ordering

Pointed out by Oleg Nesterov, who has been walking over the code
forwards and backwards.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fix radeon_cp_init_ring_buffer()
Ivan Kokshaysky [Wed, 26 Oct 2005 10:05:25 +0000 (11:05 +0100)]
[PATCH] fix radeon_cp_init_ring_buffer()

I've seen similar failure on alpha.

Obviously, someone forgot to convert sg->handle stuff for
PCI gart case.

Signed-off-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] svcsock timestamp fix
Andrew Morton [Wed, 26 Oct 2005 08:59:03 +0000 (01:59 -0700)]
[PATCH] svcsock timestamp fix

Convert nanoseconds to microseconds correctly.

Spotted by Steve Dickson <SteveD@redhat.com>

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Fix HFS+ to free up the space when a file is deleted.
Peter Wainwright [Wed, 26 Oct 2005 08:59:02 +0000 (01:59 -0700)]
[PATCH] Fix HFS+ to free up the space when a file is deleted.

fsck_hfs reveals lots of temporary files accumulating in the hidden
directory "\000\000\000HFS+ Private Data".  According to the HFS+
documentation these are files which are unlinked while in use.  However,
there may be a bug in the Linux hfsplus implementation which causes this to
happen even when the files are not in use.  It looks like the "opencnt"
field is never initialized as (I think) it should be in hfsplus_read_inode.
 This means that a file can appear to be still in use when in fact it has
been closed.  This patch seems to fix it for me.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] kill massive wireless-related log spam
Jeff Garzik [Wed, 26 Oct 2005 08:59:01 +0000 (01:59 -0700)]
[PATCH] kill massive wireless-related log spam

Although this message is having the intended effect of causing wireless
driver maintainers to upgrade their code, I never should have merged this
patch in its present form.  Leading to tons of bug reports and unhappy
users.

Some wireless apps poll for statistics regularly, which leads to a printk()
every single time they ask for stats.  That's a little bit _too_ much of a
reminder that the driver is using an old API.

Change this to printing out the message once, per kernel boot.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] export cpu_online_map
Andrew Morton [Wed, 26 Oct 2005 08:59:01 +0000 (01:59 -0700)]
[PATCH] export cpu_online_map

With CONFIG_SMP=n:

*** Warning: "cpu_online_map" [drivers/firmware/dcdbas.ko] undefined!

due to set_cpus_allowed().

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] ppc64: Fix wrong register mapping in mpic driver
Benjamin Herrenschmidt [Wed, 26 Oct 2005 08:59:00 +0000 (01:59 -0700)]
[PATCH] ppc64: Fix wrong register mapping in mpic driver

The mpic interrupt controller driver (used on G5 and early pSeries among
others) has a bug where it doesn't get the right virtual address for the
timer registers.  It causes the driver to poke at the MMIO space of
whatever has been mapped just next to it (ouch !) when initializing and
causes boot failures on some IBM machines.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] NUMA: broken per cpu pageset counters
Magnus Damm [Wed, 26 Oct 2005 08:58:59 +0000 (01:58 -0700)]
[PATCH] NUMA: broken per cpu pageset counters

The NUMA counters in struct per_cpu_pageset (linux/mmzone.h) are never
cleared today.  This works ok for CPU 0 on NUMA machines because
boot_pageset[] is already zero, but for other CPU:s this results in
uninitialized counters.

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: make sure mdthreads will always respond to kthread_stop
NeilBrown [Wed, 26 Oct 2005 08:58:58 +0000 (01:58 -0700)]
[PATCH] md: make sure mdthreads will always respond to kthread_stop

There are still a couple of cases where md threads (the resync/recovery
thread) is not interruptible since the change to use kthreads.  All places
there it tests "signal_pending", it should also test kthread_should_stop,
as with this patch.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[ARM] 3032/1: sparse: complains about generic_fls() prototype in asm-arm/bitops.h
Ian Campbell [Wed, 26 Oct 2005 14:04:21 +0000 (15:04 +0100)]
[ARM] 3032/1: sparse: complains about generic_fls() prototype in asm-arm/bitops.h

Patch from Ian Campbell

Sparse complains about the definition of generic_fls in asm-arm/bitops.h:
  CHECK   /home/icampbell/devel/kernel/2.6/arch/arm/mach-pxa/viper.c
include2/asm/bitops.h:350:34: error: marked inline, but without a definition

The definition is unnecessary since linux/bitops.h defines generic_fls before including asm/bitops.h and asm/bitops.h should not be included directly. There are still some places where asm/bitops.h is directly included, but I think that code should be fixed. I was a little wary of the patch for this reason but lubbock, mainstone and assabet all build OK and so do my in house boards...

ARM is the only arch with the generic_fls prototype in this way.

Signed-off-by: Ian Campbell <icampbell@arcom.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years agoPCI: be more verbose about resource quirks
Linus Torvalds [Wed, 26 Oct 2005 03:40:09 +0000 (20:40 -0700)]
PCI: be more verbose about resource quirks

When reserving an PCI quirk, note that in the kernel bootup messages.

Also, parse the strange PIIX4 device resources - they should get their
own PCI resource quirks, but for now just print out what it finds to
verify that the code does the right thing.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[LLC]: Strip RIF flag from source MAC address
Jochen Friedrich [Sun, 23 Oct 2005 08:33:52 +0000 (10:33 +0200)]
[LLC]: Strip RIF flag from source MAC address

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[TR]: Preserve RIF flag even for 2 byte RIF fields.
Jochen Friedrich [Sun, 23 Oct 2005 08:31:45 +0000 (10:31 +0200)]
[TR]: Preserve RIF flag even for 2 byte RIF fields.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[IPV6]: Fix refcnt of struct ip6_flowlabel
Yan Zheng [Mon, 24 Oct 2005 11:55:23 +0000 (19:55 +0800)]
[IPV6]: Fix refcnt of struct ip6_flowlabel

Signed-off-by: Yan Zheng <yanzheng@21cn.com>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[PATCH] qlogic lockup fix
Andrew Morton [Tue, 25 Oct 2005 18:00:56 +0000 (11:00 -0700)]
[PATCH] qlogic lockup fix

If qla2x00_probe_one()'s call to qla2x00_iospace_config() fails, we call
qla2x00_free_device() to clean up.  But because ha->dpc_pid hasn't been set
yet, qla2x00_free_device() tries to stop a kernel thread which hasn't started
yet.  It does wait_for_completion() against an uninitialised completion struct
and the kernel hangs up.

Fix it by initialising ha->dpc_pid a bit earlier.

Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] alpha: atomic dependency fix
Andrew Morton [Tue, 25 Oct 2005 06:05:58 +0000 (23:05 -0700)]
[PATCH] alpha: atomic dependency fix

My alpha build is exploding because asm/atomic.h now needs smb_mb(), which is
over in the (not included) system.h.

I fear what will happen if I include system.h into atomic.h, so let's put the
barriers into their own header file.

Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[ARM] fix sharp zaurus c-3000 compile failure without CONFIG_FB_PXA
Pavel Machek [Mon, 24 Oct 2005 21:30:10 +0000 (22:30 +0100)]
[ARM] fix sharp zaurus c-3000 compile failure without CONFIG_FB_PXA

This fixes compile problem when CONFIG_FB_PXA is not set.

  LD      .tmp_vmlinux1
arch/arm/mach-pxa/built-in.o(.text+0x1d74): In function
`spitz_get_hsync_len':
: undefined reference to `pxafb_get_hsync_time'
make: *** [.tmp_vmlinux1] Error 1
3.46user 0.46system 5.10 (0m5.106s) elapsed 77.01%CPU

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[SERIAL] new hp diva console port
Justin Chen [Mon, 24 Oct 2005 21:16:38 +0000 (22:16 +0100)]
[SERIAL] new hp diva console port

Add the new ID 0x132a and configure the new PCI Diva console port.  This
device supports only 1 single console UART.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[SERIAL] support the Exsys EX-4055 4S four-port card
Bjorn Helgaas [Mon, 24 Oct 2005 21:11:57 +0000 (22:11 +0100)]
[SERIAL] support the Exsys EX-4055 4S four-port card

Tested by Wolfgang Denk with this device:

    00:0f.0 Network controller: PLX Technology, Inc. PCI <-> IOBus Bridge (rev 01)
        Subsystem: Exsys EX-4055 4S(16C550) RS-232
        Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Interrupt: pin A routed to IRQ 10
        Region 0: Memory at 80100000 (32-bit, non-prefetchable) [size=128]
        Region 1: I/O ports at 7080 [size=128]
        Region 2: I/O ports at 7400 [size=32]

    00:0f.0 Class 0280: 10b5:9050 (rev 01)
        Subsystem: d84d:4055

Results with this patch:

    Serial: 8250/16550 driver $Revision: 1.90 $ 32 ports, IRQ sharing enabled
    ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
    PCI: Found IRQ 10 for device 0000:00:0f.0
    ttyS4 at I/O 0x7400 (irq = 10) is a 16550A
    ttyS5 at I/O 0x7408 (irq = 10) is a 16550A
    ttyS6 at I/O 0x7410 (irq = 10) is a 16550A
    ttyS7 at I/O 0x7418 (irq = 10) is a 16550A

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[PATCH] Return the line length via sysfs for fbdev
James Simmons [Mon, 24 Oct 2005 20:46:21 +0000 (21:46 +0100)]
[PATCH] Return the line length via sysfs for fbdev

This small patch returns the stride/line length of the framebuffer via
sysfs.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] ALSA: Fix Oops of suspend/resume with generic drivers
Takashi Iwai [Mon, 24 Oct 2005 16:16:50 +0000 (18:16 +0200)]
[PATCH] ALSA: Fix Oops of suspend/resume with generic drivers

The patch fixes Oops from sound drivers using generic platform device
but have no suspend/resume callbacks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix compile failure for TT mode
Miklos Szeredi [Mon, 24 Oct 2005 15:49:34 +0000 (17:49 +0200)]
[PATCH] uml: fix compile failure for TT mode

Without this patch, uml compile fails with:

  LD      .tmp_vmlinux1
arch/um/kernel/built-in.o: In function `config_gdb_cb':
arch/um/kernel/tt/gdb.c:129: undefined reference to `TASK_EXTERN_PID'

Tested on i386, but fix needed on x86_64 too AFAICS.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] posix-timers: fix posix_cpu_timer_set() vs run_posix_cpu_timers() race
Oleg Nesterov [Mon, 24 Oct 2005 14:29:58 +0000 (18:29 +0400)]
[PATCH] posix-timers: fix posix_cpu_timer_set() vs run_posix_cpu_timers() race

This might be harmless, but looks like a race from code inspection (I
was unable to trigger it).  I must admit, I don't understand why we
can't return TIMER_RETRY after 'spin_unlock(&p->sighand->siglock)'
without doing bump_cpu_timer(), but this is what original code does.

posix_cpu_timer_set:

read_lock(&tasklist_lock);

spin_lock(&p->sighand->siglock);
list_del_init(&timer->it.cpu.entry);
spin_unlock(&p->sighand->siglock);

We are probaly deleting the timer from run_posix_cpu_timers's 'firing'
local list_head while run_posix_cpu_timers() does list_for_each_safe.

Various bad things can happen, for example we can just delete this timer
so that list_for_each() will not notice it and run_posix_cpu_timers()
will not reset '->firing' flag. In that case,

....

if (timer->it.cpu.firing) {
read_unlock(&tasklist_lock);
timer->it.cpu.firing = -1;
return TIMER_RETRY;
}

sys_timer_settime() goes to 'retry:', calls posix_cpu_timer_set() again,
it returns TIMER_RETRY ...

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] posix-timers: exit path cleanup
Oleg Nesterov [Mon, 24 Oct 2005 10:36:28 +0000 (14:36 +0400)]
[PATCH] posix-timers: exit path cleanup

No need to rebalance when task exited

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] posix-timers: remove false BUG_ON() from run_posix_cpu_timers()
Oleg Nesterov [Mon, 24 Oct 2005 10:34:03 +0000 (14:34 +0400)]
[PATCH] posix-timers: remove false BUG_ON() from run_posix_cpu_timers()

do_exit() clears ->it_##clock##_expires, but nothing prevents
another cpu to attach the timer to exiting process after that.

After exit_notify() does 'write_unlock_irq(&tasklist_lock)' and
before do_exit() calls 'schedule() local timer interrupt can find
tsk->exit_state != 0. If that state was EXIT_DEAD (or another cpu
does sys_wait4) interrupted task has ->signal == NULL.

At this moment exiting task has no pending cpu timers, they were cleaned
up in __exit_signal()->posix_cpu_timers_exit{,_group}(), so we can just
return from irq.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] posix-timers: fix cleanup_timers() and run_posix_cpu_timers() races
Oleg Nesterov [Sun, 23 Oct 2005 16:25:39 +0000 (20:25 +0400)]
[PATCH] posix-timers: fix cleanup_timers() and run_posix_cpu_timers() races

1. cleanup_timers() sets timer->task = NULL under tasklist + ->sighand locks.
   That means that this code in posix_cpu_timer_del() and posix_cpu_timer_set()

    lock_timer(timer);
if (timer->task == NULL)
return;
read_lock(tasklist);
put_task_struct(timer->task)

   is racy. With this patch timer->task modified and accounted only under
   timer->it_lock. Sadly, this means that dead task_struct won't be freed
   until timer deleted or armed.

2. run_posix_cpu_timers() collects expired timers into local list under
   tasklist + ->sighand again. That means that posix_cpu_timer_del()
   should check timer->it.cpu.firing under these locks too.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6
Linus Torvalds [Mon, 24 Oct 2005 00:13:14 +0000 (17:13 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6

18 years ago[PATCH] ib: mthca: Always re-arm EQs in mthca_tavor_interrupt()
Roland Dreier [Sun, 23 Oct 2005 19:57:19 +0000 (12:57 -0700)]
[PATCH] ib: mthca: Always re-arm EQs in mthca_tavor_interrupt()

We should always re-arm an event queue's interrupt in
mthca_tavor_interrupt() if the corresponding bit is set in the event cause
register (ECR), even if we didn't find any entries in the EQ.  If we don't,
then there's a window where we miss an EQ entry and then get stuck because
we don't get another EQ event.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] inotify/idr leak fix
Andrew Morton [Sun, 23 Oct 2005 19:57:18 +0000 (12:57 -0700)]
[PATCH] inotify/idr leak fix

Fix a bug which was reported and diagnosed by
Stefan Jones <stefan.jones@churchillrandoms.co.uk>

IDR trees include a cache of idr_layer objects.  There's no way to destroy
this cache, so when we discard an overall idr tree we end up leaking some
memory.

Add and use idr_destroy() for this.  v9fs and infiniband also need to use
idr_destroy() to avoid leaks.

Or, we make the cache global, like radix_tree_preload().  Which is probably
better.  Later.

Cc: Eric Van Hensbergen <ericvh@ericvh.myip.org>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Robert Love <rml@novell.com>
Cc: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Kconfig: saa7134-dvb should not select cx22702
Mike Krufky [Sun, 23 Oct 2005 19:57:17 +0000 (12:57 -0700)]
[PATCH] Kconfig: saa7134-dvb should not select cx22702

On 2005-05-01, Gerd Knorr sent in a patch to add cx22702 to cx88-dvb:

 [PATCH] dvb: cx22702 frontend driver update
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9990d744bea7d28e83c420e2c9d524c7a8a2d136

...but as we can see, the Kconfig portion of his patch was incorrectly
applied to saa7134-dvb instead of cx88-dvb.

On 2005-06-24, Adrian bunk fixed cx88-dvb:

 [PATCH] VIDEO_CX88_DVB must select DVB_CX22702
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d6988588e13616587aa879c2e0bd7cd811705e5d

...but we never removed the original patch from Gerd.

This patch sets things straight:

saa7134-dvb should not select cx22702

Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] SELinux: handle sel_make_bools() failure in selinuxfs
Davi Arnaut [Sun, 23 Oct 2005 19:57:16 +0000 (12:57 -0700)]
[PATCH] SELinux: handle sel_make_bools() failure in selinuxfs

This patch fixes error handling in sel_make_bools(), where currently we'd
get a memory leak via security_get_bools() and try to kfree() the wrong
pointer if called again.

Signed-off-by: James Morris <jmorris@namei.org>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] selinux: Fix NULL deref in policydb_destroy
Stephen Smalley [Sun, 23 Oct 2005 19:57:15 +0000 (12:57 -0700)]
[PATCH] selinux: Fix NULL deref in policydb_destroy

This patch fixes a possible NULL dereference in policydb_destroy, where
p->type_attr_map can be NULL if policydb_destroy is called to clean up a
partially loaded policy upon an error during policy load.  Please apply.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] aio syscalls are not checked by lsm
Kostik Belousov [Sun, 23 Oct 2005 19:57:13 +0000 (12:57 -0700)]
[PATCH] aio syscalls are not checked by lsm

Another case of missing call to security_file_permission: aio functions
(namely, io_submit) does not check credentials with security modules.

Below is the simple patch to the problem.  It seems that it is enough to
check for rights at the request submission time.

Signed-off-by: Kostik Belousov <kostikbel@gmail.com>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] kernel-parameters cleanup
Randy Dunlap [Sun, 23 Oct 2005 19:57:11 +0000 (12:57 -0700)]
[PATCH] kernel-parameters cleanup

Fix typos & trailing whitespace.
Add blank lines in a few places.
Remove "AM53C974=" option:  driver does not exist.
Restrict to < 80 columns in most places (but don't split formatted
  command-line arguments).
Add a few option arguments for completeness.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agocardbus: limit IO windows to 256 bytes
Linus Torvalds [Sun, 23 Oct 2005 23:31:16 +0000 (16:31 -0700)]
cardbus: limit IO windows to 256 bytes

That's what we've always historically done, and bigger windows seem to
confuse some cardbus bridges. Or something.

Alan reports that this makes the ThinkPad 600x series work properly
again: the 4kB IO window for some reason made IDE DMA not work, which
makes IDE painfully slow even if it works after DMA timeouts.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6
Linus Torvalds [Sun, 23 Oct 2005 17:10:37 +0000 (10:10 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6

18 years agoPosix timers: limit number of timers firing at once
Linus Torvalds [Sun, 23 Oct 2005 17:02:50 +0000 (10:02 -0700)]
Posix timers: limit number of timers firing at once

Bursty timers aren't good for anybody, very much including latency for
other programs when we trigger lots of timers in interrupt context.  So
set a random limit, after which we'll handle the rest on the next timer
tick.

Noted by Oleg Nesterov <oleg@tv-sign.ru>

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[NEIGH] Fix timer leak in neigh_changeaddr
Herbert Xu [Sun, 23 Oct 2005 07:18:00 +0000 (17:18 +1000)]
[NEIGH] Fix timer leak in neigh_changeaddr

neigh_changeaddr attempts to delete neighbour timers without setting
nud_state.  This doesn't work because the timer may have already fired
when we acquire the write lock in neigh_changeaddr.  The result is that
the timer may keep firing for quite a while until the entry reaches
NEIGH_FAILED.

It should be setting the nud_state straight away so that if the timer
has already fired it can simply exit once we relinquish the lock.

In fact, this whole function is simply duplicating the logic in
neigh_ifdown which in turn is already doing the right thing when
it comes to deleting timers and setting nud_state.

So all we have to do is take that code out and put it into a common
function and make both neigh_changeaddr and neigh_ifdown call it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
18 years ago[NEIGH] Fix add_timer race in neigh_add_timer
Herbert Xu [Sun, 23 Oct 2005 06:37:48 +0000 (16:37 +1000)]
[NEIGH] Fix add_timer race in neigh_add_timer

neigh_add_timer cannot use add_timer unconditionally.  The reason is that
by the time it has obtained the write lock someone else (e.g., neigh_update)
could have already added a new timer.

So it should only use mod_timer and deal with its return value accordingly.

This bug would have led to rare neighbour cache entry leaks.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
18 years ago[NEIGH] Print stack trace in neigh_add_timer
Herbert Xu [Sun, 23 Oct 2005 06:11:39 +0000 (16:11 +1000)]
[NEIGH] Print stack trace in neigh_add_timer

Stack traces are very helpful in determining the exact nature of a bug.
So let's print a stack trace when the timer is added twice.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
18 years ago[PATCH] alpha: additional smp barriers
Ivan Kokshaysky [Fri, 21 Oct 2005 18:06:15 +0000 (22:06 +0400)]
[PATCH] alpha: additional smp barriers

As stated in Documentation/atomic_ops.txt, atomic functions
returning values must have the memory barriers both before and after
the operation.

Thanks to DaveM for pointing that out.

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[AX.25]: Fix signed char bug
Ralf Baechle [Fri, 14 Oct 2005 20:29:56 +0000 (21:29 +0100)]
[AX.25]: Fix signed char bug

On architectures where the char type defaults to unsigned some of the
arithmetic in the AX.25 stack to fail, resulting in some packets being dropped
on receive.

Credits for tracking this down and the original patch to
Bob Brose N0QBJ <linuxhams@n0qbj-11.ampr.org>.

Signed-off-by: Ralf Baechle DL5RB <ralf@linux-mips.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[SK_BUFF]: ipvs_property field must be copied
Julian Anastasov [Sat, 22 Oct 2005 10:39:21 +0000 (13:39 +0300)]
[SK_BUFF]: ipvs_property field must be copied

IPVS used flag NFC_IPVS_PROPERTY in nfcache but as now nfcache was removed the
new flag 'ipvs_property' still needs to be copied. This patch should be
included in 2.6.14.

Further comments from Harald Welte:

Sorry, seems like the bug was introduced by me.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[PARISC] Update MAINTAINERS and CREDITS
Kyle McMartin [Sat, 22 Oct 2005 03:11:27 +0000 (23:11 -0400)]
[PARISC] Update MAINTAINERS and CREDITS

Add Kyle McMartin and Thibaut Varene as maintainers for ALSA ad1889
driver.

Add myself to CREDITS.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] defconfig updates
Kyle McMartin [Sat, 22 Oct 2005 03:11:03 +0000 (23:11 -0400)]
[PARISC] defconfig updates

defconfig updates from Kyle McMartin, Grant Grundler,
and Matthew Wilcox.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Update parisc specific input code from parisc tree
Matthew Wilcox [Sat, 22 Oct 2005 02:58:51 +0000 (22:58 -0400)]
[PARISC] Update parisc specific input code from parisc tree

Update drivers to new input layer changes.

Signed-off-by: Helge Deller <deller@parisc-linux.org>
Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Reorder code in gscps2_interrupt() and only enable ports when opened.
This fixes issues with hangs booting an SMP kernel on my C360.
Previously serio_interrupt() could be called before the lock in
struct serio was initialised.

Signed-off-by: Richard Hirst <rhirst@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Fix mux.c driver
Matthew Wilcox [Sat, 22 Oct 2005 02:58:03 +0000 (22:58 -0400)]
[PARISC] Fix mux.c driver

Missing spin_lock_init() made the Mux driver hang on SMP systems.

Fix up users of ->hpa to use ->hpa.start instead

Remove warning in 8250_gsc.c by eliminating serial_line_nr

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Update scsi drivers from parisc tree
Matthew Wilcox [Sat, 22 Oct 2005 02:57:43 +0000 (22:57 -0400)]
[PARISC] Update scsi drivers from parisc tree

Fix lasi700 for James's ioread*be() changes

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Avoid use of floating point in the kernel
Randolph Chung [Sat, 22 Oct 2005 02:57:13 +0000 (22:57 -0400)]
[PARISC] Avoid use of floating point in the kernel

don't use *printf %f in the kernel, mm'kay?

Signed-off-by: Randolph Chung <tausq@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Properly specify section alignment for real2.S
Grant Grundler [Sat, 22 Oct 2005 02:56:53 +0000 (22:56 -0400)]
[PARISC] Properly specify section alignment for real2.S

.align applies to the current section - ie section directives come first.
Thanks to Joel Soete for catching this.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Specify level to fix binutils level promotion bug
Grant Grundler [Sat, 22 Oct 2005 02:56:35 +0000 (22:56 -0400)]
[PARISC] Specify level to fix binutils level promotion bug

fixup.S needs to specify .level and use correct LDREG macro.
New binutils has a bug where it doesn't "promote" from PA1.0 to PA1.1
correctly when using ",s" completer.

remove use of __LP64__ in assembly.h and add some white space.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Explicitly specify sr4 when flushing kernel space
Matthew Wilcox [Sat, 22 Oct 2005 02:56:14 +0000 (22:56 -0400)]
[PARISC] Explicitly specify sr4 when flushing kernel space

Specify sr4 when flushing kernel space (we could equally well use sr5-7,
but must not use sr0).

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Properly specify index field to I/D cache flush ops
Grant Grundler [Sat, 22 Oct 2005 02:55:51 +0000 (22:55 -0400)]
[PARISC] Properly specify index field to I/D cache flush ops

replace use of "0" with "%r0" since PA 1.1 I/D flush ops only take a
general register and not an immediate value for the index field.
This just forces the code to always be PA 1.1 "clean".

From: Joel Soete <soete.joel@tiscali.be>
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Fix copy_user_page_asm to NOT access past end of page
Grant Grundler [Sat, 22 Oct 2005 02:55:34 +0000 (22:55 -0400)]
[PARISC] Fix copy_user_page_asm to NOT access past end of page

2.6.12-rc2-pa3 fix copy_user_page_asm to NOT access past end of page.

My bad. /o\
Lamont confirmed that instructions following a conditional
branch are *alway* executed regardless if the branch is taken or not.
Unless they are nullified (which was missing in this case).

He also noted:
Conditional branches nullify on forward taken branch, and on
non-taken backward branch. Note that .+4 is a backwards branch.

This makes alot more sense than the giberish in the PA20 arch book.

Compiles and boots on both 64-bit (a500) and 32-bit (j6k).

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Add NETPOLL support to lasi_82596
Sven Schnelle [Sat, 22 Oct 2005 02:55:15 +0000 (22:55 -0400)]
[PARISC] Add NETPOLL support to lasi_82596

add netpoll support
Patch by Sven Schnelle <svens@gmx.de>

Signed-off-by: Sven Schnelle <svens@gmx.de>
Signed-off-by: Helge Deller <deller@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Remove the spurious do_softirq calls from entry.S
James Bottomley [Sat, 22 Oct 2005 02:54:38 +0000 (22:54 -0400)]
[PARISC] Remove the spurious do_softirq calls from entry.S

remove the spurious do_softirq calls from entry.S

With these in we were calling do_softirq twice; plus the calls in
entry.S took no account of nesting.

Signed-off-by: James Bottomley <jejb@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Define pgprot_noncached macro in pgtable.h
Grant Grundler [Sat, 22 Oct 2005 02:54:20 +0000 (22:54 -0400)]
[PARISC] Define pgprot_noncached macro in pgtable.h

drivers/infiniband depends on definition of pgprot_noncached() macro.
Someone else will have to fix it's wrong.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Add other CRT_ID for newer cards to grfioctl.h
Kyle McMartin [Sat, 22 Oct 2005 02:54:00 +0000 (22:54 -0400)]
[PARISC] Add other CRT_ID for newer cards to grfioctl.h

Add IDs for some other STI graphics cards found on HP PA-RISC
machines.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Add ECANCELED to errno.h
Grant Grundler [Sat, 22 Oct 2005 02:53:43 +0000 (22:53 -0400)]
[PARISC] Add ECANCELED to errno.h

add ECANCELED - SuSv3 wants one L.  IB/SDP actually returns this error.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Fix the alloc_slabmgmt panic
James Bottomley [Sat, 22 Oct 2005 02:53:26 +0000 (22:53 -0400)]
[PARISC] Fix the alloc_slabmgmt panic

Fix the alloc_slabmgmt panic

Hopefully this should also fix a lot of other intermittent kernel bugs.

The problem has been around since 2.6.9-rc2-pa6 when we allowed
floating point registers to be used in kernel code.  The essence of
the problem is that gcc prefers to use floating point for integer
divides and multiples.  Further, it can rely on the values in the no
clobber fp regs being correct across a function call.  Unfortunately,
our task switch function only saves the integer no clobber registers,
not the fp ones, so if gcc makes a function call to any function in
the kernel which could sleep, the values it is relying on in any no
clobber floating point register may be lost.  In the case of
alloc_slabmgmt, the value of the page offset is being stored in %fr12
across a call to kmem_getpages(), which sleeps if no pages are
available.  Thus, the offset can be trashed and the slab code can end
up with a completely bogus address leading to corruption.

Kudos to Randolph who came up with the program to trip this problem at
will and thus allowed it to be tracked and fixed.

Signed-off-by: James Bottomley <jejb@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Implement 5 argument clone.
Carlos O'Donell [Sat, 22 Oct 2005 02:53:04 +0000 (22:53 -0400)]
[PARISC] Implement 5 argument clone.

* arch/parisc/kernel/process.c (sys_clone): Use 5 args, and process
  CLONE_PARENT_SETTID, CLONE_CHILD_SETTID, CLONE_CHILD_CLEARTID.
  (copy_thread): First cut at CLONE_SETTLS.

Signed-off-by: Carlos O'Donell <carlos@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Update Kconfig for itimer selection
Grant Grundler [Sat, 22 Oct 2005 02:52:46 +0000 (22:52 -0400)]
[PARISC] Update Kconfig for itimer selection

2.6.14-rc2-pa1: enable 100/250/1000HZ itimer selection

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Mark floppy as broken.  Thanks Joel

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
make DISCONTIGMEM depend on 64BIT

Signed-off-by: Thibaut VARENE <varenet@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Update minimum compiler version and CROSS_COMPILE for parisc64
Randolph Chung [Sat, 22 Oct 2005 02:52:00 +0000 (22:52 -0400)]
[PARISC] Update minimum compiler version and CROSS_COMPILE for parisc64

Prefix changed in debian, include "gnu" in the commandline.

Signed-off-by: Carlos O'Donell <carlos@parisc-linux.org>
Ensure the compiler version is new enough (>= 3.3)

Signed-off-by: Randolph Chung <tausq@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Document history of PDC_NARROW as it is now obsolete
Grant Grundler [Sat, 22 Oct 2005 02:51:40 +0000 (22:51 -0400)]
[PARISC] Document history of PDC_NARROW as it is now obsolete

Document history of PDC_NARROW a bit as it will still show
up in an older kernel's .config file.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] kfree cleanups to ioctl32.c
Jesper Juhl [Sat, 22 Oct 2005 02:51:23 +0000 (22:51 -0400)]
[PARISC] kfree cleanups to ioctl32.c

2.6.12-rc2-pa2 kfree cleanups from Jesper Juhl

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Cleanup whitespace and handle proc_mkdir() failures in pci-dma.c
Grant Grundler [Sat, 22 Oct 2005 02:50:48 +0000 (22:50 -0400)]
[PARISC] Cleanup whitespace and handle proc_mkdir() failures in pci-dma.c

1) cleanup whitespace and handle proc_mkdir() failures.
   From: Christophe Lucas <clucas@rotomalug.org>

2) rename "dino" entry to "pcxl_dma"...also seems like it's in
   the wrong location.

3) don't dump resource bitmap in /proc/pcxl_dma output

4) fixup compiler warning

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] More informative error message in pcibios_link_hba_resources
Grant Grundler [Sat, 22 Oct 2005 02:50:33 +0000 (22:50 -0400)]
[PARISC] More informative error message in pcibios_link_hba_resources

Generate a more informative message when a resource does not have
a parent.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Update pdc console from parisc tree
Matthew Wilcox [Sat, 22 Oct 2005 02:50:06 +0000 (22:50 -0400)]
[PARISC] Update pdc console from parisc tree

Get rid of some unnecessary includes
Remove a layer of macro indirection around pdc_console_device
Delete pdc_console_die() as it is unused
Avoid double-printing on panic by clearing CON_PRINTBUFFER rather than
setting con_start to be log_end
Make con_start and log_end static again

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Prevent signal loops if we have a problem setting up a frame
Randolph Chung [Sat, 22 Oct 2005 02:49:47 +0000 (22:49 -0400)]
[PARISC] Prevent signal loops if we have a problem setting up a frame

2.6.13-rc6-pa2
use force_sigsegv() if we have a problem setting up a frame. This is
required to prevent SIGSEGV loops.

Signed-off-by: Randolph Chung <tausq@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Add printing of fpregs state to stack dump
Thibaut Varene [Sat, 22 Oct 2005 02:49:25 +0000 (22:49 -0400)]
[PARISC] Add printing of fpregs state to stack dump

We're using fp regs now in the kernel, so we want to print them
on stack dump

Signed-off-by: Thibaut VARENE <varenet@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Fix compile warning in pci.h
Matthew Wilcox [Sat, 22 Oct 2005 02:49:05 +0000 (22:49 -0400)]
[PARISC] Fix compile warning in pci.h

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Disable use of fpregs in pa_memcpy
Randolph Chung [Sat, 22 Oct 2005 02:48:34 +0000 (22:48 -0400)]
[PARISC] Disable use of fpregs in pa_memcpy

Disable use of fpregs in pa_memcpy, and turn on the
-mdisable-fpregs flag.

Signed-off-by: Randolph Chung <tausq@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Initialize serial spinlocks in superio.c
Kyle McMartin [Sat, 22 Oct 2005 02:48:03 +0000 (22:48 -0400)]
[PARISC] Initialize serial spinlocks in superio.c

git commit 976ecd12b8144d066a23fe97c6fbfc1ac8470af7 changed our locking
characteristics, and put the onus of spin_lock_init on superio.c.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Add sync required after fdc to enforce insn ordering
Grant Grundler [Sat, 22 Oct 2005 02:47:40 +0000 (22:47 -0400)]
[PARISC] Add sync required after fdc to enforce insn ordering

PA20 arch book (page 7-52 and 7-55) indicate a "sync" is required after
the FDC "to enforce instruction ordering". And we want to make
sure FIC is executed after FDC has retired.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Minor iosapic.c cleanup
Grant Grundler [Sat, 22 Oct 2005 02:47:04 +0000 (22:47 -0400)]
[PARISC] Minor iosapic.c cleanup

minor cleanup: qualify constant with "UL"

Acked-by: "Hmamouche, Youssef" <youssef@ece.utexas.edu>
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Replace uses of __LP64__ with CONFIG_64BIT
Grant Grundler [Sat, 22 Oct 2005 02:46:48 +0000 (22:46 -0400)]
[PARISC] Replace uses of __LP64__ with CONFIG_64BIT

2.6.12-rc4-pa3 s/__LP64__/CONFIG_64BIT/ and fixup config.h usage

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Use work queue in LED/LCD driver instead of tasklet.
Grant Grundler [Sat, 22 Oct 2005 02:46:18 +0000 (22:46 -0400)]
[PARISC] Use work queue in LED/LCD driver instead of tasklet.

2.6.12-rc1-pa6 use work queue in LED/LCD driver instead of tasklet.

Main advantage is it allows use of msleep() in the led_LCD_driver to
"atomically" perform two MMIO writes (CMD, then DATA).
Lead to nice cleanup of the main led_work_func() and led_LCD_driver().
Kudos to David for being persistent.

From: David Pye <dmp@davidmpye.dyndns.org>
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Add new ioprio_{set,get} syscalls
Jens Axboe [Sat, 22 Oct 2005 02:45:57 +0000 (22:45 -0400)]
[PARISC] Add new ioprio_{set,get} syscalls

add syscall entries for ioprio_set/get as per Jens Axboe.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Update bitops from parisc tree
Grant Grundler [Sat, 22 Oct 2005 02:45:22 +0000 (22:45 -0400)]
[PARISC] Update bitops from parisc tree

Optimize ext2_find_next_zero_bit. Gives about 25% perf improvement with a
rsync test with ext3.

Signed-off-by: Randolph Chung <tausq@parisc-linux.org>
fix ext3 performance - ext2_find_next_zero() was culprit.
Kudos to jejb for pointing out the the possibility that ext2_test_bit
and ext2_find_next_zero() may in fact not be enumerating bits in
the bitmap because of endianess. Took sparc64 implementation and
adapted it to our tree. I suspect the real problem is ffz() wants
an unsigned long and was getting garbage in the top half of the
unsigned int. Not confirmed but that's what I suspect.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Fix find_next_bit for 32-bit
Make masking consistent for bitops

From: Joel Soete <soete.joel@tiscali.be>
Signed-off-by: Randolph Chung <tausq@parisc-linux.org>
Add back incorrectly removed ext2_find_first_zero_bit definition

Signed-off-by: James Bottomley <jejb@parisc-linux.org>
Fixup bitops.h to use volatile for *_bit() ops

Based on this email thread:
       http://marc.theaimsgroup.com/?t=108826637900003

In a nutshell:
        *_bit() want use of volatile.
        __*_bit() are "relaxed" and don't use spinlock or volatile.

other minor changes:
o replaces hweight64() macro with alias to generic_hweight64() (Joel Soete)
o cleanup ext2* macros so (a) it's obvious what the XOR magic is about
  and (b) one version that works for both 32/64-bit.
o replace 2 uses of CONFIG_64BIT with __LP64__. bitops.h used both.
  I think header files that might go to user space should use
  something userspace will know about (__LP64__).

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Move SHIFT_PER_LONG to standard location for BITS_PER_LONG (asm/types.h)
and ditch the second definition of BITS_PER_LONG in bitops.h

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Fix parisc_setup_cache_timing to choose a better flush threshold
Stuart Brady [Sat, 22 Oct 2005 02:44:14 +0000 (22:44 -0400)]
[PARISC] Fix parisc_setup_cache_timing to choose a better flush threshold

update comment about CAFL_STRIDE

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Fixed a bug in parisc_setup_cache_timing() which caused it to calculate
a poor value for parisc_cache_flush_threshold.

Thanks to Joel Soete for spotting the bug.
Thanks to James Bottomley for pointing out the clean way to fix this.

Signed-off-by: Stuart Brady <sdb@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Add ability for prctl to change unaligned trap behaviour
Kyle McMartin [Sat, 22 Oct 2005 02:43:15 +0000 (22:43 -0400)]
[PARISC] Add ability for prctl to change unaligned trap behaviour

Add support for changing unaligned trap behaviour on a
per-thread basis.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Replace some calls to bl with b,l or bv to use longer offsets
Randolph Chung [Sat, 22 Oct 2005 02:42:57 +0000 (22:42 -0400)]
[PARISC] Replace some calls to bl with b,l or bv to use longer offsets

convert some bl calls to b,l or bv to use longer offsets

Signed-off-by: Randolph Chung <tausq@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Update harmony from parisc tree
Stuart Brady [Sat, 22 Oct 2005 02:42:38 +0000 (22:42 -0400)]
[PARISC] Update harmony from parisc tree

o Added a control for the input source (which can be either
  "line" or "mic")

o Mute the speaker/line-out/headphone outputs by default.

o Increased the buffer size from 10 pages to 16.

Signed-off-by: Stuart Brady <sdb@parisc-linux.org>
ALSA Harmony was resetting the capture position when
preparing the capture substream, which it shouldn't do.
This should fix the problem.

Signed-off-by: Stuart Brady <sdb@parisc-linux.org>
ALSA Harmony should no longer play junk (left in the buffers
from a previous stream) at the start of a new stream.

Implement the monitor mixer channel for ALSA Harmony.

Also prevent snd_harmony_volume_get from returning negative values.

Signed-off-by: Stuart Brady <sdb@parisc-linux.org>
Use the graveyard/silence buffers in ALSA Harmony.

Signed-off-by: Stuart Brady <sdb@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Take into account nullified insn and lock functions for profiling
Randolph Chung [Sat, 22 Oct 2005 02:42:18 +0000 (22:42 -0400)]
[PARISC] Take into account nullified insn and lock functions for profiling

export profile_pc() symbol - oprofile needs it when built as a module.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Take into account nullified insn and lock functions for profiling

This is needed at the end of functions; it is typical that the return
branch nullifies the next insn, which is in the next function. This
causes profiling data to show up against the "wrong" function.

We also count lock times against the locker. This is consistent with
other architectures.

Signed-off-by: Randolph Chung <tausq@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Reorganize sticore probe routine to be a little less convoluted
Matthew Wilcox [Sat, 22 Oct 2005 02:41:49 +0000 (22:41 -0400)]
[PARISC] Reorganize sticore probe routine to be a little less convoluted

Fix some whitespace issues
Reorganise parisc_device probe routine to be a little less convoluted
Use ->hpa.start instead of ->hpa

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Update spinlocks from parisc tree
Matthew Wilcox [Sat, 22 Oct 2005 02:41:25 +0000 (22:41 -0400)]
[PARISC] Update spinlocks from parisc tree

Neaten up the CONFIG_PA20 ifdefs

More merge fixes, this time for SMP

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Prettify the CONFIG_DEBUG_SPINLOCK __SPIN_LOCK_UNLOCKED initializers.

Clean up some warnings with CONFIG_DEBUG_SPINLOCK enabled.

Fix build with spinlock debugging turned on. Patch is cleaner like this,
too.

Remove mandatory 16-byte alignment requirement on PA2.0 processors by
using the ldcw,CO completer. Provides a nice insn savings.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Move pa_tlb_lock to tlb_flush.h
Grant Grundler [Sat, 22 Oct 2005 02:40:24 +0000 (22:40 -0400)]
[PARISC] Move pa_tlb_lock to tlb_flush.h

move pa_tlb_lock and it's primary consumers to tlb_flush.h
Future step will be to move spinlock_t definition out of system.h.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Make sure use of RFI conforms to PA 2.0 and 1.1 arch docs
Grant Grundler [Sat, 22 Oct 2005 02:40:07 +0000 (22:40 -0400)]
[PARISC] Make sure use of RFI conforms to PA 2.0 and 1.1 arch docs

2.6.12-rc4-pa3 : first pass at making sure use of RFI conforms to
PA 2.0 arch pages F-4 and F-5, PA 1.1 Arch page 3-19 and 3-20.

The discussion revolves around all the rules for clearing PSW Q-bit.
The hard part is meeting all the rules for "relied upon translation".

.align directive is used to guarantee the critical sequence ends more than
8 instructions (32 bytes) from the end of page.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Allow STI_CONSOLE access to some FONTS
Grant Grundler [Sat, 22 Oct 2005 02:39:43 +0000 (22:39 -0400)]
[PARISC] Allow STI_CONSOLE access to some FONTS

add || STI_CONSOLE to some of the basic FONTs. May need to get at
least one of them to default to "Y" for parisc.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Update dino from parisc tree
Matthew Wilcox [Sat, 22 Oct 2005 02:38:23 +0000 (22:38 -0400)]
[PARISC] Update dino from parisc tree

Fix card-mode Dino crashes on 725 (and probably other Snake) systems.
Dino was coming up in fatal mode after a warm reboot.  Resetting Dino
brings it out of fatal mode, so do that if the status register indicates
we're in fatal mode.  Since this was never observed on any later systems,
I presume firmware does this for us on those.

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Add debug statements in the cfg_read and cfg_write functions
Fix debug statements from the IRQ overhaul last winter
Rename dino_driver_callback() to dino_probe()

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Update ccio-dma from parisc tree
Grant Grundler [Sat, 22 Oct 2005 02:37:43 +0000 (22:37 -0400)]
[PARISC] Update ccio-dma from parisc tree

revert use of %%sr0 in fdc asm.

Thanks to Joel Soete for pointing out this oversight.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
2.6.14-rc2-pa3 fdc/lci should be %r0 instead 0 for index (PA 1.1 compliance)
From: Joel Soete <soete.joel@tiscali.be>
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Explain why we need insert_resource() instead of request_resource().

Fundementally, this is more convoluted for ccio driver because of
o legacy (HP-PB) transperant bridges.
o support for MMIO behind card-mode Dino (PCI)
o support for above bridges without ccio in the box

SBA driver doesn't have to worry about those issues.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Use insert_resource instead of request_resource now that the subdevices
will already have their resources claimed

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
re-enable use of "inline" for perf critical functions.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
2.6.12-rc4-pa5 fix sign extension of MMIO range

Fixes the problem of claiming a range that is disabled on 64-bit kernel:
ccio_init_resource() claimed CCIO bus address space (ffffffff00000000,
ffffffffffffffff)
also removes use of __FILE__.
Tested on both 32 and 64-bit systems by Joel.

From: Joel Soete <soete.joel@tiscali.be>
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
2.6.12-rc1-pa7 incorrect BUG_ON in ccio

ccio-dma.c line 1317 was preventing K-class with 4GB RAM from booting.
Any ccio machine with >=2GB of RAM would have (incorrectly) triggered this.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Convert to ioremap and __raw_read/write

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Update sba_iommu from parisc tree
Grant Grundler [Sat, 22 Oct 2005 02:37:20 +0000 (22:37 -0400)]
[PARISC] Update sba_iommu from parisc tree

revert use of %%sr0 in fdc asm.
Thanks to Joel Soete for pointing out this oversight.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
2.6.14-rc2-pa3 move "sync" outside the main loop that fills IO Pdir.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
remove explicit use of sr0 in fdc ops.
Thanks to Joel Soete for reminding me were I added those...

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
2.6.14-rc2-pa2 - make SBA more anal about invalidating pdir entries

Previous code cleared the valid flag a pdir entry but it did NOT
guarantee this change was visible to the PDIR before writing
the PCOM register. Ie the SBA could pick up a stale entry if
the write happened to hit the SBA before the cacheline was flushed
from the cache.

Long term, I think I want to make this a compile time flag.
Developement tree should enable anal pdir checking by default
and Debian can disable it with either a CONFIG option
or one-line patch. fdc/sync options can only negatively affect
performance though I haven't measure how much yet.
If someone can run netperf TCP_RR across gige and compare
-pa1 and -pa2, that would be sufficient.

Cleaned up the use of "fdc" to make sure it's using "kernel"
space id (specify sr0 but maps to sr4-7). It seems a bit fragile
to assume "sr1" gets loaded with KERNEL_SPACE which is how the
code works today.

Tested on 32 and 64-bit SMP kernels on j6k.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
remove PDC_NARROW from SBA and document history of PDC_NARROW a bit.
It will still show up in an older kernel's .config file.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
if/ifdef cleanups from Joel Soete.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
2.6.12-rc4-pa2  fix 32-bit support for Astro platforms
o Since my last SBA code change, SBA could allocate more than 1GB of IOVA
  space on Astro boxes with more than 1GB of RAM when running 32-bit kernel.
  This is bad since IOMMU can only talk to the first 1GB at most.
  Kudos to jejb for quickly spotting that bug.

o jejb also noted SBA should *always* reject DMA masks > 32-bits since
  DMA-mapping.txt indicates caller should try again with 32-bits.

o off-by-one error when comparing the mask to IOVA space size.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Convert parisc_device to use struct resource for hpa
Matthew Wilcox [Sat, 22 Oct 2005 02:36:40 +0000 (22:36 -0400)]
[PARISC] Convert parisc_device to use struct resource for hpa

Convert pa_dev->hpa from an unsigned long to a struct resource.

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Fix up users of ->hpa to use ->hpa.start instead.

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Change the driver names so /sys/bus/parisc/drivers/ looks better
Matthew Wilcox [Sat, 22 Oct 2005 02:36:23 +0000 (22:36 -0400)]
[PARISC] Change the driver names so /sys/bus/parisc/drivers/ looks better

Make /sys/bus/parisc/drivers look better by cleaning up parisc_driver
names.

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PARISC] Convert parisc_device tree to use struct device klists
Matthew Wilcox [Sat, 22 Oct 2005 02:33:38 +0000 (22:33 -0400)]
[PARISC] Convert parisc_device tree to use struct device klists

Fix parse_tree_node.  much more needs to be done to fix this file.

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Make drivers.c compile based on a patch from Pat Mochel.

From: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Fix drivers.c to create new device tree nodes when no match is found.

Signed-off-by: Richard Hirst <rhirst@parisc-linux.org>
Do a proper depth-first search returning parents before children, using the
new klist infrastructure.

Signed-off-by: Richard Hirst <rhirst@parisc-linux.org>
Fixed parisc_device traversal so that pdc_stable works again
Fixed check_dev so it doesn't dereference a parisc_device until it
has verified the bus type

Signed-off-by: Randolph Chung <tausq@parisc-linux.org>
Convert pa_dev->hpa from an unsigned long to a struct resource.
Use insert_resource() instead of request_mem_region().
Request resources at bus walk time instead of driver probe time.
Don't release the resources as we don't have any hotplug parisc_device
support yet.
Add parisc_pathname() to conveniently get the textual representation
of the hwpath used in sysfs.
Inline the remnants of claim_device() into its caller.

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
I noticed that some of the STI regions weren't showing up in iomem.
Reading the STI spec indicated that all STI devices occupy at least 32MB.
So check for STI HPAs and give them 32MB instead of 4kB.

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
18 years ago[PATCH] typo fix in last cpufreq powernow patch
Chris Wright [Fri, 21 Oct 2005 23:56:08 +0000 (16:56 -0700)]
[PATCH] typo fix in last cpufreq powernow patch

Not sure how it slipped by, but here's a trivial typo fix for powernow.

Signed-off-by: Chris Wright <chrisw@osdl.org>
[ It's "nurter" backwards.. Maybe we have a hillbilly The Shining fan? ]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>