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
Kirill Smelkov
linux
Commits
4561c1da
Commit
4561c1da
authored
Mar 29, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: xics cleanup
parent
4eee9ae9
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
181 additions
and
193 deletions
+181
-193
arch/ppc64/kernel/pSeries_lpar.c
arch/ppc64/kernel/pSeries_lpar.c
+0
-83
arch/ppc64/kernel/smp.c
arch/ppc64/kernel/smp.c
+2
-13
arch/ppc64/kernel/xics.c
arch/ppc64/kernel/xics.c
+169
-97
include/asm-ppc64/xics.h
include/asm-ppc64/xics.h
+10
-0
No files found.
arch/ppc64/kernel/pSeries_lpar.c
View file @
4561c1da
...
...
@@ -110,29 +110,6 @@ long plpar_put_term_char(unsigned long termno,
lbuf
[
0
],
lbuf
[
1
],
&
dummy
,
&
dummy
,
&
dummy
);
}
long
plpar_eoi
(
unsigned
long
xirr
)
{
return
plpar_hcall_norets
(
H_EOI
,
xirr
);
}
long
plpar_cppr
(
unsigned
long
cppr
)
{
return
plpar_hcall_norets
(
H_CPPR
,
cppr
);
}
long
plpar_ipi
(
unsigned
long
servernum
,
unsigned
long
mfrr
)
{
return
plpar_hcall_norets
(
H_IPI
,
servernum
,
mfrr
);
}
long
plpar_xirr
(
unsigned
long
*
xirr_ret
)
{
unsigned
long
dummy
;
return
plpar_hcall
(
H_XIRR
,
0
,
0
,
0
,
0
,
xirr_ret
,
&
dummy
,
&
dummy
);
}
static
void
tce_build_pSeriesLP
(
struct
TceTable
*
tbl
,
long
tcenum
,
unsigned
long
uaddr
,
int
direction
)
{
...
...
@@ -180,66 +157,6 @@ static void tce_free_one_pSeriesLP(struct TceTable *tbl, long tcenum)
}
/* PowerPC Interrupts for lpar. */
/* NOTE: this typedef is duplicated (for now) from xics.c! */
typedef
struct
{
int
(
*
xirr_info_get
)(
int
cpu
);
void
(
*
xirr_info_set
)(
int
cpu
,
int
val
);
void
(
*
cppr_info
)(
int
cpu
,
u8
val
);
void
(
*
qirr_info
)(
int
cpu
,
u8
val
);
}
xics_ops
;
static
int
pSeriesLP_xirr_info_get
(
int
n_cpu
)
{
unsigned
long
lpar_rc
;
unsigned
long
return_value
;
lpar_rc
=
plpar_xirr
(
&
return_value
);
if
(
lpar_rc
!=
H_Success
)
{
panic
(
" bad return code xirr - rc = %lx
\n
"
,
lpar_rc
);
}
return
((
int
)(
return_value
));
}
static
void
pSeriesLP_xirr_info_set
(
int
n_cpu
,
int
value
)
{
unsigned
long
lpar_rc
;
unsigned
long
val64
=
value
&
0xffffffff
;
lpar_rc
=
plpar_eoi
(
val64
);
if
(
lpar_rc
!=
H_Success
)
{
panic
(
" bad return code EOI - rc = %ld, value=%lx
\n
"
,
lpar_rc
,
val64
);
}
}
static
void
pSeriesLP_cppr_info
(
int
n_cpu
,
u8
value
)
{
unsigned
long
lpar_rc
;
lpar_rc
=
plpar_cppr
(
value
);
if
(
lpar_rc
!=
H_Success
)
{
panic
(
" bad return code cppr - rc = %lx
\n
"
,
lpar_rc
);
}
}
static
void
pSeriesLP_qirr_info
(
int
n_cpu
,
u8
value
)
{
unsigned
long
lpar_rc
;
lpar_rc
=
plpar_ipi
(
n_cpu
,
value
);
if
(
lpar_rc
!=
H_Success
)
{
panic
(
" bad return code qirr -ipi - rc = %lx
\n
"
,
lpar_rc
);
}
}
xics_ops
pSeriesLP_ops
=
{
pSeriesLP_xirr_info_get
,
pSeriesLP_xirr_info_set
,
pSeriesLP_cppr_info
,
pSeriesLP_qirr_info
};
/* end TAI-LPAR */
int
vtermno
;
/* virtual terminal# for udbg */
static
void
udbg_putcLP
(
unsigned
char
c
)
...
...
arch/ppc64/kernel/smp.c
View file @
4561c1da
...
...
@@ -47,8 +47,9 @@
#include <asm/ppcdebug.h>
#include "open_pic.h"
#include <asm/machdep.h>
#include <asm/xics.h>
int
smp_threads_ready
=
0
;
int
smp_threads_ready
;
unsigned
long
cache_decay_ticks
;
/* initialised so it doesn't end up in bss */
...
...
@@ -64,18 +65,6 @@ extern int cpu_idle(void *unused);
void
smp_call_function_interrupt
(
void
);
void
smp_message_pass
(
int
target
,
int
msg
,
unsigned
long
data
,
int
wait
);
void
xics_setup_cpu
(
void
);
void
xics_cause_IPI
(
int
cpu
);
/*
* XICS only has a single IPI, so encode the messages per CPU
*/
struct
xics_ipi_struct
{
volatile
unsigned
long
value
;
}
____cacheline_aligned
;
struct
xics_ipi_struct
xics_ipi_message
[
NR_CPUS
]
__cacheline_aligned
;
#define smp_message_pass(t,m,d,w) smp_ops->message_pass((t),(m),(d),(w))
static
inline
void
set_tb
(
unsigned
int
upper
,
unsigned
int
lower
)
...
...
arch/ppc64/kernel/xics.c
View file @
4561c1da
This diff is collapsed.
Click to expand it.
include/asm-ppc64/xics.h
View file @
4561c1da
...
...
@@ -12,7 +12,17 @@
#ifndef _PPC64_KERNEL_XICS_H
#define _PPC64_KERNEL_XICS_H
#include <linux/cache.h>
void
xics_init_IRQ
(
void
);
int
xics_get_irq
(
struct
pt_regs
*
);
void
xics_setup_cpu
(
void
);
void
xics_cause_IPI
(
int
cpu
);
struct
xics_ipi_struct
{
volatile
unsigned
long
value
;
}
____cacheline_aligned
;
extern
struct
xics_ipi_struct
xics_ipi_message
[
NR_CPUS
]
__cacheline_aligned
;
#endif
/* _PPC64_KERNEL_XICS_H */
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