Commit 7fbc5e2
committed
memblock: extract page freeing from free_reserved_area() into a helper
There are two functions that release pages to the buddy allocator late in
the boot: free_reserved_area() and memblock_free_late().
Currently they are using different underlying functionality,
free_reserved_area() runs each page being freed via free_reserved_page()
and memblock_free_late() uses memblock_free_pages() -> __free_pages_core(),
but in the end they both boil down to a loop that frees a range page by
page.
Extract the loop frees pages from free_reserved_area() into a helper and
use that helper in memblock_free_late().
Link: https://patch.msgid.link/20260323074836.3653702-7-rppt@kernel.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>1 parent b8de957 commit 7fbc5e2
1 file changed
Lines changed: 29 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
894 | 894 | | |
895 | 895 | | |
896 | 896 | | |
897 | | - | |
| 897 | + | |
| 898 | + | |
898 | 899 | | |
899 | | - | |
900 | 900 | | |
901 | 901 | | |
902 | | - | |
903 | | - | |
904 | | - | |
905 | | - | |
906 | | - | |
907 | | - | |
908 | | - | |
909 | | - | |
910 | | - | |
911 | | - | |
912 | | - | |
913 | | - | |
914 | | - | |
915 | | - | |
916 | | - | |
| 902 | + | |
917 | 903 | | |
918 | 904 | | |
919 | 905 | | |
| |||
935 | 921 | | |
936 | 922 | | |
937 | 923 | | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
938 | 945 | | |
| 946 | + | |
939 | 947 | | |
940 | 948 | | |
941 | 949 | | |
| |||
1811 | 1819 | | |
1812 | 1820 | | |
1813 | 1821 | | |
1814 | | - | |
| 1822 | + | |
1815 | 1823 | | |
1816 | | - | |
1817 | 1824 | | |
1818 | 1825 | | |
1819 | | - | |
1820 | | - | |
1821 | | - | |
1822 | 1826 | | |
1823 | | - | |
1824 | | - | |
1825 | | - | |
1826 | | - | |
| 1827 | + | |
| 1828 | + | |
1827 | 1829 | | |
| 1830 | + | |
1828 | 1831 | | |
1829 | 1832 | | |
1830 | 1833 | | |
| |||
0 commit comments