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
3b6ed4ab
Commit
3b6ed4ab
authored
Dec 25, 2008
by
Martin Schwidefsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[S390] convert setup printks to pr_xxx macros.
Signed-off-by:
Martin Schwidefsky
<
schwidefsky@de.ibm.com
>
parent
f55495ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
26 deletions
+46
-26
arch/s390/kernel/setup.c
arch/s390/kernel/setup.c
+46
-26
No files found.
arch/s390/kernel/setup.c
View file @
3b6ed4ab
...
...
@@ -14,6 +14,9 @@
* This file handles the architecture-dependent parts of initialization
*/
#define KMSG_COMPONENT "setup"
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/sched.h>
...
...
@@ -291,8 +294,8 @@ unsigned int switch_amode = 0;
#endif
EXPORT_SYMBOL_GPL
(
switch_amode
);
static
void
set_amode_and_uaccess
(
unsigned
long
user_amode
,
unsigned
long
user32_amode
)
static
int
set_amode_and_uaccess
(
unsigned
long
user_amode
,
unsigned
long
user32_amode
)
{
psw_user_bits
=
PSW_BASE_BITS
|
PSW_MASK_DAT
|
user_amode
|
PSW_MASK_IO
|
PSW_MASK_EXT
|
PSW_MASK_MCHECK
|
...
...
@@ -309,11 +312,11 @@ static void set_amode_and_uaccess(unsigned long user_amode,
PSW_MASK_MCHECK
|
PSW_DEFAULT_KEY
;
if
(
MACHINE_HAS_MVCOS
)
{
printk
(
"mvcos available.
\n
"
);
memcpy
(
&
uaccess
,
&
uaccess_mvcos_switch
,
sizeof
(
uaccess
));
return
1
;
}
else
{
printk
(
"mvcos not available.
\n
"
);
memcpy
(
&
uaccess
,
&
uaccess_pt
,
sizeof
(
uaccess
));
return
0
;
}
}
...
...
@@ -328,9 +331,10 @@ static int __init early_parse_switch_amode(char *p)
early_param
(
"switch_amode"
,
early_parse_switch_amode
);
#else
/* CONFIG_S390_SWITCH_AMODE */
static
inline
void
set_amode_and_uaccess
(
unsigned
long
user_amode
,
unsigned
long
user32_amode
)
static
inline
int
set_amode_and_uaccess
(
unsigned
long
user_amode
,
unsigned
long
user32_amode
)
{
return
0
;
}
#endif
/* CONFIG_S390_SWITCH_AMODE */
...
...
@@ -355,11 +359,20 @@ early_param("noexec", early_parse_noexec);
static
void
setup_addressing_mode
(
void
)
{
if
(
s390_noexec
)
{
printk
(
"S390 execute protection active, "
);
set_amode_and_uaccess
(
PSW_ASC_SECONDARY
,
PSW32_ASC_SECONDARY
);
if
(
set_amode_and_uaccess
(
PSW_ASC_SECONDARY
,
PSW32_ASC_SECONDARY
))
pr_info
(
"Execute protection active, "
"mvcos available
\n
"
);
else
pr_info
(
"Execute protection active, "
"mvcos not available
\n
"
);
}
else
if
(
switch_amode
)
{
printk
(
"S390 address spaces switched, "
);
set_amode_and_uaccess
(
PSW_ASC_PRIMARY
,
PSW32_ASC_PRIMARY
);
if
(
set_amode_and_uaccess
(
PSW_ASC_PRIMARY
,
PSW32_ASC_PRIMARY
))
pr_info
(
"Address spaces switched, "
"mvcos available
\n
"
);
else
pr_info
(
"Address spaces switched, "
"mvcos not available
\n
"
);
}
#ifdef CONFIG_TRACE_IRQFLAGS
sysc_restore_trace_psw
.
mask
=
psw_kernel_bits
&
~
PSW_MASK_MCHECK
;
...
...
@@ -572,15 +585,15 @@ setup_memory(void)
start
=
PFN_PHYS
(
start_pfn
)
+
bmap_size
+
PAGE_SIZE
;
if
(
start
+
INITRD_SIZE
>
memory_end
)
{
pr
intk
(
"initrd extends beyond end of memory
"
"
(0x%08lx > 0x%08lx)
\n
"
pr
_err
(
"initrd extends beyond end of
"
"
memory (0x%08lx > 0x%08lx)
"
"disabling initrd
\n
"
,
start
+
INITRD_SIZE
,
memory_end
);
INITRD_START
=
INITRD_SIZE
=
0
;
}
else
{
pr
intk
(
"Moving initrd (0x%08lx -> 0x%08lx,
"
"
size: %ld)
\n
"
,
INITRD_START
,
start
,
INITRD_SIZE
);
pr
_info
(
"Moving initrd (0x%08lx ->
"
"0x%08lx,
size: %ld)
\n
"
,
INITRD_START
,
start
,
INITRD_SIZE
);
memmove
((
void
*
)
start
,
(
void
*
)
INITRD_START
,
INITRD_SIZE
);
INITRD_START
=
start
;
...
...
@@ -642,8 +655,9 @@ setup_memory(void)
initrd_start
=
INITRD_START
;
initrd_end
=
initrd_start
+
INITRD_SIZE
;
}
else
{
printk
(
"initrd extends beyond end of memory "
"(0x%08lx > 0x%08lx)
\n
disabling initrd
\n
"
,
pr_err
(
"initrd extends beyond end of "
"memory (0x%08lx > 0x%08lx) "
"disabling initrd
\n
"
,
initrd_start
+
INITRD_SIZE
,
memory_end
);
initrd_start
=
initrd_end
=
0
;
}
...
...
@@ -747,21 +761,27 @@ setup_arch(char **cmdline_p)
* print what head.S has found out about the machine
*/
#ifndef CONFIG_64BIT
printk
((
MACHINE_IS_VM
)
?
"We are running under VM (31 bit mode)
\n
"
:
"We are running native (31 bit mode)
\n
"
);
printk
((
MACHINE_HAS_IEEE
)
?
"This machine has an IEEE fpu
\n
"
:
"This machine has no IEEE fpu
\n
"
);
if
(
MACHINE_IS_VM
)
pr_info
(
"Linux is running as a z/VM "
"guest operating system in 31-bit mode
\n
"
);
else
pr_info
(
"Linux is running natively in 31-bit mode
\n
"
);
if
(
MACHINE_HAS_IEEE
)
pr_info
(
"The hardware system has IEEE compatible "
"floating point units
\n
"
);
else
pr_info
(
"The hardware system has no IEEE compatible "
"floating point units
\n
"
);
#else
/* CONFIG_64BIT */
if
(
MACHINE_IS_VM
)
printk
(
"We are running under VM (64 bit mode)
\n
"
);
pr_info
(
"Linux is running as a z/VM "
"guest operating system in 64-bit mode
\n
"
);
else
if
(
MACHINE_IS_KVM
)
{
pr
intk
(
"We are running under KVM (64 bit mode)
\n
"
);
pr
_info
(
"Linux is running under KVM in 64-bit mode
\n
"
);
add_preferred_console
(
"hvc"
,
0
,
NULL
);
s390_virtio_console_init
();
}
else
pr
intk
(
"We are running native (64 bit mode)
\n
"
);
pr
_info
(
"Linux is running natively in 64-bit mode
\n
"
);
#endif
/* CONFIG_64BIT */
/* Have one command line that is parsed and saved in /proc/cmdline */
...
...
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