blob: dd7a0277c5c0946b1a28973b2d0bebe510692591 [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001// SPDX-License-Identifier: GPL-2.0-only
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/*
3 * arch/arm/mm/hugetlbpage.c
4 *
5 * Copyright (C) 2012 ARM Ltd.
6 *
7 * Based on arch/x86/include/asm/hugetlb.h and Bill Carson's patches
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00008 */
9
10#include <linux/init.h>
11#include <linux/fs.h>
12#include <linux/mm.h>
13#include <linux/hugetlb.h>
14#include <linux/pagemap.h>
15#include <linux/err.h>
16#include <linux/sysctl.h>
17#include <asm/mman.h>
18#include <asm/tlb.h>
19#include <asm/tlbflush.h>
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000020
21/*
22 * On ARM, huge pages are backed by pmd's rather than pte's, so we do a lot
23 * of type casting from pmd_t * to pte_t *.
24 */
25
26int pud_huge(pud_t pud)
27{
28 return 0;
29}
30
31int pmd_huge(pmd_t pmd)
32{
33 return pmd_val(pmd) && !(pmd_val(pmd) & PMD_TABLE_BIT);
34}