public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Adrian Cox <adrian@humboldt•co.uk>
To: linuxppc-dev@lists•linuxppc.org
Subject: [PATCH] Allow small areas in io_block_mapping
Date: Fri, 16 Nov 2001 15:21:48 +0000	[thread overview]
Message-ID: <3BF52F0C.7020608@humboldt.co.uk> (raw)

[-- 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;

             reply	other threads:[~2001-11-16 15:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-16 15:21 Adrian Cox [this message]
2001-11-16 16:14 ` [PATCH] Allow small areas in io_block_mapping Dan Malek
2001-11-16 16:39   ` Adrian Cox
2001-11-16 16:57     ` Dan Malek

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=3BF52F0C.7020608@humboldt.co.uk \
    --to=adrian@humboldt$(echo .)co.uk \
    --cc=linuxppc-dev@lists$(echo .)linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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