From: Pete Zaitcev <zaitcev@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: zaitcev@redhat.com
Subject: Small problem with pmd_page in 2.5
Date: Sun, 4 Aug 2002 12:57:30 -0400 [thread overview]
Message-ID: <20020804125730.A1113@devserv.devel.redhat.com> (raw)
Greetings:
I was looking a little bit at sparc(32) and ran into a difficulty
with pmd_page. The 2.5 version returns struct page*, presumably
to support page tables in highmem. Unfortunately, sparc (sun4m
actually) cannot do that, because its page tables are smaller
than memory pages.
This is the only code fragment that makes use of pmd_page:
mm/memory.c:
static inline void free_one_pmd(mmu_gather_t *tlb, pmd_t * dir)
{
struct page *pte;
if (pmd_none(*dir))
return;
if (pmd_bad(*dir)) {
pmd_ERROR(*dir);
pmd_clear(dir);
return;
}
pte = pmd_page(*dir);
pmd_clear(dir);
pte_free_tlb(tlb, pte);
}
Has anyone got an idea how to fix this? I've got some, but all seem bad:
a) Use 2 lower bits of the page pointer to store an index and
have pte_free to mask it out (possibly change pmd_page to return void*),
b) Map the page table temporarily in pmd_page,
c) Create a new architecture function pmd_zap which contains
the sequence { tmp = pmd_page(); pmd_clear(); pte_free_tlb(tmp); }
on all architectures except sparc,
d) Copy *dir into tmp instead of pte as we do now explicitly,
if that can work, say, on s390
-- Pete
next reply other threads:[~2002-08-04 16:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-04 16:57 Pete Zaitcev [this message]
2002-08-04 18:08 ` Small problem with pmd_page in 2.5 Russell King
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=20020804125730.A1113@devserv.devel.redhat.com \
--to=zaitcev@redhat.com \
--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