aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-06-01pull clearing RESTORE_SIGMASK into block_sigmask()Al Viro1-17/+7
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-06-01new helper: sigmask_to_save()Al Viro1-9/+3
replace boilerplate "should we use ->saved_sigmask or ->blocked?" with calls of obvious inlined helper... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-06-01new helper: restore_saved_sigmask()Al Viro1-4/+1
first fruits of ..._restore_sigmask() helpers: now we can take boilerplate "signal didn't have a handler, clear RESTORE_SIGMASK and restore the blocked mask from ->saved_mask" into a common helper. Open-coded instances switched... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-31Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signalLinus Torvalds1-2/+0
Pull second pile of signal handling patches from Al Viro: "This one is just task_work_add() series + remaining prereqs for it. There probably will be another pull request from that tree this cycle - at least for helpers, to get them out of the way for per-arch fixes remaining in the tree." Fix trivial conflict in kernel/irq/manage.c: the merge of Andrew's pile had brought in commit 97fd75b7b8e0 ("kernel/irq/manage.c: use the pr_foo() infrastructure to prefix printks") which changed one of the pr_err() calls that this merge moves around. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: keys: kill task_struct->replacement_session_keyring keys: kill the dummy key_replace_session_keyring() keys: change keyctl_session_to_parent() to use task_work_add() genirq: reimplement exit_irq_thread() hook via task_work_add() task_work_add: generic process-context callbacks avr32: missed _TIF_NOTIFY_RESUME on one of do_notify_resume callers parisc: need to check NOTIFY_RESUME when exiting from syscall move key_repace_session_keyring() into tracehook_notify_resume() TIF_NOTIFY_RESUME is defined on all targets now
2012-05-31blackfin: fix possible deadlock in decode_address()Anton Vorontsov1-3/+3
Oleg Nesterov found an interesting deadlock possibility: > sysrq_showregs_othercpus() does smp_call_function(showacpu) > and showacpu() show_stack()->decode_address(). Now suppose that IPI > interrupts the task holding read_lock(tasklist). To fix this, blackfin should not grab the write_ variant of the tasklist lock, read_ one is enough. Suggested-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-31blackfin: a couple of task->mm handling fixesAnton Vorontsov1-13/+13
The patch fixes two problems: 1. Working with task->mm w/o getting mm or grabing the task lock is dangerous as ->mm might disappear (exit_mm() assigns NULL under task_lock(), so tasklist lock is not enough). We can't use get_task_mm()/mmput() pair as mmput() might sleep, so we have to take the task lock while handle its mm. 2. Checking for process->mm is not enough because process' main thread may exit or detach its mm via use_mm(), but other threads may still have a valid mm. To catch this we use find_lock_task_mm(), which walks up all threads and returns an appropriate task (with task lock held). Suggested-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-30sched: Move nr_cpus_allowed out of 'struct sched_rt_entity'Peter Zijlstra1-1/+1
Since nr_cpus_allowed is used outside of sched/rt.c and wants to be used outside of there more, move it to a more natural site. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/n/tip-kr61f02y9brwzkh6x53pdptm@git.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
2012-05-23move key_repace_session_keyring() into tracehook_notify_resume()Al Viro1-2/+0
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21blackfin: don't open-code force_sigsegv()Al Viro1-3/+1
... especially since we don't have the right k_sigaction here, so resetting sa_handler won't work. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21blackfin: use set_current_blocked() and block_sigmask()Matt Fleming1-13/+4
As described in e6fa16ab ("signal: sigprocmask() should do retarget_shared_pending()") the modification of current->blocked is incorrect as we need to check whether the signal we're about to block is pending in the shared queue. Also, use the new helper function introduced in commit 5e6292c0f28f ("signal: add block_sigmask() for adding sigmask to current->blocked") which centralises the code for updating current->blocked after successfully delivering a signal and reduces the amount of duplicate code across architectures. In the past some architectures got this code wrong, so using this helper function should stop that from happening again. Acked-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds2-33/+1
Pull smp hotplug cleanups from Thomas Gleixner: "This series is merily a cleanup of code copied around in arch/* and not changing any of the real cpu hotplug horrors yet. I wish I'd had something more substantial for 3.5, but I underestimated the lurking horror..." Fix up trivial conflicts in arch/{arm,sparc,x86}/Kconfig and arch/sparc/include/asm/thread_info_32.h * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (79 commits) um: Remove leftover declaration of alloc_task_struct_node() task_allocator: Use config switches instead of magic defines sparc: Use common threadinfo allocator score: Use common threadinfo allocator sh-use-common-threadinfo-allocator mn10300: Use common threadinfo allocator powerpc: Use common threadinfo allocator mips: Use common threadinfo allocator hexagon: Use common threadinfo allocator m32r: Use common threadinfo allocator frv: Use common threadinfo allocator cris: Use common threadinfo allocator x86: Use common threadinfo allocator c6x: Use common threadinfo allocator fork: Provide kmemcache based thread_info allocator tile: Use common threadinfo allocator fork: Provide weak arch_release_[task_struct|thread_info] functions fork: Move thread info gfp flags to header fork: Remove the weak insanity sh: Remove cpu_idle_wait() ...
2012-05-21blackfin: fix build after add bf60x mach/pm.hSteven Miao1-0/+3
Signed-off-by: Steven Miao <realmz6@gmail.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21blackfin: bf60x: Rename the DDR controller macroSonic Zhang1-1/+1
Rename the DDR controller macro from DDR0 to DMC0 to avoid confustion for bf60x. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21blackfin: bf60x: cleanup get clock codeSonic Zhang1-42/+22
Remove redundance code for get clock. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21blackfin: bf60x: make clock changeable in kernel menuconfigBob Liu1-19/+5
Add clock changeable support in kernel menuconfig for bf60x. Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21bfin_gpio: fix bf548-ezkit kernel fail to bootSteven Miao1-1/+2
Fix bf548-ezkit kernel fail to boot when request peripheral pins. Signed-off-by: Steven Miao <realmz6@gmail.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21bfin_dma: fix initcall return error in proc_dma_init()Steven Miao1-1/+2
Signed-off-by: Steven Miao <realmz6@gmail.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21Blackfin: delete fork funcMike Frysinger1-10/+0
We don't implement fork() since we are no-mmu, so redirect it to the existing ENOSYS stub rather than adding a custom EINVAL one. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21Blackfin: fix unused clk var warningMike Frysinger1-0/+2
This is only used on BF60x code (so this patch should get squashed into the original one that added it). Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21blackfin: bf60x: fix compiling warningBob Liu1-1/+3
Fix several compiling warning for bf60x. Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21blackfin: bf60x: enable gptimer clock sourceSteven Miao2-3/+107
Signed-off-by: Steven Miao <realmz6@gmail.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21blackfin: cplb: add support for bf60xBob Liu2-2/+8
Bf60x support big CPLB pages, this commit enable it. Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21blackfin: add bf60x to current frameworkBob Liu7-76/+282
This patch added bf60x to current blackfin kernel framework. Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-05blackfin: Use generic init_taskThomas Gleixner2-33/+1
Same code. Use the generic version. The special Makefile treatment is pointless anyway as init_task.o contains only data which is handled by the linker script. So no point on being treated like head text. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Mike Frysinger <vapier@gentoo.org> Link: http://lkml.kernel.org/r/20120503085034.350246420@linutronix.de
2012-03-31new helper: ext2_image_size()Al Viro1-3/+4
... implemented that way since the next commit will leave it almost alone in ext2_fs.h - most of the file (including struct ext2_super_block) is going to move to fs/ext2/ext2.h. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-21blackfin:dma: rename bfin_dma_5xx.c to bfin_dma.cBob Liu2-2/+8
bfin_dma_5xx is not a generic name for all blackfin chips. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-03-21Disintegrate asm/system.h for Blackfin [ver #2]David Howells9-4/+5
Disintegrate asm/system.h for Blackfin. Signed-off-by: David Howells <dhowells@redhat.com> cc: uclinux-dist-devel@blackfin.uclinux.org Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-03-21blackfin: cplb-mpu: fix page mask table overflowBarry Song1-0/+2
page mask table will overflow without xip related macros. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-03-01sched/rt: Use schedule_preempt_disabled()Thomas Gleixner1-3/+1
Coccinelle based conversion. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/n/tip-24swm5zut3h9c4a6s46x8rws@git.kernel.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
2012-01-09blackfin: time-ts: rm unused func broadcast_timer_setup()Bob Liu1-18/+0
broadcast_timer_setup() has no user now, drop it. Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-01-09bf54x: get mem size: missing break in switchSteven Miao1-4/+12
Signed-off-by: Steven Miao <realmz6@gmail.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-01-09blackfin: smp: cleanup smp codeBob Liu1-1/+25
move idle task point to percpu blackfin_cpudata and add smp_timer_broadcast interface. enable SUPPLE_1_WAKEUP and add BFIN_IPI_TIMER ipi support. Signed-off-by: Steven Miao <realmz6@gmail.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2011-12-11nohz: Remove tick_nohz_idle_enter_norcu() / tick_nohz_idle_exit_norcu()Frederic Weisbecker1-2/+4
Those two APIs were provided to optimize the calls of tick_nohz_idle_enter() and rcu_idle_enter() into a single irq disabled section. This way no interrupt happening in-between would needlessly process any RCU job. Now we are talking about an optimization for which benefits have yet to be measured. Let's start simple and completely decouple idle rcu and dyntick idle logics to simplify. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2011-12-11nohz: Allow rcu extended quiescent state handling seperately from tick stopFrederic Weisbecker1-2/+2
It is assumed that rcu won't be used once we switch to tickless mode and until we restart the tick. However this is not always true, as in x86-64 where we dereference the idle notifiers after the tick is stopped. To prepare for fixing this, add two new APIs: tick_nohz_idle_enter_norcu() and tick_nohz_idle_exit_norcu(). If no use of RCU is made in the idle loop between tick_nohz_enter_idle() and tick_nohz_exit_idle() calls, the arch must instead call the new *_norcu() version such that the arch doesn't need to call rcu_idle_enter() and rcu_idle_exit(). Otherwise the arch must call tick_nohz_enter_idle() and tick_nohz_exit_idle() and also call explicitly: - rcu_idle_enter() after its last use of RCU before the CPU is put to sleep. - rcu_idle_exit() before the first use of RCU after the CPU is woken up. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: David Miller <davem@davemloft.net> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Paul Mackerras <paulus@samba.org> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2011-12-11nohz: Separate out irq exit and idle loop dyntick logicFrederic Weisbecker1-2/+2
The tick_nohz_stop_sched_tick() function, which tries to delay the next timer tick as long as possible, can be called from two places: - From the idle loop to start the dytick idle mode - From interrupt exit if we have interrupted the dyntick idle mode, so that we reprogram the next tick event in case the irq changed some internal state that requires this action. There are only few minor differences between both that are handled by that function, driven by the ts->inidle cpu variable and the inidle parameter. The whole guarantees that we only update the dyntick mode on irq exit if we actually interrupted the dyntick idle mode, and that we enter in RCU extended quiescent state from idle loop entry only. Split this function into: - tick_nohz_idle_enter(), which sets ts->inidle to 1, enters dynticks idle mode unconditionally if it can, and enters into RCU extended quiescent state. - tick_nohz_irq_exit() which only updates the dynticks idle mode when ts->inidle is set (ie: if tick_nohz_idle_enter() has been called). To maintain symmetry, tick_nohz_restart_sched_tick() has been renamed into tick_nohz_idle_exit(). This simplifies the code and micro-optimize the irq exit path (no need for local_irq_save there). This also prepares for the split between dynticks and rcu extended quiescent state logics. We'll need this split to further fix illegal uses of RCU in extended quiescent states in the idle loop. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: David Miller <davem@davemloft.net> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Paul Mackerras <paulus@samba.org> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2011-10-31blackfin: Add export.h to files using EXPORT_SYMBOL/THIS_MODULEPaul Gortmaker3-0/+3
These particular files were just assuming that module.h was somehow in the include paths. Give them the more minimalist header file explicitly. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-26Blackfin: irq: remove IRQF_DISABLEDYong Zhang2-5/+2
This flag is a NOOP and can be removed now. Signed-off-by: Yong Zhang <yong.zhang0@gmail.com> Acked-by: Bob Liu <lliubbo@kernel.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-25Blackfin: kgdb_test: rework code to avoid -O0 usageSonic Zhang2-3/+2
__kfree_rcu() in rcupdate.h bugs when parameter offset is not a constant at compile time. Since we build the kgdb_test module with -O0 and it includes this header file, we hit the bug. So drop the -O0 and mark the one func we need for the test as noinline (so we can set a breakpoint on it and have it be hit). Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26atomic: use <linux/atomic.h>Arun Sharma3-3/+3
This allows us to move duplicated code in <asm/atomic.h> (atomic_inc_not_zero() for now) to <linux/atomic.h> Signed-off-by: Arun Sharma <asharma@fb.com> Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: David Miller <davem@davemloft.net> Cc: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-07-24modules: make arch's use default loader hooksJonas Bonn1-21/+0
This patch removes all the module loader hook implementations in the architecture specific code where the functionality is the same as that now provided by the recently added default hooks. Signed-off-by: Jonas Bonn <jonas@southpole.se> Acked-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-07-23Blackfin: bf526: restrict reboot workaround to 0.0 siliconMike Frysinger1-1/+3
The bug in the BF526 rom when doing a software reset exists only in older silicon versions, so don't clear SWRST on newer parts. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23Blackfin: bf54x: fix GPIO resume codeMike Frysinger1-2/+2
Back in commit c03c2a87347b849ec927d, we fixed logic in the non-bf54x GPIO resume code to set the data levels properly before the direction to avoid spurious line glitches. But we missed the bf54x code paths. So add the same fix there. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23Blackfin: bf538: pull gpio/port logic out of core hibernate pathsMike Frysinger1-0/+22
Re-architect how we save/restore the gpio/port logic that only pertains to bf538/bf539 parts by pulling it out of the core code paths and pushing it out to bf538-specific locations. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23Blackfin: debug-mmrs: generalize pint logicMike Frysinger1-19/+31
Don't bind the code to specific CPU defines. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23Blackfin: bf54x: tweak MMR pint namesMike Frysinger1-1/+1
The hardware block uses the name "request" rather than "irq", so update the struct accordingly. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23Blackfin: pwm: implement linux/pwm.h APIMike Frysinger2-0/+101
For now, this only supports gptimers. Support for dedicated PWM devices as found on newer parts to come. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23Blackfin: make sure percpu section is aligned in XIP buildsSteven Miao1-0/+1
The alignment is normally handled by PERCPU(), but we need to do it ourselves in the XIP build due to the custom layout. Signed-off-by: Steven Miao <realmz6@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23Blackfin: gptimers: use bfin read/write helpersMike Frysinger1-20/+25
Use proper helper macros for reading/writing the MMRs rather than volatile markings on the struct. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23Blackfin: gptimers: use register structs from common headerMike Frysinger1-32/+16
Now that asm/gptimers.h has the hardware register struct layout, there's no need to duplicate things locally. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23Blackfin: debug-mmrs: use new gptimer_group layout to simplify codeMike Frysinger1-18/+34
Signed-off-by: Mike Frysinger <vapier@gentoo.org>