.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * PS3 Logical Performance Monitor. |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2007 Sony Computer Entertainment Inc. |
---|
5 | 6 | * Copyright 2007 Sony Corp. |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or modify |
---|
8 | | - * it under the terms of the GNU General Public License as published by |
---|
9 | | - * the Free Software Foundation; version 2 of the License. |
---|
10 | | - * |
---|
11 | | - * This program is distributed in the hope that it will be useful, |
---|
12 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | | - * GNU General Public License for more details. |
---|
15 | | - * |
---|
16 | | - * You should have received a copy of the GNU General Public License |
---|
17 | | - * along with this program; if not, write to the Free Software |
---|
18 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
19 | 7 | */ |
---|
20 | 8 | |
---|
21 | 9 | #include <linux/slab.h> |
---|
.. | .. |
---|
1108 | 1096 | lpm_priv->tb_cache_internal = NULL; |
---|
1109 | 1097 | lpm_priv->tb_cache = NULL; |
---|
1110 | 1098 | } else if (tb_cache) { |
---|
1111 | | - if (tb_cache != (void *)_ALIGN_UP((unsigned long)tb_cache, 128) |
---|
1112 | | - || tb_cache_size != _ALIGN_UP(tb_cache_size, 128)) { |
---|
| 1099 | + if (tb_cache != (void *)ALIGN((unsigned long)tb_cache, 128) |
---|
| 1100 | + || tb_cache_size != ALIGN(tb_cache_size, 128)) { |
---|
1113 | 1101 | dev_err(sbd_core(), "%s:%u: unaligned tb_cache\n", |
---|
1114 | 1102 | __func__, __LINE__); |
---|
1115 | 1103 | result = -EINVAL; |
---|
.. | .. |
---|
1123 | 1111 | lpm_priv->tb_cache_internal = kzalloc( |
---|
1124 | 1112 | lpm_priv->tb_cache_size + 127, GFP_KERNEL); |
---|
1125 | 1113 | if (!lpm_priv->tb_cache_internal) { |
---|
1126 | | - dev_err(sbd_core(), "%s:%u: alloc internal tb_cache " |
---|
1127 | | - "failed\n", __func__, __LINE__); |
---|
1128 | 1114 | result = -ENOMEM; |
---|
1129 | 1115 | goto fail_malloc; |
---|
1130 | 1116 | } |
---|
1131 | | - lpm_priv->tb_cache = (void *)_ALIGN_UP( |
---|
| 1117 | + lpm_priv->tb_cache = (void *)ALIGN( |
---|
1132 | 1118 | (unsigned long)lpm_priv->tb_cache_internal, 128); |
---|
1133 | 1119 | } |
---|
1134 | 1120 | |
---|