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
8a57a00b
Commit
8a57a00b
authored
Feb 13, 2002
by
Richard Henderson
Committed by
Richard Henderson
Feb 13, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Follow mingo's scheduling changes for x86.
parent
b7ac5241
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
33 deletions
+28
-33
arch/alpha/kernel/entry.S
arch/alpha/kernel/entry.S
+2
-4
include/asm-alpha/bitops.h
include/asm-alpha/bitops.h
+21
-0
include/asm-alpha/mmu_context.h
include/asm-alpha/mmu_context.h
+0
-22
include/asm-alpha/system.h
include/asm-alpha/system.h
+5
-7
No files found.
arch/alpha/kernel/entry.S
View file @
8a57a00b
...
...
@@ -489,10 +489,8 @@ alpha_switch_to:
.
prologue
0
bsr
$
1
,
do_switch_stack
call_pal
PAL_swpctx
unop
bsr
$
1
,
undo_switch_stack
lda
$
8
,
0x3fff
mov
$
17
,
$
0
bsr
$
1
,
undo_switch_stack
bic
$
30
,
$
8
,
$
8
ret
$
31
,(
$
26
),
1
.
end
alpha_switch_to
...
...
@@ -503,7 +501,7 @@ alpha_switch_to:
.
ent
ret_from_fork
ret_from_fork
:
lda
$
26
,
ret_from_sys_call
mov
$
0
,
$
16
mov
$
17
,
$
16
jmp
$
31
,
schedule_tail
.
end
ret_from_fork
#endif
...
...
include/asm-alpha/bitops.h
View file @
8a57a00b
...
...
@@ -460,6 +460,27 @@ find_next_bit(void * addr, unsigned long size, unsigned long offset)
#ifdef __KERNEL__
/*
* Every architecture must define this function. It's the fastest
* way of searching a 140-bit bitmap where the first 100 bits are
* unlikely to be set. It's guaranteed that at least one of the 140
* bits is set.
*/
static
inline
unsigned
long
sched_find_first_bit
(
unsigned
long
b
[
3
])
{
unsigned
long
b0
=
b
[
0
],
b1
=
b
[
1
],
b2
=
b
[
2
];
unsigned
long
ofs
;
ofs
=
(
b1
?
64
:
128
);
b1
=
(
b1
?
b1
:
b2
);
ofs
=
(
b0
?
0
:
ofs
);
b0
=
(
b0
?
b0
:
b1
);
return
__ffs
(
b0
)
+
ofs
;
}
#define ext2_set_bit __test_and_set_bit
#define ext2_clear_bit __test_and_clear_bit
#define ext2_test_bit test_bit
...
...
include/asm-alpha/mmu_context.h
View file @
8a57a00b
...
...
@@ -21,28 +21,6 @@
#include <asm/io.h>
#endif
/* ??? This does not belong here. */
/*
* Every architecture must define this function. It's the fastest
* way of searching a 140-bit bitmap where the first 100 bits are
* unlikely to be set. It's guaranteed that at least one of the 140
* bits is cleared.
*/
static
inline
int
sched_find_first_bit
(
unsigned
long
*
b
)
{
unsigned
long
b0
=
b
[
0
],
b1
=
b
[
1
],
b2
=
b
[
2
];
unsigned
long
offset
=
128
;
if
(
unlikely
(
b0
|
b1
))
{
b2
=
(
b0
?
b0
:
b1
);
offset
=
(
b0
?
0
:
64
);
}
return
__ffs
(
b2
)
+
offset
;
}
extern
inline
unsigned
long
__reload_thread
(
struct
pcb_struct
*
pcb
)
...
...
include/asm-alpha/system.h
View file @
8a57a00b
...
...
@@ -131,15 +131,13 @@ extern void halt(void) __attribute__((noreturn));
#define __halt() __asm__ __volatile__ ("call_pal %0 #halt" : : "i" (PAL_halt))
#define prepare_to_switch() do { } while(0)
#define switch_to(prev,next
,last)
\
#define switch_to(prev,next
)
\
do { \
unsigned long pcbb; \
pcbb = virt_to_phys(&(next)->thread_info->pcb); \
(last) = alpha_switch_to(pcbb, (prev)); \
alpha_switch_to(virt_to_phys(&(next)->thread_info->pcb), (prev)); \
check_mmu_context(); \
} while (0)
extern
struct
task_struct
*
alpha_switch_to
(
unsigned
long
,
struct
task_struct
*
);
extern
void
alpha_switch_to
(
unsigned
long
,
struct
task_struct
*
);
#define mb() \
__asm__ __volatile__("mb": : :"memory")
...
...
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