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
cd4aa976
Commit
cd4aa976
authored
Mar 21, 2004
by
Keith M. Wesolowski
Browse files
Options
Browse Files
Download
Plain Diff
Merge foobazco.org:/sources/2.5-bk
into foobazco.org:/sources/2.5-sparc-smp
parents
9a45400e
48a975d3
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
39 additions
and
45 deletions
+39
-45
arch/sparc/kernel/entry.S
arch/sparc/kernel/entry.S
+20
-18
arch/sparc/kernel/smp.c
arch/sparc/kernel/smp.c
+1
-1
arch/sparc/kernel/sparc_ksyms.c
arch/sparc/kernel/sparc_ksyms.c
+2
-2
arch/sparc/kernel/sun4d_smp.c
arch/sparc/kernel/sun4d_smp.c
+0
-7
arch/sparc/kernel/sun4m_smp.c
arch/sparc/kernel/sun4m_smp.c
+0
-6
include/asm-sparc/asmmacro.h
include/asm-sparc/asmmacro.h
+0
-7
include/asm-sparc/delay.h
include/asm-sparc/delay.h
+12
-3
include/asm-sparc/smp.h
include/asm-sparc/smp.h
+4
-1
No files found.
arch/sparc/kernel/entry.S
View file @
cd4aa976
...
...
@@ -32,6 +32,7 @@
#include <asm/obio.h>
#include <asm/mxcc.h>
#include <asm/thread_info.h>
#include <asm/param.h>
#include <asm/asmmacro.h>
...
...
@@ -1808,36 +1809,37 @@ fpload:
retl
nop
.
globl
ndelay
ndelay
:
/
*
__ndelay
and
__udelay
take
two
arguments
:
*
0
-
nsecs
or
usecs
to
delay
*
1
-
per_cpu
udelay_val
(
loops
per
jiffy
)
*
*
Note
that
ndelay
gives
HZ
times
higher
resolution
but
has
a
10
ms
*
limit
.
udelay
can
handle
up
to
1
s
.
*/
.
globl
__ndelay
__ndelay
:
save
%
sp
,
-
STACKFRAME_SZ
,
%
sp
mov
%
i0
,
%
o0
call
.
umul
mov
5
,
%
o1
mov
0x1ad
,
%
o1
!
2
**
32
/
(
1
000
000
000
/
HZ
)
call
.
umul
mov
%
i1
,
%
o1
!
udelay_val
ba
delay_continue
nop
mov
%
o1
,
%
o0
!
>>
32
later
for
better
resolution
.
globl
udelay
udelay
:
.
globl
__
udelay
__
udelay
:
save
%
sp
,
-
STACKFRAME_SZ
,
%
sp
mov
%
i0
,
%
o0
sethi
%
hi
(
0x10c6
),
%
o1
call
.
umul
or
%
o1
,
%
lo
(
0x10c6
),
%
o1
delay_continue
:
#ifndef CONFIG_SMP
sethi
%
hi
(
loops_per_jiffy
),
%
o3
or
%
o1
,
%
lo
(
0x10c6
),
%
o1
!
2
**
32
/
1
000
000
call
.
umul
ld
[%
o3
+
%
lo
(
loops_per_jiffy
)],
%
o1
#else
GET_PROCESSOR_OFFSET
(
o4
,
o2
)
set
cpu_data
,
%
o3
call
.
umul
ld
[%
o3
+
%
o4
],
%
o1
#endif
mov
%
i1
,
%
o1
!
udelay_val
call
.
umul
mov
100
,
%
o0
mov
HZ
,
%
o0
!
>>
32
earlier
for
wider
range
delay_continue
:
cmp
%
o0
,
0x0
1
:
bne
1
b
...
...
arch/sparc/kernel/smp.c
View file @
cd4aa976
...
...
@@ -20,11 +20,11 @@
#include <linux/fs.h>
#include <linux/seq_file.h>
#include <linux/cache.h>
#include <linux/delay.h>
#include <asm/ptrace.h>
#include <asm/atomic.h>
#include <asm/delay.h>
#include <asm/irq.h>
#include <asm/page.h>
#include <asm/pgalloc.h>
...
...
arch/sparc/kernel/sparc_ksyms.c
View file @
cd4aa976
...
...
@@ -164,8 +164,8 @@ EXPORT_SYMBOL(__cpu_number_map);
EXPORT_SYMBOL
(
__cpu_logical_map
);
#endif
EXPORT_SYMBOL
(
udelay
);
EXPORT_SYMBOL
(
ndelay
);
EXPORT_SYMBOL
(
__
udelay
);
EXPORT_SYMBOL
(
__
ndelay
);
EXPORT_SYMBOL
(
rtc_lock
);
EXPORT_SYMBOL
(
mostek_lock
);
EXPORT_SYMBOL
(
mstk48t02_regs
);
...
...
arch/sparc/kernel/sun4d_smp.c
View file @
cd4aa976
...
...
@@ -49,7 +49,6 @@ static int smp_highest_cpu;
extern
int
smp_threads_ready
;
extern
volatile
unsigned
long
cpu_callin_map
[
NR_CPUS
];
extern
struct
cpuinfo_sparc
cpu_data
[
NR_CPUS
];
extern
unsigned
long
cpu_offset
[
NR_CPUS
];
extern
unsigned
char
boot_cpu_id
;
extern
int
smp_activated
;
extern
volatile
int
__cpu_number_map
[
NR_CPUS
];
...
...
@@ -171,9 +170,6 @@ void __init smp4d_boot_cpus(void)
printk
(
"Entering SMP Mode...
\n
"
);
for
(
i
=
0
;
i
<
NR_CPUS
;
i
++
)
cpu_offset
[
i
]
=
(
char
*
)
&
(
cpu_data
(
i
))
-
(
char
*
)
&
(
cpu_data
(
0
));
if
(
boot_cpu_id
)
current_set
[
0
]
=
NULL
;
...
...
@@ -427,9 +423,6 @@ void smp4d_message_pass(int target, int msg, unsigned long data, int wait)
extern
void
sparc_do_profile
(
unsigned
long
pc
,
unsigned
long
o7
);
#define prof_multiplier(__cpu) cpu_data(__cpu).multiplier
#define prof_counter(__cpu) cpu_data(__cpu).counter
void
smp4d_percpu_timer_interrupt
(
struct
pt_regs
*
regs
)
{
int
cpu
=
hard_smp4d_processor_id
();
...
...
arch/sparc/kernel/sun4m_smp.c
View file @
cd4aa976
...
...
@@ -44,7 +44,6 @@ extern unsigned long cpu_present_map;
extern
int
smp_num_cpus
;
extern
int
smp_threads_ready
;
extern
volatile
unsigned
long
cpu_callin_map
[
NR_CPUS
];
extern
unsigned
long
cpu_offset
[
NR_CPUS
];
extern
unsigned
char
boot_cpu_id
;
extern
int
smp_activated
;
extern
volatile
int
__cpu_number_map
[
NR_CPUS
];
...
...
@@ -152,9 +151,7 @@ void __init smp4m_boot_cpus(void)
for
(
i
=
0
;
!
cpu_find_by_instance
(
i
,
NULL
,
&
mid
);
i
++
)
cpu_present_map
|=
(
1
<<
mid
);
/* XXX cpu_offset is broken -Keith */
for
(
i
=
0
;
i
<
NR_CPUS
;
i
++
)
{
cpu_offset
[
i
]
=
(
char
*
)
&
(
cpu_data
(
i
))
-
(
char
*
)
&
(
cpu_data
(
0
));
__cpu_number_map
[
i
]
=
-
1
;
__cpu_logical_map
[
i
]
=
-
1
;
}
...
...
@@ -409,9 +406,6 @@ void smp4m_cross_call_irq(void)
extern
void
sparc_do_profile
(
unsigned
long
pc
,
unsigned
long
o7
);
#define prof_multiplier(__cpu) cpu_data(__cpu).multiplier
#define prof_counter(__cpu) cpu_data(__cpu).counter
void
smp4m_percpu_timer_interrupt
(
struct
pt_regs
*
regs
)
{
int
cpu
=
smp_processor_id
();
...
...
include/asm-sparc/asmmacro.h
View file @
cd4aa976
...
...
@@ -29,13 +29,6 @@
srl %reg, 12, %reg; \
and %reg, 3, %reg;
#define GET_PROCESSOR_OFFSET(reg, tmp) \
GET_PROCESSOR_ID(reg) \
sethi %hi(cpu_offset), %tmp; \
sll %reg, 2, %reg; \
or %tmp, %lo(cpu_offset), %tmp; \
ld [%tmp + %reg], %reg;
/* All trap entry points _must_ begin with this macro or else you
* lose. It makes sure the kernel has a proper window so that
* c-code can be called.
...
...
include/asm-sparc/delay.h
View file @
cd4aa976
...
...
@@ -7,7 +7,8 @@
#ifndef __SPARC_DELAY_H
#define __SPARC_DELAY_H
extern
unsigned
long
loops_per_jiffy
;
#include <linux/config.h>
#include <asm/cpudata.h>
extern
__inline__
void
__delay
(
unsigned
long
loops
)
{
...
...
@@ -20,7 +21,15 @@ extern __inline__ void __delay(unsigned long loops)
}
/* This is too messy with inline asm on the Sparc. */
extern
void
udelay
(
unsigned
long
usecs
);
extern
void
ndelay
(
unsigned
long
usecs
);
extern
void
__udelay
(
unsigned
long
usecs
,
unsigned
long
lpj
);
extern
void
__ndelay
(
unsigned
long
nsecs
,
unsigned
long
lpj
);
#ifdef CONFIG_SMP
#define __udelay_val cpu_data(smp_processor_id()).udelay_val
#else
/* SMP */
#define __udelay_val loops_per_jiffy
#endif
/* SMP */
#define udelay(__usecs) __udelay(__usecs, __udelay_val)
#define ndelay(__nsecs) __ndelay(__nsecs, __udelay_val)
#endif
/* defined(__SPARC_DELAY_H) */
include/asm-sparc/smp.h
View file @
cd4aa976
...
...
@@ -148,7 +148,10 @@ extern __inline__ int hard_smp_processor_id(void)
}
#endif
#define smp_processor_id() hard_smp_processor_id()
#define smp_processor_id() (current_thread_info()->cpu)
#define prof_multiplier(__cpu) cpu_data(__cpu).multiplier
#define prof_counter(__cpu) cpu_data(__cpu).counter
#endif
/* !(__ASSEMBLY__) */
...
...
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