mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Schlichter <schlicht@uni-mannheim.de>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Andrew Morton <akpm@digeo.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH][2.5] add missing global_flush_tlb() after change_page_attr() calls
Date: Wed, 26 Feb 2003 12:17:28 +0100	[thread overview]
Message-ID: <200302261217.29084.schlicht@uni-mannheim.de> (raw)


[-- Attachment #1.1: body text --]
[-- Type: text/plain, Size: 376 bytes --]

After calling change_page_attr() global_flush_tlb() has to be called to 
kfree() some structures and make the changed page attributes visible by 
flushing the relevant TLB entries.

This is not done in some places and this patch should fix it...

   Thomas Schlichter

P.S.: I sent this patch on friday yet, but I think friday is a bad day for 
sending patches... ;-)

[-- Attachment #1.2: missing_global_flush_tlb.patch --]
[-- Type: text/x-diff, Size: 1184 bytes --]

--- linux-2.5.62/arch/i386/mm/ioremap.c.orig	Fri Feb 21 12:26:36 2003
+++ linux-2.5.62/arch/i386/mm/ioremap.c	Fri Feb 21 12:28:44 2003
@@ -205,6 +205,7 @@
 			iounmap(p); 
 			p = NULL;
 		}
+		global_flush_tlb();
 	} 
 
 	return p;					
@@ -226,6 +227,7 @@
 		change_page_attr(virt_to_page(__va(p->phys_addr)),
 				 p->size >> PAGE_SHIFT,
 				 PAGE_KERNEL); 				 
+		global_flush_tlb();
 	} 
 	kfree(p); 
 }
--- linux-2.5.62/arch/x86_64/mm/ioremap.c.orig	Fri Feb 21 12:25:54 2003
+++ linux-2.5.62/arch/x86_64/mm/ioremap.c	Fri Feb 21 12:27:58 2003
@@ -205,6 +205,7 @@
 			iounmap(p); 
 			p = NULL;
 		}
+		global_flush_tlb();
 	} 
 
 	return p;					
@@ -226,6 +227,7 @@
 		change_page_attr(virt_to_page(__va(p->phys_addr)),
 				 p->size >> PAGE_SHIFT,
 				 PAGE_KERNEL); 				 
+		global_flush_tlb();
 	} 
 	kfree(p); 
 }
--- linux-2.5.62/arch/x86_64/kernel/pci-gart.c.orig	Fri Feb 21 12:39:40 2003
+++ linux-2.5.62/arch/x86_64/kernel/pci-gart.c	Fri Feb 21 12:43:13 2003
@@ -437,6 +437,7 @@
 	}
 	flush_gart(); 
 	
+	global_flush_tlb();
 		
 	printk("PCI-DMA: aperture base @ %x size %u KB\n", aper_base, aper_size>>10); 
 	return 0;

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2003-02-26 11:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-26 11:17 Thomas Schlichter [this message]
2003-02-26 11:27 ` Andrew Morton

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=200302261217.29084.schlicht@uni-mannheim.de \
    --to=schlicht@uni-mannheim.de \
    --cc=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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®