Archived
14
0
Fork 0
Commit graph

13 commits

Author SHA1 Message Date
Heiko Carstens
1d802e2477 [S390] Use strim instead of strstrip to avoid false warnings.
Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-12-18 17:43:33 +01:00
Michael Holzheu
7874b1b66a [S390] hypfs: Use subcode 6 if subcode 7 is not available
Hypfs never worked on systems that only provide D204 subcode 6.
In these cases we nevertheless used subcode 7. With this fix, we
use subcode 6, if it is available and the system does not provide
subcode 7.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-10-14 12:43:52 +02:00
Heiko Carstens
33b26d7951 [S390] fix hypfs build failure
Fix build breakage below which probably was introduced with
("rcu: don't include unnecessary headers, allow kmemtrace w/ tracepoints").

  CC      arch/s390/hypfs/hypfs_diag.o
arch/s390/hypfs/hypfs_diag.c: In function 'diag204_free_buffer':
arch/s390/hypfs/hypfs_diag.c:364: error: implicit declaration of function 'free_pages'
arch/s390/hypfs/hypfs_diag.c: In function 'diag204_alloc_rbuf':
arch/s390/hypfs/hypfs_diag.c:384: error: implicit declaration of function '__get_free_pages'
arch/s390/hypfs/hypfs_diag.c:384: error: 'GFP_KERNEL' undeclared (first use in this function)
arch/s390/hypfs/hypfs_diag.c:384: error: (Each undeclared identifier is reported only once
arch/s390/hypfs/hypfs_diag.c:384: error: for each function it appears in.)

Reported-by: Sachin Sant <sachinp@in.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-03-31 19:17:03 +02:00
Michael Holzheu
f55495ba1a [S390] convert hypfs printks to pr_xxx macros.
Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:39:21 +01:00
Michael Holzheu
c41d4e3e68 [S390] Add exception handler for diagnose 224
To be able to run with the diagnose 224 switched off, a potential
specification exception has to be handled.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-05-31 17:38:10 +02:00
Christian Borntraeger
86b22470f6 [S390] hypfs fixes
Correct typo to make hypfs work on systems that support only diag204
subcode 4 and fix error handling in hypfs_diag_init.

Signed-off-by: Christian Borntraeger <cborntra@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-15 17:18:10 +01:00
Martin Schwidefsky
94c12cc7d1 [S390] Inline assembly cleanup.
Major cleanup of all s390 inline assemblies. They now have a common
coding style. Quite a few have been shortened, mainly by using register
asm variables. Use of the EX_TABLE macro helps  as well. The atomic ops,
bit ops and locking inlines new use the Q-constraint if a newer gcc
is used.  That results in slightly better code.

Thanks to Christian Borntraeger for proof reading the changes.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-09-28 16:56:43 +02:00
Michael Holzheu
23c100d99c [S390] hypfs sparse warnings.
sparse complains, if we use bitwise operations on enums. Cast enum to
long in order to fix that problem!

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-09-28 16:55:28 +02:00
Heiko Carstens
1375fc1fb0 [S390] __exit cleanup.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-09-20 15:59:12 +02:00
Michael Holzheu
331c982d4a [S390] hypfs compiler warnings.
Add casts to avoid compiler warnings.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-09-20 15:58:47 +02:00
Michael Holzheu
f19bfb2c9b [S390] hypfs comment cleanup.
Correct some comments in the hypervisor filesystem.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-09-20 15:58:44 +02:00
Heiko Carstens
d2c993d845 [S390] Fix sparse warnings.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-07-12 16:41:55 +02:00
Michael Holzheu
24bbb1faf3 [PATCH] s390_hypfs filesystem
On zSeries machines there exists an interface which allows the operating
system to retrieve LPAR hypervisor accounting data.  For example, it is
possible to get usage data for physical and virtual cpus.  In order to
provide this information to user space programs, I implemented a new
virtual Linux file system named 's390_hypfs' using the Linux 2.6 libfs
framework.  The name 's390_hypfs' stands for 'S390 Hypervisor Filesystem'.
All the accounting information is put into different virtual files which
can be accessed from user space.  All data is represented as ASCII strings.

When the file system is mounted the accounting information is retrieved and
a file system tree is created with the attribute files containing the cpu
information.  The content of the files remains unchanged until a new update
is made.  An update can be triggered from user space through writing
'something' into a special purpose update file.

We create the following directory structure:

<mount-point>/
        update
        cpus/
                <cpu-id>
                        type
                        mgmtime
                <cpu-id>
                        ...
        hyp/
                type
        systems/
                <lpar-name>
                        cpus/
                                <cpu-id>
                                        type
                                        mgmtime
                                        cputime
                                        onlinetime
                                <cpu-id>
                                        ...
                <lpar-name>
                        cpus/
                                ...

- update: File to trigger update
- cpus/: Directory for all physical cpus
- cpus/<cpu-id>/: Directory for one physical cpu.
- cpus/<cpu-id>/type: Type name of physical zSeries cpu.
- cpus/<cpu-id>/mgmtime: Physical-LPAR-management time in microseconds.
- hyp/: Directory for hypervisor information
- hyp/type: Typ of hypervisor (currently only 'LPAR Hypervisor')
- systems/: Directory for all LPARs
- systems/<lpar-name>/: Directory for one LPAR.
- systems/<lpar-name>/cpus/<cpu-id>/: Directory for the virtual cpus
- systems/<lpar-name>/cpus/<cpu-id>/type: Typ of cpu.
- systems/<lpar-name>/cpus/<cpu-id>/mgmtime:
Accumulated number of microseconds during which a physical
CPU was assigned to the logical cpu and the cpu time was
consumed by the hypervisor and was not provided to
the LPAR (LPAR overhead).

- systems/<lpar-name>/cpus/<cpu-id>/cputime:
Accumulated number of microseconds during which a physical CPU
was assigned to the logical cpu and the cpu time was consumed
by the LPAR.

- systems/<lpar-name>/cpus/<cpu-id>/onlinetime:
Accumulated number of microseconds during which the logical CPU
has been online.

As mount point for the filesystem /sys/hypervisor/s390 is created.

The update process is triggered when writing 'something' into the
'update' file at the top level hypfs directory. You can do this e.g.
with 'echo 1 > update'. During the update the whole directory structure
is deleted and built up again.

Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Ingo Oeser <ioe-lkml@rameria.de>
Cc: Joern Engel <joern@wohnheim.fh-wedel.de>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-23 07:43:02 -07:00