linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mm/page_ext: Trivial cleanups
@ 2018-05-31 13:54 Kirill A. Shutemov
  2018-05-31 13:54 ` [PATCH 1/2] mm/page_ext: Drop definition of unused PAGE_EXT_DEBUG_POISON Kirill A. Shutemov
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Kirill A. Shutemov @ 2018-05-31 13:54 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, linux-kernel, Kirill A. Shutemov

A pair of trivial cleanups in preparation for memory encryption.

Kirill A. Shutemov (2):
  mm/page_ext: Drop definition of unused PAGE_EXT_DEBUG_POISON
  mm/page_ext: Constify lookup_page_ext() argument

 include/linux/page_ext.h | 15 ++-------------
 mm/page_ext.c            |  4 ++--
 2 files changed, 4 insertions(+), 15 deletions(-)

-- 
2.17.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] mm/page_ext: Drop definition of unused PAGE_EXT_DEBUG_POISON
  2018-05-31 13:54 [PATCH 0/2] mm/page_ext: Trivial cleanups Kirill A. Shutemov
@ 2018-05-31 13:54 ` Kirill A. Shutemov
  2018-05-31 13:54 ` [PATCH 2/2] mm/page_ext: Constify lookup_page_ext() argument Kirill A. Shutemov
  2018-06-11 14:34 ` [PATCH 0/2] mm/page_ext: Trivial cleanups Kirill A. Shutemov
  2 siblings, 0 replies; 5+ messages in thread
From: Kirill A. Shutemov @ 2018-05-31 13:54 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, linux-kernel, Kirill A. Shutemov

After bd33ef368135 ("mm: enable page poisoning early at boot")
PAGE_EXT_DEBUG_POISON is not longer used. Remove it.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reviewed-by: Vinayak Menon <vinmenon@codeaurora.org>
---
 include/linux/page_ext.h | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/include/linux/page_ext.h b/include/linux/page_ext.h
index ca5461efae2f..bbec618a614b 100644
--- a/include/linux/page_ext.h
+++ b/include/linux/page_ext.h
@@ -16,18 +16,7 @@ struct page_ext_operations {
 
 #ifdef CONFIG_PAGE_EXTENSION
 
-/*
- * page_ext->flags bits:
- *
- * PAGE_EXT_DEBUG_POISON is set for poisoned pages. This is used to
- * implement generic debug pagealloc feature. The pages are filled with
- * poison patterns and set this flag after free_pages(). The poisoned
- * pages are verified whether the patterns are not corrupted and clear
- * the flag before alloc_pages().
- */
-
 enum page_ext_flags {
-	PAGE_EXT_DEBUG_POISON,		/* Page is poisoned */
 	PAGE_EXT_DEBUG_GUARD,
 	PAGE_EXT_OWNER,
 #if defined(CONFIG_IDLE_PAGE_TRACKING) && !defined(CONFIG_64BIT)
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] mm/page_ext: Constify lookup_page_ext() argument
  2018-05-31 13:54 [PATCH 0/2] mm/page_ext: Trivial cleanups Kirill A. Shutemov
  2018-05-31 13:54 ` [PATCH 1/2] mm/page_ext: Drop definition of unused PAGE_EXT_DEBUG_POISON Kirill A. Shutemov
@ 2018-05-31 13:54 ` Kirill A. Shutemov
  2018-06-11 14:34 ` [PATCH 0/2] mm/page_ext: Trivial cleanups Kirill A. Shutemov
  2 siblings, 0 replies; 5+ messages in thread
From: Kirill A. Shutemov @ 2018-05-31 13:54 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, linux-kernel, Kirill A. Shutemov

lookup_page_ext() finds 'struct page_ext' for a given page. It requires
only read access to the given struct page.

Current implemnentation takes 'struct page *' as an argument. It makes
compiler complain when 'const struct page *' passed.

Change the argument to 'const struct page *'.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 include/linux/page_ext.h | 4 ++--
 mm/page_ext.c            | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/page_ext.h b/include/linux/page_ext.h
index bbec618a614b..f84f167ec04c 100644
--- a/include/linux/page_ext.h
+++ b/include/linux/page_ext.h
@@ -50,7 +50,7 @@ static inline void page_ext_init(void)
 }
 #endif
 
-struct page_ext *lookup_page_ext(struct page *page);
+struct page_ext *lookup_page_ext(const struct page *page);
 
 #else /* !CONFIG_PAGE_EXTENSION */
 struct page_ext;
@@ -59,7 +59,7 @@ static inline void pgdat_page_ext_init(struct pglist_data *pgdat)
 {
 }
 
-static inline struct page_ext *lookup_page_ext(struct page *page)
+static inline struct page_ext *lookup_page_ext(const struct page *page)
 {
 	return NULL;
 }
diff --git a/mm/page_ext.c b/mm/page_ext.c
index 5295ef331165..a9826da84ccb 100644
--- a/mm/page_ext.c
+++ b/mm/page_ext.c
@@ -120,7 +120,7 @@ void __meminit pgdat_page_ext_init(struct pglist_data *pgdat)
 	pgdat->node_page_ext = NULL;
 }
 
-struct page_ext *lookup_page_ext(struct page *page)
+struct page_ext *lookup_page_ext(const struct page *page)
 {
 	unsigned long pfn = page_to_pfn(page);
 	unsigned long index;
@@ -195,7 +195,7 @@ void __init page_ext_init_flatmem(void)
 
 #else /* CONFIG_FLAT_NODE_MEM_MAP */
 
-struct page_ext *lookup_page_ext(struct page *page)
+struct page_ext *lookup_page_ext(const struct page *page)
 {
 	unsigned long pfn = page_to_pfn(page);
 	struct mem_section *section = __pfn_to_section(pfn);
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] mm/page_ext: Trivial cleanups
  2018-05-31 13:54 [PATCH 0/2] mm/page_ext: Trivial cleanups Kirill A. Shutemov
  2018-05-31 13:54 ` [PATCH 1/2] mm/page_ext: Drop definition of unused PAGE_EXT_DEBUG_POISON Kirill A. Shutemov
  2018-05-31 13:54 ` [PATCH 2/2] mm/page_ext: Constify lookup_page_ext() argument Kirill A. Shutemov
@ 2018-06-11 14:34 ` Kirill A. Shutemov
  2018-06-11 22:47   ` Andrew Morton
  2 siblings, 1 reply; 5+ messages in thread
From: Kirill A. Shutemov @ 2018-06-11 14:34 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, linux-kernel

On Thu, May 31, 2018 at 01:54:55PM +0000, Kirill A. Shutemov wrote:
> A pair of trivial cleanups in preparation for memory encryption.

Andrew, can we get these applied?

-- 
 Kirill A. Shutemov

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] mm/page_ext: Trivial cleanups
  2018-06-11 14:34 ` [PATCH 0/2] mm/page_ext: Trivial cleanups Kirill A. Shutemov
@ 2018-06-11 22:47   ` Andrew Morton
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2018-06-11 22:47 UTC (permalink / raw)
  To: Kirill A. Shutemov; +Cc: linux-mm, linux-kernel

On Mon, 11 Jun 2018 17:34:15 +0300 "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> wrote:

> On Thu, May 31, 2018 at 01:54:55PM +0000, Kirill A. Shutemov wrote:
> > A pair of trivial cleanups in preparation for memory encryption.
> 
> Andrew, can we get these applied?
> 

Mid-merge-window is not a good time to be looking at trivial cleanups. 
They're in my to-look-at pile.  Later this week, maybe next week.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-06-11 22:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-31 13:54 [PATCH 0/2] mm/page_ext: Trivial cleanups Kirill A. Shutemov
2018-05-31 13:54 ` [PATCH 1/2] mm/page_ext: Drop definition of unused PAGE_EXT_DEBUG_POISON Kirill A. Shutemov
2018-05-31 13:54 ` [PATCH 2/2] mm/page_ext: Constify lookup_page_ext() argument Kirill A. Shutemov
2018-06-11 14:34 ` [PATCH 0/2] mm/page_ext: Trivial cleanups Kirill A. Shutemov
2018-06-11 22:47   ` Andrew Morton

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).