]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years agox86: hpet: modify IXP400 quirk to enable interrupts
Andreas Herrmann [Fri, 5 Sep 2008 16:33:26 +0000 (18:33 +0200)]
x86: hpet: modify IXP400 quirk to enable interrupts

The current quirk is incomplete. Some more chipset fiddling has to be
done to enable HPET interrupts. This patch aims to do this. From my
tests it seems to work faultlessly.

But the official statement is that HPET is not supported on SB4X0.

Users will still have to use hpet=force to enable it.

Use it at your own risk.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: additional defconfig updates
H. Peter Anvin [Thu, 4 Sep 2008 00:24:03 +0000 (17:24 -0700)]
x86: additional defconfig updates

Additional updates to the x86 defconfigs.  The goals are, as before:

- Make them usable to testers, more so than distributors or end users,
  both of which are likely to have their own config already.
- Keep 32 and 64 bits as similar as is practical.

Changes:

- Use a more generic CPU type (ppro and generic, respectively).
- Bump number of CPUs to 64 (few if any NR_CPUS arrays left).
- Enable PAT.
- Enable OPTIMIZE_INLINE.
- Enable microcode update support.
- Build SMT scheduler support (in addition to MC).

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'linus' into x86/defconfig
Ingo Molnar [Fri, 5 Sep 2008 16:56:57 +0000 (18:56 +0200)]
Merge branch 'linus' into x86/defconfig

17 years agoThe clockdomain of clkout2_src_ck fixed
Tomi Valkeinen [Thu, 4 Sep 2008 08:54:29 +0000 (11:54 +0300)]
The clockdomain of clkout2_src_ck fixed

The clockdomain of clkout2_src_ck was set to "core_clkdm", which does not
exist.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoomap3 beagle: nand (mostly) cleanups
David Brownell [Tue, 2 Sep 2008 17:23:55 +0000 (10:23 -0700)]
omap3 beagle: nand (mostly) cleanups

Clean up the Beagle NAND config a bit:  use SZ_128K instead of
an arithmetic expression for the NAND block size.  Set the
NAND_BUSWIDTH_16 flag.  Make its init routine static.

(Unrelated:  make omap3_beagle_i2c_init be part of beagle_init.
It shouldn't be called on non-beagle hardware; and beagle_init
already runs with other arch_initcall code.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Richard Woodruff <r-woodruff2@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoomap3 beagle: input button
David Brownell [Fri, 29 Aug 2008 17:06:46 +0000 (10:06 -0700)]
omap3 beagle: input button

Export Beagle's "user" button through the input framework so it's
accessible using normal mechanisms.  This uses BTN_EXTRA for lack
of a more obvious choice.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoomap3 beagle: led triggers
David Brownell [Fri, 29 Aug 2008 17:03:16 +0000 (10:03 -0700)]
omap3 beagle: led triggers

Assign default roles to two of Beagle's programmable LEDs:

 - usr0 has a heartbeat to show basic activity
 - usr1 shows MMC activity

A third led is controlled by the TWL4030 LED_B signal, but the
TWL driver doesn't yet support leds...

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoinput: touchscreen: Fix typo on Kconfig
Felipe Balbi [Sun, 31 Aug 2008 21:56:57 +0000 (00:56 +0300)]
input: touchscreen: Fix typo on Kconfig

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agobacklight: omap_bl.c is not used anywhere
Felipe Balbi [Sun, 31 Aug 2008 21:56:56 +0000 (00:56 +0300)]
backlight: omap_bl.c is not used anywhere

This file doesn't even have a Makefile entry for building
it. Looks like it's garbage.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoarm: omap: fix build for 2430sdp
Felipe Balbi [Sat, 30 Aug 2008 16:11:48 +0000 (19:11 +0300)]
arm: omap: fix build for 2430sdp

Missing include file broke compilation for 2430sdp.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agosched: fix process time monotonicity
Balbir Singh [Fri, 5 Sep 2008 16:12:23 +0000 (18:12 +0200)]
sched: fix process time monotonicity

Spencer reported a problem where utime and stime were going negative despite
the fixes in commit b27f03d4bdc145a09fb7b0c0e004b29f1ee555fa. The suspected
reason for the problem is that signal_struct maintains it's own utime and
stime (of exited tasks), these are not updated using the new task_utime()
routine, hence sig->utime can go backwards and cause the same problem
to occur (sig->utime, adds tsk->utime and not task_utime()). This patch
fixes the problem

TODO: using max(task->prev_utime, derived utime) works for now, but a more
generic solution is to implement cputime_max() and use the cputime_gt()
function for comparison.

Reported-by: spencer@bluehost.com
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched_clock: fix NOHZ interaction
Peter Zijlstra [Mon, 1 Sep 2008 14:44:23 +0000 (16:44 +0200)]
sched_clock: fix NOHZ interaction

If HLT stops the TSC, we'll fail to account idle time, thereby inflating the
actual process times. Fix this by re-calibrating the clock against GTOD when
leaving nohz mode.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Tested-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoARM: OMAP2: Fix Nokia N8x0 second I2C bus device registration
Jarkko Nikula [Mon, 1 Sep 2008 13:05:04 +0000 (16:05 +0300)]
ARM: OMAP2: Fix Nokia N8x0 second I2C bus device registration

- TSL2563 and LP5521 are found only in N810
- Fix one typo

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: Riku voipio <riku.voipio@iki.fi>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years ago[ARM] omap: fix a load of "warning: symbol 'xxx' was not declared. Should it be static?"
Russell King [Fri, 5 Sep 2008 14:13:24 +0000 (15:13 +0100)]
[ARM] omap: fix a load of "warning: symbol 'xxx' was not declared. Should it be static?"

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] omap: fix lots of 'Using plain integer as NULL pointer'
Russell King [Fri, 5 Sep 2008 14:10:27 +0000 (15:10 +0100)]
[ARM] omap: fix lots of 'Using plain integer as NULL pointer'

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] omap: fix inappropriate casting in gpio.c
Russell King [Fri, 5 Sep 2008 14:49:14 +0000 (15:49 +0100)]
[ARM] omap: fix inappropriate casting in gpio.c

gpio.c wilfully casts physical addresses to void __iomem * and then
fixes them up at runtime using:

bank->base = IO_ADDRESS(bank->base);

where accesses prior to this fixup are via omap_read/omap_write, and
after are by __raw_read/__raw_write.  This doesn't lend itself to
static checking, nor to easy understanding of the code.

And so, OMAP_MPUIO_BASE gets to be the right type - integer like since
it's a physical address, not a MMIO pointer.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] omap: DSP registers don't need to be casted
Russell King [Fri, 5 Sep 2008 14:46:19 +0000 (15:46 +0100)]
[ARM] omap: DSP registers don't need to be casted

We're now assigning/comparing void __iomem pointers with
void __iomem pointer variables.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] omap: make sure virtual mmio addresses are __iomem pointer-like
Russell King [Thu, 4 Sep 2008 13:29:01 +0000 (14:29 +0100)]
[ARM] omap: make sure virtual mmio addresses are __iomem pointer-like

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] omap: Fix IO_ADDRESS() macros
Russell King [Mon, 1 Sep 2008 21:07:37 +0000 (22:07 +0100)]
[ARM] omap: Fix IO_ADDRESS() macros

OMAP1_IO_ADDRESS(), OMAP2_IO_ADDRESS() and IO_ADDRESS() returns cookies
for use with __raw_{read|write}* for accessing registers.  Therefore,
these macros should return (void __iomem *) cookies, not integer values.

Doing this improves typechecking, and means we can find those places
where, eg, DMA controllers are incorrectly given virtual addresses to
DMA to, or physical addresses are thrown through a virtual to physical
address translation.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] omap: convert mcbsp to use ioremap()
Russell King [Thu, 4 Sep 2008 13:25:42 +0000 (14:25 +0100)]
[ARM] omap: convert mcbsp to use ioremap()

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] omap: convert OMAP drivers to use ioremap()
Russell King [Thu, 4 Sep 2008 13:07:22 +0000 (14:07 +0100)]
[ARM] omap: convert OMAP drivers to use ioremap()

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] omap: allow ioremap() to use our fixed IO mappings
Russell King [Thu, 4 Sep 2008 11:07:44 +0000 (12:07 +0100)]
[ARM] omap: allow ioremap() to use our fixed IO mappings

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] omap: remove an io_v2p() usage
Russell King [Mon, 1 Sep 2008 20:51:50 +0000 (21:51 +0100)]
[ARM] omap: remove an io_v2p() usage

When omap_udc is also incorporated, this macro will no longer be used.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[SERIAL] 8250: serial8250_port_size() - omap ports are larger
Russell King [Mon, 1 Sep 2008 20:47:59 +0000 (21:47 +0100)]
[SERIAL] 8250: serial8250_port_size() - omap ports are larger

A function to contain common code for the size of the resource we
need to allocate or free.  OMAP ports need 22 bytes rather than
the standard 8 bytes.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] omap: improve is_omap_port()
Russell King [Mon, 1 Sep 2008 20:25:33 +0000 (21:25 +0100)]
[ARM] omap: improve is_omap_port()

Make is_omap_port() take the uart_8250_port structure so it can do
whatever test it desires.  Convert the test to compare the physical
addresses rather than virtual addresses.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoRevert "[ARM] use the new byteorder headers"
David Woodhouse [Fri, 5 Sep 2008 15:01:15 +0000 (16:01 +0100)]
Revert "[ARM] use the new byteorder headers"

This reverts commit ae82cbfc8beaa69007aa09966d3983ac938c3577. It
needs the new byteorder headers to be exported to userspace, and
they aren't yet -- and probably shouldn't be, at this point in the
2.6.27 release cycle (or ever, for that matter).

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoremove blk_register_filter and blk_unregister_filter in gendisk
FUJITA Tomonori [Fri, 29 Aug 2008 09:47:07 +0000 (11:47 +0200)]
remove blk_register_filter and blk_unregister_filter in gendisk

This patch remove blk_register_filter and blk_unregister_filter in
gendisk, and adds them to sd.c, sr.c. and ide-cd.c

The commit abf5439370491dd6fbb4fe1a7939680d2a9bc9d4 moved cmdfilter
from gendisk to request_queue. It turned out that in some subsystems
multiple gendisks share a single request_queue. So we get:

Using physmap partition information
Creating 3 MTD partitions on "physmap-flash":
0x00000000-0x01c00000 : "User FS"
0x01c00000-0x01c40000 : "booter"
kobject (8511c410): tried to init an initialized object, something is seriously wrong.
Call Trace:
[<8036644c>] dump_stack+0x8/0x34
[<8021f050>] kobject_init+0x50/0xcc
[<8021fa18>] kobject_init_and_add+0x24/0x58
[<8021d20c>] blk_register_filter+0x4c/0x64
[<8021c194>] add_disk+0x78/0xe0
[<8027d14c>] add_mtd_blktrans_dev+0x254/0x278
[<8027c8f0>] blktrans_notify_add+0x40/0x78
[<80279c00>] add_mtd_device+0xd0/0x150
[<8027b090>] add_mtd_partitions+0x568/0x5d8
[<80285458>] physmap_flash_probe+0x2ac/0x334
[<802644f8>] driver_probe_device+0x12c/0x244
[<8026465c>] __driver_attach+0x4c/0x84
[<80263c64>] bus_for_each_dev+0x58/0xac
[<802633ec>] bus_add_driver+0xc4/0x24c
[<802648e0>] driver_register+0xcc/0x184
[<80100460>] _stext+0x60/0x1bc

In the long term, we need to fix such subsystems but we need a quick
fix now. This patch add the command filter support to only sd and sr
though it might be useful for other SG_IO users (such as cciss).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reported-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agox86, tracehook: clean up implementation of syscall_get_error()
Petr Tesarik [Wed, 3 Sep 2008 11:31:42 +0000 (13:31 +0200)]
x86, tracehook: clean up implementation of syscall_get_error()

The x86-tracehook code now contains this line in syscall_get_error():

return error >= -4095L ? error : 0;

Hard-wiring a constant is not nice. Let's use the IS_ERR_VALUE macro
from linux/err.h instead.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Cc: utrace-devel@redhat.com
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'linus' into x86/tracehook
Ingo Molnar [Fri, 5 Sep 2008 15:53:05 +0000 (17:53 +0200)]
Merge branch 'linus' into x86/tracehook

17 years agox86/paravirt: Remove duplicate paravirt_pagetable_setup_{start, done}()
Alex Nixon [Wed, 3 Sep 2008 13:36:40 +0000 (14:36 +0100)]
x86/paravirt: Remove duplicate paravirt_pagetable_setup_{start, done}()

They were already called once in arch/x86/kernel/setup.c - we don't need to call them again.

Signed-off-by: Alex Nixon <alex.nixon@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: build fix for !CONFIG_SMP
Alex Nixon [Wed, 3 Sep 2008 13:30:23 +0000 (14:30 +0100)]
x86: build fix for !CONFIG_SMP

Move reset_lazy_tlbstate into tlb_32.c, and define noop versions of
play_dead() in process_{32,64}.c when !CONFIG_SMP.

Signed-off-by: Alex Nixon <alex.nixon@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoXen: fix cpu_hotplug build when !CONFIG_SMP
Alex Nixon [Wed, 3 Sep 2008 13:30:22 +0000 (14:30 +0100)]
Xen: fix cpu_hotplug build when !CONFIG_SMP

Compile cpu_hotplug.c conditionally on CONFIG_HOTPLUG_CPU

Signed-off-by: Alex Nixon <alex.nixon@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoXen: fix cpu_hotplug.c build by replacing is_running_on_xen() with xen_pv_domain()
Alex Nixon [Wed, 3 Sep 2008 13:30:21 +0000 (14:30 +0100)]
Xen: fix cpu_hotplug.c build by replacing is_running_on_xen() with xen_pv_domain()

Signed-off-by: Alex Nixon <alex.nixon@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoasync_tx: fix the bug in async_tx_run_dependencies
Yuri Tikhonov [Fri, 5 Sep 2008 15:15:47 +0000 (08:15 -0700)]
async_tx: fix the bug in async_tx_run_dependencies

Should clear the next pointer of the TX if we are sure that the
next TX (say NXT) will be submitted to the channel too. Overwise,
we break the chain of descriptors, because we lose the information
about the next descriptor to run. So next time, when invoke
async_tx_run_dependencies() with TX, it's TX->next will be NULL, and
NXT will be never submitted.

Cc: <stable@kernel.org> [2.6.26]
Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
17 years agox86: make sure the CPA test code's use of _PAGE_UNUSED1 is obvious
Jeremy Fitzhardinge [Thu, 28 Aug 2008 20:58:39 +0000 (13:58 -0700)]
x86: make sure the CPA test code's use of _PAGE_UNUSED1 is obvious

The CPA test code uses _PAGE_UNUSED1, so make sure its obvious.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: ticket spin locks: reduce instruction dependencies
Jan Beulich [Fri, 5 Sep 2008 12:27:45 +0000 (13:27 +0100)]
x86: ticket spin locks: reduce instruction dependencies

Reduce the amount of partial register accesses in the NR_CPUS < 256
case, and slightly weaken resource dependencies in the other case.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: ticket spin locks: factor out more common code
Jan Beulich [Fri, 5 Sep 2008 12:26:39 +0000 (13:26 +0100)]
x86: ticket spin locks: factor out more common code

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: ticket spin locks: fix asm constraints
Jan Beulich [Fri, 5 Sep 2008 12:26:39 +0000 (13:26 +0100)]
x86: ticket spin locks: fix asm constraints

In addition to these changes I doubt the 'volatile' on all the ticket
lock asm()-s are really necessary.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'x86/alternatives' into x86/core
Ingo Molnar [Fri, 5 Sep 2008 15:03:17 +0000 (17:03 +0200)]
Merge branch 'x86/alternatives' into x86/core

17 years agodlm: choose better identifiers
Andrew Morton [Fri, 5 Sep 2008 13:42:08 +0000 (08:42 -0500)]
dlm: choose better identifiers

sparc32:

fs/dlm/config.c:397: error: expected identifier or '(' before '{' token
fs/dlm/config.c: In function 'drop_node':
fs/dlm/config.c:589: warning: initialization from incompatible pointer type
fs/dlm/config.c:589: warning: initialization from incompatible pointer type
fs/dlm/config.c: In function 'release_node':
fs/dlm/config.c:601: warning: initialization from incompatible pointer type
fs/dlm/config.c:601: warning: initialization from incompatible pointer type
fs/dlm/config.c: In function 'show_node':
fs/dlm/config.c:717: warning: initialization from incompatible pointer type
fs/dlm/config.c:717: warning: initialization from incompatible pointer type
fs/dlm/config.c: In function 'store_node':
fs/dlm/config.c:726: warning: initialization from incompatible pointer type
fs/dlm/config.c:726: warning: initialization from incompatible pointer type

Cc: Christine Caulfield <ccaulfie@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Teigland <teigland@redhat.com>
17 years agoFix conditional export of kvh.h and a.out.h to userspace.
Khem Raj [Fri, 5 Sep 2008 06:11:01 +0000 (23:11 -0700)]
Fix conditional export of kvh.h and a.out.h to userspace.

Some architectures have moved the asm/ into arch/ and some have not.
This patch checks for a.out.h and kvh.h in both places before exporting
the corresponding file from linux/

[dwmw2: simplified a little]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
17 years ago[MTD] [NAND] tmio_nand: fix base address programming
Dmitry Baryshkov [Thu, 4 Sep 2008 09:28:33 +0000 (13:28 +0400)]
[MTD] [NAND] tmio_nand: fix base address programming

Fix offset of second word used for programming base address of memory
window. Also program tmio with offset of the FCR, not with physical
memory location.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Ian Molton <spyro@f2s.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
17 years agoUBI: remove BKL
Artem Bityutskiy [Sun, 31 Aug 2008 16:32:13 +0000 (19:32 +0300)]
UBI: remove BKL

We do not need BKL in UBI because we serialize things
properly.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoGFS2: Use an IS_ERR test rather than a NULL test
Julien Brunel [Mon, 1 Sep 2008 08:51:22 +0000 (10:51 +0200)]
GFS2: Use an IS_ERR test rather than a NULL test

In case of error, the function gfs2_inode_lookup returns an
ERR pointer, but never returns a NULL pointer. So a NULL test that
necessarily comes after an IS_ERR test should be deleted, and a NULL
test that may come after a call to this function should be
strengthened by an IS_ERR test.

The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@match_bad_null_test@
expression x, E;
statement S1,S2;
@@
x = gfs2_inode_lookup(...)
... when != x = E
* if (x != NULL)
S1 else S2
// </smpl>

Signed-off-by: Julien Brunel <brunel@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
17 years agoGFS2: Fix race relating to glock min-hold time
Steven Whitehouse [Tue, 2 Sep 2008 12:33:17 +0000 (13:33 +0100)]
GFS2: Fix race relating to glock min-hold time

In the case that a request for a glock arrives right after the
grant reply has arrived, it sometimes means that the gl_tstamp
field hasn't been updated recently enough. The net result is that
the min-hold time for the glock is ignored. If this happens
often enough, it leads to poor performance.

This patch adds an additional test, so that if the reply pending
bit is set on a glock, then it will select the maximum length of
time for the min-hold time, rather than looking at gl_tstamp.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
17 years ago[ARM] sparse: fix several warnings
Russell King [Fri, 5 Sep 2008 13:08:44 +0000 (14:08 +0100)]
[ARM] sparse: fix several warnings

arch/arm/kernel/process.c:270:6: warning: symbol 'show_fpregs' was not declared. Should it be static?

This function isn't used, so can be removed.

arch/arm/kernel/setup.c:532:9: warning: symbol 'len' shadows an earlier one
arch/arm/kernel/setup.c:524:6: originally declared here

A function containing two 'len's.

arch/arm/mm/fault-armv.c:188:13: warning: symbol 'check_writebuffer_bugs' was not declared. Should it be static?
arch/arm/mm/mmap.c:122:5: warning: symbol 'valid_phys_addr_range' was not declared. Should it be static?
arch/arm/mm/mmap.c:137:5: warning: symbol 'valid_mmap_phys_addr_range' was not declared. Should it be static?

Missing includes.

arch/arm/kernel/traps.c:71:77: warning: Using plain integer as NULL pointer
arch/arm/mm/ioremap.c:355:46: error: incompatible types in comparison expression (different address spaces)

Sillies.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoSELinux: add gitignore file for mdp script
James Morris [Fri, 5 Sep 2008 11:43:38 +0000 (21:43 +1000)]
SELinux: add gitignore file for mdp script

Add gitignore file for scripts/selinux/mdp/mdp.

Signed-off-by: James Morris <jmorris@namei.org>
17 years agolockdep, UML: fix compilation when CONFIG_TRACE_IRQFLAGS_SUPPORT is not set
Rui Sousa [Thu, 4 Sep 2008 17:47:53 +0000 (19:47 +0200)]
lockdep, UML: fix compilation when CONFIG_TRACE_IRQFLAGS_SUPPORT is not set

Hiroshi Shimamoto reported:

> > !TRACE_IRQFLAGS_SUPPORT mode of build for future work, it can be
> > restored via a simple revert.
>
> Hi, it seems that this patch breaks uml build.
>
> kernel/printk.c: In function 'vprintk':
> kernel/printk.c:674: error: implicit declaration of function
> 'raw_local_irq_save' kernel/printk.c:772: error: implicit declaration of
> function 'raw_local_irq_restore'

With the patch bellow it compiles (make ARCH=um with a x86 host), but I'm
really out of my league on this one...

Reported-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: gart alloc_coherent doesn't need to check NULL device argument
FUJITA Tomonori [Fri, 5 Sep 2008 08:58:49 +0000 (17:58 +0900)]
x86: gart alloc_coherent doesn't need to check NULL device argument

asm/dma-mapping.h guarantees that gart alloc_coherent doesn't get NULL
device argument.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoHPET: make minimum reprogramming delta useful
Thomas Gleixner [Wed, 3 Sep 2008 21:37:24 +0000 (21:37 +0000)]
HPET: make minimum reprogramming delta useful

The minimum reprogramming delta was hardcoded in HPET ticks,
which is stupid as it does not work with faster running HPETs.
The C1E idle patches made this prominent on AMD/RS690 chipsets,
where the HPET runs with 25MHz. Set it to 5us which seems to be
a reasonable value and fixes the problems on the bug reporters
machines. We have a further sanity check now in the clock events,
which increases the delta when it is not sufficient.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Tested-by: Dmitry Nezhevenko <dion@inhex.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoclockevents: prevent endless loop lockup
Thomas Gleixner [Wed, 3 Sep 2008 21:37:14 +0000 (21:37 +0000)]
clockevents: prevent endless loop lockup

The C1E/HPET bug reports on AMDX2/RS690 systems where tracked down to a
too small value of the HPET minumum delta for programming an event.

The clockevents code needs to enforce an interrupt event on the clock event
device in some cases. The enforcement code was stupid and naive, as it just
added the minimum delta to the current time and tried to reprogram the device.
When the minimum delta is too small, then this loops forever.

Add a sanity check. Allow reprogramming to fail 3 times, then print a warning
and double the minimum delta value to make sure, that this does not happen again.
Use the same function for both tick-oneshot and tick-broadcast code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoclockevents: prevent multiple init/shutdown
Thomas Gleixner [Wed, 3 Sep 2008 21:37:08 +0000 (21:37 +0000)]
clockevents: prevent multiple init/shutdown

While chasing the C1E/HPET bugreports I went through the clock events
code inch by inch and found that the broadcast device can be initialized
and shutdown multiple times. Multiple shutdowns are not critical, but
useless waste of time. Multiple initializations are simply broken. Another
CPU might have the device in use already after the first initialization and
the second init could just render it unusable again.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoclockevents: enforce reprogram in oneshot setup
Thomas Gleixner [Wed, 3 Sep 2008 21:37:03 +0000 (21:37 +0000)]
clockevents: enforce reprogram in oneshot setup

In tick_oneshot_setup we program the device to the given next_event,
but we do not check the return value. We need to make sure that the
device is programmed enforced so the interrupt handler engine starts
working. Split out the reprogramming function from tick_program_event()
and call it with the device, which was handed in to tick_setup_oneshot().
Set the force argument, so the devices is firing an interrupt.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoclockevents: prevent endless loop in periodic broadcast handler
Thomas Gleixner [Wed, 3 Sep 2008 21:36:57 +0000 (21:36 +0000)]
clockevents: prevent endless loop in periodic broadcast handler

The reprogramming of the periodic broadcast handler was broken,
when the first programming returned -ETIME. The clockevents code
stores the new expiry value in the clock events device next_event field
only when the programming time has not been elapsed yet. The loop in
question calculates the new expiry value from the next_event value
and therefor never increases.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoclockevents: prevent clockevent event_handler ending up handler_noop
Venkatesh Pallipadi [Wed, 3 Sep 2008 21:36:50 +0000 (21:36 +0000)]
clockevents: prevent clockevent event_handler ending up handler_noop

There is a ordering related problem with clockevents code, due to which
clockevents_register_device() called after tickless/highres switch
will not work. The new clockevent ends up with clockevents_handle_noop as
event handler, resulting in no timer activity.

The problematic path seems to be

* old device already has hrtimer_interrupt as the event_handler
* new clockevent device registers with a higher rating
* tick_check_new_device() is called
  * clockevents_exchange_device() gets called
    * old->event_handler is set to clockevents_handle_noop
  * tick_setup_device() is called for the new device
    * which sets new->event_handler using the old->event_handler which is noop.

Change the ordering so that new device inherits the proper handler.

This does not have any issue in normal case as most likely all the clockevent
devices are setup before the highres switch. But, can potentially be affecting
some corner case where HPET force detect happens after the highres switch.
This was a problem with HPET in MSI mode code that we have been experimenting
with.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, init_64.c: cleanup
Ingo Molnar [Fri, 5 Sep 2008 08:23:26 +0000 (10:23 +0200)]
x86, init_64.c: cleanup

Clean up comments.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: move nonx_setup etc from common.c to init_64.c
Yinghai Lu [Fri, 5 Sep 2008 07:58:28 +0000 (00:58 -0700)]
x86: move nonx_setup etc from common.c to init_64.c

like 32 bit put it in init_32.c

Signed-off-by: Yinghai <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agolockstat: documentation update
Peter Zijlstra [Wed, 3 Sep 2008 14:00:57 +0000 (16:00 +0200)]
lockstat: documentation update

Christoph noted that the documentation doesn't tell in what unit the
lockstat times are reported, ammend this.

Reported-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: use cpu/common.c on 64 bit
Yinghai Lu [Fri, 5 Sep 2008 03:09:14 +0000 (20:09 -0700)]
x86: use cpu/common.c on 64 bit

Use cpu/common.c on both 64-bit and 32-bit and remove cpu/common_64.c.

We started out with this linecount:

  816  arch/x86/kernel/cpu/common_64.c
  805  arch/x86/kernel/cpu/common.c

and the resulting common.c is 1197 lines long, so there's already
424 lines of code eliminated in this phase of the unification.

Signed-off-by: Yinghai <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: cpu/common*.c, merge whitespaces
Ingo Molnar [Fri, 5 Sep 2008 07:37:15 +0000 (09:37 +0200)]
x86: cpu/common*.c, merge whitespaces

Merge leftover whitespaces, to make arch/x86/kernel/cpu/common_64.c
exactly identical to arch/x86/kernel/cpu/common.c.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: cpu/common*.c, merge identify_cpu()
Yinghai Lu [Fri, 5 Sep 2008 03:09:13 +0000 (20:09 -0700)]
x86: cpu/common*.c, merge identify_cpu()

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: cpu/common*.c, merge generic_identify()
Yinghai Lu [Fri, 5 Sep 2008 03:09:12 +0000 (20:09 -0700)]
x86: cpu/common*.c, merge generic_identify()

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: cpu/common*.c: merge print_cpu_info()
Yinghai Lu [Fri, 5 Sep 2008 03:09:11 +0000 (20:09 -0700)]
x86: cpu/common*.c: merge print_cpu_info()

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: cpu/common*.c, merge early_identify_cpu()
Yinghai Lu [Fri, 5 Sep 2008 03:09:10 +0000 (20:09 -0700)]
x86: cpu/common*.c, merge early_identify_cpu()

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: cpu/common.c: merge get_cpu_cap()
Yinghai Lu [Fri, 5 Sep 2008 03:09:09 +0000 (20:09 -0700)]
x86: cpu/common.c: merge get_cpu_cap()

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: cpu/common*.c, merge detect_ht()
Yinghai Lu [Fri, 5 Sep 2008 03:09:08 +0000 (20:09 -0700)]
x86: cpu/common*.c, merge detect_ht()

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: cpu/common*.c, merge display_cacheinfo()
Yinghai Lu [Fri, 5 Sep 2008 03:09:07 +0000 (20:09 -0700)]
x86: cpu/common*.c, merge display_cacheinfo()

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: cpu/common.c, merge default_init()
Yinghai Lu [Fri, 5 Sep 2008 03:09:06 +0000 (20:09 -0700)]
x86: cpu/common.c, merge default_init()

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: cpu/common*.c, merge switch_to_new_gdt()
Yinghai Lu [Fri, 5 Sep 2008 03:09:05 +0000 (20:09 -0700)]
x86: cpu/common*.c, merge switch_to_new_gdt()

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: cpu/common*.c have same cpu_init(), with copying and #ifdef
Yinghai Lu [Fri, 5 Sep 2008 03:09:04 +0000 (20:09 -0700)]
x86: cpu/common*.c have same cpu_init(), with copying and #ifdef

hard to merge by lines... (as here we have material differences between
32-bit and 64-bit mode) - will try to do it later.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: cpu/common*.c, make 32-bit have 64-bit only functions
Yinghai Lu [Fri, 5 Sep 2008 03:09:03 +0000 (20:09 -0700)]
x86: cpu/common*.c, make 32-bit have 64-bit only functions

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: cpu/common.c, let 64-bit code have 32-bit only functions
Yinghai Lu [Fri, 5 Sep 2008 03:09:02 +0000 (20:09 -0700)]
x86: cpu/common.c, let 64-bit code have 32-bit only functions

No effect on 64-bit.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: same gdt_page with macro
Yinghai Lu [Fri, 5 Sep 2008 03:09:01 +0000 (20:09 -0700)]
x86: same gdt_page with macro

Move the 32-bit and 64-bit gdt_page definitions next to each
other, separated with an #ifdef.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: make header file the same in arch/x86/kernel/cpu/common_xx.c
Yinghai Lu [Fri, 5 Sep 2008 03:09:00 +0000 (20:09 -0700)]
x86: make header file the same in arch/x86/kernel/cpu/common_xx.c

Make the files more similar in preparation to unification, no
code changed.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: make detect_ht depend on CONFIG_X86_HT
Yinghai Lu [Fri, 5 Sep 2008 03:08:59 +0000 (20:08 -0700)]
x86: make detect_ht depend on CONFIG_X86_HT

64-bit has X86_HT set too, so use that instead of SMP.

This also removes a include/asm-x86/processor.h ifdef.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'x86/core' into x86/unify-cpu-detect
Ingo Molnar [Fri, 5 Sep 2008 07:27:23 +0000 (09:27 +0200)]
Merge branch 'x86/core' into x86/unify-cpu-detect

17 years agoMerge commit '63cc8c75156462d4b42cbdd76c293b7eee7ddbfe':
Ingo Molnar [Fri, 5 Sep 2008 07:24:30 +0000 (09:24 +0200)]
Merge commit '63cc8c75156462d4b42cbdd76c293b7eee7ddbfe':

  "percpu: introduce DEFINE_PER_CPU_PAGE_ALIGNED() macro"

into x86/core

Conflicts:
arch/x86/kernel/cpu/common.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'x86/x2apic' into x86/core
Ingo Molnar [Fri, 5 Sep 2008 07:21:21 +0000 (09:21 +0200)]
Merge branch 'x86/x2apic' into x86/core

Conflicts:
arch/x86/kernel/cpu/common_64.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'x86/cpu' into x86/core
Ingo Molnar [Fri, 5 Sep 2008 07:19:50 +0000 (09:19 +0200)]
Merge branch 'x86/cpu' into x86/core

17 years agoMerge branch 'x86/xsave' into x86/core
Ingo Molnar [Fri, 5 Sep 2008 07:18:39 +0000 (09:18 +0200)]
Merge branch 'x86/xsave' into x86/core

17 years agoi2c: fix i2c-sh_mobile timing issues
Magnus Damm [Wed, 27 Aug 2008 09:33:56 +0000 (18:33 +0900)]
i2c: fix i2c-sh_mobile timing issues

This patch teaches the i2c-sh_mobile driver to make use of wait irqs.
Without this patch only dte irqs are used which may lead to overruns
and cases of missing stop and extra bytes being read on the i2c bus.

Use of wait irqs forces the hardware to pause and wait until the cpu
is ready. Polling is also reworked in this patch to fix ms delay issues.

Verified with bus analyzer and tested on MigoR and AP325RXA boards.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh64: resume_kernel fix for kernel oops built with CONFIG_BKL_PREEMPT=y.
Paul Mundt [Fri, 5 Sep 2008 05:51:28 +0000 (14:51 +0900)]
sh64: resume_kernel fix for kernel oops built with CONFIG_BKL_PREEMPT=y.

Follows the SH change.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: resume_kernel fix for kernel oops built with CONFIG_BKL_PREEMPT=y.
Carmelo Amoroso [Fri, 5 Sep 2008 05:42:16 +0000 (14:42 +0900)]
sh: resume_kernel fix for kernel oops built with CONFIG_BKL_PREEMPT=y.

This patch fixes a problem within the SH implementation of resume_kernel code,
that implements in assembly the bulk of preempt_schedule_irq function without
taking care of the extra code needed to handle the BKL preemptible.

The patch basically consists of removing this asm code and calling the common
C implementation (see kernel/sched.c) as other archs do.

Another change is the missing 'cli' macro invocation at the beginning of
the resume_kernel.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agomv643xx_eth: transmit multiqueue support
Lennert Buytenhek [Thu, 28 Aug 2008 04:26:23 +0000 (06:26 +0200)]
mv643xx_eth: transmit multiqueue support

As all the infrastructure for multiple transmit queues already exists
in the driver, this patch is entirely trivial.

The individual transmit queues are still serialised by the driver's
per-port private spinlock, but that will disappear (i.e. be replaced
by the per-subqueue ->_xmit_lock) in a subsequent patch.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agomv643xx_eth: delete unused and uninteresting interrupt source mask bits
Lennert Buytenhek [Thu, 28 Aug 2008 04:10:04 +0000 (06:10 +0200)]
mv643xx_eth: delete unused and uninteresting interrupt source mask bits

Delete a couple of unused and uninteresting interrupt source mask bits:
- The receive resource underrun interrupt sources are uninteresting
  because if we are in out-of-memory mode, we are already dealing with
  the issue, and we don't need the hardware to remind us again that we
  are out of memory.
- The LINK and PHY interrupt sources can be coalesced into one define,
  since we always use them together.
- The transmit resource underrun interrupt source can be disabled since
  we never activate the head descriptor of a paged skb until the
  fragments are all activated, so transmit underrun during a packet
  should never happen.
- The INT_EXT_TX_0 define is never used.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agomv643xx_eth: get rid of netif_{stop,wake}_queue() calls on link down/up
Lennert Buytenhek [Thu, 28 Aug 2008 03:39:13 +0000 (05:39 +0200)]
mv643xx_eth: get rid of netif_{stop,wake}_queue() calls on link down/up

There is no need to call netif_{stop,wake}_queue() when the link goes
down/up, as the networking already takes care of this internally.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agomv643xx_eth: remove force_phy_addr field
Lennert Buytenhek [Tue, 26 Aug 2008 12:06:47 +0000 (14:06 +0200)]
mv643xx_eth: remove force_phy_addr field

Currently, there are two different fields in the
mv643xx_eth_platform_data struct that together describe the PHY
address -- one field (phy_addr) has the address of the PHY, but if
that address is zero, a second field (force_phy_addr) needs to be
set to distinguish the actual address zero from a zero due to not
having filled in the PHY address explicitly (which should mean
'use the default PHY address').

If we are a bit smarter about the encoding of the phy_addr field,
we can avoid the need for a second field -- this patch does that.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agomv643xx_eth: smi sharing is a per-unit property, not a per-port one
Lennert Buytenhek [Tue, 26 Aug 2008 10:56:56 +0000 (12:56 +0200)]
mv643xx_eth: smi sharing is a per-unit property, not a per-port one

Which top-level unit's SMI interface to use should be a property of
the top-level unit, not of the individual ports.  This patch moves the
->shared_smi pointer from the per-port platform data to the global
platform data.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agomv643xx_eth: require contiguous receive and transmit queue numbering
Lennert Buytenhek [Tue, 26 Aug 2008 08:23:22 +0000 (10:23 +0200)]
mv643xx_eth: require contiguous receive and transmit queue numbering

Simplify receive and transmit queue handling by requiring the set
of queue numbers to be contiguous starting from zero.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agomv643xx_eth: get rid of compile-time configurable transmit checksumming
Lennert Buytenhek [Sun, 24 Aug 2008 03:33:55 +0000 (05:33 +0200)]
mv643xx_eth: get rid of compile-time configurable transmit checksumming

Get rid of the mv643xx_eth-internal MV643XX_ETH_CHECKSUM_OFFLOAD_TX
compile-time option.  Using transmit checksumming is the sane default,
and anyone wanting to disable it should use ethtool(8) instead of
recompiling their kernels.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agomv643xx_eth: get rid of receive-side locking
Lennert Buytenhek [Sun, 24 Aug 2008 02:33:36 +0000 (04:33 +0200)]
mv643xx_eth: get rid of receive-side locking

By having the receive out-of-memory handling timer schedule the napi
poll handler and then doing oom processing from the napi poll handler,
all code that touches receive state moves to napi context, letting us
get rid of all explicit locking in the receive paths since the only
mutual exclusion we need anymore at that point is protection against
reentering ourselves, which is provided by napi synchronisation.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agomv643xx_eth: make napi unconditional
Lennert Buytenhek [Sat, 23 Aug 2008 23:03:57 +0000 (01:03 +0200)]
mv643xx_eth: make napi unconditional

Make napi unconditional on the receive side, so that we can get rid
of all the locking and local interrupt disabling in the receive path.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agomv643xx_eth: use the SMI done interrupt to wait for SMI access completion
Lennert Buytenhek [Tue, 26 Aug 2008 02:42:59 +0000 (04:42 +0200)]
mv643xx_eth: use the SMI done interrupt to wait for SMI access completion

If the platform code has passed us the IRQ number of the mv643xx_eth
top-level error interrupt, use the error interrupt to wait for SMI
access completion instead of polling the SMI busy bit, since SMI bus
accesses can take up to tens of milliseconds.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agomv643xx_eth: switch ->phy_lock from a spinlock to a mutex
Lennert Buytenhek [Sun, 24 Aug 2008 03:41:09 +0000 (05:41 +0200)]
mv643xx_eth: switch ->phy_lock from a spinlock to a mutex

Since commit 81600eea98789da09a32de69ca9d3be8b9503c54 ("mv643xx_eth:
use auto phy polling for configuring (R)(G)MII interface"),
mv643xx_eth no longer does SMI accesses from interrupt context.  The
only other callers that do SMI accesses all do them from process
context, which means we can switch the PHY lock from a spinlock to a
mutex, and get rid of the extra locking in some ethtool methods.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agomv643xx_eth: get rid of modulo operations
Lennert Buytenhek [Sat, 23 Aug 2008 21:45:28 +0000 (23:45 +0200)]
mv643xx_eth: get rid of modulo operations

Get rid of the modulo operations that are currently used for
computing successive TX/RX descriptor ring indexes.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agomv643xx_eth: get rid of IRQF_SAMPLE_RANDOM
Lennert Buytenhek [Sat, 23 Aug 2008 21:43:38 +0000 (23:43 +0200)]
mv643xx_eth: get rid of IRQF_SAMPLE_RANDOM

Using IRQF_SAMPLE_RANDOM for the mv643xx_eth interrupt handler
significantly increases interrupt processing overhead, so get rid
of it.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agomv643xx_eth: fix receive buffer DMA unmapping
Lennert Buytenhek [Sun, 24 Aug 2008 05:19:48 +0000 (07:19 +0200)]
mv643xx_eth: fix receive buffer DMA unmapping

When tearing down a DMA mapping for a receive buffer, we should pass
dma_unmap_single() the exact same address that dma_map_single() gave
us when we originally set up the mapping.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agomv643xx_eth: fix 'netdev_priv(dev) == dev->priv' assumption
Lennert Buytenhek [Sun, 24 Aug 2008 03:59:16 +0000 (05:59 +0200)]
mv643xx_eth: fix 'netdev_priv(dev) == dev->priv' assumption

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agoInput: i8042 - make Lenovo 3000 N100 blacklist entry more specific
Jiri Kosina [Fri, 5 Sep 2008 02:28:48 +0000 (22:28 -0400)]
Input: i8042 - make Lenovo 3000 N100 blacklist entry more specific

Apparently, there are more different versions of Lenovo 3000 N100, some
of them working properly with active mux, and some of them requiring it
being switched off.

This patch applies 'nomux' only to the specific product name that is
reported to behave badly unless 'nomux' is specified.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
17 years agoInput: bcm5974 - add BTN_TOUCH event for mousedev benefit
Henrik Rydberg [Fri, 5 Sep 2008 02:28:31 +0000 (22:28 -0400)]
Input: bcm5974 - add BTN_TOUCH event for mousedev benefit

The mousedev driver requires the use of BTN_TOUCH events to process
ABS_X and ABS_Y events properly, which is what is needed for the
bcm5974-based apple computers to have a functional pointer out-of-the-box.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>