aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-common
Commit message (Collapse)AuthorAgeFilesLines
* Blackfin: wire up new sendmmsg syscallMike Frysinger2011-05-281-0/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* ns: Wire up the setns system callEric W. Biederman2011-05-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 32bit and 64bit on x86 are tested and working. The rest I have looked at closely and I can't find any problems. setns is an easy system call to wire up. It just takes two ints so I don't expect any weird architecture porting problems. While doing this I have noticed that we have some architectures that are very slow to get new system calls. cris seems to be the slowest where the last system calls wired up were preadv and pwritev. avr32 is weird in that recvmmsg was wired up but never declared in unistd.h. frv is behind with perf_event_open being the last syscall wired up. On h8300 the last system call wired up was epoll_wait. On m32r the last system call wired up was fallocate. mn10300 has recvmmsg as the last system call wired up. The rest seem to at least have syncfs wired up which was new in the 2.6.39. v2: Most of the architecture support added by Daniel Lezcano <dlezcano@fr.ibm.com> v3: ported to v2.6.36-rc4 by: Eric W. Biederman <ebiederm@xmission.com> v4: Moved wiring up of the system call to another patch v5: ported to v2.6.39-rc6 v6: rebased onto parisc-next and net-next to avoid syscall conflicts. v7: ported to Linus's latest post 2.6.39 tree. >  arch/blackfin/include/asm/unistd.h     |    3 ++- >  arch/blackfin/mach-common/entry.S      |    1 + Acked-by: Mike Frysinger <vapier@gentoo.org> Oh - ia64 wiring looks good. Acked-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Blackfin: convert old cpumask API to new oneKOSAKI Motohiro2011-05-252-16/+18
| | | | | | | old cpu_xxx() APIs is planned to removed later. then, converted. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: bf537: demux port H mask A and emac rx intsMike Frysinger2011-05-251-12/+10
| | | | | | | | | | | The BF537 SIC combines the gpio port H mask A interrupts with the emac rx interrupt, so we need to demux this in software. It also combines the gpio port H mask B and the emac tx interrupts, and the watchdog and port F mask B interrupts, but since we don't support mask B yet, just add the defines for now. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: bf537: fix excessive gpio int demuxingMike Frysinger2011-05-251-30/+25
| | | | | | | | | | The search logic in the gpio demux walks all possible gpio blocks starting at the specified pin. The trouble on bf537 parts when we demux the port F and port G mask A interrupts is that we also demux port H mask A ints. Most of the time this isn't an issue as people don't usually use port H, but might as well avoid it when possible. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: bf54x: drop unused pm gpio handlingMike Frysinger2011-05-251-40/+2
| | | | | | | | This functionality was merged into the common bfin_pm_standby_ctrl func some time ago, so punt these now unused funcs and data, and localize the wake funcs that aren't needed externally anymore. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: move bf537-specific irq code out of common codeMike Frysinger2011-05-251-138/+10
| | | | | | | | The SIC interrupt line muxing that the bf537 does is specific to this CPU (thankfully), so rip it out of the common code and move it to a bf537-specific file. This tidies up the common code significantly. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: move internal irq prototypes out of global namespaceMike Frysinger2011-05-251-0/+1
| | | | | | | | These are only used in a few internal Blackfin places, so move the irq prototypes out of the global header and into the internal irq one. No functional changes other than shuffling locales. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: clean up irq ifdef logic a bitMike Frysinger2011-05-251-47/+39
| | | | | | | | Prefer MMR named checks over part-specific lists, condense duplicated code across different #ifdef branches, simplify CONFIG_PM ifdefs, and drop unused kgdb header. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: ints-priority: unify duplicate vec to irq lookup logicMike Frysinger2011-05-251-68/+44
| | | | | | | | Seems the ipipe code just copied & pasted the existing irq lookup logic, so pull the logic out of do_irq() and into a local helper, and convert the two users over to that. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: ints-priority: clean up some local varsMike Frysinger2011-05-251-17/+8
| | | | | | | | The local ivg structs need not be exported, so mark them as static. Further, the "num_spurious" variable is only incremented and never actually read anywhere, so punt it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
*-. Merge branches 'sched-core-for-linus' and 'sched-urgent-for-linus' of ↵Linus Torvalds2011-05-191-0/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (60 commits) sched: Fix and optimise calculation of the weight-inverse sched: Avoid going ahead if ->cpus_allowed is not changed sched, rt: Update rq clock when unthrottling of an otherwise idle CPU sched: Remove unused parameters from sched_fork() and wake_up_new_task() sched: Shorten the construction of the span cpu mask of sched domain sched: Wrap the 'cfs_rq->nr_spread_over' field with CONFIG_SCHED_DEBUG sched: Remove unused 'this_best_prio arg' from balance_tasks() sched: Remove noop in alloc_rt_sched_group() sched: Get rid of lock_depth sched: Remove obsolete comment from scheduler_tick() sched: Fix sched_domain iterations vs. RCU sched: Next buddy hint on sleep and preempt path sched: Make set_*_buddy() work on non-task entities sched: Remove need_migrate_task() sched: Move the second half of ttwu() to the remote cpu sched: Restructure ttwu() some more sched: Rename ttwu_post_activation() to ttwu_do_wakeup() sched: Remove rq argument from ttwu_stat() sched: Remove rq->lock from the first half of ttwu() sched: Drop rq->lock from sched_exec() ... * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: Fix rt_rq runtime leakage bug
| * \ Merge commit 'v2.6.39-rc4' into sched/coreIngo Molnar2011-04-211-3/+16
| |\ \ | | |/ | | | | | | | | | | | | Merge reason: Pick up upstream fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * | sched: Provide scheduler_ipi() callback in response to smp_send_reschedule()Peter Zijlstra2011-04-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For future rework of try_to_wake_up() we'd like to push part of that function onto the CPU the task is actually going to run on. In order to do so we need a generic callback from the existing scheduler IPI. This patch introduces such a generic callback: scheduler_ipi() and implements it as a NOP. BenH notes: PowerPC might use this IPI on offline CPUs under rare conditions! Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Acked-by: Chris Metcalf <cmetcalf@tilera.com> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Reviewed-by: Frank Rowand <frank.rowand@am.sony.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Nick Piggin <npiggin@kernel.dk> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/20110405152728.744338123@chello.nl
* | | [CPUFREQ] use dynamic debug instead of custom infrastructureDominik Brodowski2011-05-041-3/+0
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With dynamic debug having gained the capability to report debug messages also during the boot process, it offers a far superior interface for debug messages than the custom cpufreq infrastructure. As a first step, remove the old cpufreq_debug_printk() function and replace it with a call to the generic pr_debug() function. How can dynamic debug be used on cpufreq? You need a kernel which has CONFIG_DYNAMIC_DEBUG enabled. To enabled debugging during runtime, mount debugfs and $ echo -n 'module cpufreq +p' > /sys/kernel/debug/dynamic_debug/control for debugging the complete "cpufreq" module. To achieve the same goal during boot, append ddebug_query="module cpufreq +p" as a boot parameter to the kernel of your choice. For more detailled instructions, please see Documentation/dynamic-debug-howto.txt Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Dave Jones <davej@redhat.com>
* | Blackfin: SMP: fix cache flush loopSonic Zhang2011-04-131-3/+16
|/ | | | | | | | | | The recent commit (10774912647781) wasn't entirely correct. While it fixed some issues, it introduced others. So pull in the fixes from the public cache flush functions, and document why we need to call things directly ourselves. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Fix common misspellingsLucas De Marchi2011-03-312-3/+3
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* bfin: Convert irq namespaceThomas Gleixner2011-03-291-17/+17
| | | | | | | | Convert to the new function names. Scripted with coccinelle. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Mike Frysinger <vapier@gentoo.org> Cc: uclinux-dist-devel@blackfin.uclinux.org
* bfin: Final irq cleanupThomas Gleixner2011-03-291-6/+3
| | | | | | | | | Use the trigger type in irq_data and check level type instead of looking at desc->handle_irq. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Mike Frysinger <vapier@gentoo.org> Cc: uclinux-dist-devel@blackfin.uclinux.org
* Blackfin: wire up new syncfs syscallMike Frysinger2011-03-221-0/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: wire up new syscallsMike Frysinger2011-03-181-0/+3
| | | | | | Hook up name_to_handle_at, open_by_handle_at, and clock_adjtime. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin/ipipe: fix deferred pipeline sync for the root stagePhilippe Gerum2011-03-182-3/+14
| | | | | | | | | | | | | This patch makes sure to sync the pipeline for the root stage only from the outer interrupt level, when resuming kernel code after an interrupt. This fixes a bug causing EVT15 to be spuriously popped off upon nested interrupts, which in turn would cause the preempted kernel code to resume without supervisor privileges. Signed-off-by: Philippe Gerum <rpm@xenomai.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin/ipipe: upgrade to I-pipe mainlinePhilippe Gerum2011-03-181-4/+37
| | | | | | | | | | | | This patch introduces Blackfin-specific bits to support the current tip of the interrupt pipeline development, mainly: - 2/3-level interrupt maps (sparse IRQs) - generic virq handling - sysinfo v2 format for ipipe_get_sysinfo() Signed-off-by: Philippe Gerum <rpm@xenomai.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: cpufreq: fix typosMichael Hennerich2011-03-181-3/+3
| | | | | | | No functional changes here. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: convert gpio irq_chip to new functionsThomas Gleixner2011-03-181-44/+48
| | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: convert mac irq_chip to new functionsThomas Gleixner2011-03-181-7/+11
| | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: convert error irq_chip to new functionsThomas Gleixner2011-03-181-7/+7
| | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: convert internal irq_chip to new functionsThomas Gleixner2011-03-181-13/+28
| | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: convert core irq_chip to new functionsThomas Gleixner2011-03-181-11/+11
| | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: use proper wrappers for irq_descThomas Gleixner2011-03-181-9/+5
| | | | | | | Fixup the open coded access to irq_desc and use the proper wrappers. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: optimize startup codeMike Frysinger2011-03-181-69/+41
| | | | | | | Take advantage of more Blackfin-specific insns, and only initialize registers required by the ABI. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: SMP: work around anomaly 05000491Sonic Zhang2011-03-182-0/+24
| | | | | | | | | | | | | | | | In order to safely work around anomaly 05000491, we have to execute IFLUSH from L1 instruction sram. The trouble with multi-core systems is that all L1 sram is visible only to the active core. So we can't just place the functions into L1 and call it directly. We need to setup a jump table and place the entry point in external memory. This will call the right func based on the active core. In the process, convert from the manual relocation of a small bit of code into Core B's L1 to the more general framework we already have in place for loading arbitrary pieces of code into L1. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: SMP: implement cpu_freq supportGraf Yang2011-03-182-4/+48
| | | | | | | Re-use some of the existing cpu hotplugging code in the process. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: split optimization settings moreMike Frysinger2011-03-182-7/+13
| | | | | | | | | | | We need to place icache flush funcs into L1 inst sram to work around a hardware anomaly. But this currently breaks SMP support as the L1 inst sram is per-core and cannot be called directly. So in preparation for making that work, split the two options. Further, split out the SMP depend so that we can allow some for SMP. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: SMP: disable preempt with smp_processor_id to send messagesSonic Zhang2011-03-181-6/+8
| | | | | | | | The smp_processor_id() API requires that preempt be disabled when calling it, so make sure it is when we go to send messages to other processors. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: SMP: delay enabling caches until CPU is initializedsteven miao2011-03-181-2/+2
| | | | | | | | Defer bfin_setup_caches(cpu) to avoid unexpected faults due to the cpu state not yet being fully initialized. Signed-off-by: steven miao <realmz6@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: SMP: use standard cache functionsMike Frysinger2011-03-181-3/+3
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: iflush: update anomaly 05000491 workaroundMike Frysinger2011-03-041-0/+2
| | | | | | Recent feedback from design says we need three NOPs in the hardware loop. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Merge branch 'for-next' of ↵Linus Torvalds2011-01-131-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) Documentation/trace/events.txt: Remove obsolete sched_signal_send. writeback: fix global_dirty_limits comment runtime -> real-time ppc: fix comment typo singal -> signal drivers: fix comment typo diable -> disable. m68k: fix comment typo diable -> disable. wireless: comment typo fix diable -> disable. media: comment typo fix diable -> disable. remove doc for obsolete dynamic-printk kernel-parameter remove extraneous 'is' from Documentation/iostats.txt Fix spelling milisec -> ms in snd_ps3 module parameter description Fix spelling mistakes in comments Revert conflicting V4L changes i7core_edac: fix typos in comments mm/rmap.c: fix comment sound, ca0106: Fix assignment to 'channel'. hrtimer: fix a typo in comment init/Kconfig: fix typo anon_inodes: fix wrong function name in comment fix comment typos concerning "consistent" poll: fix a typo in comment ... Fix up trivial conflicts in: - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c) - fs/ext4/ext4.h Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.
| * suspend: constify platform_suspend_opsLionel Debroux2010-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | While at it, fix two checkpatch errors. Several non-const struct instances constified by this patch were added after the introduction of platform_suspend_ops in checkpatch.pl's list of "should be const" structs (79404849e90a41ea2109bd0e2f7c7164b0c4ce73). Patch against mainline. Inspired by hunks of the grsecurity patch, updated for newer kernels. Signed-off-by: Lionel Debroux <lionel_debroux@yahoo.fr> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | Blackfin: bf54x: don't ack GPIO ints when unmasking themMike Frysinger2011-01-101-1/+0
| | | | | | | | | | | | | | | | | | When unmasking a GPIO interrupt on a BF54x part, the code will implicitly ack any pending interrupts. This is not what unmasking should do and can cause people to miss interrupts from their devices, so punt the code. Reported-by: Rutger Hofman <rutger@cs.vu.nl> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | Blackfin: fix building IPIPE code when XIP is enabledMike Frysinger2011-01-101-2/+2
| | | | | | | | | | | | | | The low level assembly needs to use the pseudo_long_call helper so that we use the right call insn when doing kernel XIP. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | Blackfin: pm: drop irq save/restore in standby and suspend to mem callbackSteven Miao2011-01-101-10/+0
| | | | | | | | | | | | | | | | | | Since linux-2.6.31, the kernel suspend framework will do disable_irq/enable_irq, so save/restore irq in standby and suspend to mem callback should be dropped. Otherwise the common code notices things are enabled and complains. Signed-off-by: Steven Miao <realmz6@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | Blackfin: SMP: rewrite IPI handling to avoid memory allocationYi Li2011-01-101-119/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, sending an interprocessor interrupt (IPI) requires building up a message dynamically which means memory allocation. But often times, we will want to send an IPI in low level contexts where allocation is not possible which may lead to a panic(). So create a per-cpu static array for the message queue and use that instead. Further, while we have two supplemental interrupts, we are currently only using one of them. So use the second one for the most common IPI message of all -- smp_send_reschedule(). This avoids ugly contention for locks which in turn would require an IPI message ... In general, this improves SMP performance, and in some cases allows the SMP port to work in places it wouldn't before. Such as the PREEMPT_RT state where the slab is protected by a per-cpu spin lock. If the slab kmalloc/kfree were to put the task to sleep, and that task was actually the IPI handler, then the system falls down yet again. After running some various stress tests on the system, the static limit of 5 messages seems to work. On the off chance even this overflows, we simply panic(), and we can review that scenario to see if the limit needs to be increased a bit more. Signed-off-by: Yi Li <yi.li@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | Blackfin: SMP: tweak platform_request_ipi() usageGraf Yang2011-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | This function takes an irq_handler_t function, but the prototype in the header doesn't match the function definition. This is due to the smp headers needing to avoid circular dependencies. So change the function to take a simple pointer. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | Blackfin: SMP: fix cpumask misbehaviorGraf Yang2011-01-101-6/+1
|/ | | | | | | | | The cpu maps are defines provided by common linux/cpumask.h, not local variables. So stop exporting them locally and include the right header for their definition. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: drop unused irq_panic()/DEBUG_ICACHE_CHECKMike Frysinger2010-10-252-107/+0
| | | | | | | | This code was useful during early port development when our icache code wasn't solid, but that ship has sailed long ago, and no code calls this function anymore (irq_panic). So punt it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: bf561: rewrite SICA_xxx to just SIC_xxxMike Frysinger2010-10-222-50/+4
| | | | | | | This matches all the other Blackfin ports and keep us from having to write bf561-specific code in many places. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: add new cacheflush syscallSonic Zhang2010-10-221-0/+1
| | | | | | | | | | | | Flushing caches sometimes requires anomaly workarounds which require supervisor-only insns. Normally we don't need to flush caches from userspace so this isn't a problem, but when gcc generates trampolines on the stack, we do. So add a new syscall for gcc to use modeled after the mips version. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: SIC: fix off-by-one error in loopMichael Hennerich2010-10-221-3/+4
| | | | | | | Make sure we include EMAC_SYSTAT when showing errors. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>