Skip to content

Commit

Permalink
s390/mm: remove unused cmma functions
Browse files Browse the repository at this point in the history
The last user of arch_set_page_states(), arch_set_page_nodat() and
arch_test_page_nodat() was removed in commit 3942162
("s390: remove broken hibernate / power management support"),
let's remove these functions.

Signed-off-by: David Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/r/20210806075430.6103-1-david@redhat.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
  • Loading branch information
David Hildenbrand authored and Vasily Gorbik committed Aug 18, 2021
1 parent 9f79b54 commit cf6031d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 46 deletions.
3 changes: 0 additions & 3 deletions arch/s390/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ struct page;
void arch_free_page(struct page *page, int order);
void arch_alloc_page(struct page *page, int order);
void arch_set_page_dat(struct page *page, int order);
void arch_set_page_nodat(struct page *page, int order);
int arch_test_page_nodat(struct page *page);
void arch_set_page_states(int make_stable);

static inline int devmem_is_allowed(unsigned long pfn)
{
Expand Down
43 changes: 0 additions & 43 deletions arch/s390/mm/page-states.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,46 +228,3 @@ void arch_set_page_dat(struct page *page, int order)
return;
set_page_stable_dat(page, order);
}

void arch_set_page_nodat(struct page *page, int order)
{
if (cmma_flag < 2)
return;
set_page_stable_nodat(page, order);
}

int arch_test_page_nodat(struct page *page)
{
unsigned char state;

if (cmma_flag < 2)
return 0;
state = get_page_state(page);
return !!(state & 0x20);
}

void arch_set_page_states(int make_stable)
{
unsigned long flags, order, t;
struct list_head *l;
struct page *page;
struct zone *zone;

if (!cmma_flag)
return;
if (make_stable)
drain_local_pages(NULL);
for_each_populated_zone(zone) {
spin_lock_irqsave(&zone->lock, flags);
for_each_migratetype_order(order, t) {
list_for_each(l, &zone->free_area[order].free_list[t]) {
page = list_entry(l, struct page, lru);
if (make_stable)
set_page_stable_dat(page, order);
else
set_page_unused(page, order);
}
}
spin_unlock_irqrestore(&zone->lock, flags);
}
}

0 comments on commit cf6031d

Please sign in to comment.