Commit 625ba457 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] rmap build fix

From: William Lee Irwin III <wli@holomorphy.com>

PMD_SIZE is not a compile-time constant on sparc.  Use min() in there so
that the cluster size will be evaluated at runtime if the architecture
insists on doing that.
parent b1f5c118
......@@ -537,11 +537,7 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma)
* there there won't be many ptes located within the scan cluster. In this case
* maybe we could scan further - to the end of the pte page, perhaps.
*/
#define CLUSTER_SIZE (32 * PAGE_SIZE)
#if CLUSTER_SIZE > PMD_SIZE
#undef CLUSTER_SIZE
#define CLUSTER_SIZE PMD_SIZE
#endif
#define CLUSTER_SIZE min(32*PAGE_SIZE, PMD_SIZE)
#define CLUSTER_MASK (~(CLUSTER_SIZE - 1))
static int try_to_unmap_cluster(unsigned long cursor,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment