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
a8786db8
Commit
a8786db8
authored
Jul 20, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Read processor number correctly on Ultra-IIIi/Jalapeno.
parent
e1fffdc5
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
58 additions
and
13 deletions
+58
-13
arch/sparc64/kernel/entry.S
arch/sparc64/kernel/entry.S
+7
-2
arch/sparc64/kernel/head.S
arch/sparc64/kernel/head.S
+7
-0
arch/sparc64/kernel/irq.c
arch/sparc64/kernel/irq.c
+18
-6
include/asm-sparc64/asi.h
include/asm-sparc64/asi.h
+1
-0
include/asm-sparc64/head.h
include/asm-sparc64/head.h
+11
-0
include/asm-sparc64/irq.h
include/asm-sparc64/irq.h
+1
-0
include/asm-sparc64/smp.h
include/asm-sparc64/smp.h
+13
-5
No files found.
arch/sparc64/kernel/entry.S
View file @
a8786db8
...
@@ -911,10 +911,15 @@ cee_trap:
...
@@ -911,10 +911,15 @@ cee_trap:
sllx
%
g1
,
63
,
%
g2
; \
sllx
%
g1
,
63
,
%
g2
; \
or
%
g4
,
%
g2
,
%
g4
; \
or
%
g4
,
%
g2
,
%
g4
; \
/
*
Get
log
entry
pointer
for
this
cpu
at
this
trap
level
.
*/
\
/
*
Get
log
entry
pointer
for
this
cpu
at
this
trap
level
.
*/
\
BRANCH_IF_JALAPENO
(
g2
,
g3
,50
f
)
\
ldxa
[%
g0
]
ASI_SAFARI_CONFIG
,
%
g2
; \
ldxa
[%
g0
]
ASI_SAFARI_CONFIG
,
%
g2
; \
srlx
%
g2
,
17
,
%
g2
; \
srlx
%
g2
,
17
,
%
g2
; \
and
%
g2
,
0x3ff
,
%
g2
; \
ba
,
pt
%
xcc
,
60
f
; \
sllx
%
g2
,
9
,
%
g2
; \
and
%
g2
,
0x3ff
,
%
g2
; \
50
:
ldxa
[%
g0
]
ASI_JBUS_CONFIG
,
%
g2
; \
srlx
%
g2
,
17
,
%
g2
; \
and
%
g2
,
0x1f
,
%
g2
; \
60
:
sllx
%
g2
,
9
,
%
g2
; \
sethi
%
hi
(
cheetah_error_log
),
%
g3
; \
sethi
%
hi
(
cheetah_error_log
),
%
g3
; \
ldx
[%
g3
+
%
lo
(
cheetah_error_log
)],
%
g3
; \
ldx
[%
g3
+
%
lo
(
cheetah_error_log
)],
%
g3
; \
brz
,
pn
%
g3
,
80
f
; \
brz
,
pn
%
g3
,
80
f
; \
...
...
arch/sparc64/kernel/head.S
View file @
a8786db8
...
@@ -645,11 +645,18 @@ spitfire_vpte_base:
...
@@ -645,11 +645,18 @@ spitfire_vpte_base:
nop
nop
not_starfire
:
not_starfire
:
BRANCH_IF_JALAPENO
(
g1
,
g5
,
is_jalapeno
)
BRANCH_IF_ANY_CHEETAH
(
g1
,
g5
,
is_cheetah
)
BRANCH_IF_ANY_CHEETAH
(
g1
,
g5
,
is_cheetah
)
ba
,
pt
%
xcc
,
not_cheetah
ba
,
pt
%
xcc
,
not_cheetah
nop
nop
is_jalapeno
:
ldxa
[%
g0
]
ASI_JBUS_CONFIG
,
%
g1
srlx
%
g1
,
17
,
%
g1
ba
,
pt
%
xcc
,
set_worklist
and
%
g1
,
0x1f
,
%
g1
!
5
bit
JBUS
ID
is_cheetah
:
is_cheetah
:
ldxa
[%
g0
]
ASI_SAFARI_CONFIG
,
%
g1
ldxa
[%
g0
]
ASI_SAFARI_CONFIG
,
%
g1
srlx
%
g1
,
17
,
%
g1
srlx
%
g1
,
17
,
%
g1
...
...
arch/sparc64/kernel/irq.c
View file @
a8786db8
...
@@ -162,12 +162,24 @@ void enable_irq(unsigned int irq)
...
@@ -162,12 +162,24 @@ void enable_irq(unsigned int irq)
return
;
return
;
if
(
tlb_type
==
cheetah
||
tlb_type
==
cheetah_plus
)
{
if
(
tlb_type
==
cheetah
||
tlb_type
==
cheetah_plus
)
{
/* We set it to our Safari AID. */
unsigned
long
ver
;
__asm__
__volatile__
(
"ldxa [%%g0] %1, %0"
:
"=r"
(
tid
)
__asm__
(
"rdpr %%ver, %0"
:
"=r"
(
ver
));
:
"i"
(
ASI_SAFARI_CONFIG
));
if
((
ver
>>
32
)
==
0x003e0016
)
{
tid
=
((
tid
&
(
0x3ffUL
<<
17
))
<<
9
);
/* We set it to our JBUS ID. */
tid
&=
IMAP_AID_SAFARI
;
__asm__
__volatile__
(
"ldxa [%%g0] %1, %0"
:
"=r"
(
tid
)
:
"i"
(
ASI_JBUS_CONFIG
));
tid
=
((
tid
&
(
0x1fUL
<<
17
))
<<
9
);
tid
&=
IMAP_TID_JBUS
;
}
else
{
/* We set it to our Safari AID. */
__asm__
__volatile__
(
"ldxa [%%g0] %1, %0"
:
"=r"
(
tid
)
:
"i"
(
ASI_SAFARI_CONFIG
));
tid
=
((
tid
&
(
0x3ffUL
<<
17
))
<<
9
);
tid
&=
IMAP_AID_SAFARI
;
}
}
else
if
(
this_is_starfire
==
0
)
{
}
else
if
(
this_is_starfire
==
0
)
{
/* We set it to our UPA MID. */
/* We set it to our UPA MID. */
__asm__
__volatile__
(
"ldxa [%%g0] %1, %0"
__asm__
__volatile__
(
"ldxa [%%g0] %1, %0"
...
...
include/asm-sparc64/asi.h
View file @
a8786db8
...
@@ -51,6 +51,7 @@
...
@@ -51,6 +51,7 @@
#define ASI_INTR_DISPATCH_STAT 0x48
/* IRQ vector dispatch status */
#define ASI_INTR_DISPATCH_STAT 0x48
/* IRQ vector dispatch status */
#define ASI_INTR_RECEIVE 0x49
/* IRQ vector receive status */
#define ASI_INTR_RECEIVE 0x49
/* IRQ vector receive status */
#define ASI_UPA_CONFIG 0x4a
/* UPA config space */
#define ASI_UPA_CONFIG 0x4a
/* UPA config space */
#define ASI_JBUS_CONFIG 0x4a
/* (IIIi) JBUS Config Register */
#define ASI_SAFARI_CONFIG 0x4a
/* (III) Safari Config Register */
#define ASI_SAFARI_CONFIG 0x4a
/* (III) Safari Config Register */
#define ASI_SAFARI_ADDRESS 0x4a
/* (III) Safari Address Register */
#define ASI_SAFARI_ADDRESS 0x4a
/* (III) Safari Address Register */
#define ASI_ESTATE_ERROR_EN 0x4b
/* E-cache error enable space */
#define ASI_ESTATE_ERROR_EN 0x4b
/* E-cache error enable space */
...
...
include/asm-sparc64/head.h
View file @
a8786db8
...
@@ -9,10 +9,12 @@
...
@@ -9,10 +9,12 @@
#define PTREGS_OFF (STACK_BIAS + STACKFRAME_SZ)
#define PTREGS_OFF (STACK_BIAS + STACKFRAME_SZ)
#define __CHEETAH_ID 0x003e0014
#define __CHEETAH_ID 0x003e0014
#define __JALAPENO_ID 0x003e0016
#define CHEETAH_MANUF 0x003e
#define CHEETAH_MANUF 0x003e
#define CHEETAH_IMPL 0x0014
#define CHEETAH_IMPL 0x0014
#define CHEETAH_PLUS_IMPL 0x0015
#define CHEETAH_PLUS_IMPL 0x0015
#define JALAPENO_IMPL 0x0016
#define BRANCH_IF_CHEETAH_BASE(tmp1,tmp2,label) \
#define BRANCH_IF_CHEETAH_BASE(tmp1,tmp2,label) \
rdpr %ver, %tmp1; \
rdpr %ver, %tmp1; \
...
@@ -23,6 +25,15 @@
...
@@ -23,6 +25,15 @@
be,pn %icc, label; \
be,pn %icc, label; \
nop;
nop;
#define BRANCH_IF_JALAPENO(tmp1,tmp2,label) \
rdpr %ver, %tmp1; \
sethi %hi(__JALAPENO_ID), %tmp2; \
srlx %tmp1, 32, %tmp1; \
or %tmp2, %lo(__JALAPENO_ID), %tmp2;\
cmp %tmp1, %tmp2; \
be,pn %icc, label; \
nop;
#define BRANCH_IF_CHEETAH_PLUS_OR_FOLLOWON(tmp1,tmp2,label) \
#define BRANCH_IF_CHEETAH_PLUS_OR_FOLLOWON(tmp1,tmp2,label) \
rdpr %ver, %tmp1; \
rdpr %ver, %tmp1; \
srlx %tmp1, (32 + 16), %tmp2; \
srlx %tmp1, (32 + 16), %tmp2; \
...
...
include/asm-sparc64/irq.h
View file @
a8786db8
...
@@ -78,6 +78,7 @@ extern unsigned char dma_sync_reg_table_entry;
...
@@ -78,6 +78,7 @@ extern unsigned char dma_sync_reg_table_entry;
/* IMAP/ICLR register defines */
/* IMAP/ICLR register defines */
#define IMAP_VALID 0x80000000
/* IRQ Enabled */
#define IMAP_VALID 0x80000000
/* IRQ Enabled */
#define IMAP_TID_UPA 0x7c000000
/* UPA TargetID */
#define IMAP_TID_UPA 0x7c000000
/* UPA TargetID */
#define IMAP_TID_JBUS 0x7c000000
/* JBUS TargetID */
#define IMAP_AID_SAFARI 0x7c000000
/* Safari AgentID */
#define IMAP_AID_SAFARI 0x7c000000
/* Safari AgentID */
#define IMAP_NID_SAFARI 0x03e00000
/* Safari NodeID */
#define IMAP_NID_SAFARI 0x03e00000
/* Safari NodeID */
#define IMAP_IGN 0x000007c0
/* IRQ Group Number */
#define IMAP_IGN 0x000007c0
/* IRQ Group Number */
...
...
include/asm-sparc64/smp.h
View file @
a8786db8
...
@@ -94,11 +94,19 @@ static inline unsigned int any_online_cpu(unsigned long mask)
...
@@ -94,11 +94,19 @@ static inline unsigned int any_online_cpu(unsigned long mask)
static
__inline__
int
hard_smp_processor_id
(
void
)
static
__inline__
int
hard_smp_processor_id
(
void
)
{
{
if
(
tlb_type
==
cheetah
||
tlb_type
==
cheetah_plus
)
{
if
(
tlb_type
==
cheetah
||
tlb_type
==
cheetah_plus
)
{
unsigned
long
safari_config
;
unsigned
long
cfg
,
ver
;
__asm__
__volatile__
(
"ldxa [%%g0] %1, %0"
__asm__
__volatile__
(
"rdpr %%ver, %0"
:
"=r"
(
ver
));
:
"=r"
(
safari_config
)
if
((
ver
>>
32
)
==
0x003e0016
)
{
:
"i"
(
ASI_SAFARI_CONFIG
));
__asm__
__volatile__
(
"ldxa [%%g0] %1, %0"
return
((
safari_config
>>
17
)
&
0x3ff
);
:
"=r"
(
cfg
)
:
"i"
(
ASI_JBUS_CONFIG
));
return
((
cfg
>>
17
)
&
0x1f
);
}
else
{
__asm__
__volatile__
(
"ldxa [%%g0] %1, %0"
:
"=r"
(
cfg
)
:
"i"
(
ASI_SAFARI_CONFIG
));
return
((
cfg
>>
17
)
&
0x3ff
);
}
}
else
if
(
this_is_starfire
!=
0
)
{
}
else
if
(
this_is_starfire
!=
0
)
{
return
starfire_hard_smp_processor_id
();
return
starfire_hard_smp_processor_id
();
}
else
{
}
else
{
...
...
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