[S390] move sysinfo.c from drivers/s390 to arch/s390/kernel
All in sysinfo.c is core kernel code and not driver code. So move it to arch/s390/kernel. Also includes some small cleanups. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
committed by
Martin Schwidefsky
parent
fc19f381b3
commit
94f5b09d97
@@ -17,10 +17,12 @@ CFLAGS_smp.o := -Wno-nonnull
|
|||||||
#
|
#
|
||||||
CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'
|
CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'
|
||||||
|
|
||||||
|
CFLAGS_sysinfo.o += -Iinclude/math-emu -Iarch/s390/math-emu -w
|
||||||
|
|
||||||
obj-y := bitmap.o traps.o time.o process.o base.o early.o setup.o \
|
obj-y := bitmap.o traps.o time.o process.o base.o early.o setup.o \
|
||||||
processor.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \
|
processor.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \
|
||||||
s390_ext.o debug.o irq.o ipl.o dis.o diag.o mem_detect.o \
|
s390_ext.o debug.o irq.o ipl.o dis.o diag.o mem_detect.o \
|
||||||
vdso.o vtime.o
|
vdso.o vtime.o sysinfo.o
|
||||||
|
|
||||||
obj-y += $(if $(CONFIG_64BIT),entry64.o,entry.o)
|
obj-y += $(if $(CONFIG_64BIT),entry64.o,entry.o)
|
||||||
obj-y += $(if $(CONFIG_64BIT),reipl64.o,reipl.o)
|
obj-y += $(if $(CONFIG_64BIT),reipl64.o,reipl.o)
|
||||||
|
@@ -1,9 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* drivers/s390/sysinfo.c
|
* Copyright IBM Corp. 2001, 2009
|
||||||
*
|
* Author(s): Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
|
||||||
* Copyright IBM Corp. 2001, 2008
|
* Martin Schwidefsky <schwidefsky@de.ibm.com>,
|
||||||
* Author(s): Ulrich Weigand (Ulrich.Weigand@de.ibm.com)
|
|
||||||
* Martin Schwidefsky <schwidefsky@de.ibm.com>
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
@@ -78,23 +76,6 @@ static int stsi_1_1_1(struct sysinfo_1_1_1 *info, char *page, int len)
|
|||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 /* Currently unused */
|
|
||||||
static int stsi_1_2_1(struct sysinfo_1_2_1 *info, char *page, int len)
|
|
||||||
{
|
|
||||||
if (stsi(info, 1, 2, 1) == -ENOSYS)
|
|
||||||
return len;
|
|
||||||
|
|
||||||
len += sprintf(page + len, "\n");
|
|
||||||
EBCASC(info->sequence, sizeof(info->sequence));
|
|
||||||
EBCASC(info->plant, sizeof(info->plant));
|
|
||||||
len += sprintf(page + len, "Sequence Code of CPU: %-16.16s\n",
|
|
||||||
info->sequence);
|
|
||||||
len += sprintf(page + len, "Plant of CPU: %-16.16s\n",
|
|
||||||
info->plant);
|
|
||||||
return len;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int stsi_1_2_2(struct sysinfo_1_2_2 *info, char *page, int len)
|
static int stsi_1_2_2(struct sysinfo_1_2_2 *info, char *page, int len)
|
||||||
{
|
{
|
||||||
struct sysinfo_1_2_2_extension *ext;
|
struct sysinfo_1_2_2_extension *ext;
|
||||||
@@ -145,27 +126,9 @@ static int stsi_1_2_2(struct sysinfo_1_2_2 *info, char *page, int len)
|
|||||||
if (info->secondary_capability != 0)
|
if (info->secondary_capability != 0)
|
||||||
len += sprintf(page + len, "Secondary Capability: %d\n",
|
len += sprintf(page + len, "Secondary Capability: %d\n",
|
||||||
info->secondary_capability);
|
info->secondary_capability);
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 /* Currently unused */
|
|
||||||
static int stsi_2_2_1(struct sysinfo_2_2_1 *info, char *page, int len)
|
|
||||||
{
|
|
||||||
if (stsi(info, 2, 2, 1) == -ENOSYS)
|
|
||||||
return len;
|
|
||||||
|
|
||||||
len += sprintf(page + len, "\n");
|
|
||||||
EBCASC (info->sequence, sizeof(info->sequence));
|
|
||||||
EBCASC (info->plant, sizeof(info->plant));
|
|
||||||
len += sprintf(page + len, "Sequence Code of logical CPU: %-16.16s\n",
|
|
||||||
info->sequence);
|
|
||||||
len += sprintf(page + len, "Plant of logical CPU: %-16.16s\n",
|
|
||||||
info->plant);
|
|
||||||
return len;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int stsi_2_2_2(struct sysinfo_2_2_2 *info, char *page, int len)
|
static int stsi_2_2_2(struct sysinfo_2_2_2 *info, char *page, int len)
|
||||||
{
|
{
|
||||||
if (stsi(info, 2, 2, 2) == -ENOSYS)
|
if (stsi(info, 2, 2, 2) == -ENOSYS)
|
||||||
@@ -237,7 +200,6 @@ static int stsi_3_2_2(struct sysinfo_3_2_2 *info, char *page, int len)
|
|||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int proc_read_sysinfo(char *page, char **start,
|
static int proc_read_sysinfo(char *page, char **start,
|
||||||
off_t off, int count,
|
off_t off, int count,
|
||||||
int *eof, void *data)
|
int *eof, void *data)
|
||||||
@@ -272,8 +234,7 @@ static __init int create_proc_sysinfo(void)
|
|||||||
proc_read_sysinfo, NULL);
|
proc_read_sysinfo, NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
device_initcall(create_proc_sysinfo);
|
||||||
__initcall(create_proc_sysinfo);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Service levels interface.
|
* Service levels interface.
|
||||||
@@ -387,13 +348,11 @@ static __init int create_proc_service_level(void)
|
|||||||
register_service_level(&service_level_vm);
|
register_service_level(&service_level_vm);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
subsys_initcall(create_proc_service_level);
|
subsys_initcall(create_proc_service_level);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Bogomips calculation based on cpu capability.
|
* Bogomips calculation based on cpu capability.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int get_cpu_capability(unsigned int *capability)
|
int get_cpu_capability(unsigned int *capability)
|
||||||
{
|
{
|
||||||
struct sysinfo_1_2_2 *info;
|
struct sysinfo_1_2_2 *info;
|
@@ -2,9 +2,7 @@
|
|||||||
# Makefile for the S/390 specific device drivers
|
# Makefile for the S/390 specific device drivers
|
||||||
#
|
#
|
||||||
|
|
||||||
CFLAGS_sysinfo.o += -Iinclude/math-emu -Iarch/s390/math-emu -w
|
obj-y += s390mach.o
|
||||||
|
|
||||||
obj-y += s390mach.o sysinfo.o
|
|
||||||
obj-y += cio/ block/ char/ crypto/ net/ scsi/ kvm/
|
obj-y += cio/ block/ char/ crypto/ net/ scsi/ kvm/
|
||||||
|
|
||||||
drivers-y += drivers/s390/built-in.o
|
drivers-y += drivers/s390/built-in.o
|
||||||
|
Reference in New Issue
Block a user