From: npiggin@suse.de
From: Carsten Otte <cotte@de.ibm.com>
To: akpm@linux-foundation.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Jared Hulbert <jaredeh@gmail.com>,
Carsten Otte <cotte@de.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
linux-mm@kvack.org
Subject: [patch 7/7] s390: remove struct page entries for DCSS memory segments
Date: Fri, 28 Mar 2008 12:52:45 +1100 [thread overview]
Message-ID: <20080328015422.561646000@nick.local0.net> (raw)
In-Reply-To: <20080328015238.519230000@nick.local0.net>
[-- Attachment #1: s390-remove-struct-page-entries-for-DCSS-memory-segments.patch --]
[-- Type: text/plain, Size: 1753 bytes --]
This patch removes struct page entries for DCSS segments that are being loaded.
They can still be accessed correctly, thanks to the struct page-less XIP work
of previous patches.
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jared Hulbert <jaredeh@gmail.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
---
arch/s390/mm/vmem.c | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
Index: linux-2.6/arch/s390/mm/vmem.c
===================================================================
--- linux-2.6.orig/arch/s390/mm/vmem.c
+++ linux-2.6/arch/s390/mm/vmem.c
@@ -323,8 +323,6 @@ out:
int add_shared_memory(unsigned long start, unsigned long size)
{
struct memory_segment *seg;
- struct page *page;
- unsigned long pfn, num_pfn, end_pfn;
int ret;
mutex_lock(&vmem_mutex);
@@ -339,24 +337,10 @@ int add_shared_memory(unsigned long star
if (ret)
goto out_free;
- ret = vmem_add_mem(start, size);
+ ret = vmem_add_range(start, size);
if (ret)
goto out_remove;
- pfn = PFN_DOWN(start);
- num_pfn = PFN_DOWN(size);
- end_pfn = pfn + num_pfn;
-
- page = pfn_to_page(pfn);
- memset(page, 0, num_pfn * sizeof(struct page));
-
- for (; pfn < end_pfn; pfn++) {
- page = pfn_to_page(pfn);
- init_page_count(page);
- reset_page_mapcount(page);
- SetPageReserved(page);
- INIT_LIST_HEAD(&page->lru);
- }
goto out;
out_remove:
--
--
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-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2008-03-28 1:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-28 1:52 [patch 0/7] 2.6.25-rc5-mm1: VM_MIXEDMAP, pte_special, xip series npiggin
2008-03-28 1:52 ` [patch 1/7] mm: introduce VM_MIXEDMAP npiggin, Jared Hulbert
2008-03-31 22:04 ` Andrew Morton
2008-04-01 6:25 ` Nick Piggin
2008-04-01 14:20 ` Carsten Otte
2008-03-28 1:52 ` [patch 2/7] mm: introduce pte_special pte bit npiggin
2008-03-28 1:52 ` [patch 3/7] mm: add vm_insert_mixed npiggin
2008-03-28 1:52 ` [patch 4/7] return pfn from direct_access, for XIP npiggin, Jared Hulbert
2008-03-28 1:52 ` [patch 5/7] xip: support non-struct page backed memory npiggin
2008-03-28 1:52 ` [patch 6/7] s390: implement pte special bit npiggin
2008-03-28 1:52 ` npiggin, Carsten Otte [this message]
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=20080328015422.561646000@nick.local0.net \
--to=npiggin@suse.de \
--cc=akpm@linux-foundation.org \
--cc=cotte@de.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=jaredeh@gmail.com \
--cc=linux-mm@kvack.org \
--cc=schwidefsky@de.ibm.com \
--cc=torvalds@linux-foundation.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