diff options
author | Thomas Richter <tmricht@linux.ibm.com> | 2020-01-03 11:37:12 +0100 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2020-01-22 13:05:35 +0100 |
commit | ee09c91480b10f306bfd1856776f673b4efe68a5 (patch) | |
tree | 454583c321687efe601adbcf1a59f0dff0358d9e /arch/s390/kernel | |
parent | 32dab6828c42f087439d3e2617dc7283546bd8f7 (diff) | |
download | linux-ee09c91480b10f306bfd1856776f673b4efe68a5.tar.bz2 |
s390/cpum_sf: Use DIV_ROUND_UP
Use macro DIV_ROUND_UP() for calculation of number of SDBT
SDBT pages required for index pages. This macro is already
used throughout the file.
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/perf_cpum_sf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/perf_cpum_sf.c b/arch/s390/kernel/perf_cpum_sf.c index 7dec1fb1e8b9..b095b1c78987 100644 --- a/arch/s390/kernel/perf_cpum_sf.c +++ b/arch/s390/kernel/perf_cpum_sf.c @@ -1716,7 +1716,7 @@ static void *aux_buffer_setup(struct perf_event *event, void **pages, sfb = &aux->sfb; /* Allocate sdbt_index for fast reference */ - n_sdbt = (nr_pages + CPUM_SF_SDB_PER_TABLE - 1) / CPUM_SF_SDB_PER_TABLE; + n_sdbt = DIV_ROUND_UP(nr_pages, CPUM_SF_SDB_PER_TABLE); aux->sdbt_index = kmalloc_array(n_sdbt, sizeof(void *), GFP_KERNEL); if (!aux->sdbt_index) goto no_sdbt_index; |