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
f18d92a3
Commit
f18d92a3
authored
May 14, 2003
by
Jes Sorensen
Committed by
David Mosberger
May 14, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] cpu_idle() cleanup
parent
14076de1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
11 deletions
+50
-11
arch/ia64/kernel/process.c
arch/ia64/kernel/process.c
+9
-10
arch/ia64/sn/kernel/idle.c
arch/ia64/sn/kernel/idle.c
+36
-0
arch/ia64/sn/kernel/setup.c
arch/ia64/sn/kernel/setup.c
+5
-1
No files found.
arch/ia64/kernel/process.c
View file @
f18d92a3
...
@@ -33,16 +33,15 @@
...
@@ -33,16 +33,15 @@
#include <asm/unwind.h>
#include <asm/unwind.h>
#include <asm/user.h>
#include <asm/user.h>
#ifdef CONFIG_IA64_SGI_SN
#include <asm/sn/idle.h>
#endif
#ifdef CONFIG_PERFMON
#ifdef CONFIG_PERFMON
# include <asm/perfmon.h>
# include <asm/perfmon.h>
#endif
#endif
#include "sigframe.h"
#include "sigframe.h"
void
(
*
ia64_mark_idle
)(
int
);
void
void
ia64_do_show_stack
(
struct
unw_frame_info
*
info
,
void
*
arg
)
ia64_do_show_stack
(
struct
unw_frame_info
*
info
,
void
*
arg
)
{
{
...
@@ -175,6 +174,8 @@ default_idle (void)
...
@@ -175,6 +174,8 @@ default_idle (void)
void
__attribute__
((
noreturn
))
void
__attribute__
((
noreturn
))
cpu_idle
(
void
*
unused
)
cpu_idle
(
void
*
unused
)
{
{
void
(
*
mark_idle
)(
int
)
=
ia64_mark_idle
;
/* endless idle loop with no priority at all */
/* endless idle loop with no priority at all */
while
(
1
)
{
while
(
1
)
{
void
(
*
idle
)(
void
)
=
pm_idle
;
void
(
*
idle
)(
void
)
=
pm_idle
;
...
@@ -187,15 +188,13 @@ cpu_idle (void *unused)
...
@@ -187,15 +188,13 @@ cpu_idle (void *unused)
#endif
#endif
while
(
!
need_resched
())
{
while
(
!
need_resched
())
{
#ifdef CONFIG_IA64_SGI_SN
if
(
mark_idle
)
snidle
();
(
*
mark_idle
)(
1
);
#endif
(
*
idle
)();
(
*
idle
)();
}
}
#ifdef CONFIG_IA64_SGI_SN
if
(
mark_idle
)
snidleoff
();
(
*
mark_idle
)(
0
);
#endif
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
normal_xtp
();
normal_xtp
();
...
...
include/asm-ia64/sn/idle.h
→
arch/ia64/sn/kernel/idle.c
View file @
f18d92a3
#ifndef _ASM_IA64_SN_IDLE_H
#define _ASM_IA64_SN_IDLE_H
/*
/*
* This file is subject to the terms and conditions of the GNU General Public
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* License. See the file "COPYING" in the main directory of this archive
* for more details.
* for more details.
*
*
* Copyright (c) 2001-200
2
Silicon Graphics, Inc. All rights reserved.
* Copyright (c) 2001-200
3
Silicon Graphics, Inc. All rights reserved.
*/
*/
#include <linux/config.h>
#include <linux/config.h>
#include <asm/sn/leds.h>
#include <asm/sn/leds.h>
#include <asm/sn/simulator.h>
#include <asm/sn/simulator.h>
static
__inline__
void
void
snidle
(
int
state
)
{
snidle
(
void
)
{
if
(
state
)
{
#if 0
if
(
pda
.
idle_flag
==
0
)
{
#ifdef CONFIG_IA64_SGI_AUTOTEST
/*
{
* Turn the activity LED off.
extern int autotest_enabled;
*/
if (autotest_enabled) {
set_led_bits
(
0
,
LED_CPU_ACTIVITY
);
extern void llsc_main(int);
llsc_main(smp_processor_id());
}
}
}
#endif
if (pda.idle_flag == 0) {
/*
* Turn the activity LED off.
*/
set_led_bits(0, LED_CPU_ACTIVITY);
}
#ifdef CONFIG_IA64_SGI_SN_SIM
#ifdef CONFIG_IA64_SGI_SN_SIM
if (IS_RUNNING_ON_SIMULATOR())
if
(
IS_RUNNING_ON_SIMULATOR
())
SIMULATOR_SLEEP();
SIMULATOR_SLEEP
();
#endif
pda.idle_flag = 1;
#endif
#endif
}
static
__inline__
void
pda
.
idle_flag
=
1
;
snidleoff
(
void
)
{
}
else
{
#if 0
/*
/*
* Turn the activity LED on.
* Turn the activity LED on.
*/
*/
set_led_bits
(
LED_CPU_ACTIVITY
,
LED_CPU_ACTIVITY
);
set_led_bits(LED_CPU_ACTIVITY, LED_CPU_ACTIVITY);
pda.idle_flag = 0;
pda
.
idle_flag
=
0
;
#endif
}
}
}
#endif
/* _ASM_IA64_SN_IDLE_H */
arch/ia64/sn/kernel/setup.c
View file @
f18d92a3
/*
/*
* Copyright (C) 1999,2001-200
2
Silicon Graphics, Inc. All rights reserved.
* Copyright (C) 1999,2001-200
3
Silicon Graphics, Inc. All rights reserved.
*
*
* This program is free software; you can redistribute it and/or modify it
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License
* under the terms of version 2 of the GNU General Public License
...
@@ -79,6 +79,8 @@ DEFINE_PER_CPU(struct pda_s, pda_percpu);
...
@@ -79,6 +79,8 @@ DEFINE_PER_CPU(struct pda_s, pda_percpu);
extern
void
bte_init_node
(
nodepda_t
*
,
cnodeid_t
);
extern
void
bte_init_node
(
nodepda_t
*
,
cnodeid_t
);
extern
void
bte_init_cpu
(
void
);
extern
void
bte_init_cpu
(
void
);
extern
void
sn_timer_init
(
void
);
extern
void
sn_timer_init
(
void
);
extern
void
(
*
ia64_mark_idle
)(
int
);
extern
void
snidle
(
int
);
unsigned
long
sn_rtc_cycles_per_second
;
unsigned
long
sn_rtc_cycles_per_second
;
...
@@ -304,6 +306,8 @@ sn_setup(char **cmdline_p)
...
@@ -304,6 +306,8 @@ sn_setup(char **cmdline_p)
current
->
thread
.
flags
|=
IA64_THREAD_FPEMU_NOPRINT
;
current
->
thread
.
flags
|=
IA64_THREAD_FPEMU_NOPRINT
;
sn_timer_init
();
sn_timer_init
();
ia64_mark_idle
=
&
snidle
;
}
}
/**
/**
...
...
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