Skip to content

Commit e359b70

Browse files
DerDakonhdeller
authored andcommitted
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 <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent 9536374 commit e359b70

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

drivers/parisc/iosapic.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -221,16 +221,7 @@ static size_t irt_num_entry;
221221

222222
static struct irt_entry *iosapic_alloc_irt(int num_entries)
223223
{
224-
unsigned long a;
225-
226-
/* The IRT needs to be 8-byte aligned for the PDC call.
227-
* Normally kmalloc would guarantee larger alignment, but
228-
* if CONFIG_DEBUG_SLAB is enabled, then we can get only
229-
* 4-byte alignment on 32-bit kernels
230-
*/
231-
a = (unsigned long)kmalloc(sizeof(struct irt_entry) * num_entries + 8, GFP_KERNEL);
232-
a = (a + 7UL) & ~7UL;
233-
return (struct irt_entry *)a;
224+
return kcalloc(num_entries, sizeof(struct irt_entry), GFP_KERNEL);
234225
}
235226

236227
/**

0 commit comments

Comments
 (0)