From: linas@austin.ibm.com (Linas Vepstas)
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Olof Johansson <olof@lixom.net>,
linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH] powerpc: map 4K iommu pages even on 64K largepage systems
Date: Tue, 24 Oct 2006 15:08:03 -0500 [thread overview]
Message-ID: <20061024200803.GC6360@austin.ibm.com> (raw)
In-Reply-To: <1161666868.10524.577.camel@localhost.localdomain>
Hi Ben,
The patch tests well; bt there was one change I didn't understand ...
> +++ linux-cell/include/asm-powerpc/iommu.h 2006-10-24 14:58:45.000000000 +1000
> +
> +#define IOMMU_PAGE_SHIFT 12
> +++ linux-cell/include/asm-powerpc/tce.h 2006-10-24 14:59:20.000000000 +1000
>
> #define TCE_SHIFT 12
> #define TCE_PAGE_SIZE (1 << TCE_SHIFT)
> -#define TCE_PAGE_FACTOR (PAGE_SHIFT - TCE_SHIFT)
This is zero now, but if anyone ever changes IOMMU_PAGE_SHIFT to a
value oter than 12, then the below will break:
> +++ linux-cell/arch/powerpc/platforms/pseries/iommu.c 2006-10-24 15:00:07.000000000 +1000
>
> - index <<= TCE_PAGE_FACTOR;
> - npages <<= TCE_PAGE_FACTOR;
since this shift does need to be made, if IOMMU_PAGE_SHIFT != TCE_SHIFT
> +++ linux-cell/arch/powerpc/sysdev/dart.h 2006-10-24 15:01:16.000000000 +1000
>
> #define DART_PAGE_SHIFT 12
> #define DART_PAGE_SIZE (1 << DART_PAGE_SHIFT)
> -#define DART_PAGE_FACTOR (PAGE_SHIFT - DART_PAGE_SHIFT)
I'd argue that the right fix would have been
> +#define DART_PAGE_FACTOR (IOMMU_PAGE_SHIFT - DART_PAGE_SHIFT)
> +++ linux-cell/arch/powerpc/sysdev/dart_iommu.c 2006-10-24 15:01:47.000000000 +1000
>
> - index <<= DART_PAGE_FACTOR;
> - npages <<= DART_PAGE_FACTOR;
And do *not* remove these lines... certainly, they would have to be
put back in if we made iommu_page_size to be a variable in the iommu
table..
--linas
next prev parent reply other threads:[~2006-10-24 20:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-24 0:25 [RFC]: map 4K iommu pages even on 64K largepage systems Linas Vepstas
2006-10-24 0:50 ` Geoff Levand
2006-10-24 2:23 ` Benjamin Herrenschmidt
2006-10-24 2:22 ` Benjamin Herrenschmidt
2006-10-24 3:00 ` Geoff Levand
2006-10-24 4:43 ` Benjamin Herrenschmidt
2006-10-24 5:14 ` [PATCH] powerpc: " Benjamin Herrenschmidt
2006-10-24 20:08 ` Linas Vepstas [this message]
2006-10-24 21:41 ` Benjamin Herrenschmidt
2006-10-24 23:17 ` Linas Vepstas
-- strict thread matches above, loose matches on Subject: below --
2006-10-30 5:15 Benjamin Herrenschmidt
2006-10-30 21:33 ` Olof Johansson
2006-10-31 3:06 ` Stephen Rothwell
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=20061024200803.GC6360@austin.ibm.com \
--to=linas@austin.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=olof@lixom.net \
--cc=paulus@samba.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.