From: Gerald Schaefer Update s390 to track the new fields in struct page_state. --- 25-akpm/arch/s390/appldata/appldata_mem.c | 25 +++++++++++++------------ 25-akpm/arch/s390/appldata/appldata_net_sum.c | 8 ++++++++ 25-akpm/arch/s390/appldata/appldata_os.c | 9 +++++++++ 25-akpm/include/linux/page-flags.h | 3 --- 4 files changed, 30 insertions(+), 15 deletions(-) diff -puN arch/s390/appldata/appldata_mem.c~s390-page_state-update arch/s390/appldata/appldata_mem.c --- 25/arch/s390/appldata/appldata_mem.c~s390-page_state-update Mon Mar 15 15:51:20 2004 +++ 25-akpm/arch/s390/appldata/appldata_mem.c Mon Mar 15 15:51:20 2004 @@ -27,6 +27,15 @@ /* * Memory data + * + * This is accessed as binary data by z/VM. If changes to it can't be avoided, + * the structure version (product ID, see appldata_base.c) needs to be changed + * as well and all documentation and z/VM applications using it must be + * updated. + * + * The record layout is documented in the Linux for zSeries Device Drivers + * book: + * http://oss.software.ibm.com/developerworks/opensource/linux390/index.shtml */ struct appldata_mem_data { u64 timestamp; @@ -54,9 +63,7 @@ struct appldata_mem_data { u64 freeswap; /* free swap space */ // New in 2.6 --> - u64 pgalloc_high; /* page allocations */ - u64 pgalloc_normal; - u64 pgalloc_dma; + u64 pgalloc; /* page allocations */ u64 pgfault; /* page faults (major+minor) */ u64 pgmajfault; /* page faults (major only) */ // <-- New in 2.6 @@ -71,9 +78,7 @@ static inline void appldata_debug_print( P_DEBUG("pgpgout = %8lu KB\n", mem_data->pgpgout); P_DEBUG("pswpin = %8lu Pages\n", mem_data->pswpin); P_DEBUG("pswpout = %8lu Pages\n", mem_data->pswpout); - P_DEBUG("pgalloc_high = %8lu \n", mem_data->pgalloc_high); - P_DEBUG("pgalloc_normal = %8lu \n", mem_data->pgalloc_normal); - P_DEBUG("pgalloc_dma = %8lu \n", mem_data->pgalloc_dma); + P_DEBUG("pgalloc = %8lu \n", mem_data->pgalloc); P_DEBUG("pgfault = %8lu \n", mem_data->pgfault); P_DEBUG("pgmajfault = %8lu \n", mem_data->pgmajfault); P_DEBUG("sharedram = %8lu KB\n", mem_data->sharedram); @@ -109,15 +114,11 @@ static void appldata_get_mem_data(void * mem_data->pgpgout = ps.pgpgout >> 1; mem_data->pswpin = ps.pswpin; mem_data->pswpout = ps.pswpout; - mem_data->pgalloc_high = ps.pgalloc_high; - mem_data->pgalloc_normal = ps.pgalloc_normal; - mem_data->pgalloc_dma = ps.pgalloc_dma; + mem_data->pgalloc = ps.pgalloc_high + ps.pgalloc_normal + + ps.pgalloc_dma; mem_data->pgfault = ps.pgfault; mem_data->pgmajfault = ps.pgmajfault; -P_DEBUG("pgalloc_high = %lu, pgalloc_normal = %lu, pgalloc_dma = %lu, pgfree = %lu\n", - ps.pgalloc_high, ps.pgalloc_normal, ps.pgalloc_dma, ps.pgfree); - si_meminfo(&val); mem_data->sharedram = val.sharedram; mem_data->totalram = P2K(val.totalram); diff -puN arch/s390/appldata/appldata_net_sum.c~s390-page_state-update arch/s390/appldata/appldata_net_sum.c --- 25/arch/s390/appldata/appldata_net_sum.c~s390-page_state-update Mon Mar 15 15:51:20 2004 +++ 25-akpm/arch/s390/appldata/appldata_net_sum.c Mon Mar 15 15:51:20 2004 @@ -26,6 +26,14 @@ /* * Network data + * + * This is accessed as binary data by z/VM. If changes to it can't be avoided, + * the structure version (product ID, see appldata_base.c) needs to be changed + * as well and all documentation and z/VM applications using it must be updated. + * + * The record layout is documented in the Linux for zSeries Device Drivers + * book: + * http://oss.software.ibm.com/developerworks/opensource/linux390/index.shtml */ struct appldata_net_sum_data { u64 timestamp; diff -puN arch/s390/appldata/appldata_os.c~s390-page_state-update arch/s390/appldata/appldata_os.c --- 25/arch/s390/appldata/appldata_os.c~s390-page_state-update Mon Mar 15 15:51:20 2004 +++ 25-akpm/arch/s390/appldata/appldata_os.c Mon Mar 15 15:51:20 2004 @@ -28,6 +28,15 @@ /* * OS data + * + * This is accessed as binary data by z/VM. If changes to it can't be avoided, + * the structure version (product ID, see appldata_base.c) needs to be changed + * as well and all documentation and z/VM applications using it must be + * updated. + * + * The record layout is documented in the Linux for zSeries Device Drivers + * book: + * http://oss.software.ibm.com/developerworks/opensource/linux390/index.shtml */ struct appldata_os_per_cpu { u32 per_cpu_user; /* timer ticks spent in user mode */ diff -puN include/linux/page-flags.h~s390-page_state-update include/linux/page-flags.h --- 25/include/linux/page-flags.h~s390-page_state-update Mon Mar 15 15:51:20 2004 +++ 25-akpm/include/linux/page-flags.h Mon Mar 15 15:51:20 2004 @@ -80,9 +80,6 @@ /* * Global page accounting. One instance per CPU. Only unsigned longs are * allowed. - * - * NOTE: if this structure is changed then mm/page_alloc.c and - * arch/s390/appldata/appldata_mem.c must be updated accordingly */ struct page_state { unsigned long nr_dirty; /* Dirty writeable pages */ _