All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: PARISC list <parisc-linux@lists.parisc-linux.org>
Cc: parisc-linux-cvs@lists.parisc-linux.org
Subject: [parisc-linux] Re: [parisc-linux-cvs] linux-2.6 jejb
Date: 14 Apr 2004 12:53:23 -0500	[thread overview]
Message-ID: <1081965204.1804.96.camel@mulgrave> (raw)
In-Reply-To: <20040414174535.81173494194@palinux.hppa>

On Wed, 2004-04-14 at 12:45, James Bottomley wrote:
> CVSROOT:	/var/cvs
> Module name:	linux-2.6
> Changes by:	jejb	04/04/14 11:45:35
> 
> Modified files:
> 	.              : Makefile 
> 	arch/parisc/kernel: cache.c sys_parisc.c 
> 
> Log message:
> Make all shared mappings and all file mappings (including MAP_PRIVATE)
> equivalently mapped.
> 
> This allows us only to flush a single space again in flush_dcache_page().
> 
> The flip side is that now all shared libraries are going to be mapped
> on 4MB boundaries.  This only wastes virtual space, but it may run us
> out of mappings faster than would otherwise happen in ILP32 processes.

Index: arch/parisc/kernel/cache.c
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/kernel/cache.c,v
retrieving revision 1.9
diff -u -r1.9 cache.c
--- a/arch/parisc/kernel/cache.c	12 Apr 2004 15:48:00 -0000	1.9
+++ b/arch/parisc/kernel/cache.c	14 Apr 2004 17:42:54 -0000
@@ -265,12 +265,16 @@
 
 		__flush_cache_page(mpnt, addr);
 
-		break;
+		/* If we find an address to flush, that will also
+		 * bring all the private mappings up to date (see
+		 * comment below) */
+		return;
 	}
 
-	/* Private mappings will not have congruent addresses, so we
-	 * have to flush each of them individually to make the change
-	 * in the kernel page visible */
+	/* we have carefully arranged in arch_get_unmapped_area() that
+	 * *any* mappings of a file are always congruently mapped (whether
+	 * declared as MAP_PRIVATE or MAP_SHARED), so we only need
+	 * to flush one address here too */
 	list_for_each(l, &page->mapping->i_mmap) {
 		struct vm_area_struct *mpnt;
 		unsigned long off, addr;
@@ -293,6 +297,8 @@
 			continue;
 
 		__flush_cache_page(mpnt, addr);
+
+		return;
 	}
 }
 EXPORT_SYMBOL(__flush_dcache_page);
Index: arch/parisc/kernel/sys_parisc.c
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/kernel/sys_parisc.c,v
retrieving revision 1.21
diff -u -r1.21 sys_parisc.c
--- a/arch/parisc/kernel/sys_parisc.c	16 Mar 2004 15:39:55 -0000	1.21
+++ b/arch/parisc/kernel/sys_parisc.c	14 Apr 2004 17:42:54 -0000
@@ -93,7 +93,7 @@
 		unsigned long addr, unsigned long len, unsigned long pgoff)
 {
 	struct vm_area_struct *vma;
-	int offset = get_offset(mapping);
+	int offset = mapping ? get_offset(mapping) : 0;
 
 	addr = DCACHE_ALIGN(addr - offset) + offset;
 
@@ -117,8 +117,10 @@
 	if (!addr)
 		addr = TASK_UNMAPPED_BASE;
 
-	if (filp && (flags & MAP_SHARED)) {
+	if (filp) {
 		addr = get_shared_area(filp->f_mapping, addr, len, pgoff);
+	} else if(flags & MAP_SHARED) {
+		addr = get_shared_area(NULL, addr, len, pgoff);
 	} else {
 		addr = get_unshared_area(addr, len);
 	}

       reply	other threads:[~2004-04-14 17:53 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040414174535.81173494194@palinux.hppa>
2004-04-14 17:53 ` James Bottomley [this message]
     [not found] <20040505204811.27F0C4945E4@palinux.hppa>
2004-05-05 20:50 ` [parisc-linux] Re: [parisc-linux-cvs] linux-2.6 jejb James Bottomley
2004-05-06  5:05   ` Randolph Chung
2004-05-06  5:22     ` Randolph Chung
2004-05-06  9:33     ` M. Grabert
2004-05-06 13:25     ` Kyle McMartin
     [not found] <20040502161601.DC7C24945C7@palinux.hppa>
2004-05-03 20:51 ` James Bottomley
     [not found] <20040501200312.40BB74945E1@palinux.hppa>
2004-05-01 20:09 ` James Bottomley
2004-05-03  8:57   ` Joel Soete
     [not found] <20040501160556.D07DC4945CA@palinux.hppa>
2004-05-01 16:13 ` James Bottomley
     [not found] <20040430162037.9D2B94945CD@palinux.hppa>
2004-04-30 16:25 ` James Bottomley
     [not found] <20040427171140.706074945BD@palinux.hppa>
2004-04-27 17:15 ` James Bottomley
     [not found] <20040425145051.10F5C4942B8@palinux.hppa>
2004-04-25 14:55 ` James Bottomley
     [not found] <20040412154800.D31F6494194@palinux.hppa>
2004-04-12 15:55 ` James Bottomley
     [not found] <20040407004901.031D3494194@palinux.hppa>
2004-04-07  0:54 ` James Bottomley
2004-04-08  6:15   ` Joel Soete
2004-04-08 12:36     ` James Bottomley
     [not found] <20040406213446.CB675494194@palinux.hppa>
2004-04-06 21:37 ` James Bottomley
     [not found] <20040405174131.84BF1494194@palinux.hppa>
2004-04-06 13:21 ` Carlos O'Donell
2004-04-06 14:18   ` James Bottomley
2004-04-06 15:40     ` Randolph Chung
     [not found] <20040405024740.9330F494194@palinux.hppa>
2004-04-05  2:49 ` James Bottomley
2004-04-05  2:54   ` James Bottomley
     [not found] <20040320210116.7A727494553@palinux.hppa>
2004-03-20 21:04 ` James Bottomley
2004-03-20 21:10   ` Helge Deller
2004-03-20 21:13     ` Helge Deller
     [not found] <20040228212407.DB126494190@palinux.hppa>
2004-02-28 22:21 ` Joel Soete
2004-02-28 22:42   ` James Bottomley
2004-02-29  9:39     ` Joel Soete
2004-03-04 16:39       ` Joel Soete
2004-02-06  7:31 [parisc-linux] " Joel Soete
2004-02-06 17:50 ` Grant Grundler
2004-02-06 18:06   ` bame
2004-02-06 19:16 ` Randolph Chung
2004-02-06 17:08   ` Joel Soete
2004-02-07  6:40     ` Randolph Chung
2004-02-09  7:26       ` Joel Soete
     [not found] <20040204182455.1CC11494191@palinux.hppa>
2004-02-05  9:20 ` [parisc-linux] " Randolph Chung
2004-02-05 15:19   ` James Bottomley
2004-02-05 15:29 ` [parisc-linux] " Joel Soete
2004-02-05 20:31   ` Randolph Chung
2004-02-05 18:49     ` Joel Soete
     [not found] <20040113155603.CBCC249425A@palinux.hppa>
2004-01-13 15:58 ` [parisc-linux] " James Bottomley
     [not found] <20030924175431.D51BC49408B@palinux.hppa>
2003-09-24 18:01 ` James Bottomley
     [not found] <20030919010356.148684940A4@palinux.hppa>
2003-09-19  1:06 ` James Bottomley
2003-09-19 11:24   ` Randolph Chung
2003-09-19 14:02     ` James Bottomley
2003-09-19 18:24       ` Jim Hull
     [not found] <20030903200300.8B7B7494064@palinux.hppa>
2003-09-03 20:07 ` James Bottomley
     [not found] <20030903165113.138BF494064@palinux.hppa>
2003-09-03 16:56 ` James Bottomley

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=1081965204.1804.96.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=parisc-linux-cvs@lists.parisc-linux.org \
    --cc=parisc-linux@lists.parisc-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.