From: Russell King <rmk@arm.linux.org.uk>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: riel@nl.linux.org, linux-kernel@vger.rutgers.edu, linux-mm@kvack.org
Subject: Re: shm_alloc and friends
Date: Thu, 25 May 2000 16:20:10 +0100 (BST) [thread overview]
Message-ID: <200005251520.QAA02278@raistlin.arm.linux.org.uk> (raw)
In-Reply-To: <E12uz6w-0007xj-00@the-village.bc.nu> from "Alan Cox" at May 25, 2000 03:59:44 PM
Alan Cox writes:
> Use pte_clear. That is the only valid way to do it. Im not sure I follow why
> you cant use pte_clear in this case
pte_clear has other side effects on ARM, since we don't have enough bits in the
page tables to store all the bits that Linux needs. In fact, there are NO bits
in the page table entries which are not CPU defined.
Therefore, we have to store the CPU's version of the page pointers at ptep[0]
through to ptep[1023], and the kernel's version with all the associated flags
in ptep[-1024] through to ptep[-1].
pte_alloc and friends are aware of this because they are allocating page tables,
and pte_clear is supposed to be used on page tables.
SHM uses it on *pages* allocated from __get_free_page() and kmalloc, which are
not page tables.
Therefore, really SHM's use of pte_clear is a hack in the extreme, breaking the
architecture independence of the page table macros.
_____
|_____| ------------------------------------------------- ---+---+-
| | Russell King rmk@arm.linux.org.uk --- ---
| | | | http://www.arm.linux.org.uk/~rmk/aboutme.html / / |
| +-+-+ --- -+-
/ | THE developer of ARM Linux |+| /|\
/ | | | --- |
+-+-+ ------------------------------------------------- /\\\ |
--
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.eu.org/Linux-MM/
next prev parent reply other threads:[~2000-05-25 15:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-25 14:24 Russell King
2000-05-25 14:31 ` Alan Cox
2000-05-25 14:36 ` Russell King
2000-05-25 14:59 ` Alan Cox
2000-05-25 15:20 ` Russell King [this message]
2000-05-25 15:59 ` Alan Cox
2000-05-25 16:01 ` Benjamin C.R. LaHaise
2000-05-25 16:04 ` Russell King
2000-05-26 14:07 ` Eric W. Biederman
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=200005251520.QAA02278@raistlin.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=riel@nl.linux.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