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
559510f5
Commit
559510f5
authored
May 06, 2002
by
Roman Zippel
Committed by
Linus Torvalds
May 06, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] m68k: seq_file fixes [17/20]
update some proc functions to use the seq_file interface
parent
0e209536
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
8 deletions
+37
-8
arch/m68k/kernel/setup.c
arch/m68k/kernel/setup.c
+23
-3
arch/m68k/sun3/config.c
arch/m68k/sun3/config.c
+14
-5
No files found.
arch/m68k/kernel/setup.c
View file @
559510f5
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include <linux/string.h>
#include <linux/string.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/bootmem.h>
#include <linux/bootmem.h>
#include <linux/seq_file.h>
#include <linux/module.h>
#include <linux/module.h>
#include <asm/bootinfo.h>
#include <asm/bootinfo.h>
...
@@ -406,7 +407,7 @@ void __init setup_arch(char **cmdline_p)
...
@@ -406,7 +407,7 @@ void __init setup_arch(char **cmdline_p)
#endif
#endif
}
}
int
get_cpuinfo
(
char
*
buffer
)
static
int
show_cpuinfo
(
struct
seq_file
*
m
,
void
*
v
)
{
{
const
char
*
cpu
,
*
mmu
,
*
fpu
;
const
char
*
cpu
,
*
mmu
,
*
fpu
;
unsigned
long
clockfreq
,
clockfactor
;
unsigned
long
clockfreq
,
clockfactor
;
...
@@ -467,7 +468,7 @@ int get_cpuinfo(char * buffer)
...
@@ -467,7 +468,7 @@ int get_cpuinfo(char * buffer)
clockfreq
=
loops_per_jiffy
*
HZ
*
clockfactor
;
clockfreq
=
loops_per_jiffy
*
HZ
*
clockfactor
;
return
(
sprintf
(
buffer
,
"CPU:
\t\t
%s
\n
"
seq_printf
(
m
,
"CPU:
\t\t
%s
\n
"
"MMU:
\t\t
%s
\n
"
"MMU:
\t\t
%s
\n
"
"FPU:
\t\t
%s
\n
"
"FPU:
\t\t
%s
\n
"
"Clocking:
\t
%lu.%1luMHz
\n
"
"Clocking:
\t
%lu.%1luMHz
\n
"
...
@@ -476,9 +477,28 @@ int get_cpuinfo(char * buffer)
...
@@ -476,9 +477,28 @@ int get_cpuinfo(char * buffer)
cpu
,
mmu
,
fpu
,
cpu
,
mmu
,
fpu
,
clockfreq
/
1000000
,(
clockfreq
/
100000
)
%
10
,
clockfreq
/
1000000
,(
clockfreq
/
100000
)
%
10
,
loops_per_jiffy
/
(
500000
/
HZ
),(
loops_per_jiffy
/
(
5000
/
HZ
))
%
100
,
loops_per_jiffy
/
(
500000
/
HZ
),(
loops_per_jiffy
/
(
5000
/
HZ
))
%
100
,
loops_per_jiffy
));
loops_per_jiffy
);
return
0
;
}
static
void
*
c_start
(
struct
seq_file
*
m
,
loff_t
*
pos
)
{
return
*
pos
<
1
?
(
void
*
)
1
:
NULL
;
}
static
void
*
c_next
(
struct
seq_file
*
m
,
void
*
v
,
loff_t
*
pos
)
{
++*
pos
;
return
NULL
;
}
static
void
c_stop
(
struct
seq_file
*
m
,
void
*
v
)
{
}
}
struct
seq_operations
cpuinfo_op
=
{
start:
c_start
,
next:
c_next
,
stop:
c_stop
,
show:
show_cpuinfo
,
};
int
get_hardware_list
(
char
*
buffer
)
int
get_hardware_list
(
char
*
buffer
)
{
{
...
...
arch/m68k/sun3/config.c
View file @
559510f5
...
@@ -36,13 +36,11 @@ extern char _text, _end;
...
@@ -36,13 +36,11 @@ extern char _text, _end;
char
sun3_reserved_pmeg
[
SUN3_PMEGS_NUM
];
char
sun3_reserved_pmeg
[
SUN3_PMEGS_NUM
];
extern
unsigned
long
sun3_gettimeoffset
(
void
);
extern
unsigned
long
sun3_gettimeoffset
(
void
);
extern
int
show_sun3_interrupts
(
char
*
);
extern
int
show_sun3_interrupts
(
struct
seq_file
*
,
void
*
);
extern
void
sun3_sched_init
(
void
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
));
extern
void
sun3_sched_init
(
void
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
));
extern
void
sun3_get_model
(
char
*
model
);
extern
void
sun3_get_model
(
char
*
model
);
extern
void
idprom_init
(
void
);
extern
void
idprom_init
(
void
);
extern
void
sun3_gettod
(
int
*
yearp
,
int
*
monp
,
int
*
dayp
,
extern
int
sun3_hwclk
(
int
set
,
struct
rtc_time
*
t
);
int
*
hourp
,
int
*
minp
,
int
*
secp
);
extern
int
sun3_hwclk
(
int
set
,
struct
hwclk_time
*
t
);
extern
void
sun_serial_setup
(
void
);
extern
void
sun_serial_setup
(
void
);
volatile
char
*
clock_va
;
volatile
char
*
clock_va
;
...
@@ -50,6 +48,18 @@ extern volatile unsigned char* sun3_intreg;
...
@@ -50,6 +48,18 @@ extern volatile unsigned char* sun3_intreg;
extern
unsigned
long
availmem
;
extern
unsigned
long
availmem
;
unsigned
long
num_pages
;
unsigned
long
num_pages
;
static
int
sun3_get_hardware_list
(
char
*
buffer
)
{
int
len
=
0
;
len
+=
sprintf
(
buffer
+
len
,
"PROM Revision:
\t
%s
\n
"
,
romvec
->
pv_monid
);
return
len
;
}
void
__init
sun3_init
(
void
)
void
__init
sun3_init
(
void
)
{
{
unsigned
char
enable_register
;
unsigned
char
enable_register
;
...
@@ -167,7 +177,6 @@ void __init config_sun3(void)
...
@@ -167,7 +177,6 @@ void __init config_sun3(void)
sun_serial_setup
();
sun_serial_setup
();
}
}
void
__init
sun3_sched_init
(
void
(
*
timer_routine
)(
int
,
void
*
,
struct
pt_regs
*
))
void
__init
sun3_sched_init
(
void
(
*
timer_routine
)(
int
,
void
*
,
struct
pt_regs
*
))
...
...
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