From: Hugh Dickins <hugh@veritas.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Jeff Dike <jdike@addtoit.com>, linux-kernel@vger.kernel.org
Subject: [PATCH 6/9] mm: uml kill unused
Date: Sat, 22 Oct 2005 17:27:01 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.61.0510221725560.18047@goblin.wat.veritas.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0510221716380.18047@goblin.wat.veritas.com>
In worrying over the various pte operations in different architectures,
I came across some unused functions in UML: remove mprotect_kernel_vm,
protect_vm_page and addr_pte.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
---
arch/um/include/tlb.h | 1 -
arch/um/kernel/tlb.c | 9 ---------
arch/um/kernel/tt/tlb.c | 36 ------------------------------------
3 files changed, 46 deletions(-)
--- mm5/arch/um/include/tlb.h 2005-10-11 12:07:16.000000000 +0100
+++ mm6/arch/um/include/tlb.h 2005-10-22 14:07:12.000000000 +0100
@@ -34,7 +34,6 @@ struct host_vm_op {
} u;
};
-extern void mprotect_kernel_vm(int w);
extern void force_flush_all(void);
extern void fix_range_common(struct mm_struct *mm, unsigned long start_addr,
unsigned long end_addr, int force,
--- mm5/arch/um/kernel/tlb.c 2005-10-11 12:07:16.000000000 +0100
+++ mm6/arch/um/kernel/tlb.c 2005-10-22 14:07:12.000000000 +0100
@@ -334,15 +334,6 @@ pte_t *pte_offset_proc(pmd_t *pmd, unsig
return(pte_offset_kernel(pmd, address));
}
-pte_t *addr_pte(struct task_struct *task, unsigned long addr)
-{
- pgd_t *pgd = pgd_offset(task->mm, addr);
- pud_t *pud = pud_offset(pgd, addr);
- pmd_t *pmd = pmd_offset(pud, addr);
-
- return(pte_offset_map(pmd, addr));
-}
-
void flush_tlb_page(struct vm_area_struct *vma, unsigned long address)
{
address &= PAGE_MASK;
--- mm5/arch/um/kernel/tt/tlb.c 2005-10-11 12:07:16.000000000 +0100
+++ mm6/arch/um/kernel/tt/tlb.c 2005-10-22 14:07:12.000000000 +0100
@@ -74,42 +74,6 @@ void flush_tlb_kernel_range_tt(unsigned
atomic_inc(&vmchange_seq);
}
-static void protect_vm_page(unsigned long addr, int w, int must_succeed)
-{
- int err;
-
- err = protect_memory(addr, PAGE_SIZE, 1, w, 1, must_succeed);
- if(err == 0) return;
- else if((err == -EFAULT) || (err == -ENOMEM)){
- flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
- protect_vm_page(addr, w, 1);
- }
- else panic("protect_vm_page : protect failed, errno = %d\n", err);
-}
-
-void mprotect_kernel_vm(int w)
-{
- struct mm_struct *mm;
- pgd_t *pgd;
- pud_t *pud;
- pmd_t *pmd;
- pte_t *pte;
- unsigned long addr;
-
- mm = &init_mm;
- for(addr = start_vm; addr < end_vm;){
- pgd = pgd_offset(mm, addr);
- pud = pud_offset(pgd, addr);
- pmd = pmd_offset(pud, addr);
- if(pmd_present(*pmd)){
- pte = pte_offset_kernel(pmd, addr);
- if(pte_present(*pte)) protect_vm_page(addr, w, 0);
- addr += PAGE_SIZE;
- }
- else addr += PMD_SIZE;
- }
-}
-
void flush_tlb_kernel_vm_tt(void)
{
flush_tlb_kernel_range(start_vm, end_vm);
next prev parent reply other threads:[~2005-10-22 16:28 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-22 16:18 [PATCH 0/9] mm: page fault scalability Hugh Dickins
2005-10-22 16:19 ` [PATCH 1/9] mm: i386 sh sh64 ready for split ptlock Hugh Dickins
2005-10-22 18:24 ` Paul Mundt
2005-10-22 16:22 ` [PATCH 2/9] mm: arm " Hugh Dickins
2005-10-22 17:02 ` Russell King
2005-10-23 8:27 ` Hugh Dickins
2005-10-25 2:45 ` Nicolas Pitre
2005-10-25 6:31 ` Hugh Dickins
2005-10-25 14:55 ` Nicolas Pitre
2005-10-25 7:55 ` Russell King
2005-10-25 15:00 ` Nicolas Pitre
2005-10-26 0:20 ` Russell King
2005-10-26 1:26 ` Nicolas Pitre
2005-10-31 22:19 ` Jesper Juhl
2005-10-31 22:27 ` Russell King
2005-10-31 22:34 ` Jesper Juhl
2005-10-31 22:50 ` Russell King
2005-10-22 16:23 ` [PATCH 3/9] mm: parisc pte atomicity Hugh Dickins
2005-10-22 16:33 ` Matthew Wilcox
2005-10-22 17:08 ` [parisc-linux] " James Bottomley
2005-10-23 9:02 ` Hugh Dickins
2005-10-23 15:05 ` James Bottomley
2005-10-24 4:36 ` Hugh Dickins
2005-10-24 14:56 ` James Bottomley
2005-10-24 16:49 ` Hugh Dickins
2005-10-22 16:24 ` [PATCH 4/9] mm: cris v32 mmu_context_lock Hugh Dickins
2005-10-22 16:25 ` [PATCH 5/9] mm: uml pte atomicity Hugh Dickins
2005-10-22 16:27 ` Hugh Dickins [this message]
2005-10-22 19:23 ` [PATCH 6/9] mm: uml kill unused Jeff Dike
2005-10-22 16:29 ` [PATCH 7/9] mm: split page table lock Hugh Dickins
2005-10-23 16:54 ` Nikita Danilov
2005-10-23 21:27 ` Andrew Morton
2005-10-23 22:22 ` Andrew Morton
2005-10-24 3:38 ` Hugh Dickins
2005-10-24 4:16 ` Andrew Morton
2005-10-24 4:58 ` Hugh Dickins
2005-10-24 3:09 ` Hugh Dickins
2005-10-23 21:49 ` Andrew Morton
2005-10-24 3:12 ` Hugh Dickins
2005-10-22 16:30 ` [PATCH 8/9] mm: fix rss and mmlist locking Hugh Dickins
2005-10-22 16:31 ` [PATCH 9/9] mm: update comments to pte lock Hugh Dickins
2005-10-23 7:49 ` [PATCH 6/9 take 2] mm: uml kill unused Hugh Dickins
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=Pine.LNX.4.61.0510221725560.18047@goblin.wat.veritas.com \
--to=hugh@veritas.com \
--cc=akpm@osdl.org \
--cc=jdike@addtoit.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
all inboxes | Powered by JetHome®