Commit 8ff5d8f
committed
powerpc: opal-core: pair alloc_pages_exact() with free_pages_exact()
opal-core allocates buffers with alloc_pages_exact(), but then
marks them as reserved and frees using free_reserved_area().
This is completely unnecessary and the pages allocated with
alloc_pages_exact() can be naturally freed with free_pages_exact().
Replace freeing of memory in opalcore_cleanup() with
free_pages_exact() and simplify allocation code so that it won't mark
allocated pages as reserved.
Link: https://patch.msgid.link/20260323074836.3653702-4-rppt@kernel.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>1 parent 25ee3af commit 8ff5d8f
1 file changed
Lines changed: 1 addition & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
307 | 306 | | |
308 | 307 | | |
309 | 308 | | |
| |||
328 | 327 | | |
329 | 328 | | |
330 | 329 | | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | 330 | | |
337 | 331 | | |
338 | 332 | | |
| |||
437 | 431 | | |
438 | 432 | | |
439 | 433 | | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
| 434 | + | |
444 | 435 | | |
445 | 436 | | |
446 | 437 | | |
| |||
0 commit comments