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
d0ac249b
Commit
d0ac249b
authored
Jun 05, 2002
by
Rob Radez
Committed by
David S. Miller
Jun 05, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sparc32 code cleanups from 2.4.x.
parent
a9907091
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
115 additions
and
570 deletions
+115
-570
arch/sparc/kernel/devices.c
arch/sparc/kernel/devices.c
+28
-29
arch/sparc/mm/sun4c.c
arch/sparc/mm/sun4c.c
+71
-460
include/asm-sparc/btfixup.h
include/asm-sparc/btfixup.h
+16
-27
include/asm-sparc/ultra.h
include/asm-sparc/ultra.h
+0
-52
include/asm-sparc/vac-ops.h
include/asm-sparc/vac-ops.h
+0
-2
No files found.
arch/sparc/kernel/devices.c
View file @
d0ac249b
...
@@ -22,8 +22,8 @@ extern void cpu_probe(void);
...
@@ -22,8 +22,8 @@ extern void cpu_probe(void);
extern
void
clock_stop_probe
(
void
);
/* tadpole.c */
extern
void
clock_stop_probe
(
void
);
/* tadpole.c */
extern
void
sun4c_probe_memerr_reg
(
void
);
extern
void
sun4c_probe_memerr_reg
(
void
);
unsigned
long
__init
void
__init
device_scan
(
unsigned
long
mem_start
)
device_scan
(
void
)
{
{
char
node_str
[
128
];
char
node_str
[
128
];
int
thismid
;
int
thismid
;
...
@@ -37,46 +37,45 @@ device_scan(unsigned long mem_start)
...
@@ -37,46 +37,45 @@ device_scan(unsigned long mem_start)
int
scan
;
int
scan
;
scan
=
prom_getchild
(
prom_root_node
);
scan
=
prom_getchild
(
prom_root_node
);
/* One can look it up in PROM instead */
/* One can look it up in PROM instead */
/* prom_printf("root child is %08lx\n", (unsigned long) scan); */
while
((
scan
=
prom_getsibling
(
scan
))
!=
0
)
{
while
((
scan
=
prom_getsibling
(
scan
))
!=
0
)
{
prom_getstring
(
scan
,
"device_type"
,
prom_getstring
(
scan
,
"device_type"
,
node_str
,
sizeof
(
node_str
));
node_str
,
sizeof
(
node_str
));
if
(
strcmp
(
node_str
,
"cpu"
)
==
0
)
{
if
(
strcmp
(
node_str
,
"cpu"
)
==
0
)
{
linux_cpus
[
linux_num_cpus
].
prom_node
=
scan
;
linux_cpus
[
linux_num_cpus
].
prom_node
=
scan
;
prom_getproperty
(
scan
,
"mid"
,
(
char
*
)
&
thismid
,
sizeof
(
thismid
));
prom_getproperty
(
scan
,
"mid"
,
(
char
*
)
&
thismid
,
sizeof
(
thismid
));
linux_cpus
[
linux_num_cpus
].
mid
=
thismid
;
linux_cpus
[
linux_num_cpus
].
mid
=
thismid
;
/* prom_printf("Found CPU %d <node=%08lx,mid=%d>\n", linux_num_cpus, (unsigned long) scan, thismid); */
printk
(
"Found CPU %d <node=%08lx,mid=%d>
\n
"
,
printk
(
"Found CPU %d <node=%08lx,mid=%d>
\n
"
,
linux_num_cpus
,
(
unsigned
long
)
scan
,
thismid
);
linux_num_cpus
,
(
unsigned
long
)
scan
,
thismid
);
linux_num_cpus
++
;
linux_num_cpus
++
;
}
}
}
}
if
(
linux_num_cpus
==
0
)
{
if
(
linux_num_cpus
==
0
&&
sparc_cpu_model
==
sun4d
)
{
if
(
sparc_cpu_model
==
sun4d
)
{
scan
=
prom_getchild
(
prom_root_node
);
scan
=
prom_getchild
(
prom_root_node
);
for
(
scan
=
prom_searchsiblings
(
scan
,
"cpu-unit"
);
scan
;
for
(
scan
=
prom_searchsiblings
(
scan
,
"cpu-unit"
);
scan
;
scan
=
prom_searchsiblings
(
prom_getsibling
(
scan
),
"cpu-unit"
))
{
scan
=
prom_searchsiblings
(
prom_getsibling
(
scan
),
"cpu-unit"
))
{
int
node
=
prom_getchild
(
scan
);
int
node
=
prom_getchild
(
scan
);
prom_getstring
(
node
,
"device_type"
,
node_str
,
sizeof
(
node_str
));
prom_getstring
(
node
,
"device_type"
,
if
(
strcmp
(
node_str
,
"cpu"
)
==
0
)
{
node_str
,
sizeof
(
node_str
));
prom_getproperty
(
node
,
"cpu-id"
,
(
char
*
)
&
thismid
,
sizeof
(
thismid
));
if
(
strcmp
(
node_str
,
"cpu"
)
==
0
)
{
linux_cpus
[
linux_num_cpus
].
prom_node
=
node
;
prom_getproperty
(
node
,
"cpu-id"
,
linux_cpus
[
linux_num_cpus
].
mid
=
thismid
;
(
char
*
)
&
thismid
,
sizeof
(
thismid
));
/* prom_printf("Found CPU %d <node=%08lx,mid=%d>\n",
linux_cpus
[
linux_num_cpus
].
prom_node
=
node
;
linux_num_cpus, (unsigned long) node, thismid); */
linux_cpus
[
linux_num_cpus
].
mid
=
thismid
;
printk
(
"Found CPU %d <node=%08lx,mid=%d>
\n
"
,
printk
(
"Found CPU %d <node=%08lx,mid=%d>
\n
"
,
linux_num_cpus
,
(
unsigned
long
)
node
,
thismid
);
linux_num_cpus
,
(
unsigned
long
)
node
,
thismid
);
linux_num_cpus
++
;
linux_num_cpus
++
;
}
}
}
}
}
}
}
if
(
linux_num_cpus
==
0
)
{
if
(
linux_num_cpus
==
0
)
{
printk
(
"No CPU nodes found, cannot continue.
\n
"
);
printk
(
"No CPU nodes found, cannot continue.
\n
"
);
/* Probably a sun4e, Sun is trying to trick us ;-) */
/* Probably a sun4e, Sun is trying to trick us ;-) */
halt
();
halt
();
}
}
printk
(
"Found %d CPU prom device tree node(s).
\n
"
,
linux_num_cpus
);
printk
(
"Found %d CPU prom device tree node(s).
\n
"
,
linux_num_cpus
);
}
;
}
cpu_probe
();
cpu_probe
();
#ifdef CONFIG_SUN_AUXIO
#ifdef CONFIG_SUN_AUXIO
...
@@ -92,5 +91,5 @@ device_scan(unsigned long mem_start)
...
@@ -92,5 +91,5 @@ device_scan(unsigned long mem_start)
if
(
ARCH_SUN4C_SUN4
)
if
(
ARCH_SUN4C_SUN4
)
sun4c_probe_memerr_reg
();
sun4c_probe_memerr_reg
();
return
mem_start
;
return
;
}
}
arch/sparc/mm/sun4c.c
View file @
d0ac249b
This diff is collapsed.
Click to expand it.
include/asm-sparc/btfixup.h
View file @
d0ac249b
...
@@ -16,7 +16,22 @@ extern unsigned int ___illegal_use_of_BTFIXUP_SIMM13_in_module(void);
...
@@ -16,7 +16,22 @@ extern unsigned int ___illegal_use_of_BTFIXUP_SIMM13_in_module(void);
extern
unsigned
int
___illegal_use_of_BTFIXUP_SETHI_in_module
(
void
);
extern
unsigned
int
___illegal_use_of_BTFIXUP_SETHI_in_module
(
void
);
extern
unsigned
int
___illegal_use_of_BTFIXUP_HALF_in_module
(
void
);
extern
unsigned
int
___illegal_use_of_BTFIXUP_HALF_in_module
(
void
);
extern
unsigned
int
___illegal_use_of_BTFIXUP_INT_in_module
(
void
);
extern
unsigned
int
___illegal_use_of_BTFIXUP_INT_in_module
(
void
);
#endif
#define BTFIXUP_SIMM13(__name) ___illegal_use_of_BTFIXUP_SIMM13_in_module()
#define BTFIXUP_HALF(__name) ___illegal_use_of_BTFIXUP_HALF_in_module()
#define BTFIXUP_SETHI(__name) ___illegal_use_of_BTFIXUP_SETHI_in_module()
#define BTFIXUP_INT(__name) ___illegal_use_of_BTFIXUP_INT_in_module()
#define BTFIXUP_BLACKBOX(__name) ___illegal_use_of_BTFIXUP_BLACKBOX_in_module
#else
#define BTFIXUP_SIMM13(__name) ___sf_##__name()
#define BTFIXUP_HALF(__name) ___af_##__name()
#define BTFIXUP_SETHI(__name) ___hf_##__name()
#define BTFIXUP_INT(__name) ((unsigned int)&___i_##__name)
/* This must be written in assembly and present in a sethi */
#define BTFIXUP_BLACKBOX(__name) ___b_##__name
#endif
/* MODULE */
/* Fixup call xx */
/* Fixup call xx */
...
@@ -30,12 +45,6 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
...
@@ -30,12 +45,6 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
#define BTFIXUPDEF_BLACKBOX(__name) \
#define BTFIXUPDEF_BLACKBOX(__name) \
extern unsigned ___bs_##__name[2];
extern unsigned ___bs_##__name[2];
#ifdef MODULE
#define BTFIXUP_BLACKBOX(__name) ___illegal_use_of_BTFIXUP_BLACKBOX_in_module
#else
/* This must be written in assembly and present in a sethi */
#define BTFIXUP_BLACKBOX(__name) ___b_##__name
#endif
/* Put bottom 13bits into some register variable */
/* Put bottom 13bits into some register variable */
...
@@ -55,11 +64,6 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
...
@@ -55,11 +64,6 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
__asm__ ("or %%g0, ___s_" #__name "__btset_" #__val ", %0" : "=r"(ret));\
__asm__ ("or %%g0, ___s_" #__name "__btset_" #__val ", %0" : "=r"(ret));\
return ret; \
return ret; \
}
}
#ifdef MODULE
#define BTFIXUP_SIMM13(__name) ___illegal_use_of_BTFIXUP_SIMM13_in_module()
#else
#define BTFIXUP_SIMM13(__name) ___sf_##__name()
#endif
/* Put either bottom 13 bits, or upper 22 bits into some register variable
/* Put either bottom 13 bits, or upper 22 bits into some register variable
* (depending on the value, this will lead into sethi FIX, reg; or
* (depending on the value, this will lead into sethi FIX, reg; or
...
@@ -82,11 +86,6 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
...
@@ -82,11 +86,6 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
__asm__ ("or %%g0, ___a_" #__name "__btset_" #__val ", %0" : "=r"(ret));\
__asm__ ("or %%g0, ___a_" #__name "__btset_" #__val ", %0" : "=r"(ret));\
return ret; \
return ret; \
}
}
#ifdef MODULE
#define BTFIXUP_HALF(__name) ___illegal_use_of_BTFIXUP_HALF_in_module()
#else
#define BTFIXUP_HALF(__name) ___af_##__name()
#endif
/* Put upper 22 bits into some register variable */
/* Put upper 22 bits into some register variable */
...
@@ -107,22 +106,12 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
...
@@ -107,22 +106,12 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
"=r"(ret)); \
"=r"(ret)); \
return ret; \
return ret; \
}
}
#ifdef MODULE
#define BTFIXUP_SETHI(__name) ___illegal_use_of_BTFIXUP_SETHI_in_module()
#else
#define BTFIXUP_SETHI(__name) ___hf_##__name()
#endif
/* Put a full 32bit integer into some register variable */
/* Put a full 32bit integer into some register variable */
#define BTFIXUPDEF_INT(__name) \
#define BTFIXUPDEF_INT(__name) \
extern unsigned char ___i_##__name; \
extern unsigned char ___i_##__name; \
extern unsigned ___is_##__name[2];
extern unsigned ___is_##__name[2];
#ifdef MODULE
#define BTFIXUP_INT(__name) ___illegal_use_of_BTFIXUP_INT_in_module()
#else
#define BTFIXUP_INT(__name) ((unsigned int)&___i_##__name)
#endif
#define BTFIXUPCALL_NORM 0x00000000
/* Always call */
#define BTFIXUPCALL_NORM 0x00000000
/* Always call */
#define BTFIXUPCALL_NOP 0x01000000
/* Possibly optimize to nop */
#define BTFIXUPCALL_NOP 0x01000000
/* Possibly optimize to nop */
...
...
include/asm-sparc/ultra.h
deleted
100644 → 0
View file @
a9907091
/* $Id: ultra.h,v 1.2 1995/11/25 02:33:10 davem Exp $
* ultra.h: Definitions and defines for the TI V9 UltraSparc.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
*/
#ifndef _SPARC_ULTRA_H
#define _SPARC_ULTRA_H
/* Spitfire MMU control register:
*
* ----------------------------------------------------------
* | | IMPL | VERS | | MID | |
* ----------------------------------------------------------
* 64 31-28 27-24 23-22 21-17 16 0
*
* IMPL: Implementation of this Spitfire.
* VERS: Version of this Spitfire.
* MID: Module ID of this processor.
*/
#define SPITFIRE_MIDMASK 0x00000000003e0000
/* Spitfire Load Store Unit control register:
*
* ---------------------------------------------------------------------
* | RSV | PWR | PWW | VWR | VWW | RSV | PMASK | DME | IME | DCE | ICE |
* ---------------------------------------------------------------------
* 63-25 24 23 22 21 20 19-4 3 2 1 0
*
* PWR: Physical Watchpoint Read enable: 0=off 1=on
* PWW: Physical Watchpoint Write enable: 0=off 1=on
* VWR: Virtual Watchpoint Read enable: 0=off 1=on
* VWW: Virtual Watchpoint Write enable: 0=off 1=on
* PMASK: Parity MASK ???
* DME: Data MMU Enable: 0=off 1=on
* IME: Instruction MMU Enable: 0=off 1=on
* DCE: Data Cache Enable: 0=off 1=on
* ICE: Instruction Cache Enable: 0=off 1=on
*/
#define SPITFIRE_LSU_PWR 0x01000000
#define SPITFIRE_LSU_PWW 0x00800000
#define SPITFIRE_LSU_VWR 0x00400000
#define SPITFIRE_LSU_VWW 0x00200000
#define SPITFIRE_LSU_PMASK 0x000ffff0
#define SPITFIRE_LSU_DME 0x00000008
#define SPITFIRE_LSU_IME 0x00000004
#define SPITFIRE_LSU_DCE 0x00000002
#define SPITFIRE_LSU_ICE 0x00000001
#endif
/* !(_SPARC_ULTRA_H) */
include/asm-sparc/vac-ops.h
View file @
d0ac249b
...
@@ -107,8 +107,6 @@ struct sun4c_vac_props {
...
@@ -107,8 +107,6 @@ struct sun4c_vac_props {
extern
struct
sun4c_vac_props
sun4c_vacinfo
;
extern
struct
sun4c_vac_props
sun4c_vacinfo
;
extern
void
sun4c_flush_all
(
void
);
/* sun4c_enable_vac() enables the sun4c virtual address cache. */
/* sun4c_enable_vac() enables the sun4c virtual address cache. */
extern
__inline__
void
sun4c_enable_vac
(
void
)
extern
__inline__
void
sun4c_enable_vac
(
void
)
{
{
...
...
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