public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Jes Sorensen <jes@wildopensource.com>
Cc: hch@infradead.org, linux-ia64@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [patch -mm series] ia64 specific /dev/mem handlers
Date: Thu, 10 Mar 2005 06:55:16 +0000	[thread overview]
Message-ID: <20050309225516.55195ddc.akpm@osdl.org> (raw)
In-Reply-To: <yq0k6oydjjv.fsf@jaguar.mkp.net>

Jes Sorensen <jes@wildopensource.com> wrote:
>
> Convert /dev/mem read/write calls to use arch_translate_mem_ptr if
>  available. Needed on ia64 for pages converted fo uncached mappings to
>  avoid it being accessed in cached mode after the conversion which can
>  lead to memory corruption. Introduces PG_uncached page flag for
>  marking pages uncached.

For some reason this patch still gives me the creeps.  Maybe it's because
we lose a page flag for something so obscure.

Nothing ever clears PG_uncached.  We'll end up with every page in the
machine marked as being uncached.

But then, nothing ever sets PG_uncached, either.  Is there some patch which
you're hiding from me?

If a page is marked uncached then it'll remain marked as uncached even
after it's unmapped.  Or will it?  Would like to see the other patch, please.

We should add PG_uncached checks to the page allocator.  Is this OK?


--- 25/mm/page_alloc.c~ia64-specific-dev-mem-handlers-checks	2005-03-09 22:53:12.000000000 -0800
+++ 25-akpm/mm/page_alloc.c	2005-03-09 22:53:44.000000000 -0800
@@ -108,6 +108,7 @@ static void bad_page(const char *functio
 			1 << PG_active	|
 			1 << PG_dirty	|
 			1 << PG_swapcache |
+			1 << PG_uncached |
 			1 << PG_writeback);
 	set_page_count(page, 0);
 	reset_page_mapcount(page);
@@ -321,6 +322,7 @@ static inline void free_pages_check(cons
 			1 << PG_reclaim	|
 			1 << PG_slab	|
 			1 << PG_swapcache |
+			1 << PG_uncached |
 			1 << PG_writeback )))
 		bad_page(function, page);
 	if (PageDirty(page))
@@ -446,6 +448,7 @@ static void prep_new_page(struct page *p
 			1 << PG_dirty	|
 			1 << PG_reclaim	|
 			1 << PG_swapcache |
+			1 << PG_uncached |
 			1 << PG_writeback )))
 		bad_page(__FUNCTION__, page);
 
_


  reply	other threads:[~2005-03-10  6:55 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-22  9:52 [patch -mm series] ia64 specific /dev/mem handlers Jes Sorensen
2005-02-22 10:03 ` Andrew Morton
2005-02-22 12:08   ` Andi Kleen
2005-02-22 14:41   ` Jes Sorensen
2005-02-22 17:52     ` Matthew Wilcox
2005-02-22 19:25       ` Andrew Morton
2005-02-22 19:35         ` Dave Hansen
2005-02-22 21:38           ` Jes Sorensen
2005-02-23  0:48             ` Dave Hansen
2005-02-22 21:34         ` Jes Sorensen
2005-02-22 22:39         ` Jes Sorensen
2005-02-22 23:34           ` Andrew Morton
2005-02-23 10:01             ` Jes Sorensen
2005-02-23 22:34               ` Christoph Hellwig
2005-02-24 16:11                 ` Jes Sorensen
2005-03-10  6:55                   ` Andrew Morton [this message]
2005-03-10 13:49                     ` Jes Sorensen
2005-02-22 18:05 ` Luck, Tony
2005-02-22 22:03 ` Arjan van de Ven
2005-02-22 22:30   ` Jes Sorensen
2005-02-22 22:42     ` Arjan van de Ven
2005-02-23  8:12       ` Jes Sorensen
2005-02-23  8:24         ` Arjan van de Ven
2005-03-03 11:37 ` Andrew Morton
2005-03-03 12:53   ` Jes Sorensen
2005-03-04 12:26     ` Jes Sorensen

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=20050309225516.55195ddc.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=hch@infradead.org \
    --cc=jes@wildopensource.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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