From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: akpm@linux-foundation.org
Cc: peterz@infradead.org, mingo@kernel.org, davej@redhat.com,
sasha.levin@oracle.com, hughd@google.com, linux-mm@kvack.org,
linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Jeff Dike <jdike@addtoit.com>,
Richard Weinberger <richard@nod.at>
Subject: [PATCH 35/38] um: drop _PAGE_FILE and pte_file()-related helpers
Date: Wed, 24 Dec 2014 14:22:43 +0200 [thread overview]
Message-ID: <1419423766-114457-36-git-send-email-kirill.shutemov@linux.intel.com> (raw)
In-Reply-To: <1419423766-114457-1-git-send-email-kirill.shutemov@linux.intel.com>
We've replaced remap_file_pages(2) implementation with emulation.
Nobody creates non-linear mapping anymore.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
---
arch/um/include/asm/pgtable-2level.h | 9 ---------
arch/um/include/asm/pgtable-3level.h | 20 --------------------
arch/um/include/asm/pgtable.h | 9 ---------
3 files changed, 38 deletions(-)
diff --git a/arch/um/include/asm/pgtable-2level.h b/arch/um/include/asm/pgtable-2level.h
index f534b73e753e..7afe86035fa7 100644
--- a/arch/um/include/asm/pgtable-2level.h
+++ b/arch/um/include/asm/pgtable-2level.h
@@ -41,13 +41,4 @@ static inline void pgd_mkuptodate(pgd_t pgd) { }
#define pfn_pte(pfn, prot) __pte(pfn_to_phys(pfn) | pgprot_val(prot))
#define pfn_pmd(pfn, prot) __pmd(pfn_to_phys(pfn) | pgprot_val(prot))
-/*
- * Bits 0 through 4 are taken
- */
-#define PTE_FILE_MAX_BITS 27
-
-#define pte_to_pgoff(pte) (pte_val(pte) >> 5)
-
-#define pgoff_to_pte(off) ((pte_t) { ((off) << 5) + _PAGE_FILE })
-
#endif
diff --git a/arch/um/include/asm/pgtable-3level.h b/arch/um/include/asm/pgtable-3level.h
index 0032f9212e74..344c559c0a17 100644
--- a/arch/um/include/asm/pgtable-3level.h
+++ b/arch/um/include/asm/pgtable-3level.h
@@ -112,25 +112,5 @@ static inline pmd_t pfn_pmd(pfn_t page_nr, pgprot_t pgprot)
return __pmd((page_nr << PAGE_SHIFT) | pgprot_val(pgprot));
}
-/*
- * Bits 0 through 3 are taken in the low part of the pte,
- * put the 32 bits of offset into the high part.
- */
-#define PTE_FILE_MAX_BITS 32
-
-#ifdef CONFIG_64BIT
-
-#define pte_to_pgoff(p) ((p).pte >> 32)
-
-#define pgoff_to_pte(off) ((pte_t) { ((off) << 32) | _PAGE_FILE })
-
-#else
-
-#define pte_to_pgoff(pte) ((pte).pte_high)
-
-#define pgoff_to_pte(off) ((pte_t) { _PAGE_FILE, (off) })
-
-#endif
-
#endif
diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h
index bf974f712af7..2324b624f195 100644
--- a/arch/um/include/asm/pgtable.h
+++ b/arch/um/include/asm/pgtable.h
@@ -18,7 +18,6 @@
#define _PAGE_ACCESSED 0x080
#define _PAGE_DIRTY 0x100
/* If _PAGE_PRESENT is clear, we use these: */
-#define _PAGE_FILE 0x008 /* nonlinear file mapping, saved PTE; unset:swap */
#define _PAGE_PROTNONE 0x010 /* if the user mapped it with PROT_NONE;
pte_present gives true */
@@ -151,14 +150,6 @@ static inline int pte_write(pte_t pte)
!(pte_get_bits(pte, _PAGE_PROTNONE)));
}
-/*
- * The following only works if pte_present() is not true.
- */
-static inline int pte_file(pte_t pte)
-{
- return pte_get_bits(pte, _PAGE_FILE);
-}
-
static inline int pte_dirty(pte_t pte)
{
return pte_get_bits(pte, _PAGE_DIRTY);
--
2.1.3
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: akpm@linux-foundation.org
Cc: peterz@infradead.org, mingo@kernel.org, davej@redhat.com,
sasha.levin@oracle.com, hughd@google.com, linux-mm@kvack.org,
linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Jeff Dike <jdike@addtoit.com>,
Richard Weinberger <richard@nod.at>
Subject: [PATCH 35/38] um: drop _PAGE_FILE and pte_file()-related helpers
Date: Wed, 24 Dec 2014 14:22:43 +0200 [thread overview]
Message-ID: <1419423766-114457-36-git-send-email-kirill.shutemov@linux.intel.com> (raw)
Message-ID: <20141224122243.FzY4jAn-FALzPPSpxLKupvfxdrRuLkmWwXJyOo5VZ40@z> (raw)
In-Reply-To: <1419423766-114457-1-git-send-email-kirill.shutemov@linux.intel.com>
We've replaced remap_file_pages(2) implementation with emulation.
Nobody creates non-linear mapping anymore.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
---
arch/um/include/asm/pgtable-2level.h | 9 ---------
arch/um/include/asm/pgtable-3level.h | 20 --------------------
arch/um/include/asm/pgtable.h | 9 ---------
3 files changed, 38 deletions(-)
diff --git a/arch/um/include/asm/pgtable-2level.h b/arch/um/include/asm/pgtable-2level.h
index f534b73e753e..7afe86035fa7 100644
--- a/arch/um/include/asm/pgtable-2level.h
+++ b/arch/um/include/asm/pgtable-2level.h
@@ -41,13 +41,4 @@ static inline void pgd_mkuptodate(pgd_t pgd) { }
#define pfn_pte(pfn, prot) __pte(pfn_to_phys(pfn) | pgprot_val(prot))
#define pfn_pmd(pfn, prot) __pmd(pfn_to_phys(pfn) | pgprot_val(prot))
-/*
- * Bits 0 through 4 are taken
- */
-#define PTE_FILE_MAX_BITS 27
-
-#define pte_to_pgoff(pte) (pte_val(pte) >> 5)
-
-#define pgoff_to_pte(off) ((pte_t) { ((off) << 5) + _PAGE_FILE })
-
#endif
diff --git a/arch/um/include/asm/pgtable-3level.h b/arch/um/include/asm/pgtable-3level.h
index 0032f9212e74..344c559c0a17 100644
--- a/arch/um/include/asm/pgtable-3level.h
+++ b/arch/um/include/asm/pgtable-3level.h
@@ -112,25 +112,5 @@ static inline pmd_t pfn_pmd(pfn_t page_nr, pgprot_t pgprot)
return __pmd((page_nr << PAGE_SHIFT) | pgprot_val(pgprot));
}
-/*
- * Bits 0 through 3 are taken in the low part of the pte,
- * put the 32 bits of offset into the high part.
- */
-#define PTE_FILE_MAX_BITS 32
-
-#ifdef CONFIG_64BIT
-
-#define pte_to_pgoff(p) ((p).pte >> 32)
-
-#define pgoff_to_pte(off) ((pte_t) { ((off) << 32) | _PAGE_FILE })
-
-#else
-
-#define pte_to_pgoff(pte) ((pte).pte_high)
-
-#define pgoff_to_pte(off) ((pte_t) { _PAGE_FILE, (off) })
-
-#endif
-
#endif
diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h
index bf974f712af7..2324b624f195 100644
--- a/arch/um/include/asm/pgtable.h
+++ b/arch/um/include/asm/pgtable.h
@@ -18,7 +18,6 @@
#define _PAGE_ACCESSED 0x080
#define _PAGE_DIRTY 0x100
/* If _PAGE_PRESENT is clear, we use these: */
-#define _PAGE_FILE 0x008 /* nonlinear file mapping, saved PTE; unset:swap */
#define _PAGE_PROTNONE 0x010 /* if the user mapped it with PROT_NONE;
pte_present gives true */
@@ -151,14 +150,6 @@ static inline int pte_write(pte_t pte)
!(pte_get_bits(pte, _PAGE_PROTNONE)));
}
-/*
- * The following only works if pte_present() is not true.
- */
-static inline int pte_file(pte_t pte)
-{
- return pte_get_bits(pte, _PAGE_FILE);
-}
-
static inline int pte_dirty(pte_t pte)
{
return pte_get_bits(pte, _PAGE_DIRTY);
--
2.1.3
next prev parent reply other threads:[~2014-12-24 12:22 UTC|newest]
Thread overview: 110+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-24 12:22 [PATCH 00/38] mm: remove non-linear mess Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 01/38] mm: drop support of non-linear mapping from unmap/zap codepath Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 02/38] mm: drop support of non-linear mapping from fault codepath Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 03/38] mm: drop vm_ops->remap_pages and generic_file_remap_pages() stub Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 04/38] proc: drop handling non-linear mappings Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 05/38] rmap: drop support of " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 06/38] mm: replace vma->sharead.linear with vma->shared Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 07/38] mm: remove rest usage of VM_NONLINEAR and pte_file() Kirill A. Shutemov
2014-12-24 14:02 ` [PATCHv2 " Kirill A. Shutemov
2014-12-24 14:02 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 08/38] asm-generic: drop unused pte_file* helpers Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 09/38] alpha: drop _PAGE_FILE and pte_file()-related helpers Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 10/38] arc: " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:29 ` Vineet Gupta
2014-12-24 12:29 ` Vineet Gupta
2014-12-24 12:22 ` [PATCH 11/38] arm64: drop PTE_FILE " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 17:23 ` Catalin Marinas
2014-12-24 17:23 ` Catalin Marinas
2014-12-24 12:22 ` [PATCH 12/38] arm: drop L_PTE_FILE " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 13/38] avr32: drop _PAGE_FILE " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 14:15 ` Hans-Christian Egtvedt
2014-12-24 14:15 ` Hans-Christian Egtvedt
2014-12-24 12:22 ` [PATCH 14/38] blackfin: drop pte_file() Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 15/38] c6x: " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 14:08 ` Mark Salter
2014-12-24 14:08 ` Mark Salter
2014-12-24 12:22 ` [PATCH 16/38] cris: drop _PAGE_FILE and pte_file()-related helpers Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 17/38] frv: " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 18/38] hexagon: " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 19/38] ia64: " Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 20/38] m32r: " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 21/38] m68k: " Kirill A. Shutemov
2014-12-29 12:16 ` [PATCHv2 " Kirill A. Shutemov
2014-12-29 12:16 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 22/38] metag: " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2015-01-02 16:03 ` James Hogan
2015-01-02 16:03 ` James Hogan
2014-12-24 12:22 ` [PATCH 23/38] microblaze: " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 24/38] mips: " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-25 10:08 ` Geert Uytterhoeven
2014-12-25 10:08 ` Geert Uytterhoeven
2014-12-25 10:18 ` Kirill A. Shutemov
2014-12-25 10:18 ` Kirill A. Shutemov
2014-12-29 12:17 ` [PATCHv2 " Kirill A. Shutemov
2014-12-29 12:17 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 25/38] mn10300: " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 26/38] nios2: " Kirill A. Shutemov
2014-12-25 12:30 ` Tobias Klauser
2014-12-26 5:52 ` Ley Foon Tan
2014-12-26 5:52 ` Ley Foon Tan
2014-12-24 12:22 ` [PATCH 27/38] openrisc: " Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 28/38] parisc: " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 29/38] powerpc: " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2015-01-05 5:03 ` Michael Ellerman
2014-12-24 12:22 ` [PATCH 30/38] s390: drop " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-29 10:07 ` Martin Schwidefsky
2014-12-29 10:37 ` Kirill A. Shutemov
2014-12-29 10:37 ` Kirill A. Shutemov
2014-12-30 10:55 ` Martin Schwidefsky
2014-12-30 10:55 ` Martin Schwidefsky
2014-12-24 12:22 ` [PATCH 31/38] score: drop _PAGE_FILE and " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 32/38] sh: " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 14:05 ` [PATCH] " Kirill A. Shutemov
2014-12-24 14:05 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 33/38] sparc: drop " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-25 23:34 ` David Miller
2014-12-24 12:22 ` [PATCH 34/38] tile: " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-25 2:57 ` Chris Metcalf
2014-12-25 2:57 ` Chris Metcalf
2014-12-24 12:22 ` Kirill A. Shutemov [this message]
2014-12-24 12:22 ` [PATCH 35/38] um: drop _PAGE_FILE and " Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 36/38] unicore32: drop " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 37/38] x86: drop _PAGE_FILE and " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-24 12:22 ` [PATCH 38/38] xtensa: " Kirill A. Shutemov
2014-12-24 12:22 ` Kirill A. Shutemov
2014-12-25 10:25 ` Max Filippov
2014-12-25 10:25 ` Max Filippov
2014-12-26 21:10 ` [PATCH 00/38] mm: remove non-linear mess Felipe Balbi
2014-12-26 21:10 ` Felipe Balbi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1419423766-114457-36-git-send-email-kirill.shutemov@linux.intel.com \
--to=kirill.shutemov@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=davej@redhat.com \
--cc=hughd@google.com \
--cc=jdike@addtoit.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=richard@nod.at \
--cc=sasha.levin@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).