History log of /linux-master/arch/m68k/kernel/ints.c
Revision Date Author Comments
# ef69fb4d 13-Sep-2023 Geert Uytterhoeven <geert@linux-m68k.org>

m68k: kernel: Add and use "ints.h"

When building with W=1:

arch/m68k/kernel/ints.c:165:17: warning: no previous prototype for ‘handle_badint’ [-Wmissing-prototypes]
165 | asmlinkage void handle_badint(struct pt_regs *regs)
| ^~~~~~~~~~~~~

Fix this by introducing a new header file "ints.h" for holding the
prototypes of functions implemented in arch/m68k/kernel/ints.c.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/dc65d01ca4c7de94ce814e5b5e1f726fff97566b.1694613528.git.geert@linux-m68k.org


# abcfc543 05-Mar-2014 Thomas Gleixner <tglx@linutronix.de>

m68k: Do not rely on magic indirect includes

commit: 8f945a33 (genirq: Move kstat_incr_irqs_this_cpu() to core)
unearthed the following:

arch/m68k/kernel/ints.c:34:15: error: variable 'auto_irq_chip' has initializer but incomplete type
arch/m68k/kernel/ints.c:35:2: error: unknown field 'name' specified in initializer
arch/m68k/kernel/ints.c:35:2: warning: excess elements in struct initializer [enabled by default]

The reason is that this file requires linux/irq.h and magically
pulled that in via linux/kernel_stat.h

The commit above got rid of the pointless include of linux/irq.h in
linux/kernel_stat.h and therefor broke the build.

Include linux/irq.h

Reported-by: fengguang.wu@intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>


# 09f90f66 11-Nov-2013 Thomas Gleixner <tglx@linutronix.de>

m68k: Simplify low level interrupt handling code

The low level interrupt entry code of m68k contains the following:

add_preempt_count(HARDIRQ_OFFSET);

do_IRQ();
irq_enter();
add_preempt_count(HARDIRQ_OFFSET);
handle_interrupt();
irq_exit();
sub_preempt_count(HARDIRQ_OFFSET);
if (in_interrupt())
return; <---- On m68k always taken!
if (local_softirq_pending())
do_softirq();

sub_preempt_count(HARDIRQ_OFFSET);
if (in_hardirq())
return;
if (status_on_stack_has_interrupt_priority_mask > 0)
return;
if (local_softirq_pending())
do_softirq();

ret_from_exception:
if (interrupted_context_is_kernel)
return:
....

I tried to find a proper explanation for this, but the changelog is
sparse and there are no mails explaining it further. But obviously
this relates to the interrupt priority levels of the m68k and tries to
be extra clever with nested interrupts. Though this cleverness just
adds code bloat to the interrupt hotpath.

For the common case of non nested interrupts the code runs through two
extra conditionals to the only important one, which checks whether the
return is to kernel or user space.

For the nested case the checks for in_hardirq() and the priority mask
value on stack catch only the case where the nested interrupt happens
inside the hard irq context of the first interrupt. If the nested
interrupt happens while the first interrupt handles soft interrupts,
then these extra checks buy nothing. The nested interrupt will fall
through to the final kernel/user space return check at
ret_from_exception.

Changing the code flow in the following way:

do_IRQ();
irq_enter();
add_preempt_count(HARDIRQ_OFFSET);
handle_interrupt();
irq_exit();
sub_preempt_count(HARDIRQ_OFFSET);
if (in_interrupt())
return;
if (local_softirq_pending())
do_softirq();

ret_from_exception:
if (interrupted_context_is_kernel)
return:

makes the region protected by the hardirq count slightly smaller and
the softirq handling is invoked with a minimal deeper stack. But
otherwise it's completely functional equivalent and saves 104 bytes of
text in arch/m68k/kernel/entry.o.

This modification allows us further to get rid of the limitations
which m68k puts on the preempt_count layout, so we can make the
preempt count bits completely generic.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linux/m68k <linux-m68k@vger.kernel.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1311112052360.30673@ionos.tec.linutronix.de


# 378f7ca6 02-Jun-2013 Thomas Bogendoerfer <tsbogend@alpha.franken.de>

m68k/irq: Vector ints need a valid interrupt handler

To get vectored interrupts working we need to switch from the default
handler handle_bad_irq() to something more sensible. Tested on a MVME177
board.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>


# 803f6914 28-Mar-2012 David Howells <dhowells@redhat.com>

Disintegrate asm/system.h for M68K

Disintegrate asm/system.h for M68K.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Greg Ungerer <gerg@uclinux.org>
cc: linux-m68k@lists.linux-m68k.org


# f30a6484 11-Sep-2011 Geert Uytterhoeven <geert@linux-m68k.org>

m68k/irq: Remove obsolete support for user vector interrupt fixups

It was used on Apollo only, before its conversion to genirq.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>


# d890d739 11-Sep-2011 Geert Uytterhoeven <geert@linux-m68k.org>

m68k/irq: Remove obsolete m68k irq framework

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>


# 4936f63c 21-Apr-2011 Geert Uytterhoeven <geert@linux-m68k.org>

m68k/irq: Add genirq support

Disabled on all platforms for now

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
[v1] Acked-by: Thomas Gleixner <tglx@linutronix.de>


# 5a239453 13-Jul-2011 Geert Uytterhoeven <geert@linux-m68k.org>

m68k/irq: Remove obsolete IRQ_FLG_* users

The m68k core irq code stopped honoring these flags during the irq
restructuring in 2006.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>


# 1425df87 01-Jul-2011 Geert Uytterhoeven <geert@linux-m68k.org>

m68k/irq: Rename {,__}m68k_handle_int()

- Rename m68k_handle_int() to generic_handle_irq(), and drop the unneeded
asmlinkage,
- Rename __m68k_handle_int() to do_IRQ().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>


# 40a72c8f 27-May-2011 Geert Uytterhoeven <geert@linux-m68k.org>

m68k/irq: Extract irq_set_chip()

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>


# 13d6da35 19-Apr-2011 Geert Uytterhoeven <geert@linux-m68k.org>

m68k/irq: Rename setup_irq() to m68k_setup_irq() and make it static

It has nothing to do with the standard one in <linux/irq.h>

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>


# e8abf5e7 17-Apr-2011 Geert Uytterhoeven <geert@linux-m68k.org>

m68k/irq: Switch irq_chip methods to "struct irq_data *data"

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>


# 6549d537 17-Apr-2011 Geert Uytterhoeven <geert@linux-m68k.org>

m68k/irq: Rename irq_node to irq_data

Make it more similar to the genirq version:
- Add an irq field

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>


# 0dde595b 17-Apr-2011 Geert Uytterhoeven <geert@linux-m68k.org>

m68k/irq: Kill irq_node_t typedef, always use struct irq_node

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>


# c288bf25 13-Apr-2011 Geert Uytterhoeven <geert@linux-m68k.org>

m68k/irq: Rename irq_controller to irq_chip

Make it more similar to the genirq version:
- Remove lock (unused as we don't do SMP anyway),
- Prepend methods with irq_,
- Make irq_startup() return unsigned int.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>


# 27123cbc 14-Nov-2008 Geert Uytterhoeven <geert@linux-m68k.org>

m68k: Fix off-by-one in m68k_setup_user_interrupt()

commit 69961c375288bdab7604e0bb1c8d22999bb8a347 ("[PATCH] m68k/Atari:
Interrupt updates") added a BUG_ON() with an incorrect upper bound
comparison, which causes an early crash on VME boards, where IRQ_USER is
8, cnt is 192 and NR_IRQS is 200.

Reported-by: Stephen N Chivers <schivers@csc.com.au>
Tested-by: Kars de Jong <jongk@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 7ef0c30d 15-Oct-2008 Thomas Gleixner <tglx@linutronix.de>

genirq: define nr_irqs for architectures with GENERIC_HARDIRQS=n

Revert the sparse irq changes in m68k/s390/sparc and just define
nr_irqs as NR_IRQS for those architectures.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>


# c59d85a7 28-Aug-2008 Ingo Molnar <mingo@elte.hu>

sparseirq: export nr_irqs on m68k/sparc/s390

Stephen Rothwell reported such build failures on m68k/sparc/s390:

> ERROR: "nr_irqs" [drivers/net/hamradio/baycom_ser_fdx.ko] undefined!
> ERROR: "nr_irqs" [drivers/net/3c59x.ko] undefined!

export nr_irqs on these architectures too.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


# 85c0f909 19-Aug-2008 Yinghai Lu <yhlu.kernel@gmail.com>

irq: introduce nr_irqs

at this point nr_irqs is equal NR_IRQS

convert a few easy users from NR_IRQS to dynamic nr_irqs.

v2: according to Eric, we need to take care of arch without generic_hardirqs

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


# da9870e4 13-Oct-2008 Geert Uytterhoeven <geert@linux-m68k.org>

m68k: init_irq_proc depends on CONFIG_PROC_FS

If CONFIG_PROC_FS is not set, I get:

| arch/m68k/kernel/ints.c:433: error: redefinition of 'init_irq_proc'
| include/linux/interrupt.h:438: error: previous definition of 'init_irq_proc' was here

This was introduced by commit 6168a702ab0be181e5e57a0b2d0e7376f7a47f0b
("Declare init_irq_proc before we use it."), which replaced the #ifdef
protection of the init_irq_proc() call by a static inline dummy if
CONFIG_PROC_FS is not set.

Make init_irq_proc() depend on CONFIG_PROC_FS to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# f85e7cdc 28-Apr-2008 Harvey Harrison <harvey.harrison@gmail.com>

m68k: replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# e9ed7e72 21-Jul-2007 Al Viro <viro@ftp.linux.org.uk>

take declarations of enable_irq() et.al. to linux/interrupt.h

Now that the last inlined instances are gone, all that is left to do
is turning disable_irq_nosync on arm26 and m68k from defines to aliases
and we are all set - we can make these externs in linux/interrupt.h
uncoditional and kill remaining instances in asm/irq.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 241258d1 06-May-2007 Milind Arun Choudhary <milindchoudhary@gmail.com>

SPIN_LOCK_UNLOCKED cleanup in arch/m68k

SPIN_LOCK_UNLOCKED cleanup,use __SPIN_LOCK_UNLOCKED instead

Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 6168a702 17-Feb-2007 Andrew Morton <akpm@osdl.org>

[PATCH] Declare init_irq_proc before we use it.

powerpc gets:

init/main.c: In function `do_basic_setup':
init/main.c:714: warning: implicit declaration of function `init_irq_proc'

but we cannot include linux/irq.h in generic code.

Fix it by moving the declaration into linux/interrupt.h instead.

And make sure all code that defines init_irq_proc() is including
linux/interrupt.h.

And nuke an ifdef-in-C

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 69961c37 09-Oct-2006 Geert Uytterhoeven <geert@linux-m68k.org>

[PATCH] m68k/Atari: Interrupt updates

Misc Atari fixes:
- initialize correct number of atari irqs
- silence vbl interrupt until it's used by atafb
- use mdelay() to read clock if necessary

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 40220c1a 08-Oct-2006 David Howells <dhowells@redhat.com>

IRQ: Use the new typedef for interrupt handler function pointers

Use the new typedef for interrupt handler function pointers rather than
actually spelling out the full thing each time. This was scripted with the
following small shell script:

#!/bin/sh
egrep -nHrl -e 'irqreturn_t[ ]*[(][*]' $* |
while read i
do
echo $i
perl -pi -e 's/irqreturn_t\s*[(]\s*[*]\s*([_a-zA-Z0-9]*)\s*[)]\s*[(]\s*int\s*,\s*void\s*[*]\s*[)]/irq_handler_t \1/g' $i || exit $?
done

Signed-Off-By: David Howells <dhowells@redhat.com>


# 2850bc27 07-Oct-2006 Al Viro <viro@ftp.linux.org.uk>

[PATCH] m68k pt_regs fixes

m68k_handle_int() split in two functions: __m68k_handle_int() takes
pt_regs * and does set_irq_regs(); m68k_handle_int() doesn't get pt_regs
*.

Places where we used to call m68k_handle_int() recursively with the same
pt_regs have simply lost the second argument, the rest is switched to
__m68k_handle_int().

The rest of patch is just dropping pt_regs * where needed.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# b0b9fdc1 01-Jul-2006 Thomas Gleixner <tglx@linutronix.de>

[PATCH] irq-flags: M68K: Use the new IRQF_ constants

Use the new IRQF_ constants and remove the SA_INTERRUPT define

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 6ab3d562 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>


# 68387c44 25-Jun-2006 Roman Zippel <zippel@linux-m68k.org>

[PATCH] m68k: convert generic irq code to irq controller

Convert the generic irq code to use irq controller, this gets rid of the
machine specific callbacks and gives better control over irq handling without
duplicating lots of code.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# b5dc7840 25-Jun-2006 Roman Zippel <zippel@linux-m68k.org>

[PATCH] m68k: introduce irq controller

Introduce irq controller and use it to manage auto vector interrupts.
Introduce setup_irq() which can be used for irq setup.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 4facfde9 25-Jun-2006 Roman Zippel <zippel@linux-m68k.org>

[PATCH] m68k: cleanup generic irq names

Rename IRQ1..IRQ7 to IRQ_AUTO_1..IRQ_AUTO_7 and remove the duplicate
defintions.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 92445eaa 25-Jun-2006 Roman Zippel <zippel@linux-m68k.org>

[PATCH] m68k: separate handler for auto and user vector interrupt

Use separate entry points for auto and user vector interrupts and cleanup
naming a little.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 6d2f16a8 23-Jun-2006 Roman Zippel <zippel@linux-m68k.org>

[PATCH] m68k: adjust to changed HARDIRQ_MASK

Adjust entry.S to the changed HARDIRQ_MASK, add a check to prevent it from
silently breaking again.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 1da177e4 16-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!