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
f572f5e3
Commit
f572f5e3
authored
May 22, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: replace MAX_PACAS with NR_CPUS
parent
2b41d113
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
20 deletions
+27
-20
arch/ppc64/kernel/iSeries_setup.c
arch/ppc64/kernel/iSeries_setup.c
+1
-1
arch/ppc64/kernel/irq.c
arch/ppc64/kernel/irq.c
+1
-1
arch/ppc64/kernel/pacaData.c
arch/ppc64/kernel/pacaData.c
+20
-2
arch/ppc64/kernel/setup.c
arch/ppc64/kernel/setup.c
+1
-1
arch/ppc64/kernel/smp.c
arch/ppc64/kernel/smp.c
+4
-4
include/asm-ppc64/paca.h
include/asm-ppc64/paca.h
+0
-11
No files found.
arch/ppc64/kernel/iSeries_setup.c
View file @
f572f5e3
...
...
@@ -864,7 +864,7 @@ static void iSeries_setup_dprofile(void)
{
if
(
dprof_buffer
)
{
unsigned
i
;
for
(
i
=
0
;
i
<
MAX_PACA
S
;
++
i
)
{
for
(
i
=
0
;
i
<
NR_CPU
S
;
++
i
)
{
paca
[
i
].
prof_shift
=
dprof_shift
;
paca
[
i
].
prof_len
=
dprof_len
-
1
;
paca
[
i
].
prof_buffer
=
dprof_buffer
;
...
...
arch/ppc64/kernel/irq.c
View file @
f572f5e3
...
...
@@ -676,7 +676,7 @@ static int prof_cpu_mask_write_proc (struct file *file, const char *buffer,
#ifdef CONFIG_PPC_ISERIES
{
unsigned
i
;
for
(
i
=
0
;
i
<
MAX_PACA
S
;
++
i
)
{
for
(
i
=
0
;
i
<
NR_CPU
S
;
++
i
)
{
if
(
paca
[
i
].
prof_buffer
&&
(
new_value
&
1
)
)
paca
[
i
].
prof_enabled
=
1
;
else
...
...
arch/ppc64/kernel/pacaData.c
View file @
f572f5e3
...
...
@@ -64,7 +64,7 @@ struct systemcfg *systemcfg;
(&paca[number].exception_stack[0]) - EXC_FRAME_SIZE, \
}
struct
paca_struct
paca
[
MAX_PACA
S
]
__page_aligned
=
{
struct
paca_struct
paca
[
NR_CPU
S
]
__page_aligned
=
{
#ifdef CONFIG_PPC_ISERIES
PACAINITDATA
(
0
,
1
,
&
xItLpQueue
,
0
,
STAB0_VIRT_ADDR
),
#else
...
...
@@ -101,6 +101,7 @@ struct paca_struct paca[MAX_PACAS] __page_aligned = {
PACAINITDATA
(
29
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
30
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
31
,
0
,
0
,
0
,
0
),
#if NR_CPUS > 32
PACAINITDATA
(
32
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
33
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
34
,
0
,
0
,
0
,
0
),
...
...
@@ -116,5 +117,22 @@ struct paca_struct paca[MAX_PACAS] __page_aligned = {
PACAINITDATA
(
44
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
45
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
46
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
47
,
0
,
0
,
0
,
0
)
PACAINITDATA
(
47
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
48
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
49
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
50
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
51
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
52
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
53
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
54
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
55
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
56
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
57
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
58
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
59
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
60
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
61
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
62
,
0
,
0
,
0
,
0
),
PACAINITDATA
(
63
,
0
,
0
,
0
,
0
),
#endif
};
arch/ppc64/kernel/setup.c
View file @
f572f5e3
...
...
@@ -585,7 +585,7 @@ int set_spread_lpevents( char * str )
/* The parameter is the number of processors to share in processing lp events */
unsigned
long
i
;
unsigned
long
val
=
simple_strtoul
(
str
,
NULL
,
0
);
if
(
(
val
>
0
)
&&
(
val
<=
MAX_PACA
S
)
)
{
if
(
(
val
>
0
)
&&
(
val
<=
NR_CPU
S
)
)
{
for
(
i
=
1
;
i
<
val
;
++
i
)
paca
[
i
].
lpQueuePtr
=
paca
[
0
].
lpQueuePtr
;
printk
(
"lpevent processing spread over %ld processors
\n
"
,
val
);
...
...
arch/ppc64/kernel/smp.c
View file @
f572f5e3
...
...
@@ -113,7 +113,7 @@ static int smp_iSeries_numProcs(void)
struct
ItLpPaca
*
lpPaca
;
np
=
0
;
for
(
i
=
0
;
i
<
MAX_PACA
S
;
++
i
)
{
for
(
i
=
0
;
i
<
NR_CPU
S
;
++
i
)
{
lpPaca
=
paca
[
i
].
xLpPacaPtr
;
if
(
lpPaca
->
xDynProcStatus
<
2
)
{
++
np
;
...
...
@@ -128,7 +128,7 @@ static int smp_iSeries_probe(void)
unsigned
np
=
0
;
struct
ItLpPaca
*
lpPaca
;
for
(
i
=
0
;
i
<
MAX_PACA
S
;
++
i
)
{
for
(
i
=
0
;
i
<
NR_CPU
S
;
++
i
)
{
lpPaca
=
paca
[
i
].
xLpPacaPtr
;
if
(
lpPaca
->
xDynProcStatus
<
2
)
{
paca
[
i
].
active
=
1
;
...
...
@@ -144,7 +144,7 @@ static void smp_iSeries_kick_cpu(int nr)
struct
ItLpPaca
*
lpPaca
;
/* Verify we have a Paca for processor nr */
if
(
(
nr
<=
0
)
||
(
nr
>=
MAX_PACA
S
)
)
(
nr
>=
NR_CPU
S
)
)
return
;
/* Verify that our partition has a processor nr */
lpPaca
=
paca
[
nr
].
xLpPacaPtr
;
...
...
@@ -228,7 +228,7 @@ smp_kick_cpu(int nr)
{
/* Verify we have a Paca for processor nr */
if
(
(
nr
<=
0
)
||
(
nr
>=
MAX_PACA
S
)
)
(
nr
>=
NR_CPU
S
)
)
return
;
/* The information for processor bringup must
...
...
include/asm-ppc64/paca.h
View file @
f572f5e3
...
...
@@ -33,17 +33,6 @@
#include <asm/mmu.h>
#include <asm/processor.h>
/* A paca entry is required for each logical processor. On systems
* that support hardware multi-threading, this is equal to twice the
* number of physical processors. On LPAR systems, we are required
* to have space for the maximum number of logical processors we
* could ever possibly have. Currently, we are limited to allocating
* 24 processors to a partition which gives 48 logical processors on
* an HMT box. Therefore, we reserve this many paca entries.
*/
#define MAX_PROCESSORS 24
#define MAX_PACAS MAX_PROCESSORS * 2
extern
struct
paca_struct
paca
[];
register
struct
paca_struct
*
local_paca
asm
(
"r13"
);
#define get_paca() local_paca
...
...
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