]> git.karo-electronics.de Git - mv-sheeva.git/log
mv-sheeva.git
14 years agosched: Add new wakeup preemption mode: WAKEUP_RUNNING
Peter Zijlstra [Wed, 16 Sep 2009 10:31:31 +0000 (12:31 +0200)]
sched: Add new wakeup preemption mode: WAKEUP_RUNNING

Create a new wakeup preemption mode, preempt towards tasks that run
shorter on avg. It sets next buddy to be sure we actually run the task
we preempted for.

Test results:

 root@twins:~# while :; do :; done &
 [1] 6537
 root@twins:~# while :; do :; done &
 [2] 6538
 root@twins:~# while :; do :; done &
 [3] 6539
 root@twins:~# while :; do :; done &
 [4] 6540

 root@twins:/home/peter# ./latt -c4 sleep 4
 Entries: 48 (clients=4)

 Averages:
 ------------------------------
        Max          4750 usec
        Avg           497 usec
        Stdev         737 usec

 root@twins:/home/peter# echo WAKEUP_RUNNING > /debug/sched_features

 root@twins:/home/peter# ./latt -c4 sleep 4
 Entries: 48 (clients=4)

 Averages:
 ------------------------------
        Max            14 usec
        Avg             5 usec
        Stdev           3 usec

Disabled by default - needs more testing.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <new-submission>

14 years agosched: Fix TASK_WAKING & loadaverage breakage
Ingo Molnar [Wed, 16 Sep 2009 19:09:13 +0000 (21:09 +0200)]
sched: Fix TASK_WAKING & loadaverage breakage

Fix this:

top - 21:54:00 up  2:59,  1 user,  load average: 432512.33, 426421.74, 417432.74

Which happens because we now set TASK_WAKING before activate_task().

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoaf_iucv: fix race when queueing skbs on the backlog queue
Hendrik Brueckner [Wed, 16 Sep 2009 04:37:28 +0000 (04:37 +0000)]
af_iucv: fix race when queueing skbs on the backlog queue

iucv_sock_recvmsg() and iucv_process_message()/iucv_fragment_skb race
for dequeuing an skb from the backlog queue.

If iucv_sock_recvmsg() dequeues first, iucv_process_message() calls
sock_queue_rcv_skb() with an skb that is NULL.

This results in the following kernel panic:

<1>Unable to handle kernel pointer dereference at virtual kernel address (null)
<4>Oops: 0004 [#1] PREEMPT SMP DEBUG_PAGEALLOC
<4>Modules linked in: af_iucv sunrpc qeth_l3 dm_multipath dm_mod vmur qeth ccwgroup
<4>CPU: 0 Not tainted 2.6.30 #4
<4>Process client-iucv (pid: 4787, task: 0000000034e75940, ksp: 00000000353e3710)
<4>Krnl PSW : 0704000180000000 000000000043ebca (sock_queue_rcv_skb+0x7a/0x138)
<4>           R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:0 PM:0 EA:3
<4>Krnl GPRS: 0052900000000000 000003e0016e0fe8 0000000000000000 0000000000000000
<4>           000000000043eba8 0000000000000002 0000000000000001 00000000341aa7f0
<4>           0000000000000000 0000000000007800 0000000000000000 0000000000000000
<4>           00000000341aa7f0 0000000000594650 000000000043eba8 000000003fc2fb28
<4>Krnl Code: 000000000043ebbea7840006            brc     8,43ebca
<4>           000000000043ebc25930c23c            c       %r3,572(%r12)
<4>           000000000043ebc6a724004c            brc     2,43ec5e
<4>          >000000000043ebcae3c0b0100024        stg     %r12,16(%r11)
<4>           000000000043ebd0a7190000            lghi    %r1,0
<4>           000000000043ebd4e310b0200024        stg     %r1,32(%r11)
<4>           000000000043ebdac010ffffdce9        larl    %r1,43a5ac
<4>           000000000043ebe0e310b0800024        stg     %r1,128(%r11)
<4>Call Trace:
<4>([<000000000043eba8>] sock_queue_rcv_skb+0x58/0x138)
<4> [<000003e0016bcf2a>] iucv_process_message+0x112/0x3cc [af_iucv]
<4> [<000003e0016bd3d4>] iucv_callback_rx+0x1f0/0x274 [af_iucv]
<4> [<000000000053a21a>] iucv_message_pending+0xa2/0x120
<4> [<000000000053b5a6>] iucv_tasklet_fn+0x176/0x1b8
<4> [<000000000014fa82>] tasklet_action+0xfe/0x1f4
<4> [<0000000000150a56>] __do_softirq+0x116/0x284
<4> [<0000000000111058>] do_softirq+0xe4/0xe8
<4> [<00000000001504ba>] irq_exit+0xba/0xd8
<4> [<000000000010e0b2>] do_extint+0x146/0x190
<4> [<00000000001184b6>] ext_no_vtime+0x1e/0x22
<4> [<00000000001fbf4e>] kfree+0x202/0x28c
<4>([<00000000001fbf44>] kfree+0x1f8/0x28c)
<4> [<000000000044205a>] __kfree_skb+0x32/0x124
<4> [<000003e0016bd8b2>] iucv_sock_recvmsg+0x236/0x41c [af_iucv]
<4> [<0000000000437042>] sock_aio_read+0x136/0x160
<4> [<0000000000205e50>] do_sync_read+0xe4/0x13c
<4> [<0000000000206dce>] vfs_read+0x152/0x15c
<4> [<0000000000206ed0>] SyS_read+0x54/0xac
<4> [<0000000000117c8e>] sysc_noemu+0x10/0x16
<4> [<00000042ff8def3c>] 0x42ff8def3c

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoaf_iucv: do not call iucv_sock_kill() twice
Hendrik Brueckner [Wed, 16 Sep 2009 04:37:27 +0000 (04:37 +0000)]
af_iucv: do not call iucv_sock_kill() twice

For non-accepted sockets on the accept queue, iucv_sock_kill()
is called twice (in iucv_sock_close() and iucv_sock_cleanup_listen()).
This typically results in a kernel oops as shown below.

Remove the duplicate call to iucv_sock_kill() and set the SOCK_ZAPPED
flag in iucv_sock_close() only.

The iucv_sock_kill() function frees a socket only if the socket is zapped
and orphaned (sk->sk_socket == NULL):
  - Non-accepted sockets are always orphaned and, thus, iucv_sock_kill()
    frees the socket twice.
  - For accepted sockets or sockets created with iucv_sock_create(),
    sk->sk_socket is initialized. This caused the first call to
    iucv_sock_kill() to return immediately. To free these sockets,
    iucv_sock_release() uses sock_orphan() before calling iucv_sock_kill().

<1>Unable to handle kernel pointer dereference at virtual kernel address 000000003edd3000
<4>Oops: 0011 [#1] PREEMPT SMP DEBUG_PAGEALLOC
<4>Modules linked in: af_iucv sunrpc qeth_l3 dm_multipath dm_mod qeth vmur ccwgroup
<4>CPU: 0 Not tainted 2.6.30 #4
<4>Process iucv_sock_close (pid: 2486, task: 000000003aea4340, ksp: 000000003b75bc68)
<4>Krnl PSW : 0704200180000000 000003e00168e23a (iucv_sock_kill+0x2e/0xcc [af_iucv])
<4>           R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:2 PM:0 EA:3
<4>Krnl GPRS: 0000000000000000 000000003b75c000 000000003edd37f0 0000000000000001
<4>           000003e00168ec62 000000003988d960 0000000000000000 000003e0016b0608
<4>           000000003fe81b20 000000003839bb58 00000000399977f0 000000003edd37f0
<4>           000003e00168b000 000003e00168f138 000000003b75bcd0 000000003b75bc98
<4>Krnl Code: 000003e00168e22ac0c0ffffe6eb larl %r12,3e00168b000
<4>           000003e00168e230b90400b2 lgr %r11,%r2
<4>           000003e00168e234e3e0f0980024 stg %r14,152(%r15)
<4>          >000003e00168e23ae310225e0090 llgc %r1,606(%r2)
<4>           000003e00168e240a7110001 tmll %r1,1
<4>           000003e00168e244a7840007 brc 8,3e00168e252
<4>           000003e00168e248d507d00023c8 clc 0(8,%r13),968(%r2)
<4>           000003e00168e24ea7840009 brc 8,3e00168e260
<4>Call Trace:
<4>([<000003e0016b0608>] afiucv_dbf+0x0/0xfffffffffffdea20 [af_iucv])
<4> [<000003e00168ec6c>] iucv_sock_close+0x130/0x368 [af_iucv]
<4> [<000003e00168ef02>] iucv_sock_release+0x5e/0xe4 [af_iucv]
<4> [<0000000000438e6c>] sock_release+0x44/0x104
<4> [<0000000000438f5e>] sock_close+0x32/0x50
<4> [<0000000000207898>] __fput+0xf4/0x250
<4> [<00000000002038aa>] filp_close+0x7a/0xa8
<4> [<00000000002039ba>] SyS_close+0xe2/0x148
<4> [<0000000000117c8e>] sysc_noemu+0x10/0x16
<4> [<00000042ff8deeac>] 0x42ff8deeac

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoaf_iucv: handle non-accepted sockets after resuming from suspend
Hendrik Brueckner [Wed, 16 Sep 2009 04:37:26 +0000 (04:37 +0000)]
af_iucv: handle non-accepted sockets after resuming from suspend

After resuming from suspend, all af_iucv sockets are disconnected.
Ensure that iucv_accept_dequeue() can handle disconnected sockets
which are not yet accepted.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoaf_iucv: fix race in __iucv_sock_wait()
Hendrik Brueckner [Wed, 16 Sep 2009 04:37:25 +0000 (04:37 +0000)]
af_iucv: fix race in __iucv_sock_wait()

Moving prepare_to_wait before the condition to avoid a race between
schedule_timeout and wake up.
The race can appear during iucv_sock_connect() and iucv_callback_connack().

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoiucv: use correct output register in iucv_query_maxconn()
Hendrik Brueckner [Wed, 16 Sep 2009 04:37:24 +0000 (04:37 +0000)]
iucv: use correct output register in iucv_query_maxconn()

The iucv_query_maxconn() function uses the wrong output register and
stores the size of the interrupt buffer instead of the maximum number
of connections.

According to the QUERY IUCV function, general register 1 contains the
maximum number of connections.

If the maximum number of connections is not set properly, the following
warning is displayed:

Badness at /usr/src/kernel-source/2.6.30-39.x.20090806/net/iucv/iucv.c:1808
Modules linked in: netiucv fsm af_iucv sunrpc qeth_l3 dm_multipath dm_mod vmur qeth ccwgroup
CPU: 0 Tainted: G        W  2.6.30 #4
Process seq (pid: 16925, task: 0000000030e24a40, ksp: 000000003033bd98)
Krnl PSW : 0404200180000000 000000000053b270 (iucv_external_interrupt+0x64/0x224)
           R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:0 CC:2 PM:0 EA:3
Krnl GPRS: 00000000011279c2 00000000014bdb70 0029000000000000 0000000000000029
           000000000053b236 000000000001dba4 0000000000000000 0000000000859210
           0000000000a67f68 00000000008a6100 000000003f83fb90 0000000000004000
           000000003f8c7bc8 00000000005a2250 000000000053b236 000000003fc2fe08
Krnl Code: 000000000053b262e33010000021 clg %r3,0(%r1)
           000000000053b268a7440010 brc 4,53b288
           000000000053b26ca7f40001 brc 15,53b26e
          >000000000053b270c03000184134 larl %r3,8434d8
           000000000053b276eb220030000c srlg %r2,%r2,48
           000000000053b27ceb6ff0a00004 lmg %r6,%r15,160(%r15)
           000000000053b282c0f4fffff6a7 brcl 15,539fd0
           000000000053b2884310a003 ic %r1,3(%r10)
Call Trace:
([<000000000053b236>] iucv_external_interrupt+0x2a/0x224)
 [<000000000010e09e>] do_extint+0x132/0x190
 [<00000000001184b6>] ext_no_vtime+0x1e/0x22
 [<0000000000549f7a>] _spin_unlock_irqrestore+0x96/0xa4
([<0000000000549f70>] _spin_unlock_irqrestore+0x8c/0xa4)
 [<00000000002101d6>] pipe_write+0x3da/0x5bc
 [<0000000000205d14>] do_sync_write+0xe4/0x13c
 [<0000000000206a7e>] vfs_write+0xae/0x15c
 [<0000000000206c24>] SyS_write+0x54/0xac
 [<0000000000117c8e>] sysc_noemu+0x10/0x16
 [<00000042ff8defcc>] 0x42ff8defcc

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoiucv: fix iucv_buffer_cpumask check when calling IUCV functions
Hendrik Brueckner [Wed, 16 Sep 2009 04:37:23 +0000 (04:37 +0000)]
iucv: fix iucv_buffer_cpumask check when calling IUCV functions

Prior to calling IUCV functions, the DECLARE BUFFER function must have been
called for at least one CPU to receive IUCV interrupts.

With commit "iucv: establish reboot notifier" (6c005961), a check has been
introduced to avoid calling IUCV functions if the current CPU does not have
an interrupt buffer declared.
Because one interrupt buffer is sufficient, change the condition to ensure
that one interrupt buffer is available.

In addition, checking the buffer on the current CPU creates a race with
CPU up/down notifications: before checking the buffer, the IUCV function
might be interrupted by an smp_call_function() that retrieves the interrupt
buffer for the current CPU.
When the IUCV function continues, the check fails and -EIO is returned. If a
buffer is available on any other CPU, the IUCV function call must be invoked
(instead of failing with -EIO).

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoiucv: suspend/resume error msg for left over pathes
Ursula Braun [Wed, 16 Sep 2009 04:37:22 +0000 (04:37 +0000)]
iucv: suspend/resume error msg for left over pathes

During suspend IUCV exploiters have to close their IUCV connections.
When restoring an image, it can be checked if all IUCV pathes had
been closed before the Linux instance was suspended. If not, an
error message is issued to indicate a problem in one of the
used programs exploiting IUCV communication.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lowpan...
David S. Miller [Thu, 17 Sep 2009 03:55:28 +0000 (20:55 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan

14 years agowl12xx: switch to %pM to print the mac address
Jean-Christophe PLAGNIOL-VILLARD [Wed, 16 Sep 2009 14:07:38 +0000 (14:07 +0000)]
wl12xx: switch to %pM to print the mac address

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agob44: the poll handler b44_poll must not enable IRQ unconditionally
Dongdong Deng [Wed, 16 Sep 2009 16:10:47 +0000 (16:10 +0000)]
b44: the poll handler b44_poll must not enable IRQ unconditionally

net/core/netpoll.c::netpoll_send_skb() calls the poll handler when
it is available. As netconsole can be used from almost any context,
IRQ must not be enabled blindly in the NAPI handler of the driver
which supports netpoll.

Call trace:
netpoll_send_skb()
{
local_irq_save(flags)
  -> netpoll_poll()
    -> poll_napi()
      -> poll_one_napi()
        -> napi->poll()
            -> b44_poll()
local_irq_restore(flags)
}

Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoBlackfin: update ftrace for latest toolchain
Yi Li [Tue, 15 Sep 2009 09:24:31 +0000 (09:24 +0000)]
Blackfin: update ftrace for latest toolchain

The mcount support that was finally added to the Blackfin gcc port isn't
exactly the same as what ftrace was developed against.  Now that the final
gcc version is in place, update the ftrace code to match.

While updating this, fix the swapped arguments to the tracer (signature is
(ip, parent_ip) while we were passing (parent_ip, ip)).

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: fix elf_fpregset_t definition
Mike Frysinger [Mon, 14 Sep 2009 21:22:06 +0000 (21:22 +0000)]
Blackfin: fix elf_fpregset_t definition

The elf_fpregset_t type relied on an empty struct in the asm/user.h, but
the transition to asm-generic/user.h dropped that empty struct.  Rather
than restore this useless struct, define the only user (elf_fpregset_t)
as an empty struct itself.  This fixes building when ELF dump support is
enabled.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: unify cache init functions
Mike Frysinger [Mon, 14 Sep 2009 19:42:26 +0000 (19:42 +0000)]
Blackfin: unify cache init functions

The CPLB implementations (mpu/nompu) had exact copies of the cacheinit
code.  Even the i/d cache functions are largely the same.  So unify them
both in the common kernel cache code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: swap clocksource ratings for gptimer/cycles
Graf Yang [Mon, 14 Sep 2009 04:41:00 +0000 (04:41 +0000)]
Blackfin: swap clocksource ratings for gptimer/cycles

The cycles clocksource is a higher resolution than the gptimer one, so
make sure the ratings field reflects this.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: update ftrace_push_return_trace() breakage
Mike Frysinger [Mon, 14 Sep 2009 01:50:22 +0000 (01:50 +0000)]
Blackfin: update ftrace_push_return_trace() breakage

Commit 71e308a239c updated ftrace_push_return_trace() prototype but didn't
update the Blackfin ftrace code, so things broke.  Since we don't support
the new stuff yet, call it with stub values.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: update cm board resources
Harald Krapfenbauer [Thu, 10 Sep 2009 15:30:03 +0000 (15:30 +0000)]
Blackfin: update cm board resources

Signed-off-by: Harald Krapfenbauer <Harald.Krapfenbauer@bluetechnix.at>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: cm-bf537u: split board from cm-bf537e
Harald Krapfenbauer [Thu, 10 Sep 2009 15:12:08 +0000 (15:12 +0000)]
Blackfin: cm-bf537u: split board from cm-bf537e

The cm-bf537u module, while similar to the cm-bf537e, is different enough
to warrant its own resources.  It has a USB controller but no PHY.

Signed-off-by: Harald Krapfenbauer <Harald.Krapfenbauer@bluetechnix.at>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: bf538-ezkit: add SPI IRQ resources
Barry Song [Thu, 10 Sep 2009 04:32:47 +0000 (04:32 +0000)]
Blackfin: bf538-ezkit: add SPI IRQ resources

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: increase default async timings for parallel flashes
Sonic Zhang [Mon, 7 Sep 2009 03:20:48 +0000 (03:20 +0000)]
Blackfin: increase default async timings for parallel flashes

The default async timings are a little too fast for the parallel flash
that is attached by default to the async banks.  So slow things down a bit
so accessing the hardware is stable.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: add ICPLB coverage for async banks
Bernd Schmidt [Wed, 2 Sep 2009 08:14:05 +0000 (08:14 +0000)]
Blackfin: add ICPLB coverage for async banks

When doing XIP, we need to execute out of the async banks, so we need
ICPLBs to allow this.

Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: use KERN_ALERT in all kgdb_test output
Mingquan Pan [Mon, 31 Aug 2009 04:56:06 +0000 (04:56 +0000)]
Blackfin: use KERN_ALERT in all kgdb_test output

Most messages are already using KERN_ALERT, so be consistent to make
things easier to check with test scripts.

Signed-off-by: Mingquan Pan <grace.pan@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: fix BF54x SPI CS resources
Yi Li [Sun, 30 Aug 2009 20:45:50 +0000 (20:45 +0000)]
Blackfin: fix BF54x SPI CS resources

The BF54x has three slave select signals for SPI0/SPI1, not eight.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: fix typo in isram_write()
Robin Getz [Thu, 27 Aug 2009 14:39:31 +0000 (14:39 +0000)]
Blackfin: fix typo in isram_write()

The DTEST write bit is 2, not 1.  Improve comments in the related macro
while we're here.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: bf537-stamp: add adp5588 gpio resources
Michael Hennerich [Thu, 27 Aug 2009 04:09:32 +0000 (04:09 +0000)]
Blackfin: bf537-stamp: add adp5588 gpio resources

For the adp5588 GPIO daughter card.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: add some isram-driver self tests
Mike Frysinger [Thu, 27 Aug 2009 01:46:48 +0000 (01:46 +0000)]
Blackfin: add some isram-driver self tests

Make it easy to figure out if code changes here are correct.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: workaround anomaly 05000283
Robin Getz [Wed, 26 Aug 2009 15:54:10 +0000 (15:54 +0000)]
Blackfin: workaround anomaly 05000283

Make sure our interrupt entry code with exact hardware errors handles
anomaly 05000283 (infinite stall in system MMR kill) so we don't stall
while under load.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: fix spelling in a few comments
Michael Hennerich [Fri, 21 Aug 2009 03:49:19 +0000 (03:49 +0000)]
Blackfin: fix spelling in a few comments

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: use raw_smp_processor_id() in exception code
Yi Li [Thu, 20 Aug 2009 04:17:47 +0000 (04:17 +0000)]
Blackfin: use raw_smp_processor_id() in exception code

When preempt debugging is enabled, smp_processor_id() may utilize the
"current" structure.  This may not be safe to access under all exceptions
due to it being in dynamically allocated memory.  So in exception code,
make sure we use raw_smp_processor_id() instead to get at the real value
directly.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: remove useless duplicated assignment in gpio code
Michael Hennerich [Wed, 19 Aug 2009 03:15:56 +0000 (03:15 +0000)]
Blackfin: remove useless duplicated assignment in gpio code

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: Fix link errors with binutils 2.19 and GCC 4.3
Ingo Molnar [Tue, 18 Aug 2009 16:45:25 +0000 (16:45 +0000)]
Blackfin: Fix link errors with binutils 2.19 and GCC 4.3

Not sure whether this has been reported/fixed before.

Today I built a Blackfin tool-chain from scratch for -tip testing,
and it triggers:

 arch/blackfin/kernel/vmlinux.lds:1238: undefined section `.data_a_l1' referenced in expression

and:

 arch/blackfin/kernel/vmlinux.lds:1238: undefined section `.text_data_l1'
referenced in expression

Now i dont have any way to test this linker script, but it now at
least builds fine after fixing what appears to be typos in those
assert statements.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: handle the core timer interrupt with handle_percpu_irq on SMP
Graf Yang [Tue, 18 Aug 2009 04:29:33 +0000 (04:29 +0000)]
Blackfin: handle the core timer interrupt with handle_percpu_irq on SMP

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: optimize fixed code handling for the most common case
Mike Frysinger [Mon, 17 Aug 2009 19:05:07 +0000 (19:05 +0000)]
Blackfin: optimize fixed code handling for the most common case

The majority of the time we are returning to user space, it is not in the
fixed atomic code region.  So rather than branch to a function where we
check the PC and return, do the check inline and branch only when needed.

Also, tweak some of the fixed code handling based on assumptions we are
aware of but cannot be expressed in C.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: delete '-spi' suffix in ad1836/ad1938 driver name
Barry Song [Thu, 13 Aug 2009 21:07:37 +0000 (21:07 +0000)]
Blackfin: delete '-spi' suffix in ad1836/ad1938 driver name

The ASoC drivers have dropped the redundant "-spi" suffix in the driver
name, so update the board resources accordingly.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: punt dead cache locking code
Mike Frysinger [Thu, 13 Aug 2009 23:32:11 +0000 (19:32 -0400)]
Blackfin: punt dead cache locking code

No one uses these functions, and some are duplicate of existing C code.  So
just punt the whole thing.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: drop board resources for dead devices (pbx/ad9960)
Mike Frysinger [Thu, 13 Aug 2009 04:27:31 +0000 (04:27 +0000)]
Blackfin: drop board resources for dead devices (pbx/ad9960)

These hardware devices are dead and the drivers never cleaned up/merged,
so punt the useless board resource info.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: do not trace the exception handler
Yi Li [Wed, 12 Aug 2009 23:05:35 +0000 (23:05 +0000)]
Blackfin: do not trace the exception handler

Since the exception handler cannot cause exceptions, we cannot trace it
without easily causing double faults and crashing the system.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: fix BF522/BF523 max VCO mixup
Mike Frysinger [Tue, 11 Aug 2009 21:27:09 +0000 (21:27 +0000)]
Blackfin: fix BF522/BF523 max VCO mixup

The BF522 and BF523 had their real max VCO values swapped.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: SMP port does not yet support cpu frequency scaling
Graf Yang [Fri, 7 Aug 2009 03:52:54 +0000 (03:52 +0000)]
Blackfin: SMP port does not yet support cpu frequency scaling

We have an item to get this fixed, but in the mean time, disable selection
via Kconfig dependencies.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: cleanup sync handling when enabling/disabling cplbs
Yi Li [Fri, 7 Aug 2009 01:20:58 +0000 (01:20 +0000)]
Blackfin: cleanup sync handling when enabling/disabling cplbs

The handling of updating the [DI]MEM_CONTROL MMRs does not follow proper
sync procedures as laid out in the Blackfin programming manual.  So rather
than audit/fix every call location, create helper functions that do the
right things in order to safely update these MMRs.  Then convert all call
sites to use these new helper functions.

While we're fixing the code, drop the workaround for anomaly 05000125 as
that anomaly applies to old versions of silicon that we do not support.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: bf537-stamp: update ad1836 resources
Barry Song [Thu, 6 Aug 2009 21:03:02 +0000 (21:03 +0000)]
Blackfin: bf537-stamp: update ad1836 resources

Update the ad1836 resources for the new ASoC driver.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: update anomaly lists
Yi Li [Wed, 5 Aug 2009 10:02:14 +0000 (10:02 +0000)]
Blackfin: update anomaly lists

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: bf538-ezkit: add resources for parallel flash
Barry Song [Mon, 3 Aug 2009 04:40:36 +0000 (04:40 +0000)]
Blackfin: bf538-ezkit: add resources for parallel flash

The board has some parallel flash hooked up to the async banks, so add
appropriate physmap resources for it.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: fix read buffer overflow
Roel Kluin [Sun, 2 Aug 2009 12:26:48 +0000 (14:26 +0200)]
Blackfin: fix read buffer overflow

Check whether index is within bounds before testing the element.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: bf548-ezkit: fix incorrect LCD size parameters
Stefan Pledl [Wed, 29 Jul 2009 08:09:45 +0000 (08:09 +0000)]
Blackfin: bf548-ezkit: fix incorrect LCD size parameters

I think we have to use the physical dimensions [mm] of the display for
.width and .heigth in struct bfin_bf54xfb_mach_info bf54x_lq043_data which
are copied to fbinfo->var.height/.width in bf54x-lq043fb.c.

linux/fb.h describes this values as 'height/weight of picture in mm'

Otherwise QT calcs the wrong dpi value and the displayed fonts are very
small.

Signed-off-by: Stefan Pledl <stefan.pledl@mesutronic.de>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: cm-bf527/bf537-stamp: fix dm9000 resources
Barry Song [Mon, 27 Jul 2009 06:42:50 +0000 (06:42 +0000)]
Blackfin: cm-bf527/bf537-stamp: fix dm9000 resources

The dm9000 driver expects two IORESOURCE_MEM to get at the device, so make
sure we declare things properly.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: drop unused MMR defines that only cause bad code to be written
Mike Frysinger [Mon, 27 Jul 2009 00:44:25 +0000 (00:44 +0000)]
Blackfin: drop unused MMR defines that only cause bad code to be written

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: convert boards to use platform data with smc91x
Michael Hennerich [Fri, 24 Jul 2009 08:48:31 +0000 (08:48 +0000)]
Blackfin: convert boards to use platform data with smc91x

Latest smc91x driver allows you to specify settings in board resources
rather than needing CONFIG_BLACKFIN in the drivers/net/smc91x.h header.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: bf537-stamp: drop ATA interrupt probe workaround
Barry Song [Thu, 23 Jul 2009 04:20:48 +0000 (04:20 +0000)]
Blackfin: bf537-stamp: drop ATA interrupt probe workaround

The interrupt probe workaround doesn't work without hacks to common code,
and the add-on card only needs a simple resistor to fix the problem, so
drop the board-specific hack.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: improve double fault debug handling
Graf Yang [Wed, 22 Jul 2009 11:56:24 +0000 (11:56 +0000)]
Blackfin: improve double fault debug handling

Since the hardware only provides reporting for the last exception handled,
and the values are valid only when executing the exception handler, we
need to save the context for reporting at a later point.  While we do this
for one exception, it doesn't work properly when handling a second one as
the original exception is clobbered by the double fault.  So when double
fault debugging is enabled, create a dedicated shadow of these values and
save/restore out of there.  Now the crash report properly displays the
first exception as well as the second one.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: bf533-stamp: fix typo in SPI frequency for ad1836 codec
Cliff Cai [Wed, 22 Jul 2009 06:34:55 +0000 (06:34 +0000)]
Blackfin: bf533-stamp: fix typo in SPI frequency for ad1836 codec

One too many zeros means we run way faster than the codec can handle.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: fix MPU handling of invalid memory accesses
Graf Yang [Tue, 21 Jul 2009 02:26:57 +0000 (02:26 +0000)]
Blackfin: fix MPU handling of invalid memory accesses

The protect_page() function was incorrectly setting up the hardware tables
based on possible access capabilities rather than the actual requested
values.  This means we would grant more access to mmap-ed pages than we
should have.  Once we fix this, we need to tweak the signal generated by
such accesses to aline ourselves with other ports.  This allows the LTP
mmap0{5,6,7} cases to run properly.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: clean up duplicate I2C device type definitions
Jean Delvare [Sat, 18 Jul 2009 14:54:03 +0000 (16:54 +0200)]
Blackfin: clean up duplicate I2C device type definitions

I2C_BOARD_INFO() already sets .type, no need to set it again.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: bf537-stamp: update AD714x resources
Barry Song [Fri, 17 Jul 2009 07:04:55 +0000 (07:04 +0000)]
Blackfin: bf537-stamp: update AD714x resources

Push the device table to the board resources as data interpretation can be
changed on a per-board basis.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: do not try displaying the end of the stack
Sonic Zhang [Thu, 16 Jul 2009 10:36:35 +0000 (10:36 +0000)]
Blackfin: do not try displaying the end of the stack

The end of the stack may not be valid (and that could be OK), so do not
attempt to parse it.  If we do, we might use a bad pointer in kernel space
which makes things panic().

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: bf533-stamp: add resources for mmc_spi card
Yi Li [Thu, 16 Jul 2009 10:12:30 +0000 (10:12 +0000)]
Blackfin: bf533-stamp: add resources for mmc_spi card

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: bf538: add bfin_clear_PPI_STATUS() helper
Barry Song [Mon, 13 Jul 2009 04:16:42 +0000 (04:16 +0000)]
Blackfin: bf538: add bfin_clear_PPI_STATUS() helper

Add the bf538 version of bfin_clear_PPI_STATUS() to match all other ports.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: fix BF548 UART0 DMA IRQ translation
Stefan Pledl [Sat, 11 Jul 2009 11:50:42 +0000 (13:50 +0200)]
Blackfin: fix BF548 UART0 DMA IRQ translation

The initial BF54x port included some defines to keep code simple across
different processors, but it just ended up causing the UART0 DMA IRQs to
be set to the UART1 channels.

Signed-off-by: Stefan Pledl <stefan.pledl@mesutronic.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: catch hardware errors earlier during booting
Robin Getz [Tue, 7 Jul 2009 20:17:09 +0000 (20:17 +0000)]
Blackfin: catch hardware errors earlier during booting

Allow hardware errors to be caught during early portions of booting, and
leave something in the shadow console that people can use to debug their
system with (to be printed out by the bootloader on next reset).

This enables the hardare error interrupts in head.S, allowing us to find
hardware errors when they happen (well, as much as you can with a hardware
error) and prints out the trace if it is enabled.  This will catch errors
(like booting the wrong image on a 533) which previously resulted in a
infinite loop/hang, as well as random hardware errors before before
setup_arch().

To disable this debug only feature - turn off EARLY_PRINTK.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: add an early shadow console
Robin Getz [Mon, 6 Jul 2009 14:53:19 +0000 (14:53 +0000)]
Blackfin: add an early shadow console

Add a memory based shadow console to keep a copy of the printk buffer in a
location which can be found externally.  This allows bootloaders to locate
and utilize the log buffer in case of silent (early/resume/etc...) crashes.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: add support for common FDPIC ptrace requests
Mike Frysinger [Fri, 3 Jul 2009 00:17:45 +0000 (00:17 +0000)]
Blackfin: add support for common FDPIC ptrace requests

The FDPIC arches support a standard set of ptrace requests so rather than
define our own custom API, hook up those requests for common code to
leverage.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: push SRAM locks down into related ifdefs
Mike Frysinger [Wed, 1 Jul 2009 15:42:13 +0000 (15:42 +0000)]
Blackfin: push SRAM locks down into related ifdefs

Rather than defining the locks and initializing them all the time, only do
so when we actually need them (i.e. the SRAM regions exist).  This avoids
dead data and code bloat during runtime.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: unify duplicated SMP checks in L2 cache kconfig
Sonic Zhang [Tue, 30 Jun 2009 09:48:03 +0000 (09:48 +0000)]
Blackfin: unify duplicated SMP checks in L2 cache kconfig

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: rename PCF8574 driver config
Michael Hennerich [Tue, 30 Jun 2009 14:57:22 +0000 (14:57 +0000)]
Blackfin: rename PCF8574 driver config

The "TWI_KEYPAD" driver was renamed to "INPUT_PCF8574", so update the
defines in the board resources accordingly.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: clean up early memory setup code
Robin Getz [Fri, 26 Jun 2009 12:52:46 +0000 (12:52 +0000)]
Blackfin: clean up early memory setup code

Remove code duplication, and only print out memory warnings when they are
an actual problem.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: fix module reloc handling for all memory regions
Mike Frysinger [Fri, 26 Jun 2009 00:49:51 +0000 (00:49 +0000)]
Blackfin: fix module reloc handling for all memory regions

The current module relocation code has spotty handling wrt different
memory regions (like L1 instruction).  Rather than try to fix each
little spot, use the new common memory functions to greatly simplify
everything and make sure it is always correct.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: cleanup module section checking
Mike Frysinger [Fri, 26 Jun 2009 00:48:33 +0000 (00:48 +0000)]
Blackfin: cleanup module section checking

The current module section handling code has a lot of verbose statements
copied and pasted throughout which makes it pretty hard to digest at a
glance.  By unifying all of these up front, it is a lot easier to quickly
get an idea of what is actually going on.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: convert malloc()/memset() to zalloc() in module code
Mike Frysinger [Fri, 26 Jun 2009 00:37:40 +0000 (00:37 +0000)]
Blackfin: convert malloc()/memset() to zalloc() in module code

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: cleanup printk() usage in module code
Mike Frysinger [Fri, 26 Jun 2009 00:35:24 +0000 (00:35 +0000)]
Blackfin: cleanup printk() usage in module code

Convert all printk() statements to use the common pr_xxx() funcs and use
the new pr_fmt() function to standardize all of the output.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: reject outdated/unused/wrong relocation types
Robin Getz [Thu, 25 Jun 2009 15:49:38 +0000 (15:49 +0000)]
Blackfin: reject outdated/unused/wrong relocation types

All kernel modules are required to be built with -mlong-calls and thus
should not generate any of these relocations.  If they do, it means the
module has not been compiled properly, so rather than trying to handle
them (and running into random run time errors) just error out on module
load to force the module to be compiled correctly.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: convert ptrace to new memory functions
Mike Frysinger [Thu, 25 Jun 2009 00:02:58 +0000 (20:02 -0400)]
Blackfin: convert ptrace to new memory functions

Now that we have a Blackfin memory function to figure out how to properly
access the different regions, drop the custom memory range checks in our
ptrace code and use that.  It makes the code nicer and fixes bugs where
the ptrace logic wasn't handling all the different regions.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: cleanup traps decode_address() a bit
Mike Frysinger [Tue, 23 Jun 2009 20:17:21 +0000 (20:17 +0000)]
Blackfin: cleanup traps decode_address() a bit

Unify the address display to shrink the code, and add missing decoding of
a few special Blackfin-specific regions (L1 ROM and MMRs).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: inline I-pipe bypass code in ret_from_exception
Philippe Gerum [Mon, 22 Jun 2009 16:26:22 +0000 (18:26 +0200)]
Blackfin: inline I-pipe bypass code in ret_from_exception

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: sanitize manual control of IPEND[4]
Philippe Gerum [Mon, 22 Jun 2009 16:26:07 +0000 (18:26 +0200)]
Blackfin: sanitize manual control of IPEND[4]

Cleanup is performed in two ways:

- remove extraneous updates of IPEND[4] w/ CONFIG_IPIPE,
  and document remaining use.

- substitute pop-reg-from-stack instructions with plain SP fixups in
  all save-RETI-then-discard patterns.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: document __ipipe_call_irqtail
Philippe Gerum [Mon, 22 Jun 2009 16:25:52 +0000 (18:25 +0200)]
Blackfin: document __ipipe_call_irqtail

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: allow EVT5 to preempt irqtail prologue (CONFIG_DEBUG_HWERR)
Philippe Gerum [Mon, 22 Jun 2009 16:24:18 +0000 (18:24 +0200)]
Blackfin: allow EVT5 to preempt irqtail prologue (CONFIG_DEBUG_HWERR)

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: reuse evt_evt14 handler to perform irqtail epilogue
Philippe Gerum [Mon, 22 Jun 2009 16:24:02 +0000 (18:24 +0200)]
Blackfin: reuse evt_evt14 handler to perform irqtail epilogue

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: use generic name for EVT14 handler
Philippe Gerum [Mon, 22 Jun 2009 16:23:48 +0000 (18:23 +0200)]
Blackfin: use generic name for EVT14 handler

The purpose of the EVT14 handler may depend on whether CONFIG_IPIPE is
enabled, albeit its implementation can be the same in both cases. When
the interrupt pipeline is enabled, EVT14 can be used to raise the core
priority level for the running code; when CONFIG_IPIPE is off, EVT14
can be used to lower this level before running softirq handlers.

Rename evt14_softirq to evt_evt14 to pick an identifier that fits
both, which allows to reuse the same vector setup code as well.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: allow high priority domains to preempt schedule_tail()
Philippe Gerum [Mon, 22 Jun 2009 16:23:32 +0000 (18:23 +0200)]
Blackfin: allow high priority domains to preempt schedule_tail()

ret_from_fork is always entered with hw interrupts off, which prevents
real-time domains to preempt the Linux kernel during part of the
initial context switch to the new task, which could in turn raise the
worst-case latency figures.

To avoid this, stall the root domain stage in the interrupt pipeline
to keep the scheduling tail code free from Linux-handled IRQs, then
enable hardware interrupts again.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: export show_stack() to modules
Philippe Gerum [Mon, 22 Jun 2009 16:23:12 +0000 (18:23 +0200)]
Blackfin: export show_stack() to modules

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: fix misnomer of some I-pipe helpers
Philippe Gerum [Mon, 22 Jun 2009 16:22:48 +0000 (18:22 +0200)]
Blackfin: fix misnomer of some I-pipe helpers

__ipipe_{stall, unstall}_root_raw() identifiers may leave the reader
under the impression that only the virtual state is affected by these
operations, which is wrong. Pick names following the convention used
throughout the interrupt pipeline code.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: checkpatch --file arch/blackfin/kernel/ipipe.c
Philippe Gerum [Mon, 22 Jun 2009 16:22:25 +0000 (18:22 +0200)]
Blackfin: checkpatch --file arch/blackfin/kernel/ipipe.c

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: make EVT3->EVT5 lowering more robust wrt IPEND[4]
Robin Getz [Mon, 22 Jun 2009 02:02:16 +0000 (02:02 +0000)]
Blackfin: make EVT3->EVT5 lowering more robust wrt IPEND[4]

We handle many exceptions at EVT5 (hardware error level) so that we can
catch exceptions in our exception handling code.  Today - if the global
interrupt enable bit (IPEND[4]) is set (interrupts disabled) our trap
handling code goes into a infinite loop, since we need interrupts to be
on to defer things to EVT5.

Normal kernel code should not trigger this for any reason as IPEND[4] gets
cleared early (when doing an interrupt context save) and the kernel stack
there should be sane (or something much worse is happening in the system).
But there have been a few times where this has happened, so this change
makes sure we dump a proper crash message even when things have gone south.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: bf537-stamp: add resources for AD1938 audio card
Barry Song [Thu, 4 Jun 2009 10:14:17 +0000 (10:14 +0000)]
Blackfin: bf537-stamp: add resources for AD1938 audio card

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: bf537-stamp: declare SPI IRQ resources
Yi Li [Wed, 3 Jun 2009 09:46:22 +0000 (09:46 +0000)]
Blackfin: bf537-stamp: declare SPI IRQ resources

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: bf537-stamp: update ADP5588 header name
Michael Hennerich [Tue, 2 Dec 2008 14:08:58 +0000 (14:08 +0000)]
Blackfin: bf537-stamp: update ADP5588 header name

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoipv6: Ignore route option with ROUTER_PREF_INVALID
Jens Rosenboom [Thu, 10 Sep 2009 06:25:11 +0000 (06:25 +0000)]
ipv6: Ignore route option with ROUTER_PREF_INVALID

RFC4191 says that "If the Reserved (10) value is received, the Route
Information Option MUST be ignored.", so this patch makes us conform
to the RFC. This is different to the usage of the Default Router
Preference, where an invalid value must indeed be treated as
PREF_MEDIUM.

Signed-off-by: Jens Rosenboom <me@jayr.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: make ab_arp select active slaves as other modes
Jiri Pirko [Mon, 31 Aug 2009 11:09:38 +0000 (11:09 +0000)]
bonding: make ab_arp select active slaves as other modes

When I was implementing primary_passive option (formely named primary_lazy) I've
run into troubles with ab_arp. This is the only mode which is not using
bond_select_active_slave() function to select active slave and instead it
selects it itself. This seems to be not the right behaviour and it would be
better to do it in bond_select_active_slave() for all cases. This patch makes
this happen. Please review.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Thu, 17 Sep 2009 00:01:24 +0000 (17:01 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6

14 years agocfg80211: fix SME connect
Johannes Berg [Wed, 16 Sep 2009 16:04:26 +0000 (09:04 -0700)]
cfg80211: fix SME connect

There's a check saying
/* we're good if we have both BSSID and channel */
if (wdev->conn->params.bssid && wdev->conn->params.channel) {

but that isn't true -- we need the BSS struct. This leads
to errors such as

    Trying to associate with 00:1b:53:11:dc:40 (SSID='TEST' freq=2412 MHz)
    ioctl[SIOCSIWFREQ]: No such file or directory
    ioctl[SIOCSIWESSID]: No such file or directory
    Association request to the driver failed
    Associated with 00:1b:53:11:dc:40

in wpa_supplicant, as reported by Holger.

Instead, we really need to have the BSS struct, and if we
don't, then we need to initiate a scan for it. But we may
already have the BSS struct here, so hang on to it if we
do and scan if we don't.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agorc80211_minstrel: fix contention window calculation
Pavel Roskin [Wed, 16 Sep 2009 02:24:30 +0000 (22:24 -0400)]
rc80211_minstrel: fix contention window calculation

The contention window is supposed to be a power of two minus one, i.e.
15, 31, 63, 127...  minstrel_rate_init() forgets to subtract 1, so the
sequence becomes 15, 32, 66, 134...

Bug reported by Dan Halperin <dhalperi@cs.washington.edu>

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agossb/sdio: fix printk format warnings
Randy Dunlap [Tue, 15 Sep 2009 21:52:40 +0000 (14:52 -0700)]
ssb/sdio: fix printk format warnings

Fix printk format warnings:

drivers/ssb/sdio.c:336: warning: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t'
drivers/ssb/sdio.c:443: warning: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agop54usb: add Zcomax XG-705A usbid
Christian Lamparter [Mon, 14 Sep 2009 21:08:43 +0000 (23:08 +0200)]
p54usb: add Zcomax XG-705A usbid

This patch adds a new usbid for Zcomax XG-705A to the device table.

Cc: stable@kernel.org
Reported-by: Jari Jaakola <jari.jaakola@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoASoC: remove unused #include <linux/version.h>
Huang Weiyi [Wed, 16 Sep 2009 13:05:45 +0000 (21:05 +0800)]
ASoC: remove unused #include <linux/version.h>

Remove unused #include <linux/version.h>('s) in
  sound/soc/codecs/ad1836.c
  sound/soc/codecs/ad1938.c
  sound/soc/codecs/wm8974.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoFix ia64 build breakage in head.S
Anirban Sinha [Wed, 16 Sep 2009 17:16:18 +0000 (10:16 -0700)]
Fix ia64 build breakage in head.S

The "cleanup console_print()" patch in commit
353f6dd2dec992ddd34620a94b051b0f76227379 introduced an "extern"
declaration into an assembly language file.  Remove it.

Signed-off-by: Anirban Sinha <asinha@zeugmasystems.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'tip/tracing/core4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Ingo Molnar [Wed, 16 Sep 2009 19:16:37 +0000 (21:16 +0200)]
Merge branch 'tip/tracing/core4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into tracing/core

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Wed, 16 Sep 2009 15:27:10 +0000 (08:27 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  Driver Core: devtmpfs - kernel-maintained tmpfs-based /dev
  debugfs: Modify default debugfs directory for debugging pktcdvd.
  debugfs: Modified default dir of debugfs for debugging UHCI.
  debugfs: Change debugfs directory of IWMC3200
  debugfs: Change debuhgfs directory of trace-events-sample.h
  debugfs: Fix mount directory of debugfs by default in events.txt
  hpilo: add poll f_op
  hpilo: add interrupt handler
  hpilo: staging for interrupt handling
  driver core: platform_device_add_data(): use kmemdup()
  Driver core: Add support for compatibility classes
  uio: add generic driver for PCI 2.3 devices
  driver-core: move dma-coherent.c from kernel to driver/base
  mem_class: fix bug
  mem_class: use minor as index instead of searching the array
  driver model: constify attribute groups
  UIO: remove 'default n' from Kconfig
  Driver core: Add accessor for device platform data
  Driver core: move dev_get/set_drvdata to drivers/base/dd.c
  Driver core: add new device to bus's list before probing

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Linus Torvalds [Wed, 16 Sep 2009 15:11:54 +0000 (08:11 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (641 commits)
  Staging: remove sxg driver
  Staging: remove heci driver
  Staging: remove at76_usb wireless driver.
  Staging: rspiusb: remove the driver
  Staging: meilhaus: remove the drivers
  Staging: remove me4000 driver.
  Staging: line6: ffzb returns an unsigned integer
  Staging: line6: pod.c: style cleanups
  Staging: iio: introduce missing kfree
  Staging: dream: introduce missing kfree
  Staging: comedi: addi-data: NULL dereference of amcc in v_pci_card_list_init()
  Staging: vt665x: fix built-in compiling
  Staging: rt3090: enable NATIVE_WPA_SUPPLICANT_SUPPORT option
  Staging: rt3090: port changes in WPA_MIX_PAIR_CIPHER to rt3090
  Staging: rt3090: rename device from raX to wlanX
  Staging: rt3090: remove possible conflict with rt2860
  Staging: rt2860/rt2870/rt3070/rt3090: fix compiler warning on x86_64
  Staging: rt2860: add new device ids
  Staging: rt3090: add device id 1462:891a
  Staging: asus_oled: Cleaned up checkpatch issues.
  ...

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pcmcia-2.6
Linus Torvalds [Wed, 16 Sep 2009 15:11:23 +0000 (08:11 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pcmcia-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pcmcia-2.6:
  pcmcia: document return value of pcmcia_loop_config
  pcmcia: dtl1_cs: fix pcmcia_loop_config logic
  pcmcia: drop non-existant includes
  pcmcia: disable prefetch/burst for OZ6933
  pcmcia: fix incorrect argument order to list_add_tail()
  pcmcia: drivers/pcmcia/pcmcia_resource.c: Remove unnecessary semicolons
  pcmcia: Use phys_addr_t for physical addresses
  pcmcia: drivers/pcmcia: Make static