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
7b468488
Commit
7b468488
authored
Mar 26, 2009
by
Martin Schwidefsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[S390] eliminate cpuinfo_S390 structure
Signed-off-by:
Martin Schwidefsky
<
schwidefsky@de.ibm.com
>
parent
2938af53
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
75 deletions
+52
-75
arch/s390/include/asm/lowcore.h
arch/s390/include/asm/lowcore.h
+8
-7
arch/s390/include/asm/processor.h
arch/s390/include/asm/processor.h
+1
-15
arch/s390/include/asm/smp.h
arch/s390/include/asm/smp.h
+1
-6
arch/s390/kernel/processor.c
arch/s390/kernel/processor.c
+34
-35
arch/s390/kernel/setup.c
arch/s390/kernel/setup.c
+3
-7
arch/s390/kernel/smp.c
arch/s390/kernel/smp.c
+4
-4
drivers/s390/cio/css.c
drivers/s390/cio/css.c
+1
-1
No files found.
arch/s390/include/asm/lowcore.h
View file @
7b468488
...
@@ -80,7 +80,6 @@
...
@@ -80,7 +80,6 @@
#define __LC_USER_ASCE 0xC50
#define __LC_USER_ASCE 0xC50
#define __LC_PANIC_STACK 0xC54
#define __LC_PANIC_STACK 0xC54
#define __LC_CPUID 0xC60
#define __LC_CPUID 0xC60
#define __LC_CPUADDR 0xC68
#define __LC_IPLDEV 0xC7C
#define __LC_IPLDEV 0xC7C
#define __LC_CURRENT 0xC90
#define __LC_CURRENT 0xC90
#define __LC_INT_CLOCK 0xC98
#define __LC_INT_CLOCK 0xC98
...
@@ -102,7 +101,6 @@
...
@@ -102,7 +101,6 @@
#define __LC_USER_ASCE 0xD60
#define __LC_USER_ASCE 0xD60
#define __LC_PANIC_STACK 0xD68
#define __LC_PANIC_STACK 0xD68
#define __LC_CPUID 0xD80
#define __LC_CPUID 0xD80
#define __LC_CPUADDR 0xD88
#define __LC_IPLDEV 0xDB8
#define __LC_IPLDEV 0xDB8
#define __LC_CURRENT 0xDD8
#define __LC_CURRENT 0xDD8
#define __LC_INT_CLOCK 0xDE8
#define __LC_INT_CLOCK 0xDE8
...
@@ -273,8 +271,10 @@ struct _lowcore
...
@@ -273,8 +271,10 @@ struct _lowcore
__u32
user_exec_asce
;
/* 0xc58 */
__u32
user_exec_asce
;
/* 0xc58 */
__u8
pad10
[
0xc60
-
0xc5c
];
/* 0xc5c */
__u8
pad10
[
0xc60
-
0xc5c
];
/* 0xc5c */
/* entry.S sensitive area start */
/* entry.S sensitive area start */
struct
cpuinfo_S390
cpu_data
;
/* 0xc60 */
cpuid_t
cpu_id
;
/* 0xc60 */
__u32
ipl_device
;
/* 0xc7c */
__u32
cpu_nr
;
/* 0xc68 */
__u32
ipl_device
;
/* 0xc6c */
__u8
pad_0xc70
[
0xc80
-
0xc70
];
/* 0xc70 */
/* entry.S sensitive area end */
/* entry.S sensitive area end */
/* SMP info area: defined by DJB */
/* SMP info area: defined by DJB */
...
@@ -366,9 +366,10 @@ struct _lowcore
...
@@ -366,9 +366,10 @@ struct _lowcore
__u64
user_exec_asce
;
/* 0xd70 */
__u64
user_exec_asce
;
/* 0xd70 */
__u8
pad10
[
0xd80
-
0xd78
];
/* 0xd78 */
__u8
pad10
[
0xd80
-
0xd78
];
/* 0xd78 */
/* entry.S sensitive area start */
/* entry.S sensitive area start */
struct
cpuinfo_S390
cpu_data
;
/* 0xd80 */
cpuid_t
cpu_id
;
/* 0xd80 */
__u32
ipl_device
;
/* 0xdb8 */
__u32
cpu_nr
;
/* 0xd88 */
__u32
pad11
;
/* 0xdbc */
__u32
ipl_device
;
/* 0xd8c */
__u8
pad_0xd90
[
0xdc0
-
0xd90
];
/* 0xd90 */
/* entry.S sensitive area end */
/* entry.S sensitive area end */
/* SMP info area: defined by DJB */
/* SMP info area: defined by DJB */
...
...
arch/s390/include/asm/processor.h
View file @
7b468488
...
@@ -42,22 +42,8 @@ static inline void get_cpu_id(cpuid_t *ptr)
...
@@ -42,22 +42,8 @@ static inline void get_cpu_id(cpuid_t *ptr)
asm
volatile
(
"stidp 0(%1)"
:
"=m"
(
*
ptr
)
:
"a"
(
ptr
));
asm
volatile
(
"stidp 0(%1)"
:
"=m"
(
*
ptr
)
:
"a"
(
ptr
));
}
}
struct
cpuinfo_S390
{
cpuid_t
cpu_id
;
__u16
cpu_addr
;
__u16
cpu_nr
;
unsigned
long
loops_per_jiffy
;
unsigned
long
*
pgd_quick
;
#ifdef __s390x__
unsigned
long
*
pmd_quick
;
#endif
/* __s390x__ */
unsigned
long
*
pte_quick
;
unsigned
long
pgtable_cache_sz
;
};
extern
void
s390_adjust_jiffies
(
void
);
extern
void
s390_adjust_jiffies
(
void
);
extern
void
print_cpu_info
(
struct
cpuinfo_S390
*
);
extern
void
print_cpu_info
(
void
);
extern
int
get_cpu_capability
(
unsigned
int
*
);
extern
int
get_cpu_capability
(
unsigned
int
*
);
/*
/*
...
...
arch/s390/include/asm/smp.h
View file @
7b468488
...
@@ -50,12 +50,7 @@ extern void machine_power_off_smp(void);
...
@@ -50,12 +50,7 @@ extern void machine_power_off_smp(void);
#define PROC_CHANGE_PENALTY 20
/* Schedule penalty */
#define PROC_CHANGE_PENALTY 20
/* Schedule penalty */
#define raw_smp_processor_id() (S390_lowcore.cpu_data.cpu_nr)
#define raw_smp_processor_id() (S390_lowcore.cpu_nr)
static
inline
__u16
hard_smp_processor_id
(
void
)
{
return
stap
();
}
/*
/*
* returns 1 if cpu is in stopped/check stopped state or not operational
* returns 1 if cpu is in stopped/check stopped state or not operational
...
...
arch/s390/kernel/processor.c
View file @
7b468488
...
@@ -18,10 +18,11 @@
...
@@ -18,10 +18,11 @@
#include <asm/lowcore.h>
#include <asm/lowcore.h>
#include <asm/param.h>
#include <asm/param.h>
void
__cpuinit
print_cpu_info
(
struct
cpuinfo_S390
*
cpuinfo
)
void
__cpuinit
print_cpu_info
(
void
)
{
{
pr_info
(
"Processor %d started, address %d, identification %06X
\n
"
,
pr_info
(
"Processor %d started, address %d, identification %06X
\n
"
,
cpuinfo
->
cpu_nr
,
cpuinfo
->
cpu_addr
,
cpuinfo
->
cpu_id
.
ident
);
S390_lowcore
.
cpu_nr
,
S390_lowcore
.
cpu_addr
,
S390_lowcore
.
cpu_id
.
ident
);
}
}
/*
/*
...
@@ -34,7 +35,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
...
@@ -34,7 +35,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
"esan3"
,
"zarch"
,
"stfle"
,
"msa"
,
"ldisp"
,
"eimm"
,
"dfp"
,
"esan3"
,
"zarch"
,
"stfle"
,
"msa"
,
"ldisp"
,
"eimm"
,
"dfp"
,
"edat"
"edat"
};
};
struct
cpuinfo_S390
*
cpuinfo
;
struct
_lowcore
*
lc
;
unsigned
long
n
=
(
unsigned
long
)
v
-
1
;
unsigned
long
n
=
(
unsigned
long
)
v
-
1
;
int
i
;
int
i
;
...
@@ -55,20 +56,18 @@ static int show_cpuinfo(struct seq_file *m, void *v)
...
@@ -55,20 +56,18 @@ static int show_cpuinfo(struct seq_file *m, void *v)
if
(
cpu_online
(
n
))
{
if
(
cpu_online
(
n
))
{
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
if
(
smp_processor_id
()
==
n
)
lc
=
(
smp_processor_id
()
==
n
)
?
cpuinfo
=
&
S390_lowcore
.
cpu_data
;
&
S390_lowcore
:
lowcore_ptr
[
n
];
else
cpuinfo
=
&
lowcore_ptr
[
n
]
->
cpu_data
;
#else
#else
cpuinfo
=
&
S390_lowcore
.
cpu_data
;
lc
=
&
S390_lowcore
;
#endif
#endif
seq_printf
(
m
,
"processor %li: "
seq_printf
(
m
,
"processor %li: "
"version = %02X, "
"version = %02X, "
"identification = %06X, "
"identification = %06X, "
"machine = %04X
\n
"
,
"machine = %04X
\n
"
,
n
,
cpuinfo
->
cpu_id
.
version
,
n
,
lc
->
cpu_id
.
version
,
cpuinfo
->
cpu_id
.
ident
,
lc
->
cpu_id
.
ident
,
cpuinfo
->
cpu_id
.
machine
);
lc
->
cpu_id
.
machine
);
}
}
preempt_enable
();
preempt_enable
();
return
0
;
return
0
;
...
...
arch/s390/kernel/setup.c
View file @
7b468488
...
@@ -121,13 +121,10 @@ static struct resource data_resource = {
...
@@ -121,13 +121,10 @@ static struct resource data_resource = {
*/
*/
void
__cpuinit
cpu_init
(
void
)
void
__cpuinit
cpu_init
(
void
)
{
{
int
addr
=
hard_smp_processor_id
();
/*
/*
* Store processor id in lowcore (used e.g. in timer_interrupt)
* Store processor id in lowcore (used e.g. in timer_interrupt)
*/
*/
get_cpu_id
(
&
S390_lowcore
.
cpu_data
.
cpu_id
);
get_cpu_id
(
&
S390_lowcore
.
cpu_id
);
S390_lowcore
.
cpu_data
.
cpu_addr
=
addr
;
/*
/*
* Force FPU initialization:
* Force FPU initialization:
...
@@ -686,7 +683,6 @@ setup_memory(void)
...
@@ -686,7 +683,6 @@ setup_memory(void)
static
void
__init
setup_hwcaps
(
void
)
static
void
__init
setup_hwcaps
(
void
)
{
{
static
const
int
stfl_bits
[
6
]
=
{
0
,
2
,
7
,
17
,
19
,
21
};
static
const
int
stfl_bits
[
6
]
=
{
0
,
2
,
7
,
17
,
19
,
21
};
struct
cpuinfo_S390
*
cpuinfo
=
&
S390_lowcore
.
cpu_data
;
unsigned
long
long
facility_list_extended
;
unsigned
long
long
facility_list_extended
;
unsigned
int
facility_list
;
unsigned
int
facility_list
;
int
i
;
int
i
;
...
@@ -732,7 +728,7 @@ static void __init setup_hwcaps(void)
...
@@ -732,7 +728,7 @@ static void __init setup_hwcaps(void)
if
(
MACHINE_HAS_HPAGE
)
if
(
MACHINE_HAS_HPAGE
)
elf_hwcap
|=
1UL
<<
7
;
elf_hwcap
|=
1UL
<<
7
;
switch
(
cpuinfo
->
cpu_id
.
machine
)
{
switch
(
S390_lowcore
.
cpu_id
.
machine
)
{
case
0x9672
:
case
0x9672
:
#if !defined(CONFIG_64BIT)
#if !defined(CONFIG_64BIT)
default:
/* Use "g5" as default for 31 bit kernels. */
default:
/* Use "g5" as default for 31 bit kernels. */
...
@@ -825,7 +821,7 @@ setup_arch(char **cmdline_p)
...
@@ -825,7 +821,7 @@ setup_arch(char **cmdline_p)
setup_lowcore
();
setup_lowcore
();
cpu_init
();
cpu_init
();
__cpu_logical_map
[
0
]
=
S390_lowcore
.
cpu_data
.
cpu_addr
;
__cpu_logical_map
[
0
]
=
stap
()
;
s390_init_cpu_topology
();
s390_init_cpu_topology
();
/*
/*
...
...
arch/s390/kernel/smp.c
View file @
7b468488
...
@@ -372,7 +372,7 @@ static void __init smp_detect_cpus(void)
...
@@ -372,7 +372,7 @@ static void __init smp_detect_cpus(void)
c_cpus
=
1
;
c_cpus
=
1
;
s_cpus
=
0
;
s_cpus
=
0
;
boot_cpu_addr
=
S390_lowcore
.
cpu_data
.
cpu_addr
;
boot_cpu_addr
=
__cpu_logical_map
[
0
]
;
info
=
kmalloc
(
sizeof
(
*
info
),
GFP_KERNEL
);
info
=
kmalloc
(
sizeof
(
*
info
),
GFP_KERNEL
);
if
(
!
info
)
if
(
!
info
)
panic
(
"smp_detect_cpus failed to allocate memory
\n
"
);
panic
(
"smp_detect_cpus failed to allocate memory
\n
"
);
...
@@ -446,7 +446,7 @@ int __cpuinit start_secondary(void *cpuvoid)
...
@@ -446,7 +446,7 @@ int __cpuinit start_secondary(void *cpuvoid)
/* Switch on interrupts */
/* Switch on interrupts */
local_irq_enable
();
local_irq_enable
();
/* Print info about this processor */
/* Print info about this processor */
print_cpu_info
(
&
S390_lowcore
.
cpu_data
);
print_cpu_info
();
/* cpu_idle will call schedule for us */
/* cpu_idle will call schedule for us */
cpu_idle
();
cpu_idle
();
return
0
;
return
0
;
...
@@ -564,7 +564,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
...
@@ -564,7 +564,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
:
:
"a"
(
&
cpu_lowcore
->
access_regs_save_area
)
:
"memory"
);
:
:
"a"
(
&
cpu_lowcore
->
access_regs_save_area
)
:
"memory"
);
cpu_lowcore
->
percpu_offset
=
__per_cpu_offset
[
cpu
];
cpu_lowcore
->
percpu_offset
=
__per_cpu_offset
[
cpu
];
cpu_lowcore
->
current_task
=
(
unsigned
long
)
idle
;
cpu_lowcore
->
current_task
=
(
unsigned
long
)
idle
;
cpu_lowcore
->
cpu_
data
.
cpu_
nr
=
cpu
;
cpu_lowcore
->
cpu_nr
=
cpu
;
cpu_lowcore
->
kernel_asce
=
S390_lowcore
.
kernel_asce
;
cpu_lowcore
->
kernel_asce
=
S390_lowcore
.
kernel_asce
;
cpu_lowcore
->
ipl_device
=
S390_lowcore
.
ipl_device
;
cpu_lowcore
->
ipl_device
=
S390_lowcore
.
ipl_device
;
eieio
();
eieio
();
...
@@ -656,7 +656,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
...
@@ -656,7 +656,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
/* request the 0x1201 emergency signal external interrupt */
/* request the 0x1201 emergency signal external interrupt */
if
(
register_external_interrupt
(
0x1201
,
do_ext_call_interrupt
)
!=
0
)
if
(
register_external_interrupt
(
0x1201
,
do_ext_call_interrupt
)
!=
0
)
panic
(
"Couldn't request external interrupt 0x1201"
);
panic
(
"Couldn't request external interrupt 0x1201"
);
print_cpu_info
(
&
S390_lowcore
.
cpu_data
);
print_cpu_info
();
/* Reallocate current lowcore, but keep its contents. */
/* Reallocate current lowcore, but keep its contents. */
lc_order
=
sizeof
(
long
)
==
8
?
1
:
0
;
lc_order
=
sizeof
(
long
)
==
8
?
1
:
0
;
...
...
drivers/s390/cio/css.c
View file @
7b468488
...
@@ -655,7 +655,7 @@ css_generate_pgid(struct channel_subsystem *css, u32 tod_high)
...
@@ -655,7 +655,7 @@ css_generate_pgid(struct channel_subsystem *css, u32 tod_high)
css
->
global_pgid
.
pgid_high
.
ext_cssid
.
cssid
=
css
->
cssid
;
css
->
global_pgid
.
pgid_high
.
ext_cssid
.
cssid
=
css
->
cssid
;
}
else
{
}
else
{
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
css
->
global_pgid
.
pgid_high
.
cpu_addr
=
hard_smp_processor_id
();
css
->
global_pgid
.
pgid_high
.
cpu_addr
=
stap
();
#else
#else
css
->
global_pgid
.
pgid_high
.
cpu_addr
=
0
;
css
->
global_pgid
.
pgid_high
.
cpu_addr
=
0
;
#endif
#endif
...
...
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