s390/appldata_os: fix cpu array size calculation
authorGerald Schaefer <gerald.schaefer@de.ibm.com>
Fri, 28 Feb 2014 16:35:52 +0000 (17:35 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 7 Mar 2014 14:25:55 +0000 (15:25 +0100)
commit6967037baf08860407d275fdd6475d2ee41bd9b7
treeab24cabaa559374fc43afcdbb1ddf97166aff655
parentd72d2bb5a6bc85af77a9f969687c74ea00cdcc99
s390/appldata_os: fix cpu array size calculation

The cpu array size calculation uses the NR_CPUS config option, which
was recently increased from 64 to 256. With a value of 256, the cpu
array will no longer fit into one APPLDATA record and loading the
appldata_os module fails with the following error:
could not insert 'appldata_os': Cannot allocate memory

Use num_possible_cpus() instead of NR_CPUS. For z/VM, this will still
result in a value of 64. This is not true for LPAR, but the appldata
feature is not available for LPAR.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/appldata/appldata_os.c