diff options
author | Rolf Eike Beer <eike-kernel@sf-tec.de> | 2022-09-14 16:23:02 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2022-09-15 07:33:26 +0200 |
commit | e359b70cc1c51138e166bd4a560e5c5995369a99 (patch) | |
tree | 0154e848f18ae35541ca5ee9d96fb65bba05abbe | |
parent | 95363747a6f39e88a3052fcf6ce6237769495ce0 (diff) | |
download | lwn-e359b70cc1c51138e166bd4a560e5c5995369a99.tar.gz lwn-e359b70cc1c51138e166bd4a560e5c5995369a99.zip |
parisc: remove obsolete manual allocation aligning in iosapic
kmalloc() returns memory with __assume_kmalloc_alignment, which is
__alignof__(unsigned long long) for parisc.
Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r-- | drivers/parisc/iosapic.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c index 3a8c98615634..bdef7a8d6ab8 100644 --- a/drivers/parisc/iosapic.c +++ b/drivers/parisc/iosapic.c @@ -221,16 +221,7 @@ static size_t irt_num_entry; static struct irt_entry *iosapic_alloc_irt(int num_entries) { - unsigned long a; - - /* The IRT needs to be 8-byte aligned for the PDC call. - * Normally kmalloc would guarantee larger alignment, but - * if CONFIG_DEBUG_SLAB is enabled, then we can get only - * 4-byte alignment on 32-bit kernels - */ - a = (unsigned long)kmalloc(sizeof(struct irt_entry) * num_entries + 8, GFP_KERNEL); - a = (a + 7UL) & ~7UL; - return (struct irt_entry *)a; + return kcalloc(num_entries, sizeof(struct irt_entry), GFP_KERNEL); } /** |