History log of /arch/mips/sibyte/sb1250/irq.c
Revision Date Author Comments
421d1563c6620423d23e394711e3f209e585c161 04-Mar-2014 Thomas Gleixner <tglx@linutronix.de> mips: Validate online cpus in irq_set_affinity() callbacks

The [user space] interface does not filter out offline cpus. It merily
guarantees that the mask contains at least one online cpu.

So the selector in the irq chip implementation needs to make sure to
pick only an online cpu because otherwise:

Offline Core 1
Set affinity to 0xe (is valid due to online mask 0xd)
cpumask_first will pick core 1, which is offline

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Link: http://lkml.kernel.org/r/20140304203100.744800502@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
7034228792cc561e79ff8600f02884bd4c80e287 22-Jan-2013 Ralf Baechle <ralf@linux-mips.org> MIPS: Whitespace cleanup.

Having received another series of whitespace patches I decided to do this
once and for all rather than dealing with this kind of patches trickling
in forever.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
b81947c646bfefdf98e2fde5d7d39cbbda8525d4 28-Mar-2012 David Howells <dhowells@redhat.com> Disintegrate asm/system.h for MIPS

Disintegrate asm/system.h for MIPS.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
cc: linux-mips@linux-mips.org
1544129da2de9fa276429deed8fac3fbc45634be 06-Jun-2011 Thomas Gleixner <tglx@linutronix.de> MIPS: SB1250: Restore dropped irq_mask function

Commit d6d5d5c4a (MIPS: Sibyte: Convert to new irq_chip functions)
removed the mask function which breaks irq_shutdown(). Restore it.

Reported-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2460/
Tested-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
e4ec7989b4e55d9275ebac66230b7dac6dcb1fae 27-Mar-2011 Thomas Gleixner <tglx@linutronix.de> MIPS: Convert the irq functions to the new names

Scripted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
d6d5d5c4afd4c8bb4c5e3753a2141e9c3a874629 23-Mar-2011 Thomas Gleixner <tglx@linutronix.de> MIPS: Sibyte: Convert to new irq_chip functions

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2205/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

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>
f77f13e22df4a40d237697df496152c8c37f3f2b 29-Mar-2010 Gilles Espinasse <g.esp@free.fr> Fix comment and Kconfig typos for 'require' and 'fragment'

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
5772f6deb6214a94248e5429869e99e8b7b9cf25 27-Feb-2010 Ralf Baechle <ralf@linux-mips.org> MIPS: SB1250: Convert IRQ controller lock to raw spinlock.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
4a8a738de637dc7141de5228d2d722573a329b95 27-Feb-2010 Ralf Baechle <ralf@linux-mips.org> MIPS: Make various locks static.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
7762f206a3f3a19a38ed91a3d87f019d8b4eafc1 17-Jun-2009 Ralf Baechle <ralf@linux-mips.org> MIPS: SB1250: Sort out merge mistake.

A wrong resolution of a merge conflict made the recently deleted wrong
error check in sb1250_set_affinity. Send the zombie back to the empire
of the undead.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
5d81b83d03eb32085c569854695e102dde7af544 04-May-2009 Thomas Bogendoerfer <tsbogend@alpha.franken.de> MIPS: Sibyte: Fix locking in set_irq_affinity

Locking of irq_desc is now done in irq_set_affinity; don't lock it again
in chip specific set_affinity function.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
d5dedd4507d307eb3f35f21b6e16f336fdc0d82a 28-Apr-2009 Yinghai Lu <yinghai@kernel.org> irq: change ->set_affinity() to return status

according to Ingo, change set_affinity() in irq_chip should return int,
because that way we can handle failure cases in a much cleaner way, in
the genirq layer.

v2: fix two typos

[ Impact: extend API ]

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-arch@vger.kernel.org
LKML-Reference: <49F654E9.4070809@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
c87e09096dcd1ea3da8dfe434ee694fac51031c8 30-Mar-2009 Ralf Baechle <ralf@linux-mips.org> MIPS: Enable GENERIC_HARDIRQS_NO__DO_IRQ for all platforms

__do_IRQ() is deprecated and will go away.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
0de26520c7cabf36e1de090ea8092f011a6106ce 13-Dec-2008 Rusty Russell <rusty@rustcorp.com.au> cpumask: make irq_set_affinity() take a const struct cpumask

Impact: change existing irq_chip API

Not much point with gentle transition here: the struct irq_chip's
setaffinity method signature needs to change.

Fortunately, not widely used code, but hits a few architectures.

Note: In irq_select_affinity() I save a temporary in by mangling
irq_desc[irq].affinity directly. Ingo, does this break anything?

(Folded in fix from KOSAKI Motohiro)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Grant Grundler <grundler@parisc-linux.org>
Acked-by: Ingo Molnar <mingo@redhat.com>
Cc: ralf@linux-mips.org
Cc: grundler@parisc-linux.org
Cc: jeremy@xensource.com
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
8d60a903d986ffa26c41f0092320a3b9da20bfaf 29-Jul-2008 Jason Wessel <jason.wessel@windriver.com> [MIPS] kgdb: Remove existing implementation

This patch explicitly removes the kgdb implementation, for mips which
is intended to be followed by a patch that adds a kgdb implementation
for MIPS that makes use of the kgdb core in the kernel.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9e32a510afa62c0d548d78572031e6112d21e0ea 31-Oct-2007 Ralf Baechle <ralf@linux-mips.org> [MIPS] Sibyte: Build fixes / dead code removal.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11ca25aa312d912c192ccfd5781669d794126118 29-Oct-2007 Ralf Baechle <ralf@linux-mips.org> [MIPS] Sibyte: Delete {sb1250,bcm1480}_steal_irq().

They break the timer interrupt initialization and only seem to be a kludge
for initialization happening in the wrong order. Further testing done by
Thiemo confirms the suspicion that the other invocations also seem to have
useless.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
d04533650f64fe3367e180f3e488d92205152cd3 22-Oct-2007 Ralf Baechle <ralf@linux-mips.org> [MIPS] time: SMP-proofing of Sibyte clockevent/clocksource code.

The BCM148 has 4 cores but there are also just 4 generic timers available
so use the ZBbus cycle counter instead of it. In addition the ZBbus
counter also offers a much higher resolution and 64-bit counting so I'm
considering a later complete conversion to it once I figure out if all
members of the Sibyte SOC family support it - the docs seem to agree but
the headers files seem to disagree ...

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
d527eef5b7f151320921f0ff7a88297cefc5be72 19-Oct-2007 Ralf Baechle <ralf@linux-mips.org> [MIPS] Sibyte: Finish conversion to modern time APIs.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
21a151d8ca3aa74ee79f9791a9d4dc370d3e0636 12-Oct-2007 Ralf Baechle <ralf@linux-mips.org> [MIPS] checkfiles: Fix "need space after that ','" errors.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
7bcf7717b6a047c272410d0cd00213185fe6b99d 12-Oct-2007 Ralf Baechle <ralf@linux-mips.org> [MIPS] Implement clockevents for R4000-style cp0 count/compare interrupt

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
477f949e0ad7f1d3503a87b9f158d70c29abc918 02-Aug-2007 Ralf Baechle <ralf@linux-mips.org> [MIPS] Sibyte: CONFIG_SIBYTE_SB1250_DUART -> CONFIG_SERIAL_SB1250_DUART

This is needed since the Sibyte serial driver was exchanged.

Issue report by Imre Kaloz <kaloz@openwrt.org>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
119537c092638bf8a0672415024639353c773bb1 19-Mar-2007 Thiemo Seufer <ths@networkno.de> [MIPS] Misc fixes for plat_irq_dispatch functions

o adds missing ST0_IM masks, which caused the logging of valid interrupts
as spurious
o stops pnx8550 to log every interrupt as spurious
o adds cause register masks for ip22/ip32, which caused handling of masked
interrupts
o removes some superfluous parentheses in the SNI interrupt code

Signed-Off-By: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
70d21cdeef6331e67ed87262c894cd6601f0dccc 14-Jan-2007 Atsushi Nemoto <anemo@mba.ocn.ne.jp> [MIPS] use name instead of typename for each irq_chip

The "typename" field was obsoleted by the "name" field.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1603b5aca4f15b34848fb5594d0c7b6333b99144 01-Nov-2006 Atsushi Nemoto <anemo@mba.ocn.ne.jp> [MIPS] IRQ cleanups

This is a big irq cleanup patch.

* Use set_irq_chip() to register irq_chip.
* Initialize .mask, .unmask, .mask_ack field. Functions for these
method are already exist in most case.
* Do not initialize .startup, .shutdown, .enable, .disable fields if
default routines provided by irq_chip_set_defaults() were suitable.
* Remove redundant irq_desc initializations.
* Remove unnecessary local_irq_save/local_irq_restore, spin_lock.

With this cleanup, it would be easy to switch to slightly lightwait
irq flow handlers (handle_level_irq(), etc.) instead of __do_IRQ().

Though whole this patch is quite large, changes in each irq_chip are
not quite simple. Please review and test on your platform. Thanks.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
27f768192fe2d96936cef5d4713e228daee07ae2 09-Oct-2006 Ralf Baechle <ralf@linux-mips.org> [MIPS] Cleanup unnecessary <asm/ptrace.h> inclusions.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
937a801576f954bd030d7c4a5a94571710d87c0b 07-Oct-2006 Ralf Baechle <ralf@linux-mips.org> [MIPS] Complete fixes after removal of pt_regs argument to int handlers.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
d599def5cd81439e7da04dc6754b257043f5e584 03-Oct-2006 Maciej W. Rozycki <macro@linux-mips.org> [MIPS] SB1250: Interrupt handler fixes

Mask cp0.status against cp0.cause. Additionally, spurious interrupts are
not recorded.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
dc41fb43966ae1318fe34a8e5f959924a7c05d81 16-Aug-2006 Ralf Baechle <ralf@linux-mips.org> [MIPS] Fix 32-bit kernel by replacing 64-bit-only code.

dclz() expects its 64-bit argument being passed as a single register
but on 32-bit kernels it'll actually be in a register pair.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
6e61e85b0980f7b88cd5c4b822386ed00dd7e295 05-Jul-2006 Thiemo Seufer <ths@networkno.de> [MIPS] Sibyte: Improve interrupt latency again for sb1250/bcm1480

this patch restores the behaviour of the old (assembly-written)
interrupt handler, the handler is left as soon as a single interrupt
cause is handled.

Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
94dee171df34b7955cd647da4c40ba67d55a7671 02-Jul-2006 Ralf Baechle <ralf@linux-mips.org> [MIPS] Eleminate interrupt migration helper use.

> #define hw_interrupt_type irq_chip
> typedef struct irq_chip hw_irq_controller;
> #define no_irq_type no_irq_chip
> typedef struct irq_desc irq_desc_t;

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
6ab3d5624e172c553004ecc862bfeac16d9d68b7 30-Jun-2006 Jörn Engel <joern@wohnheim.fh-wedel.de> Remove obsolete #include <linux/config.h>

Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
d1bef4ed5faf7d9872337b33c4269e45ae1bf960 29-Jun-2006 Ingo Molnar <mingo@elte.hu> [PATCH] genirq: rename desc->handler to desc->chip

This patch-queue improves the generic IRQ layer to be truly generic, by adding
various abstractions and features to it, without impacting existing
functionality.

While the queue can be best described as "fix and improve everything in the
generic IRQ layer that we could think of", and thus it consists of many
smaller features and lots of cleanups, the one feature that stands out most is
the new 'irq chip' abstraction.

The irq-chip abstraction is about describing and coding and IRQ controller
driver by mapping its raw hardware capabilities [and quirks, if needed] in a
straightforward way, without having to think about "IRQ flow"
(level/edge/etc.) type of details.

This stands in contrast with the current 'irq-type' model of genirq
architectures, which 'mixes' raw hardware capabilities with 'flow' details.
The patchset supports both types of irq controller designs at once, and
converts i386 and x86_64 to the new irq-chip design.

As a bonus side-effect of the irq-chip approach, chained interrupt controllers
(master/slave PIC constructs, etc.) are now supported by design as well.

The end result of this patchset intends to be simpler architecture-level code
and more consolidation between architectures.

We reused many bits of code and many concepts from Russell King's ARM IRQ
layer, the merging of which was one of the motivations for this patchset.

This patch:

rename desc->handler to desc->chip.

Originally i did not want to do this, because it's a big patch. But having
both "desc->handler", "desc->handle_irq" and "action->handler" caused a
large degree of confusion and made the code appear alot less clean than it
truly is.

I have also attempted a dual approach as well by introducing a
desc->chip alias - but that just wasnt robust enough and broke
frequently.

So lets get over with this quickly. The conversion was done automatically
via scripts and converts all the code in the kernel.

This renaming patch is the first one amongst the patches, so that the
remaining patches can stay flexible and can be merged and split up
without having some big monolithic patch act as a merge barrier.

[akpm@osdl.org: build fix]
[akpm@osdl.org: another build fix]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
4fb60a4b80f9db94605c2a47807d34dfb9ae44c8 18-Jun-2006 Thiemo Seufer <ths@networkno.de> [MIPS] Random fixes for sb1250

Random improvements for sb1250: Silence compiler warnings, a bugfix for
the profiling code, and a comment typo.

Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
e4ac58afdfac792c0583af30dbd9eae53e24c78b 03-Apr-2006 Ralf Baechle <ralf@linux-mips.org> [MIPS] Rewrite all the assembler interrupt handlers to C.

Saves like 1,600 lines of code, is way easier to debug, compilers
frequently do a better job than the cut and paste type of handlers many
boards had. And finally having all the stuff done in a single place
also means alot of bug potencial for the MT ASE is gone.

The only surviving handler in assembler is the DECstation one; I hope
Maciej will rewrite it.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
942d042d17c77febab9af6815b2e77f665d0f9c1 23-Jun-2005 Andrew Isaacson <adi@broadcom.com> Use cpumask_t rather than hand-rolled bitmask code in sb1250_set_affinity.

Signed-Off-By: Andrew Isaacson <adi@broadcom.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8ab00b9a02c55fd6263c5f7c0dc88389d94de327 28-Feb-2005 Ralf Baechle <ralf@linux-mips.org> Convert struct hw_interrupt_type initializations to ISO C99 named
initializers.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
65bda1a95d395c256818d1d8129487a4497b29d8 22-Feb-2005 Maciej W. Rozycki <macro@linux-mips.org> Switch SiByte drivers back to __raw_*() functions.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
42a3b4f25af8f8d77feddf27f839fa0628dbff1a 04-Sep-2005 Ralf Baechle <ralf@linux-mips.org> [PATCH] mips: nuke trailing whitespace

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!