aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/appldata/appldata_mem.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-07-15 01:44:51 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-07-15 01:44:51 -0400
commit43d2548bb2ef7e6d753f91468a746784041e522d (patch)
tree77d13fcd48fd998393abb825ec36e2b732684a73 /arch/s390/appldata/appldata_mem.c
parent585583d95c5660973bc0cf64add517b040acd8a4 (diff)
parent85082fd7cbe3173198aac0eb5e85ab1edcc6352c (diff)
Merge commit '85082fd7cbe3173198aac0eb5e85ab1edcc6352c' into test-build
Manual fixup of: arch/powerpc/Kconfig
Diffstat (limited to 'arch/s390/appldata/appldata_mem.c')
-rw-r--r--arch/s390/appldata/appldata_mem.c43
1 files changed, 2 insertions, 41 deletions
diff --git a/arch/s390/appldata/appldata_mem.c b/arch/s390/appldata/appldata_mem.c
index 51181ccdb87b..3ed56b7d1b2f 100644
--- a/arch/s390/appldata/appldata_mem.c
+++ b/arch/s390/appldata/appldata_mem.c
@@ -14,14 +14,13 @@
14#include <linux/slab.h> 14#include <linux/slab.h>
15#include <linux/errno.h> 15#include <linux/errno.h>
16#include <linux/kernel_stat.h> 16#include <linux/kernel_stat.h>
17#include <asm/io.h>
18#include <linux/pagemap.h> 17#include <linux/pagemap.h>
19#include <linux/swap.h> 18#include <linux/swap.h>
19#include <asm/io.h>
20 20
21#include "appldata.h" 21#include "appldata.h"
22 22
23 23
24#define MY_PRINT_NAME "appldata_mem" /* for debug messages, etc. */
25#define P2K(x) ((x) << (PAGE_SHIFT - 10)) /* Converts #Pages to KB */ 24#define P2K(x) ((x) << (PAGE_SHIFT - 10)) /* Converts #Pages to KB */
26 25
27/* 26/*
@@ -70,30 +69,6 @@ static struct appldata_mem_data {
70} __attribute__((packed)) appldata_mem_data; 69} __attribute__((packed)) appldata_mem_data;
71 70
72 71
73static inline void appldata_debug_print(struct appldata_mem_data *mem_data)
74{
75 P_DEBUG("--- MEM - RECORD ---\n");
76 P_DEBUG("pgpgin = %8lu KB\n", mem_data->pgpgin);
77 P_DEBUG("pgpgout = %8lu KB\n", mem_data->pgpgout);
78 P_DEBUG("pswpin = %8lu Pages\n", mem_data->pswpin);
79 P_DEBUG("pswpout = %8lu Pages\n", mem_data->pswpout);
80 P_DEBUG("pgalloc = %8lu \n", mem_data->pgalloc);
81 P_DEBUG("pgfault = %8lu \n", mem_data->pgfault);
82 P_DEBUG("pgmajfault = %8lu \n", mem_data->pgmajfault);
83 P_DEBUG("sharedram = %8lu KB\n", mem_data->sharedram);
84 P_DEBUG("totalram = %8lu KB\n", mem_data->totalram);
85 P_DEBUG("freeram = %8lu KB\n", mem_data->freeram);
86 P_DEBUG("totalhigh = %8lu KB\n", mem_data->totalhigh);
87 P_DEBUG("freehigh = %8lu KB\n", mem_data->freehigh);
88 P_DEBUG("bufferram = %8lu KB\n", mem_data->bufferram);
89 P_DEBUG("cached = %8lu KB\n", mem_data->cached);
90 P_DEBUG("totalswap = %8lu KB\n", mem_data->totalswap);
91 P_DEBUG("freeswap = %8lu KB\n", mem_data->freeswap);
92 P_DEBUG("sync_count_1 = %u\n", mem_data->sync_count_1);
93 P_DEBUG("sync_count_2 = %u\n", mem_data->sync_count_2);
94 P_DEBUG("timestamp = %lX\n", mem_data->timestamp);
95}
96
97/* 72/*
98 * appldata_get_mem_data() 73 * appldata_get_mem_data()
99 * 74 *
@@ -140,9 +115,6 @@ static void appldata_get_mem_data(void *data)
140 115
141 mem_data->timestamp = get_clock(); 116 mem_data->timestamp = get_clock();
142 mem_data->sync_count_2++; 117 mem_data->sync_count_2++;
143#ifdef APPLDATA_DEBUG
144 appldata_debug_print(mem_data);
145#endif
146} 118}
147 119
148 120
@@ -164,17 +136,7 @@ static struct appldata_ops ops = {
164 */ 136 */
165static int __init appldata_mem_init(void) 137static int __init appldata_mem_init(void)
166{ 138{
167 int rc; 139 return appldata_register_ops(&ops);
168
169 P_DEBUG("sizeof(mem) = %lu\n", sizeof(struct appldata_mem_data));
170
171 rc = appldata_register_ops(&ops);
172 if (rc != 0) {
173 P_ERROR("Error registering ops, rc = %i\n", rc);
174 } else {
175 P_DEBUG("%s-ops registered!\n", ops.name);
176 }
177 return rc;
178} 140}
179 141
180/* 142/*
@@ -185,7 +147,6 @@ static int __init appldata_mem_init(void)
185static void __exit appldata_mem_exit(void) 147static void __exit appldata_mem_exit(void)
186{ 148{
187 appldata_unregister_ops(&ops); 149 appldata_unregister_ops(&ops);
188 P_DEBUG("%s-ops unregistered!\n", ops.name);
189} 150}
190 151
191 152