aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-05-19Merge branch 'timers-for-linus-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tipLinus Torvalds2-39/+13
* 'timers-for-linus-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: avr32: Fix typo in read_persistent_clock() sparc: Convert sparc to use read/update_persistent_clock cris: Convert cris to use read/update_persistent_clock m68k: Convert m68k to use read/update_persistent_clock m32r: Convert m32r to use read/update_peristent_clock blackfin: Convert blackfin to use read/update_persistent_clock ia64: Convert ia64 to use read/update_persistent_clock avr32: Convert avr32 to use read/update_persistent_clock h8300: Convert h8300 to use read/update_persistent_clock frv: Convert frv to use read/update_persistent_clock mn10300: Convert mn10300 to use read/update_persistent_clock alpha: Convert alpha to use read/update_persistent_clock xtensa: Fix unnecessary setting of xtime time: Clean up direct xtime usage in xen
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.hTejun Heo2-1/+1
percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-13blackfin: Convert blackfin to use read/update_persistent_clockJohn Stultz2-39/+13
This patch converts the blackfin architecture to use the generic read_persistent_clock and update_persistent_clock interfaces, reducing the amount of arch specific code we have to maintain, and allowing for further cleanups in the future. I have not built or tested this patch, so help from arch maintainers would be appreciated. Signed-off-by: John Stultz <johnstul@us.ibm.com> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Andrew Morton <akpm@linux-foundation.org> LKML-Reference: <1267675049-12337-10-git-send-email-johnstul@us.ibm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2010-03-09Blackfin: mark gpio lib functions staticJoachim Eastwood1-7/+7
Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: GPIO: implement to_irq handlerJoachim Eastwood1-0/+6
This makes it possible to support IRQs coming from off-chip GPIO controllers. Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: remove trailing space in messagesFrans Pop2-6/+6
Signed-off-by: Frans Pop <elendil@planet.nl> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: add support for restart_syscall()Mike Frysinger1-0/+9
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: fix single stepping over system callsMike Frysinger2-3/+11
On Blackfin systems, the hardware single step exception triggers before the system call exception, so we need to save this info to process it later on. Otherwise, single stepping in userspace misses a few insns right after the system call. This is based a bit on the SuperH code added in commit 4b505db9c4c72dbd. Reported-by: Roland McGrath <roland@redhat.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: initial tracehook supportMike Frysinger2-60/+20
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: initial regset supportMike Frysinger2-30/+90
We don't support core dumps (yet?), but this should make things easier. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: simplify PTRACE_{PEEK,POKE}USR in preperation for regset supportMike Frysinger1-67/+51
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: simplify SYSCFG code a bit and ignore attempts to change itMike Frysinger1-18/+6
We don't want to let user space modify the SYSCFG register arbitrarily as the settings are system wide (SNEN/CNEN) and can cause misbehavior. The only other bit here (SSSTEP) has proper controls via PTRACE_SINGLESTEP. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: use generic ptrace_resume codeChristoph Hellwig1-44/+0
Use the generic ptrace_resume code for PTRACE_SYSCALL, PTRACE_CONT, PTRACE_KILL and PTRACE_SINGLESTEP. This implies defining arch_has_single_step in <asm/ptrace.h> and implementing the user_enable_single_step and user_disable_single_step functions, which also causes the breakpoint information to be cleared on fork, which could be considered a bug fix. Also the TIF_SYSCALL_TRACE thread flag is now cleared on PTRACE_KILL which it previously wasn't which is consistent with all architectures using the modern ptrace code. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: rewrite resync_core_{i,d}cache() SMP logic to avoid per_cpu dataGraf Yang1-2/+2
This functions are implicitly called by core functions like cpu_relax(), and since those functions may be called early on before common code has initialized the per-cpu data area, we need to tweak the stats gathering. Now the statistics are maintained in common bss which makes these funcs safe to use as soon as the C runtime env is setup. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: add support for cpufreq on SMP systemsGraf Yang1-0/+4
Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: split watchdog definitions into a dedicated header fileGraf Yang1-15/+1
This allows things to be shared between the different watchdog sources. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: support new ftrace frame pointer semanticsMike Frysinger2-5/+13
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: implement ftrace mcount testMike Frysinger1-1/+10
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: implement nmi_watchdog for SMP on BF561Graf Yang3-0/+318
Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: respect the L1 kconfig optimization in the MPU codeBarry Song1-6/+12
Restore support for CONFIG_EXCPT_IRQ_SYSC_L1 in the MPU CPLB manager. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: fill out the signal si_addr when sending a SIGBUS/SIGSEGVBarry Song1-3/+11
Some userspace applications use this member in diagnosing crashes. It also makes some LTP tests pass (i.e. the Blackfin arch behaves more like everyone else). Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: fix up mm locking in address dumpingGraf Yang1-1/+13
The locking code in the address dumper needs to grab the mm's mmap_sem so that other CPUs do not get an inconsistent view. On UP systems this really wasn't a problem, but it is easy to trigger a race on SMP systems when another CPU removes a mapping. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: kgdb: mark all local funcs/structs staticMike Frysinger1-5/+5
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: fix decoding of opcodes 41-47 in decode_instruction()Roel Kluin1-1/+1
This condition allowed only decoding of opcode 0x0040 Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: initial XIP supportBarry Song5-7/+92
Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: fix the section name of init_thread_unionBarry Song1-1/+1
Use the common attribute rather than setting the section name directly. The common linker script defines expect the newer naming. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: replace harcoded define with proper THREAD_SIZE macroBarry Song1-1/+1
Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: fix relocation errors with large initramfs imagesJie Zhang1-5/+8
Since we are now discarding .exit.text at runtime instead of link time, we need to place all .text sections ahead of the .data sections. Otherwise, a really large attached initramfs may cause link errors as it pushes the PC relative relocations behind the limits of the Blackfin ISA (~16meg). The instructions in the .exit.text are unable to call back into the .text sections leading to a link failure. Signed-off-by: Jie Zhang <jie.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: SMP: make core timers per-cpu clock events for HRTYi Li1-92/+105
SMP systems require per-cpu local clock event devices in order to enable HRT support. One a BF561, we can use local core timer for this purpose. Originally, there was one global core-timer clock event device set up for core A. To accomplish this feat, we need to split the gptimer0/core timer logic so that each is a standalone clock event. There is no requirement that we only have one clock event source anyways. Once we have this, we just define per-cpu clock event devices for each local core timer. Signed-off-by: Yi Li <yi.li@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: gpio: use shorter nameMichael Hennerich1-1/+1
The gpio label size is 16 char, but the current code uses a longer name resulting in chopped display. So use a shorter name. Reported-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: dma-mapping: fix thinko in constant optimizationSonic Zhang1-1/+1
Make sure the non-constant version of the dma_sync functions actually complete instead of recursively calling itself forever. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: MPU: handle caches for reserved memorySonic Zhang1-1/+5
We weren't handling the user-specified cache behavior for the reserved memory regions (via mem=/max_mem=). The no-MPU code already takes care of this, so add support to the MPU code as well. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: fix MPU page permission masks overflow when dealing with async memoryBarry Song2-8/+27
Attempting to use the MPU while doing XIP out of parallel flash hooked up to the async memory bus would often result in random crashes as the MPU slowly corrupted memory. The fallout here is that the async banks gain MPU protection from user space too. So any accesses have to go through the mmap() interface rather than just using hardcoded pointers. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: allow boards to register early devicesSonic Zhang1-0/+7
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-07blackfin,kgdb: Do not put PC in gdb_regs into retx.Sonic Zhang1-1/+1
In blackfin, kgdb is running in delayed exception IRQ5 other than in exception IRQ3 directly. Register reti other than retx in pt_regs is the kgdb return address. So, don't put PC in gdb_regs into retx. CC: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Sonic Zhang <sonic.adi@gmail.com> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
2010-01-07blackfin,kgdb,probe_kernel: Cleanup probe_kernel_read/writeJason Wessel1-205/+0
Blackfin needs it own arch specific probe_kernel_read() and probe_kernel_write(). This was moved out of the kgdb code and into the arch/blackfin/maccess.c, because it is a generic kernel api. The arch specific kgdb.c for blackfin was cleaned of all functions which exist in the kgdb core that do the same thing after resolving the probe_kernel_read() and probe_kernel_write(). This also eliminated the need for most of the #include's. CC: Sonic Zhang <sonic.adi@gmail.com> Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-16Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfinLinus Torvalds18-274/+474
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (88 commits) Blackfin: Convert BUG() to use unreachable() Blackfin: define __NR_recvmmsg Blackfin: drop duplicate sched_clock Blackfin: NOMPU: skip DMA ICPLB hole when it is redundant Blackfin: MPU: add missing __init markings Blackfin: add support for TIF_NOTIFY_RESUME Blackfin: kgdb_test: clean up code a bit Blackfin: convert kgdbtest to proc_fops Blackfin: convert cyc2ns() to clocksource_cyc2ns() Blackfin: ip0x: pull in asm/portmux.h for P_xxx defines Blackfin: drop unused ax88180 resources Blackfin: bf537-stamp: add ADF702x network driver resources Blackfin: bf537-stamp: add CAN resources Blackfin: bf537-stamp: add AD5258 i2c address Blackfin: bf537-stamp: add adau1761 i2c address Blackfin: bf537-stamp: add adau1371 i2c address Blackfin: bf537-stamp: add ADP8870 resources Blackfin: bf537-stamp: kill AD714x board-specific Kconfigs Blackfin: bf537-stamp: update ADP5520 resources Blackfin: bf537-stamp: add ADXL346 orientation sensing support ...
2009-12-16Merge branch 'module' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linusLinus Torvalds1-2/+0
* 'module' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: modpost: fix segfault with short symbol names module: handle ppc64 relocating kcrctabs when CONFIG_RELOCATABLE=y Kbuild: clear marker out of modpost module: make MODULE_SYMBOL_PREFIX into a CONFIG option ARM: unexport symbols used to implement floating point emulation ARM: use unified discard definition in linker script x86: don't export inline function sparc64: don't export static inline pci_ functions
2009-12-15module: make MODULE_SYMBOL_PREFIX into a CONFIG optionAlan Jenkins1-2/+0
The next commit will require the use of MODULE_SYMBOL_PREFIX in .tmp_exports-asm.S. Currently it is mixed in with C structure definitions in "asm/module.h". Move the definition of this arch option into Kconfig, so it can be easily accessed by any code. This also lets modpost.c use the same definition. Previously modpost relied on a hardcoded list of architectures in mk_elfconfig.c. A build test for blackfin, one of the two MODULE_SYMBOL_PREFIX archs, showed the generated code was unchanged. vmlinux was identical save for build ids, and an apparently randomized suffix on a single "__key" symbol in the kallsyms data). Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Acked-by: Mike Frysinger <vapier@gentoo.org> (blackfin) CC: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-12-15Blackfin: drop duplicate sched_clockMike Frysinger1-8/+0
The Blackfin sched_clock() func is pretty much a duplicate of the common version, so just punt it. Reported-by: David Miller <davem@davemloft.net> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15Blackfin: NOMPU: skip DMA ICPLB hole when it is redundantMike Frysinger1-5/+6
Normally there is no user-reserved memory after the DMA region which means there is no user-reserved ICPLB coverage. So the DMA hole can be covered by the large hole that is always added to cover up to the async bank. We only need an explicit DMA whole when we also add an explicit mapping for the user-reserved memory. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15Blackfin: MPU: add missing __init markingsMike Frysinger1-1/+1
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15Blackfin: add support for TIF_NOTIFY_RESUMEBarry Song1-0/+18
Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15Blackfin: kgdb_test: clean up code a bitMike Frysinger1-23/+21
- document simple global symbols - convert printk to pr_* - clean up spurious whitespace - use min_t() Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15Blackfin: convert kgdbtest to proc_fopsAlexey Dobriyan1-27/+12
The read_proc and write_proc interfaces are going to be removed in the common kernel code. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15Blackfin: convert cyc2ns() to clocksource_cyc2ns()Mike Frysinger1-2/+4
The former no longer exists. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15Blackfin: dma-mapping.h: flesh out missing DMA mapping functionsBarry Song1-37/+17
Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15Blackfin: workaround anomaly 05000310Barry Song1-0/+30
While fetching instructions at the boundary of L1 instruction SRAM, a false External Memory Addressing Error might be triggered. We should ignore this and continue on our way to avoid random crashes. Because hardware errors are not exact in the Blackfin architecture, we need to catch a few more common cases when the code flow changes and the signal is finally delivered. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15Blackfin: drop ptrace() write support for fixed code/bootromMike Frysinger1-13/+0
These regions are either read-only and won't work anyways (bootrom), or we don't want people screwing with them because they're shared between all processes (fixed code). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15Blackfin: MPU: support XIP in async flash memoryBarry Song1-4/+9
The NOMPU code already supported executing in the async banks, so this brings the MPU code in line. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>