License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.
By default all files without license information are under the default
license of the kernel, which is GPL version 2.
Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.
This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.
How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,
Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.
The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.
The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.
Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 14:07:57 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2005-04-16 22:20:36 +00:00
|
|
|
/*
|
|
|
|
* ip22-int.c: Routines for generic manipulation of the INT[23] ASIC
|
2013-01-22 11:59:30 +00:00
|
|
|
* found on INDY and Indigo2 workstations.
|
2005-04-16 22:20:36 +00:00
|
|
|
*
|
2011-04-04 21:15:29 +00:00
|
|
|
* Copyright (C) 1996 David S. Miller (davem@davemloft.net)
|
2005-04-16 22:20:36 +00:00
|
|
|
* Copyright (C) 1997, 1998 Ralf Baechle (ralf@gnu.org)
|
|
|
|
* Copyright (C) 1999 Andrew R. Baker (andrewb@uab.edu)
|
2013-01-22 11:59:30 +00:00
|
|
|
* - Indigo2 changes
|
|
|
|
* - Interrupt handling fixes
|
2005-04-16 22:20:36 +00:00
|
|
|
* Copyright (C) 2001, 2003 Ladislav Michl (ladis@linux-mips.org)
|
|
|
|
*/
|
|
|
|
#include <linux/types.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/kernel_stat.h>
|
|
|
|
#include <linux/interrupt.h>
|
2009-11-20 12:34:33 +00:00
|
|
|
#include <linux/ftrace.h>
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2007-01-07 17:14:29 +00:00
|
|
|
#include <asm/irq_cpu.h>
|
2005-04-16 22:20:36 +00:00
|
|
|
#include <asm/sgi/hpc3.h>
|
|
|
|
#include <asm/sgi/ip22.h>
|
|
|
|
|
|
|
|
/* So far nothing hangs here */
|
2005-09-03 22:56:17 +00:00
|
|
|
#undef USE_LIO3_IRQ
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
struct sgint_regs *sgint;
|
|
|
|
|
|
|
|
static char lc0msk_to_irqnr[256];
|
|
|
|
static char lc1msk_to_irqnr[256];
|
|
|
|
static char lc2msk_to_irqnr[256];
|
|
|
|
static char lc3msk_to_irqnr[256];
|
|
|
|
|
|
|
|
extern int ip22_eisa_init(void);
|
|
|
|
|
2011-03-23 21:09:11 +00:00
|
|
|
static void enable_local0_irq(struct irq_data *d)
|
2005-04-16 22:20:36 +00:00
|
|
|
{
|
|
|
|
/* don't allow mappable interrupt to be enabled from setup_irq,
|
|
|
|
* we have our own way to do so */
|
2011-03-23 21:09:11 +00:00
|
|
|
if (d->irq != SGI_MAP_0_IRQ)
|
|
|
|
sgint->imask0 |= (1 << (d->irq - SGINT_LOCAL0));
|
2005-04-16 22:20:36 +00:00
|
|
|
}
|
|
|
|
|
2011-03-23 21:09:11 +00:00
|
|
|
static void disable_local0_irq(struct irq_data *d)
|
2005-04-16 22:20:36 +00:00
|
|
|
{
|
2011-03-23 21:09:11 +00:00
|
|
|
sgint->imask0 &= ~(1 << (d->irq - SGINT_LOCAL0));
|
2005-04-16 22:20:36 +00:00
|
|
|
}
|
|
|
|
|
2006-07-02 13:41:42 +00:00
|
|
|
static struct irq_chip ip22_local0_irq_type = {
|
2007-01-14 15:07:25 +00:00
|
|
|
.name = "IP22 local 0",
|
2011-03-23 21:09:11 +00:00
|
|
|
.irq_mask = disable_local0_irq,
|
|
|
|
.irq_unmask = enable_local0_irq,
|
2005-04-16 22:20:36 +00:00
|
|
|
};
|
|
|
|
|
2011-03-23 21:09:11 +00:00
|
|
|
static void enable_local1_irq(struct irq_data *d)
|
2005-04-16 22:20:36 +00:00
|
|
|
{
|
|
|
|
/* don't allow mappable interrupt to be enabled from setup_irq,
|
|
|
|
* we have our own way to do so */
|
2011-03-23 21:09:11 +00:00
|
|
|
if (d->irq != SGI_MAP_1_IRQ)
|
|
|
|
sgint->imask1 |= (1 << (d->irq - SGINT_LOCAL1));
|
2005-04-16 22:20:36 +00:00
|
|
|
}
|
|
|
|
|
2011-03-23 21:09:11 +00:00
|
|
|
static void disable_local1_irq(struct irq_data *d)
|
2005-04-16 22:20:36 +00:00
|
|
|
{
|
2011-03-23 21:09:11 +00:00
|
|
|
sgint->imask1 &= ~(1 << (d->irq - SGINT_LOCAL1));
|
2005-04-16 22:20:36 +00:00
|
|
|
}
|
|
|
|
|
2006-07-02 13:41:42 +00:00
|
|
|
static struct irq_chip ip22_local1_irq_type = {
|
2007-01-14 15:07:25 +00:00
|
|
|
.name = "IP22 local 1",
|
2011-03-23 21:09:11 +00:00
|
|
|
.irq_mask = disable_local1_irq,
|
|
|
|
.irq_unmask = enable_local1_irq,
|
2005-04-16 22:20:36 +00:00
|
|
|
};
|
|
|
|
|
2011-03-23 21:09:11 +00:00
|
|
|
static void enable_local2_irq(struct irq_data *d)
|
2005-04-16 22:20:36 +00:00
|
|
|
{
|
|
|
|
sgint->imask0 |= (1 << (SGI_MAP_0_IRQ - SGINT_LOCAL0));
|
2011-03-23 21:09:11 +00:00
|
|
|
sgint->cmeimask0 |= (1 << (d->irq - SGINT_LOCAL2));
|
2005-04-16 22:20:36 +00:00
|
|
|
}
|
|
|
|
|
2011-03-23 21:09:11 +00:00
|
|
|
static void disable_local2_irq(struct irq_data *d)
|
2005-04-16 22:20:36 +00:00
|
|
|
{
|
2011-03-23 21:09:11 +00:00
|
|
|
sgint->cmeimask0 &= ~(1 << (d->irq - SGINT_LOCAL2));
|
2005-04-16 22:20:36 +00:00
|
|
|
if (!sgint->cmeimask0)
|
|
|
|
sgint->imask0 &= ~(1 << (SGI_MAP_0_IRQ - SGINT_LOCAL0));
|
|
|
|
}
|
|
|
|
|
2006-07-02 13:41:42 +00:00
|
|
|
static struct irq_chip ip22_local2_irq_type = {
|
2007-01-14 15:07:25 +00:00
|
|
|
.name = "IP22 local 2",
|
2011-03-23 21:09:11 +00:00
|
|
|
.irq_mask = disable_local2_irq,
|
|
|
|
.irq_unmask = enable_local2_irq,
|
2005-04-16 22:20:36 +00:00
|
|
|
};
|
|
|
|
|
2011-03-23 21:09:11 +00:00
|
|
|
static void enable_local3_irq(struct irq_data *d)
|
2005-04-16 22:20:36 +00:00
|
|
|
{
|
|
|
|
sgint->imask1 |= (1 << (SGI_MAP_1_IRQ - SGINT_LOCAL1));
|
2011-03-23 21:09:11 +00:00
|
|
|
sgint->cmeimask1 |= (1 << (d->irq - SGINT_LOCAL3));
|
2005-04-16 22:20:36 +00:00
|
|
|
}
|
|
|
|
|
2011-03-23 21:09:11 +00:00
|
|
|
static void disable_local3_irq(struct irq_data *d)
|
2005-04-16 22:20:36 +00:00
|
|
|
{
|
2011-03-23 21:09:11 +00:00
|
|
|
sgint->cmeimask1 &= ~(1 << (d->irq - SGINT_LOCAL3));
|
2005-04-16 22:20:36 +00:00
|
|
|
if (!sgint->cmeimask1)
|
|
|
|
sgint->imask1 &= ~(1 << (SGI_MAP_1_IRQ - SGINT_LOCAL1));
|
|
|
|
}
|
|
|
|
|
2006-07-02 13:41:42 +00:00
|
|
|
static struct irq_chip ip22_local3_irq_type = {
|
2007-01-14 15:07:25 +00:00
|
|
|
.name = "IP22 local 3",
|
2011-03-23 21:09:11 +00:00
|
|
|
.irq_mask = disable_local3_irq,
|
|
|
|
.irq_unmask = enable_local3_irq,
|
2005-04-16 22:20:36 +00:00
|
|
|
};
|
|
|
|
|
2006-10-07 18:44:33 +00:00
|
|
|
static void indy_local0_irqdispatch(void)
|
2005-04-16 22:20:36 +00:00
|
|
|
{
|
|
|
|
u8 mask = sgint->istat0 & sgint->imask0;
|
|
|
|
u8 mask2;
|
|
|
|
int irq;
|
|
|
|
|
|
|
|
if (mask & SGINT_ISTAT0_LIO2) {
|
|
|
|
mask2 = sgint->vmeistat & sgint->cmeimask0;
|
|
|
|
irq = lc2msk_to_irqnr[mask2];
|
|
|
|
} else
|
|
|
|
irq = lc0msk_to_irqnr[mask];
|
|
|
|
|
2014-06-04 10:00:37 +00:00
|
|
|
/*
|
|
|
|
* workaround for INT2 bug; if irq == 0, INT2 has seen a fifo full
|
|
|
|
* irq, but failed to latch it into status register
|
|
|
|
*/
|
2005-04-16 22:20:36 +00:00
|
|
|
if (irq)
|
2006-10-07 18:44:33 +00:00
|
|
|
do_IRQ(irq);
|
2014-06-04 10:00:37 +00:00
|
|
|
else
|
|
|
|
do_IRQ(SGINT_LOCAL0 + 0);
|
2005-04-16 22:20:36 +00:00
|
|
|
}
|
|
|
|
|
2006-10-07 18:44:33 +00:00
|
|
|
static void indy_local1_irqdispatch(void)
|
2005-04-16 22:20:36 +00:00
|
|
|
{
|
|
|
|
u8 mask = sgint->istat1 & sgint->imask1;
|
|
|
|
u8 mask2;
|
|
|
|
int irq;
|
|
|
|
|
|
|
|
if (mask & SGINT_ISTAT1_LIO3) {
|
|
|
|
mask2 = sgint->vmeistat & sgint->cmeimask1;
|
|
|
|
irq = lc3msk_to_irqnr[mask2];
|
|
|
|
} else
|
|
|
|
irq = lc1msk_to_irqnr[mask];
|
|
|
|
|
|
|
|
/* if irq == 0, then the interrupt has already been cleared */
|
|
|
|
if (irq)
|
2006-10-07 18:44:33 +00:00
|
|
|
do_IRQ(irq);
|
2005-04-16 22:20:36 +00:00
|
|
|
}
|
|
|
|
|
2006-10-07 18:44:33 +00:00
|
|
|
extern void ip22_be_interrupt(int irq);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2009-11-20 12:34:33 +00:00
|
|
|
static void __irq_entry indy_buserror_irq(void)
|
2005-04-16 22:20:36 +00:00
|
|
|
{
|
|
|
|
int irq = SGI_BUSERR_IRQ;
|
|
|
|
|
|
|
|
irq_enter();
|
2014-02-23 21:40:14 +00:00
|
|
|
kstat_incr_irq_this_cpu(irq);
|
2006-10-07 18:44:33 +00:00
|
|
|
ip22_be_interrupt(irq);
|
2005-04-16 22:20:36 +00:00
|
|
|
irq_exit();
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef USE_LIO3_IRQ
|
|
|
|
#define SGI_INTERRUPTS SGINT_END
|
|
|
|
#else
|
|
|
|
#define SGI_INTERRUPTS SGINT_LOCAL3
|
|
|
|
#endif
|
|
|
|
|
2006-10-07 18:44:33 +00:00
|
|
|
extern void indy_8254timer_irq(void);
|
2006-04-03 16:56:36 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* IRQs on the INDY look basically (barring software IRQs which we don't use
|
|
|
|
* at all) like:
|
|
|
|
*
|
|
|
|
* MIPS IRQ Source
|
2013-01-22 11:59:30 +00:00
|
|
|
* -------- ------
|
|
|
|
* 0 Software (ignored)
|
|
|
|
* 1 Software (ignored)
|
|
|
|
* 2 Local IRQ level zero
|
|
|
|
* 3 Local IRQ level one
|
|
|
|
* 4 8254 Timer zero
|
|
|
|
* 5 8254 Timer one
|
|
|
|
* 6 Bus Error
|
|
|
|
* 7 R4k timer (what we use)
|
2006-04-03 16:56:36 +00:00
|
|
|
*
|
|
|
|
* We handle the IRQ according to _our_ priority which is:
|
|
|
|
*
|
2013-01-22 11:59:30 +00:00
|
|
|
* Highest ---- R4k Timer
|
|
|
|
* Local IRQ zero
|
|
|
|
* Local IRQ one
|
|
|
|
* Bus Error
|
|
|
|
* 8254 Timer zero
|
|
|
|
* Lowest ---- 8254 Timer one
|
2006-04-03 16:56:36 +00:00
|
|
|
*
|
|
|
|
* then we just return, if multiple IRQs are pending then we will just take
|
|
|
|
* another exception, big deal.
|
|
|
|
*/
|
|
|
|
|
2006-10-07 18:44:33 +00:00
|
|
|
asmlinkage void plat_irq_dispatch(void)
|
2006-04-03 16:56:36 +00:00
|
|
|
{
|
2007-03-19 00:13:37 +00:00
|
|
|
unsigned int pending = read_c0_status() & read_c0_cause();
|
2006-04-03 16:56:36 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* First we check for r4k counter/timer IRQ.
|
|
|
|
*/
|
|
|
|
if (pending & CAUSEF_IP7)
|
2007-10-11 22:46:09 +00:00
|
|
|
do_IRQ(SGI_TIMER_IRQ);
|
2006-04-03 16:56:36 +00:00
|
|
|
else if (pending & CAUSEF_IP2)
|
2006-10-07 18:44:33 +00:00
|
|
|
indy_local0_irqdispatch();
|
2006-04-03 16:56:36 +00:00
|
|
|
else if (pending & CAUSEF_IP3)
|
2006-10-07 18:44:33 +00:00
|
|
|
indy_local1_irqdispatch();
|
2006-04-03 16:56:36 +00:00
|
|
|
else if (pending & CAUSEF_IP6)
|
2006-10-07 18:44:33 +00:00
|
|
|
indy_buserror_irq();
|
2006-04-03 16:56:36 +00:00
|
|
|
else if (pending & (CAUSEF_IP4 | CAUSEF_IP5))
|
2006-10-07 18:44:33 +00:00
|
|
|
indy_8254timer_irq();
|
2006-04-03 16:56:36 +00:00
|
|
|
}
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
void __init arch_init_irq(void)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
/* Init local mask --> irq tables. */
|
|
|
|
for (i = 0; i < 256; i++) {
|
|
|
|
if (i & 0x80) {
|
|
|
|
lc0msk_to_irqnr[i] = SGINT_LOCAL0 + 7;
|
|
|
|
lc1msk_to_irqnr[i] = SGINT_LOCAL1 + 7;
|
|
|
|
lc2msk_to_irqnr[i] = SGINT_LOCAL2 + 7;
|
|
|
|
lc3msk_to_irqnr[i] = SGINT_LOCAL3 + 7;
|
|
|
|
} else if (i & 0x40) {
|
|
|
|
lc0msk_to_irqnr[i] = SGINT_LOCAL0 + 6;
|
|
|
|
lc1msk_to_irqnr[i] = SGINT_LOCAL1 + 6;
|
|
|
|
lc2msk_to_irqnr[i] = SGINT_LOCAL2 + 6;
|
|
|
|
lc3msk_to_irqnr[i] = SGINT_LOCAL3 + 6;
|
|
|
|
} else if (i & 0x20) {
|
|
|
|
lc0msk_to_irqnr[i] = SGINT_LOCAL0 + 5;
|
|
|
|
lc1msk_to_irqnr[i] = SGINT_LOCAL1 + 5;
|
|
|
|
lc2msk_to_irqnr[i] = SGINT_LOCAL2 + 5;
|
|
|
|
lc3msk_to_irqnr[i] = SGINT_LOCAL3 + 5;
|
|
|
|
} else if (i & 0x10) {
|
|
|
|
lc0msk_to_irqnr[i] = SGINT_LOCAL0 + 4;
|
|
|
|
lc1msk_to_irqnr[i] = SGINT_LOCAL1 + 4;
|
|
|
|
lc2msk_to_irqnr[i] = SGINT_LOCAL2 + 4;
|
|
|
|
lc3msk_to_irqnr[i] = SGINT_LOCAL3 + 4;
|
|
|
|
} else if (i & 0x08) {
|
|
|
|
lc0msk_to_irqnr[i] = SGINT_LOCAL0 + 3;
|
|
|
|
lc1msk_to_irqnr[i] = SGINT_LOCAL1 + 3;
|
|
|
|
lc2msk_to_irqnr[i] = SGINT_LOCAL2 + 3;
|
|
|
|
lc3msk_to_irqnr[i] = SGINT_LOCAL3 + 3;
|
|
|
|
} else if (i & 0x04) {
|
|
|
|
lc0msk_to_irqnr[i] = SGINT_LOCAL0 + 2;
|
|
|
|
lc1msk_to_irqnr[i] = SGINT_LOCAL1 + 2;
|
|
|
|
lc2msk_to_irqnr[i] = SGINT_LOCAL2 + 2;
|
|
|
|
lc3msk_to_irqnr[i] = SGINT_LOCAL3 + 2;
|
|
|
|
} else if (i & 0x02) {
|
|
|
|
lc0msk_to_irqnr[i] = SGINT_LOCAL0 + 1;
|
|
|
|
lc1msk_to_irqnr[i] = SGINT_LOCAL1 + 1;
|
|
|
|
lc2msk_to_irqnr[i] = SGINT_LOCAL2 + 1;
|
|
|
|
lc3msk_to_irqnr[i] = SGINT_LOCAL3 + 1;
|
|
|
|
} else if (i & 0x01) {
|
|
|
|
lc0msk_to_irqnr[i] = SGINT_LOCAL0 + 0;
|
|
|
|
lc1msk_to_irqnr[i] = SGINT_LOCAL1 + 0;
|
|
|
|
lc2msk_to_irqnr[i] = SGINT_LOCAL2 + 0;
|
|
|
|
lc3msk_to_irqnr[i] = SGINT_LOCAL3 + 0;
|
|
|
|
} else {
|
|
|
|
lc0msk_to_irqnr[i] = 0;
|
|
|
|
lc1msk_to_irqnr[i] = 0;
|
|
|
|
lc2msk_to_irqnr[i] = 0;
|
|
|
|
lc3msk_to_irqnr[i] = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Mask out all interrupts. */
|
|
|
|
sgint->imask0 = 0;
|
|
|
|
sgint->imask1 = 0;
|
|
|
|
sgint->cmeimask0 = 0;
|
|
|
|
sgint->cmeimask1 = 0;
|
|
|
|
|
|
|
|
/* init CPU irqs */
|
2007-01-07 17:14:29 +00:00
|
|
|
mips_cpu_irq_init();
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
for (i = SGINT_LOCAL0; i < SGI_INTERRUPTS; i++) {
|
2006-07-02 13:41:42 +00:00
|
|
|
struct irq_chip *handler;
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
if (i < SGINT_LOCAL1)
|
|
|
|
handler = &ip22_local0_irq_type;
|
|
|
|
else if (i < SGINT_LOCAL2)
|
|
|
|
handler = &ip22_local1_irq_type;
|
|
|
|
else if (i < SGINT_LOCAL3)
|
|
|
|
handler = &ip22_local2_irq_type;
|
|
|
|
else
|
|
|
|
handler = &ip22_local3_irq_type;
|
|
|
|
|
2011-03-27 13:19:28 +00:00
|
|
|
irq_set_chip_and_handler(i, handler, handle_level_irq);
|
2005-04-16 22:20:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* vector handler. this register the IRQ as non-sharable */
|
2020-03-05 11:57:53 +00:00
|
|
|
if (request_irq(SGI_LOCAL_0_IRQ, no_action, IRQF_NO_THREAD,
|
|
|
|
"local0 cascade", NULL))
|
|
|
|
pr_err("Failed to register local0 cascade interrupt\n");
|
|
|
|
if (request_irq(SGI_LOCAL_1_IRQ, no_action, IRQF_NO_THREAD,
|
|
|
|
"local1 cascade", NULL))
|
|
|
|
pr_err("Failed to register local1 cascade interrupt\n");
|
|
|
|
if (request_irq(SGI_BUSERR_IRQ, no_action, IRQF_NO_THREAD,
|
|
|
|
"Bus Error", NULL))
|
|
|
|
pr_err("Failed to register Bus Error interrupt\n");
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
/* cascade in cascade. i love Indy ;-) */
|
2020-03-05 11:57:53 +00:00
|
|
|
if (request_irq(SGI_MAP_0_IRQ, no_action, IRQF_NO_THREAD,
|
|
|
|
"mapable0 cascade", NULL))
|
|
|
|
pr_err("Failed to register mapable0 cascade interrupt\n");
|
2005-04-16 22:20:36 +00:00
|
|
|
#ifdef USE_LIO3_IRQ
|
2020-03-05 11:57:53 +00:00
|
|
|
if (request_irq(SGI_MAP_1_IRQ, no_action, IRQF_NO_THREAD,
|
|
|
|
"mapable1 cascade", NULL))
|
|
|
|
pr_err("Failed to register mapable1 cascade interrupt\n");
|
2005-04-16 22:20:36 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_EISA
|
|
|
|
if (ip22_is_fullhouse()) /* Only Indigo-2 has EISA stuff */
|
2008-10-24 22:46:56 +00:00
|
|
|
ip22_eisa_init();
|
2005-04-16 22:20:36 +00:00
|
|
|
#endif
|
|
|
|
}
|