Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
e130bedb
Commit
e130bedb
authored
Nov 10, 2005
by
Paul Mackerras
Browse files
Options
Browse Files
Download
Plain Diff
Merge
git://oak/home/sfr/kernels/iseries/work
parents
00557b59
756e7104
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
164 additions
and
341 deletions
+164
-341
arch/powerpc/kernel/Makefile
arch/powerpc/kernel/Makefile
+1
-1
arch/powerpc/kernel/irq.c
arch/powerpc/kernel/irq.c
+112
-153
arch/powerpc/kernel/misc_64.S
arch/powerpc/kernel/misc_64.S
+4
-4
arch/powerpc/kernel/setup-common.c
arch/powerpc/kernel/setup-common.c
+2
-0
arch/powerpc/kernel/setup.h
arch/powerpc/kernel/setup.h
+6
-0
arch/powerpc/kernel/setup_32.c
arch/powerpc/kernel/setup_32.c
+2
-0
arch/powerpc/kernel/setup_64.c
arch/powerpc/kernel/setup_64.c
+2
-0
arch/powerpc/platforms/iseries/irq.c
arch/powerpc/platforms/iseries/irq.c
+19
-5
arch/powerpc/platforms/powermac/pic.c
arch/powerpc/platforms/powermac/pic.c
+3
-0
arch/powerpc/platforms/pseries/xics.c
arch/powerpc/platforms/pseries/xics.c
+1
-0
arch/ppc/kernel/Makefile
arch/ppc/kernel/Makefile
+2
-3
arch/ppc/kernel/irq.c
arch/ppc/kernel/irq.c
+0
-165
arch/ppc/kernel/ppc_ksyms.c
arch/ppc/kernel/ppc_ksyms.c
+0
-1
arch/ppc/platforms/pmac_pic.c
arch/ppc/platforms/pmac_pic.c
+3
-0
arch/ppc64/kernel/Makefile
arch/ppc64/kernel/Makefile
+1
-1
arch/ppc64/kernel/misc.S
arch/ppc64/kernel/misc.S
+4
-4
include/asm-powerpc/hw_irq.h
include/asm-powerpc/hw_irq.h
+0
-1
include/asm-powerpc/irq.h
include/asm-powerpc/irq.h
+2
-3
No files found.
arch/powerpc/kernel/Makefile
View file @
e130bedb
...
...
@@ -12,7 +12,7 @@ CFLAGS_btext.o += -fPIC
endif
obj-y
:=
semaphore.o cputable.o ptrace.o syscalls.o
\
signal_32.o pmc.o
irq.o
signal_32.o pmc.o
obj-$(CONFIG_PPC64)
+=
setup_64.o binfmt_elf32.o sys_ppc32.o
\
signal_64.o ptrace32.o systbl.o
\
paca.o ioctl32.o cpu_setup_power4.o
\
...
...
arch/p
pc64
/kernel/irq.c
→
arch/p
owerpc
/kernel/irq.c
View file @
e130bedb
This diff is collapsed.
Click to expand it.
arch/powerpc/kernel/misc_64.S
View file @
e130bedb
...
...
@@ -89,12 +89,12 @@ _GLOBAL(call_do_softirq)
mtlr
r0
blr
_GLOBAL
(
call_
handle_IRQ_event
)
_GLOBAL
(
call_
__do_IRQ
)
mflr
r0
std
r0
,
16
(
r1
)
stdu
r1
,
THREAD_SIZE
-
112
(
r
6
)
mr
r1
,
r
6
bl
.
handle_IRQ_event
stdu
r1
,
THREAD_SIZE
-
112
(
r
5
)
mr
r1
,
r
5
bl
.
__do_IRQ
ld
r1
,
0
(
r1
)
ld
r0
,
16
(
r1
)
mtlr
r0
...
...
arch/powerpc/kernel/setup-common.c
View file @
e130bedb
...
...
@@ -53,6 +53,8 @@
#include <asm/lmb.h>
#include <asm/xmon.h>
#include "setup.h"
#undef DEBUG
#ifdef DEBUG
...
...
arch/powerpc/kernel/setup.h
0 → 100644
View file @
e130bedb
#ifndef _POWERPC_KERNEL_SETUP_H
#define _POWERPC_KERNEL_SETUP_H
void
check_for_initrd
(
void
);
#endif
/* _POWERPC_KERNEL_SETUP_H */
arch/powerpc/kernel/setup_32.c
View file @
e130bedb
...
...
@@ -40,6 +40,8 @@
#include <asm/xmon.h>
#include <asm/time.h>
#include "setup.h"
#define DBG(fmt...)
#if defined CONFIG_KGDB
...
...
arch/powerpc/kernel/setup_64.c
View file @
e130bedb
...
...
@@ -61,6 +61,8 @@
#include <asm/xmon.h>
#include <asm/udbg.h>
#include "setup.h"
#ifdef DEBUG
#define DBG(fmt...) udbg_printf(fmt)
#else
...
...
arch/powerpc/platforms/iseries/irq.c
View file @
e130bedb
...
...
@@ -103,6 +103,9 @@ static void intReceived(struct XmPciLpEvent *eventParm,
struct
pt_regs
*
regsParm
)
{
int
irq
;
#ifdef CONFIG_IRQSTACKS
struct
thread_info
*
curtp
,
*
irqtp
;
#endif
++
Pci_Interrupt_Count
;
...
...
@@ -110,7 +113,20 @@ static void intReceived(struct XmPciLpEvent *eventParm,
case
XmPciLpEvent_SlotInterrupt
:
irq
=
eventParm
->
hvLpEvent
.
xCorrelationToken
;
/* Dispatch the interrupt handlers for this irq */
ppc_irq_dispatch_handler
(
regsParm
,
irq
);
#ifdef CONFIG_IRQSTACKS
/* Switch to the irq stack to handle this */
curtp
=
current_thread_info
();
irqtp
=
hardirq_ctx
[
smp_processor_id
()];
if
(
curtp
!=
irqtp
)
{
irqtp
->
task
=
curtp
->
task
;
irqtp
->
flags
=
0
;
call___do_IRQ
(
irq
,
regsParm
,
irqtp
);
irqtp
->
task
=
NULL
;
if
(
irqtp
->
flags
)
set_bits
(
irqtp
->
flags
,
&
curtp
->
flags
);
}
else
#endif
__do_IRQ
(
irq
,
regsParm
);
HvCallPci_eoi
(
eventParm
->
eventData
.
slotInterrupt
.
busNumber
,
eventParm
->
eventData
.
slotInterrupt
.
subBusNumber
,
eventParm
->
eventData
.
slotInterrupt
.
deviceId
);
...
...
@@ -310,10 +326,8 @@ static void iSeries_disable_IRQ(unsigned int irq)
}
/*
* Need to define this so ppc_irq_dispatch_handler will NOT call
* enable_IRQ at the end of interrupt handling. However, this does
* nothing because there is not enough information provided to do
* the EOI HvCall. This is done by XmPciLpEvent.c
* This does nothing because there is not enough information
* provided to do the EOI HvCall. This is done by XmPciLpEvent.c
*/
static
void
iSeries_end_IRQ
(
unsigned
int
irq
)
{
...
...
arch/powerpc/platforms/powermac/pic.c
View file @
e130bedb
...
...
@@ -74,6 +74,9 @@ static DEFINE_SPINLOCK(pmac_pic_lock);
#define GATWICK_IRQ_POOL_SIZE 10
static
struct
interrupt_info
gatwick_int_pool
[
GATWICK_IRQ_POOL_SIZE
];
#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
static
unsigned
long
ppc_lost_interrupts
[
NR_MASK_WORDS
];
/*
* Mark an irq as "lost". This is only used on the pmac
* since it can lose interrupts (see pmac_set_irq_mask).
...
...
arch/powerpc/platforms/pseries/xics.c
View file @
e130bedb
...
...
@@ -567,6 +567,7 @@ void xics_init_IRQ(void)
xics_8259_pic
.
enable
=
i8259_pic
.
enable
;
xics_8259_pic
.
disable
=
i8259_pic
.
disable
;
xics_8259_pic
.
end
=
i8259_pic
.
end
;
for
(
i
=
0
;
i
<
16
;
++
i
)
get_irq_desc
(
i
)
->
handler
=
&
xics_8259_pic
;
for
(;
i
<
NR_IRQS
;
++
i
)
...
...
arch/ppc/kernel/Makefile
View file @
e130bedb
...
...
@@ -12,7 +12,7 @@ extra-$(CONFIG_6xx) += idle_6xx.o
extra-$(CONFIG_POWER4)
+=
idle_power4.o
extra-y
+=
vmlinux.lds
obj-y
:=
entry.o traps.o i
rq.o i
dle.o time.o misc.o
\
obj-y
:=
entry.o traps.o idle.o time.o misc.o
\
process.o align.o
\
setup.o
\
ppc_htab.o
...
...
@@ -38,8 +38,7 @@ endif
# These are here while we do the architecture merge
else
obj-y
:=
irq.o idle.o
\
align.o
obj-y
:=
idle.o align.o
obj-$(CONFIG_6xx)
+=
l2cr.o cpu_setup_6xx.o
obj-$(CONFIG_SOFTWARE_SUSPEND)
+=
swsusp.o
obj-$(CONFIG_MODULES)
+=
module.o
...
...
arch/ppc/kernel/irq.c
deleted
100644 → 0
View file @
00557b59
/*
* arch/ppc/kernel/irq.c
*
* Derived from arch/i386/kernel/irq.c
* Copyright (C) 1992 Linus Torvalds
* Adapted from arch/i386 by Gary Thomas
* Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
* Updated and modified by Cort Dougan <cort@fsmlabs.com>
* Copyright (C) 1996-2001 Cort Dougan
* Adapted for Power Macintosh by Paul Mackerras
* Copyright (C) 1996 Paul Mackerras (paulus@cs.anu.edu.au)
* Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
*
* This file contains the code used by various IRQ handling routines:
* asking for different IRQ's should be done through these routines
* instead of just grabbing them. Thus setups with different IRQ numbers
* shouldn't result in any weird surprises, and installing new handlers
* should be easier.
*
* The MPC8xx has an interrupt mask in the SIU. If a bit is set, the
* interrupt is _enabled_. As expected, IRQ0 is bit 0 in the 32-bit
* mask register (of which only 16 are defined), hence the weird shifting
* and complement of the cached_irq_mask. I want to be able to stuff
* this right into the SIU SMASK register.
* Many of the prep/chrp functions are conditional compiled on CONFIG_8xx
* to reduce code space and undefined function references.
*/
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/threads.h>
#include <linux/kernel_stat.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/ptrace.h>
#include <linux/ioport.h>
#include <linux/interrupt.h>
#include <linux/timex.h>
#include <linux/config.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/irq.h>
#include <linux/proc_fs.h>
#include <linux/random.h>
#include <linux/seq_file.h>
#include <linux/cpumask.h>
#include <linux/profile.h>
#include <linux/bitops.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/irq.h>
#include <asm/cache.h>
#include <asm/prom.h>
#include <asm/ptrace.h>
#include <asm/machdep.h>
#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
extern
atomic_t
ipi_recv
;
extern
atomic_t
ipi_sent
;
#define MAXCOUNT 10000000
int
ppc_spurious_interrupts
=
0
;
struct
irqaction
*
ppc_irq_action
[
NR_IRQS
];
unsigned
long
ppc_cached_irq_mask
[
NR_MASK_WORDS
];
unsigned
long
ppc_lost_interrupts
[
NR_MASK_WORDS
];
atomic_t
ppc_n_lost_interrupts
;
#ifdef CONFIG_TAU_INT
extern
int
tau_initialized
;
extern
int
tau_interrupts
(
int
);
#endif
int
show_interrupts
(
struct
seq_file
*
p
,
void
*
v
)
{
int
i
=
*
(
loff_t
*
)
v
,
j
;
struct
irqaction
*
action
;
unsigned
long
flags
;
if
(
i
==
0
)
{
seq_puts
(
p
,
" "
);
for
(
j
=
0
;
j
<
NR_CPUS
;
j
++
)
if
(
cpu_online
(
j
))
seq_printf
(
p
,
"CPU%d "
,
j
);
seq_putc
(
p
,
'\n'
);
}
if
(
i
<
NR_IRQS
)
{
spin_lock_irqsave
(
&
irq_desc
[
i
].
lock
,
flags
);
action
=
irq_desc
[
i
].
action
;
if
(
!
action
||
!
action
->
handler
)
goto
skip
;
seq_printf
(
p
,
"%3d: "
,
i
);
#ifdef CONFIG_SMP
for
(
j
=
0
;
j
<
NR_CPUS
;
j
++
)
if
(
cpu_online
(
j
))
seq_printf
(
p
,
"%10u "
,
kstat_cpu
(
j
).
irqs
[
i
]);
#else
seq_printf
(
p
,
"%10u "
,
kstat_irqs
(
i
));
#endif
/* CONFIG_SMP */
if
(
irq_desc
[
i
].
handler
)
seq_printf
(
p
,
" %s "
,
irq_desc
[
i
].
handler
->
typename
);
else
seq_puts
(
p
,
" None "
);
seq_printf
(
p
,
"%s"
,
(
irq_desc
[
i
].
status
&
IRQ_LEVEL
)
?
"Level "
:
"Edge "
);
seq_printf
(
p
,
" %s"
,
action
->
name
);
for
(
action
=
action
->
next
;
action
;
action
=
action
->
next
)
seq_printf
(
p
,
", %s"
,
action
->
name
);
seq_putc
(
p
,
'\n'
);
skip:
spin_unlock_irqrestore
(
&
irq_desc
[
i
].
lock
,
flags
);
}
else
if
(
i
==
NR_IRQS
)
{
#ifdef CONFIG_TAU_INT
if
(
tau_initialized
){
seq_puts
(
p
,
"TAU: "
);
for
(
j
=
0
;
j
<
NR_CPUS
;
j
++
)
if
(
cpu_online
(
j
))
seq_printf
(
p
,
"%10u "
,
tau_interrupts
(
j
));
seq_puts
(
p
,
" PowerPC Thermal Assist (cpu temp)
\n
"
);
}
#endif
#if defined(CONFIG_SMP) && !defined(CONFIG_PPC_MERGE)
/* should this be per processor send/receive? */
seq_printf
(
p
,
"IPI (recv/sent): %10u/%u
\n
"
,
atomic_read
(
&
ipi_recv
),
atomic_read
(
&
ipi_sent
));
#endif
seq_printf
(
p
,
"BAD: %10u
\n
"
,
ppc_spurious_interrupts
);
}
return
0
;
}
void
do_IRQ
(
struct
pt_regs
*
regs
)
{
int
irq
,
first
=
1
;
irq_enter
();
/*
* Every platform is required to implement ppc_md.get_irq.
* This function will either return an irq number or -1 to
* indicate there are no more pending. But the first time
* through the loop this means there wasn't and IRQ pending.
* The value -2 is for buggy hardware and means that this IRQ
* has already been handled. -- Tom
*/
while
((
irq
=
ppc_md
.
get_irq
(
regs
))
>=
0
)
{
__do_IRQ
(
irq
,
regs
);
first
=
0
;
}
if
(
irq
!=
-
2
&&
first
)
/* That's not SMP safe ... but who cares ? */
ppc_spurious_interrupts
++
;
irq_exit
();
}
void
__init
init_IRQ
(
void
)
{
ppc_md
.
init_IRQ
();
}
arch/ppc/kernel/ppc_ksyms.c
View file @
e130bedb
...
...
@@ -78,7 +78,6 @@ EXPORT_SYMBOL(program_check_exception);
EXPORT_SYMBOL
(
single_step_exception
);
EXPORT_SYMBOL
(
sys_sigreturn
);
EXPORT_SYMBOL
(
ppc_n_lost_interrupts
);
EXPORT_SYMBOL
(
ppc_lost_interrupts
);
EXPORT_SYMBOL
(
ISA_DMA_THRESHOLD
);
EXPORT_SYMBOL
(
DMA_MODE_READ
);
...
...
arch/ppc/platforms/pmac_pic.c
View file @
e130bedb
...
...
@@ -75,6 +75,9 @@ static DEFINE_SPINLOCK(pmac_pic_lock);
#define GATWICK_IRQ_POOL_SIZE 10
static
struct
interrupt_info
gatwick_int_pool
[
GATWICK_IRQ_POOL_SIZE
];
#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
static
unsigned
long
ppc_lost_interrupts
[
NR_MASK_WORDS
];
/*
* Mark an irq as "lost". This is only used on the pmac
* since it can lose interrupts (see pmac_set_irq_mask).
...
...
arch/ppc64/kernel/Makefile
View file @
e130bedb
...
...
@@ -11,7 +11,7 @@ obj-y := misc.o prom.o
endif
obj-y
+=
i
rq.o i
dle.o dma.o
\
obj-y
+=
idle.o dma.o
\
align.o
\
udbg.o
\
rtc.o
\
...
...
arch/ppc64/kernel/misc.S
View file @
e130bedb
...
...
@@ -78,12 +78,12 @@ _GLOBAL(call_do_softirq)
mtlr
r0
blr
_GLOBAL
(
call_
handle_IRQ_event
)
_GLOBAL
(
call_
__do_IRQ
)
mflr
r0
std
r0
,
16
(
r1
)
stdu
r1
,
THREAD_SIZE
-
112
(
r
6
)
mr
r1
,
r
6
bl
.
handle_IRQ_event
stdu
r1
,
THREAD_SIZE
-
112
(
r
5
)
mr
r1
,
r
5
bl
.
__do_IRQ
ld
r1
,
0
(
r1
)
ld
r0
,
16
(
r1
)
mtlr
r0
...
...
include/asm-powerpc/hw_irq.h
View file @
e130bedb
...
...
@@ -12,7 +12,6 @@
#include <asm/processor.h>
extern
void
timer_interrupt
(
struct
pt_regs
*
);
extern
void
ppc_irq_dispatch_handler
(
struct
pt_regs
*
regs
,
int
irq
);
#ifdef CONFIG_PPC_ISERIES
...
...
include/asm-powerpc/irq.h
View file @
e130bedb
...
...
@@ -429,7 +429,6 @@ extern u64 ppc64_interrupt_controller;
#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
/* pedantic: these are long because they are used with set_bit --RR */
extern
unsigned
long
ppc_cached_irq_mask
[
NR_MASK_WORDS
];
extern
unsigned
long
ppc_lost_interrupts
[
NR_MASK_WORDS
];
extern
atomic_t
ppc_n_lost_interrupts
;
#define virt_irq_create_mapping(x) (x)
...
...
@@ -488,8 +487,8 @@ extern struct thread_info *softirq_ctx[NR_CPUS];
extern
void
irq_ctx_init
(
void
);
extern
void
call_do_softirq
(
struct
thread_info
*
tp
);
extern
int
call_
handle_IRQ_event
(
int
irq
,
struct
pt_regs
*
regs
,
struct
irqaction
*
action
,
struct
thread_info
*
tp
);
extern
int
call_
__do_IRQ
(
int
irq
,
struct
pt_regs
*
regs
,
struct
thread_info
*
tp
);
#define __ARCH_HAS_DO_SOFTIRQ
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment