dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

86 Commits

Author SHA1 Message Date
Robin Getz 904656cda1 [Blackfin] arch: fix bug - grab locks when not atomic
grab locks when not atomic - this fixes the issues
sometimes seen when using magic sysrq.

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-03-26 09:17:43 +08:00
Robin Getz 9a62ca40fd [Blackfin] arch: fix bug - when we crash, current is not valid
Sometimes when we crash, current is not valid, (has been written
over), so the existing code causes a invalid read during exception
context - which is a unrecoverable double fault. This fixes this.

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-03-26 09:15:58 +08:00
Mike Frysinger 0ddeeca25c [Blackfin] arch: add missing __user marking to ss_sp member of signalstack and a few userspace system functions
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-03-07 02:37:41 +08:00
Jan Blunck cf28b4863f d_path: Make d_path() use a struct path
d_path() is used on a <dentry,vfsmount> pair.  Lets use a struct path to
reflect this.

[akpm@linux-foundation.org: fix build in mm/memory.c]
Signed-off-by: Jan Blunck <jblunck@suse.de>
Acked-by: Bryan Wu <bryan.wu@analog.com>
Acked-by: Christoph Hellwig <hch@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Neil Brown <neilb@suse.de>
Cc: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-14 21:17:09 -08:00
Mike Frysinger a3acf52885 [Blackfin] arch: fix typo in printk message
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-02 15:45:27 +08:00
Robin Getz aee3a29240 [Blackfin] arch: print out list of modules if kernel is crashing and tell people if the kernel is tainted
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-11 16:53:00 +08:00
Robin Getz 6b5eace2f1 [Blackfin] arch: Don't oops_in_progress if single step is comming from the kernel
Don't oops_in_progress if single step is comming from the
kernel, which happens if a single step occurs after a exception cause.
This fixes up the remaining issues in the toolchain bug.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-10 17:57:56 +08:00
Robin Getz b03b08ba9c [Blackfin] arch: Clean up dump_bfin_mem
Clean up dump_bfin_mem so that it will display
content from the kernel, as well as l1 instruction, when deferred
HW errors happen, print out the last frame info if it makes sense.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-12-23 22:57:01 +08:00
Robin Getz d8f66c8c1e [Blackfin] arch: fix bug gdb testing on hardware has regression
http://blackfin.uclinux.org/gf/project/toolchain/tracker/?action=TrackerItemEdit&tracker_item_id=3651

As Bernd predicted, this was only necessary because of other
problems in the kenel - fixing those, and this is not necessary, so
remove it.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-12-24 15:27:56 +08:00
Robin Getz 13fe24f37d [Blackfin] arch: fix bug - trap_tests fails to recover on some tests.
http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3719

When the CPLBs get a miss, we do:
  - find a victim in the HW table
  - remove the victim
  - find the replacement in the software table
  - put it into the HW table.

If we can't find a replacement in the software table, we accidently
leave a duplicate in the HW table. This patch ensures that duplicate
is marked as not valid.

What we should do is find the replacement in the software table, before
we find a victim in the HW table - but its too late in the release cycle
to do that much restructuring of this code.

Rather that duplicate code, connect Hardware Errors (irq5) into trap_c,
so user space processes get killed properly.

The rest of irq_panic() can be moved into traps.c (later)

There is still a small corner case that causes problems when a
pheriperal interrupt goes off a single cycle before a user space
hardware error. This causes a kernel panic, rather than the user
space process being killed.

But, this checkin makes things work in 99.9% of the cases, and is a vast
improvement from what is there today (which fails 100% of the time).

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-27 15:38:56 +08:00
Mike Frysinger 49dce9124b Blackfin arch: split apart dump_bfin_regs and merge/remove show_regs from process.c, which was largely duplicated
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-11-21 16:46:49 +08:00
Robin Getz fb322915a0 Blackfin arch: fix bug when sending signals with the wrong PC, cause gdb get confused
We need to send signals with the proper PC, or gdb gets
confused, and lots of tests fail. This should fix that.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-11-21 16:38:05 +08:00
Robin Getz 569a50ca3f Blackfin arch: Ensure we printk out strings with the proper loglevel
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-11-21 16:35:57 +08:00
Robin Getz 90c7f4686f Blackfin arch: cleanup kernel exception message, don't insult the customer.
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-11-18 00:35:33 +08:00
Robin Getz 4c26c6c9bf Blackfin arch: print out modules that are loaded if we get a kernel oops
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-11-18 00:20:49 +08:00
Robin Getz 6a3f0b460c Blackfin arch: fix bug cplbmgr.S does not exit properly on error condition
https://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=1685

Ensure that cache/protection is turned back on when we get a
fault, and ensure that the initial population of the CPLB tables are
correct - that kernel is locked in CPLB tables

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-11-15 15:10:48 +08:00
Robin Getz 4a589e1ef6 Blackfin arch: fix bux - only reset the PC when necessary, otherwise gdb gets confused
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-11-12 22:46:46 +08:00
Robin Getz f26fbc48f1 Blackfin arch: ensure we work around ANOMALY_05000261 for null pointers
We currently do not. Also make it easier to handle cplb violations - in traps.c

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-11-12 22:21:30 +08:00
Robin Getz 226eb1ef52 Blackfin arch: cleanup arch/blackfin/kernel/traps.c handling code.
- move the CONFIG_KGDB into one block, for easier reading
 - remove printk from printk_address, and pass around buffers. Also
   print out the labels when decoding CPLB errors, so you know exactly
   where the error was.
 - Do not use fixed addresses, becuase people do not know where they come from.
 - Turn the printing level down on the dump, so if you don't want,
   only the signal prints out - just like on other archs. If a kernel/interrupt
   crashes, it should dump everything all the time

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-29 17:59:07 +08:00
Robin Getz 885be03b06 Blackfin arch: fix bug: kernel prints out error message twice
This fixes two things:
 - stop calling write_lock_irq/write_unlock_irq which can turn modify
   irq levels
 - don't calling mmput when handing exceptions - since this might_sleep,
   which does a rti, and leaves us in kernel space (irq15, rather
   than irq5).

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-29 17:20:41 +08:00
Bernd Schmidt c1e7399da7 Blackfin arch: Fixing Bug: balance calls to get_task_mm with corresponding mmput calls
We must balance calls to get_task_mm with corresponding mmput calls, otherwise
refcounting is screwed up and mms don't get freed when their task exits.

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-21 22:32:27 +08:00
Robin Getz ce3afa1c04 Blackfin arch: Enable earlyprintk earlier - so any error after our interrupt tables are set up will print out
Also ensure that the traps_c code doesn't cause a double fault, by
sending a signal to a faulting kernel before the memory subsystem
is fully initialized, by printing out the error message before sending
the signal.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-09 17:28:36 +08:00
Robin Getz 2ebcade590 Blackfin arch: fix endless loop bug when a double fault happens
Today when a double fault happens (exception during an exception
handling event), we go into an endless loop, with nothing comming out
the UART. With this patch, we actually see that we have commited a
double fault event

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-09 17:24:30 +08:00
Mike Frysinger 1ffe6646ba Blackfin arch: add an exception request/free api
add an exception request/free api similar to the interrupt request/fre
api so people can utilize the free software based exceptions for their
own purposes

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-08-05 17:14:04 +08:00
Mike Frysinger b4055d733d Blackfin arch: remove spurious KERN_EMERG log level in output
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-08-05 14:00:11 +08:00
Robin Getz 518039bc24 Blackfin arch: Add ability to expend the hardware trace buffer
Add ability to expend the hardware trace buffer via a configurable
software buffer - so you can have lots of history when a crash occurs.

The interesting way we do printk in the traps.c confusese the checking
script

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-25 11:03:28 +08:00
Bryan Wu d31c5ab147 Blackfin arch: after removing fs.h from mm.h, fix the broken on Blackfin arch
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11 15:47:39 -07:00
Sonic Zhang 64c5cb8608 Blackfin arch: fix KGDB bug, dont forget last parameter.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-25 10:46:45 +08:00
Mike Frysinger 9401e618c8 Blackfin arch: scrub dead code
we converted to using a system call for userspace spinlocks
rather than a dedicated exception long ago

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-12 11:50:43 +08:00
Mike Frysinger 1f83b8f148 Blackfin arch: cleanup warnings from checkpatch -- no functional changes
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-12 22:58:21 +08:00
Robin Getz 669b792c77 Blackfin arch: Clean up trace buffer handling, No major functional changes.
Turns on trace earlier, so crashes at kernel start should print out a
trace, making things easier to debug.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-06-21 16:34:08 +08:00
Robin Getz da1f95b4c4 Blackfin arch: Fix up remaining printks with proper log levels
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-06-25 18:05:53 +08:00
Robin Getz c5d88d9e25 Blackfin arch: update printk to use KERN_EMERG and reformat crash output
to look like:

return address: [0x0357fcc4]; contents of:
0x0357fca0:  fcbc  0357  fe20  0357  0009  0000  6a8c  0345
0x0357fcb0:  000e  0000  fcc4  0357  fd44  0357  e128  00ad
0x0357fcc0:  00a0  0000 [000e] 0000  0000  0000  0080  0000
0x0357fcd0:  0000  0000  0000  0000  00a0  0000  000e  0000

instruction in [] is the offending instruction

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-06-21 11:34:16 +08:00
Simon Arlott d2d50aa97d Blackfin arch: spelling fixes
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-06-11 15:31:30 +08:00
Mike Frysinger 8a0e665603 Blackfin arch: fix trace output for FLAT binaries
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-21 09:50:22 -07:00
Bryan Wu 1394f03221 blackfin architecture
This adds support for the Analog Devices Blackfin processor architecture, and
currently supports the BF533, BF532, BF531, BF537, BF536, BF534, and BF561
(Dual Core) devices, with a variety of development platforms including those
avaliable from Analog Devices (BF533-EZKit, BF533-STAMP, BF537-STAMP,
BF561-EZKIT), and Bluetechnix!  Tinyboards.

The Blackfin architecture was jointly developed by Intel and Analog Devices
Inc.  (ADI) as the Micro Signal Architecture (MSA) core and introduced it in
December of 2000.  Since then ADI has put this core into its Blackfin
processor family of devices.  The Blackfin core has the advantages of a clean,
orthogonal,RISC-like microprocessor instruction set.  It combines a dual-MAC
(Multiply/Accumulate), state-of-the-art signal processing engine and
single-instruction, multiple-data (SIMD) multimedia capabilities into a single
instruction-set architecture.

The Blackfin architecture, including the instruction set, is described by the
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
http://blackfin.uclinux.org/gf/download/frsrelease/29/2549/Blackfin_PRM.pdf

The Blackfin processor is already supported by major releases of gcc, and
there are binary and source rpms/tarballs for many architectures at:
http://blackfin.uclinux.org/gf/project/toolchain/frs There is complete
documentation, including "getting started" guides available at:
http://docs.blackfin.uclinux.org/ which provides links to the sources and
patches you will need in order to set up a cross-compiling environment for
bfin-linux-uclibc

This patch, as well as the other patches (toolchain, distribution,
uClibc) are actively supported by Analog Devices Inc, at:
http://blackfin.uclinux.org/

We have tested this on LTP, and our test plan (including pass/fails) can
be found at:
http://docs.blackfin.uclinux.org/doku.php?id=testing_the_linux_kernel

[m.kozlowski@tuxland.pl: balance parenthesis in blackfin header files]
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-07 12:12:58 -07:00