linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Allow small areas in io_block_mapping
@ 2001-11-16 15:21 Adrian Cox
  2001-11-16 16:14 ` Dan Malek
  0 siblings, 1 reply; 4+ messages in thread
From: Adrian Cox @ 2001-11-16 15:21 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

The attached patch stops io_block_mapping() from attempting to use BATs
for areas too small to fit in a BAT.  (On the port I'm currently
developing, the board uses high-order address lines to distinguish
between register groups, and I'm trying to allocate a page for each group.)

--
Adrian Cox   http://www.humboldt.co.uk/

[-- Attachment #2: pgtable.patch --]
[-- Type: text/plain, Size: 476 bytes --]

===== arch/ppc/mm/pgtable.c 1.7 vs edited =====
--- 1.7/arch/ppc/mm/pgtable.c	Sun Nov  4 18:54:46 2001
+++ edited/arch/ppc/mm/pgtable.c	Fri Nov 16 15:12:48 2001
@@ -242,7 +242,7 @@
 	/*
 	 * Use a BAT for this if possible...
 	 */
-	if (io_bat_index < 2 && is_power_of_2(size)
+	if (io_bat_index < 2 && is_power_of_2(size) && size >= 0x20000
 	    && (virt & (size - 1)) == 0 && (phys & (size - 1)) == 0) {
 		setbat(io_bat_index, virt, phys, size, flags);
 		++io_bat_index;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-11-16 16:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-16 15:21 [PATCH] Allow small areas in io_block_mapping Adrian Cox
2001-11-16 16:14 ` Dan Malek
2001-11-16 16:39   ` Adrian Cox
2001-11-16 16:57     ` Dan Malek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).