Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[2.6.25-git18 => 2.6.26-rc1-git1] Xorg crash with xf86MapVidMem error

 

 

First page Previous page 1 2 Next page Last page  View All Linux kernel RSS feed   Index | Next | Previous | View Threaded


venkatesh.pallipadi at intel

May 8, 2008, 5:34 PM

Post #26 of 32 (901 views)
Permalink
Re: [2.6.25-git18 => 2.6.26-rc1-git1] Xorg crash with xf86MapVidMem error [In reply to]

On Thu, May 08, 2008 at 04:54:44PM -0700, H. Peter Anvin wrote:
> Venki Pallipadi wrote:
> >On Thu, May 08, 2008 at 02:59:31PM -0700, Venkatesh Pallipadi wrote:
> >>>
> >>I agree we need a better range check in place. But, the current one was
> >>not
> >>really doing anything useful and actually causing the side-effect
> >>regression. So, I felt not having it is better solution for now.
> >>
> >>Other solution is to stay with start and end range check and just ignore
> >>the
> >>range check error with WC overlap in case where UC_MINUS is requested.
> >>
> >>Given the way MTRRs are defined, the only way to do the full range check
> >>seems to be to go over page by page (from start to end), and check which
> >>variable range MTTR it matches with, which is obviously very excessive.
> >>As,
> >>this is not a problem in typical usage scenario.
> >>
>
> I don't believe that is true in the slightest. You can iterate over the
> variable MTRRs and see if any part of them overlaps the target range;
> doing exhaustive enumeration is clearly bogus, especially on 64-bit
> platforms.

What I meant was:
MTRRs are not really base and size. They are defined as base and mask.
Any addr is affected by mtrr if addr & mask == base & mask.
So, MTRR entry like
base = 0xf00000, mask = 0xff00000 with 36 bit physical address covers
0xf00000-0xffffff, 0x10f00000-0x10ffffff, 0x20f00000-0x20ffffff, ....

In this case if user is trying to mmap 0x1a000000-0x2a000000, we cannot really
cover this case with single parsing of variable address ranges. We will have
to go through the sub-ranges withing single variable range, which can be page
by page in worst case.

> >
> >Also, note that we only look for start while looking at fixed range MTRRs.
> >This is not as scary as it seems. We are finding the effective memory type
> >by just looking at the start of the address range. We still go through
> >the PAT reserve free mechanism, once we find the effective memory type
> >and that list will catch any other users with conflicting type anywhere
> >in the start to end range. And we will still keep effective type consistent
> >across all mappings.
> >
>
> So what you're saying here is "it's bogus, but it doesn't really matter
> anyway?" Why bother having it at all, then?
>
> Seriously, if it's not unconditionally correct, then:
>
> a. it should be *clearly* labelled a heuristic.
> b. it should be *clearly* explained why having the heuristic is much
> better than not having anything.
>
> In this case, neither of those conditions appear to be addressed.

Agree that is has to be called a heuristic. Yes. Not having that will work
may be not as optimially. Having it gives us better starting point when we
start to find a proper memory type for requests, especially when there are
no other overlapping mappings in PAT list.

One of the reason for heristic was to get proper type for /dev/mem maps for WB
region (ACPI and BIOS area). /dev/mem checks to see the mtrr type of the start
address and starts with that type for the request. As long as there are no
other conflict in PAT list, we can give WB to this /dev/mem request. Not
having this heuristic we will have to most probably default to UC.

When there are overlapping PAT list entries, the mtrr_lookup does not matter
as we have to inherit things from those PAT entries or conflicting with them.

This discussion points to - code is not sufficiently commented and/or needs
some refactoring. Will look at this afresh tomorrow morning and see whether
I can some up with some better alternative.

Thanks,
Venki
Thanks,
Venki
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


hpa at zytor

May 8, 2008, 5:49 PM

Post #27 of 32 (915 views)
Permalink
Re: [2.6.25-git18 => 2.6.26-rc1-git1] Xorg crash with xf86MapVidMem error [In reply to]

Venki Pallipadi wrote:
>
> What I meant was:
> MTRRs are not really base and size. They are defined as base and mask.
> Any addr is affected by mtrr if addr & mask == base & mask.
> So, MTRR entry like
> base = 0xf00000, mask = 0xff00000 with 36 bit physical address covers
> 0xf00000-0xffffff, 0x10f00000-0x10ffffff, 0x20f00000-0x20ffffff, ....
>
> In this case if user is trying to mmap 0x1a000000-0x2a000000, we cannot really
> cover this case with single parsing of variable address ranges. We will have
> to go through the sub-ranges withing single variable range, which can be page
> by page in worst case.
>

In practice, though, such MTRRs are never seen. Even in the presence of
such pathological MTRRs, I'm sure one can figure out a *much* smarter
overlap algorithm. I'd have to sit down and think about it, but I'm
pretty sure one could; the basic observation, though, is that any set
mask bit that are in a position <= floor(log2(range_len))-1 don't matter
at all, since the range WILL end up covering both the 0 and the 1 case
in this bit position. At this point, you can test only a limited number
of points (I *believe* you can reduce it down to only the beginning and
the end, but I haven't proven that, so don't count on it yet.)

The key, of course, is to look for the case of multiple MTRRs matching
the range.

-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


hpa at zytor

May 8, 2008, 5:52 PM

Post #28 of 32 (916 views)
Permalink
Re: [2.6.25-git18 => 2.6.26-rc1-git1] Xorg crash with xf86MapVidMem error [In reply to]

Venki Pallipadi wrote:
>
> One of the reason for heristic was to get proper type for /dev/mem maps for WB
> region (ACPI and BIOS area). /dev/mem checks to see the mtrr type of the start
> address and starts with that type for the request. As long as there are no
> other conflict in PAT list, we can give WB to this /dev/mem request. Not
> having this heuristic we will have to most probably default to UC.
>
> When there are overlapping PAT list entries, the mtrr_lookup does not matter
> as we have to inherit things from those PAT entries or conflicting with them.
>

Okay, now here is something...

I don't believe it is kosher for mmap() to behave differently if we
called it once or called it twice.

Therefore, the proper behaviour in the case of a range that covers
multiple types is to break it down into multiple requests each mapped
with the appropriate type, as if mmap had been called separate on each
subrange. In the limiting case, yes, this does mean the subranges can
be individual pages, but such an outcome is vanishingly improbable in
practice.

-hpa

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


venkatesh.pallipadi at intel

May 9, 2008, 6:46 AM

Post #29 of 32 (902 views)
Permalink
RE: [2.6.25-git18 => 2.6.26-rc1-git1] Xorg crash with xf86MapVidMem error [In reply to]

>-----Original Message-----
>From: H. Peter Anvin [mailto:hpa [at] zytor]
>Sent: Thursday, May 08, 2008 5:53 PM
>To: Pallipadi, Venkatesh
>Cc: Rufus & Azrael; Ingo Molnar; Siddha, Suresh B;
>Linux-kernel Mailing List; Yinghai Lu; Thomas Gleixner
>Subject: Re: [2.6.25-git18 => 2.6.26-rc1-git1] Xorg crash with
>xf86MapVidMem error
>
>Venki Pallipadi wrote:
>>
>> One of the reason for heristic was to get proper type for
>/dev/mem maps for WB
>> region (ACPI and BIOS area). /dev/mem checks to see the mtrr
>type of the start
>> address and starts with that type for the request. As long
>as there are no
>> other conflict in PAT list, we can give WB to this /dev/mem
>request. Not
>> having this heuristic we will have to most probably default to UC.
>>
>> When there are overlapping PAT list entries, the mtrr_lookup
>does not matter
>> as we have to inherit things from those PAT entries or
>conflicting with them.
>>
>
>Okay, now here is something...
>
>I don't believe it is kosher for mmap() to behave differently if we
>called it once or called it twice.

May be I am missing something. Only time mmap will behave differently is
when some of the pre-existing conditions are different. If the MTRRs are
different and/or there has been conflicting mapping in between first and
second mmap. Otherwise, it will be same. We had to do this inheriting
Business if there are other conflicting maps to have compatibility with
All existing /dev/mem users.

>Therefore, the proper behaviour in the case of a range that covers
>multiple types is to break it down into multiple requests each mapped
>with the appropriate type, as if mmap had been called separate on each
>subrange. In the limiting case, yes, this does mean the subranges can
>be individual pages, but such an outcome is vanishingly improbable in
>practice.

We thought about splitting the range. But, in general the interface
requires
us to give one single type of access back. Interfaces like pci accesses
in /sysfs. If user maps the file with mmap, we give one particular type
of mapping.
returning multi type may be a possibility, but that will mean whole new
level of complications in tracking, splitting the vmas, returning this
subrange mapping info to user in some way etc.

Sub-range of a page is probably improbable. But overlaps are common.
That is exactly what is happening with the issue in this thread.
Part of the region is mmaped first (it will get UC_MINUS) and MTRR setup
for WC.
Later a bigger region that includes the first smaller part is being
mmaped. We can
safely return UC_MINUS to this bigger request (without causing any
aliases) and things
will work fine as this bigger mmap does its own MTRR for WC as well.
This is the case
where I feel just maintaining the consistency across the PAT list (which
is UC_MINUS)
here is safe irrespective of any MTRR setting we may have underneath.
Worrying about
MTRR ranges here doesn't seem to add any additional safety-ness.

Thanks,
Venki


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


venkatesh.pallipadi at intel

May 29, 2008, 12:01 PM

Post #30 of 32 (873 views)
Permalink
Re: [2.6.25-git18 => 2.6.26-rc1-git1] Xorg crash with xf86MapVidMem error [In reply to]

On Thu, May 08, 2008 at 05:34:24PM -0700, Pallipadi, Venkatesh wrote:
> On Thu, May 08, 2008 at 04:54:44PM -0700, H. Peter Anvin wrote:
> > Venki Pallipadi wrote:
> > >
> > >Also, note that we only look for start while looking at fixed range
> MTRRs.
> > >This is not as scary as it seems. We are finding the effective memory
> type
> > >by just looking at the start of the address range. We still go through
> > >the PAT reserve free mechanism, once we find the effective memory type
> > >and that list will catch any other users with conflicting type anywhere
> > >in the start to end range. And we will still keep effective type
> consistent
> > >across all mappings.
> > >
> >
> > So what you're saying here is "it's bogus, but it doesn't really matter
> > anyway?" Why bother having it at all, then?
> >
> > Seriously, if it's not unconditionally correct, then:
> >
> > a. it should be *clearly* labelled a heuristic.
> > b. it should be *clearly* explained why having the heuristic is much
> > better than not having anything.
> >
> > In this case, neither of those conditions appear to be addressed.
>
> Agree that is has to be called a heuristic. Yes. Not having that will work
> may be not as optimially. Having it gives us better starting point when we
> start to find a proper memory type for requests, especially when there are
> no other overlapping mappings in PAT list.
>
> One of the reason for heristic was to get proper type for /dev/mem maps
> for WB
> region (ACPI and BIOS area). /dev/mem checks to see the mtrr type of the
> start
> address and starts with that type for the request. As long as there are no
> other conflict in PAT list, we can give WB to this /dev/mem request. Not
> having this heuristic we will have to most probably default to UC.
>
> When there are overlapping PAT list entries, the mtrr_lookup does not
> matter
> as we have to inherit things from those PAT entries or conflicting with
> them.
>
> This discussion points to - code is not sufficiently commented and/or
> needs
> some refactoring. Will look at this afresh tomorrow morning and see
> whether
> I can some up with some better alternative.
>


This is an alternate solution to the problem in this thread. The change
clarifies what is expected out of mtrr_lookup in PAT code and how we handle
failure.

Thanks,
Venki



Alternate patch to clarify the usage of mtrr_lookup() in PAT code, and to make
PAT code resilient to mtrr lookup problems.

Specifically, pat_x_mtrr_type() is restructured to highlight, under
what conditions we look for mtrr hint. pat_x_mtrr_type() uses a default
type when there are any errors in mtrr lookup (still maintaining the pat
consistency). And, reserve_memtype() highlights its usage ot mtrr_lookup for
request type of '-1' and also defaults in a sane way on any mtrr lookup failure.

pat.c looks at mtrr type of a range to get a hint on what mapping type
to request when user/API:
(1) hasn't specified any type (/dev/mem mapping) and we do not want to take
performance hit by always mapping UC_MINUS. This will be the case
for /dev/mem mappings used to map BIOS area or ACPI region which are WB'able.
In this case, as long as MTRR is not WB, PAT will request UC_MINUS for such
mappings.

(2) user/API requests WB mapping while in reality MTRR may have UC or WC.
In this case, PAT can map as WB (without checking MTRR) and still effective
type will be UC or WC. But, a subsequent request to map same region as
UC or WC may fail, as the region will get trackked as WB in PAT list. Looking
at MTRR hint helps us to track based on effective type rather than what user
requested. Again, here mtrr_lookup is only used as hint and we fallback to
WB mapping (as requested by user) as default.

In both cases, after using the mtrr hint, we still go through the memtype
list to make sure there are no inconsistencies among multiple users.


Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi [at] intel>
Signed-off-by: Suresh Siddha <suresh.b.siddha [at] intel>

---
arch/x86/mm/pat.c | 49 ++++++++++++++++++++++++-------------------------
1 file changed, 24 insertions(+), 25 deletions(-)

Index: linux-2.6/arch/x86/mm/pat.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/pat.c 2008-05-28 13:19:28.000000000 -0700
+++ linux-2.6/arch/x86/mm/pat.c 2008-05-28 15:18:22.000000000 -0700
@@ -151,32 +151,33 @@ static int pat_x_mtrr_type(u64 start, u6
unsigned long pat_type;
u8 mtrr_type;

- mtrr_type = mtrr_type_lookup(start, end);
- if (mtrr_type == 0xFF) { /* MTRR not enabled */
- *ret_prot = prot;
- return 0;
- }
- if (mtrr_type == 0xFE) { /* MTRR match error */
- *ret_prot = _PAGE_CACHE_UC;
- return -1;
- }
- if (mtrr_type != MTRR_TYPE_UNCACHABLE &&
- mtrr_type != MTRR_TYPE_WRBACK &&
- mtrr_type != MTRR_TYPE_WRCOMB) { /* MTRR type unhandled */
- *ret_prot = _PAGE_CACHE_UC;
- return -1;
- }
-
pat_type = prot & _PAGE_CACHE_MASK;
prot &= (~_PAGE_CACHE_MASK);

- /* Currently doing intersection by hand. Optimize it later. */
+ /*
+ * We return the PAT request directly for types where PAT takes
+ * precedence with respect to MTRR and for UC_MINUS.
+ * Consistency checks with other PAT requests is done later
+ * while going through memtype list.
+ */
if (pat_type == _PAGE_CACHE_WC) {
*ret_prot = prot | _PAGE_CACHE_WC;
+ return 0;
} else if (pat_type == _PAGE_CACHE_UC_MINUS) {
*ret_prot = prot | _PAGE_CACHE_UC_MINUS;
- } else if (pat_type == _PAGE_CACHE_UC ||
- mtrr_type == MTRR_TYPE_UNCACHABLE) {
+ return 0;
+ } else if (pat_type == _PAGE_CACHE_UC) {
+ *ret_prot = prot | _PAGE_CACHE_UC;
+ return 0;
+ }
+
+ /*
+ * Look for MTRR hint to get the effective type in case where PAT
+ * request is for WB.
+ */
+ mtrr_type = mtrr_type_lookup(start, end);
+
+ if (mtrr_type == MTRR_TYPE_UNCACHABLE) {
*ret_prot = prot | _PAGE_CACHE_UC;
} else if (mtrr_type == MTRR_TYPE_WRCOMB) {
*ret_prot = prot | _PAGE_CACHE_WC;
@@ -233,14 +234,12 @@ int reserve_memtype(u64 start, u64 end,

if (req_type == -1) {
/*
- * Special case where caller wants to inherit from mtrr or
- * existing pat mapping, defaulting to UC_MINUS in case of
- * no match.
+ * Call mtrr_lookup to get the type hint. This is an
+ * optimization for /dev/mem mmap'ers into WB memory (BIOS
+ * tools and ACPI tools). Use WB request for WB memory and use
+ * UC_MINUS otherwise.
*/
u8 mtrr_type = mtrr_type_lookup(start, end);
- if (mtrr_type == 0xFE) { /* MTRR match error */
- err = -1;
- }

if (mtrr_type == MTRR_TYPE_WRBACK) {
req_type = _PAGE_CACHE_WB;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


rufus-azrael at numericable

May 29, 2008, 2:51 PM

Post #31 of 32 (869 views)
Permalink
Re: [2.6.25-git18 => 2.6.26-rc1-git1] Xorg crash with xf86MapVidMem error [In reply to]

Venki Pallipadi wrote:
> On Thu, May 08, 2008 at 05:34:24PM -0700, Pallipadi, Venkatesh wrote:
>
>> On Thu, May 08, 2008 at 04:54:44PM -0700, H. Peter Anvin wrote:
>> > Venki Pallipadi wrote:
>> > >
>> > >Also, note that we only look for start while looking at fixed range
>> MTRRs.
>> > >This is not as scary as it seems. We are finding the effective memory
>> type
>> > >by just looking at the start of the address range. We still go through
>> > >the PAT reserve free mechanism, once we find the effective memory type
>> > >and that list will catch any other users with conflicting type anywhere
>> > >in the start to end range. And we will still keep effective type
>> consistent
>> > >across all mappings.
>> > >
>> >
>> > So what you're saying here is "it's bogus, but it doesn't really matter
>> > anyway?" Why bother having it at all, then?
>> >
>> > Seriously, if it's not unconditionally correct, then:
>> >
>> > a. it should be *clearly* labelled a heuristic.
>> > b. it should be *clearly* explained why having the heuristic is much
>> > better than not having anything.
>> >
>> > In this case, neither of those conditions appear to be addressed.
>>
>> Agree that is has to be called a heuristic. Yes. Not having that will work
>> may be not as optimially. Having it gives us better starting point when we
>> start to find a proper memory type for requests, especially when there are
>> no other overlapping mappings in PAT list.
>>
>> One of the reason for heristic was to get proper type for /dev/mem maps
>> for WB
>> region (ACPI and BIOS area). /dev/mem checks to see the mtrr type of the
>> start
>> address and starts with that type for the request. As long as there are no
>> other conflict in PAT list, we can give WB to this /dev/mem request. Not
>> having this heuristic we will have to most probably default to UC.
>>
>> When there are overlapping PAT list entries, the mtrr_lookup does not
>> matter
>> as we have to inherit things from those PAT entries or conflicting with
>> them.
>>
>> This discussion points to - code is not sufficiently commented and/or
>> needs
>> some refactoring. Will look at this afresh tomorrow morning and see
>> whether
>> I can some up with some better alternative.
>>
>>
>
>
> This is an alternate solution to the problem in this thread. The change
> clarifies what is expected out of mtrr_lookup in PAT code and how we handle
> failure.
>
> Thanks,
> Venki
>
>
>
> Alternate patch to clarify the usage of mtrr_lookup() in PAT code, and to make
> PAT code resilient to mtrr lookup problems.
>
> Specifically, pat_x_mtrr_type() is restructured to highlight, under
> what conditions we look for mtrr hint. pat_x_mtrr_type() uses a default
> type when there are any errors in mtrr lookup (still maintaining the pat
> consistency). And, reserve_memtype() highlights its usage ot mtrr_lookup for
> request type of '-1' and also defaults in a sane way on any mtrr lookup failure.
>
> pat.c looks at mtrr type of a range to get a hint on what mapping type
> to request when user/API:
> (1) hasn't specified any type (/dev/mem mapping) and we do not want to take
> performance hit by always mapping UC_MINUS. This will be the case
> for /dev/mem mappings used to map BIOS area or ACPI region which are WB'able.
> In this case, as long as MTRR is not WB, PAT will request UC_MINUS for such
> mappings.
>
> (2) user/API requests WB mapping while in reality MTRR may have UC or WC.
> In this case, PAT can map as WB (without checking MTRR) and still effective
> type will be UC or WC. But, a subsequent request to map same region as
> UC or WC may fail, as the region will get trackked as WB in PAT list. Looking
> at MTRR hint helps us to track based on effective type rather than what user
> requested. Again, here mtrr_lookup is only used as hint and we fallback to
> WB mapping (as requested by user) as default.
>
> In both cases, after using the mtrr hint, we still go through the memtype
> list to make sure there are no inconsistencies among multiple users.
>
>
> Signed-off-by: Venkatesh Pallipadi<venkatesh.pallipadi [at] intel>
> Signed-off-by: Suresh Siddha<suresh.b.siddha [at] intel>
>
> ---
> arch/x86/mm/pat.c | 49 ++++++++++++++++++++++++-------------------------
> 1 file changed, 24 insertions(+), 25 deletions(-)
>
> Index: linux-2.6/arch/x86/mm/pat.c
> ===================================================================
> --- linux-2.6.orig/arch/x86/mm/pat.c 2008-05-28 13:19:28.000000000 -0700
> +++ linux-2.6/arch/x86/mm/pat.c 2008-05-28 15:18:22.000000000 -0700
> @@ -151,32 +151,33 @@ static int pat_x_mtrr_type(u64 start, u6
> unsigned long pat_type;
> u8 mtrr_type;
>
> - mtrr_type = mtrr_type_lookup(start, end);
> - if (mtrr_type == 0xFF) { /* MTRR not enabled */
> - *ret_prot = prot;
> - return 0;
> - }
> - if (mtrr_type == 0xFE) { /* MTRR match error */
> - *ret_prot = _PAGE_CACHE_UC;
> - return -1;
> - }
> - if (mtrr_type != MTRR_TYPE_UNCACHABLE&&
> - mtrr_type != MTRR_TYPE_WRBACK&&
> - mtrr_type != MTRR_TYPE_WRCOMB) { /* MTRR type unhandled */
> - *ret_prot = _PAGE_CACHE_UC;
> - return -1;
> - }
> -
> pat_type = prot& _PAGE_CACHE_MASK;
> prot&= (~_PAGE_CACHE_MASK);
>
> - /* Currently doing intersection by hand. Optimize it later. */
> + /*
> + * We return the PAT request directly for types where PAT takes
> + * precedence with respect to MTRR and for UC_MINUS.
> + * Consistency checks with other PAT requests is done later
> + * while going through memtype list.
> + */
> if (pat_type == _PAGE_CACHE_WC) {
> *ret_prot = prot | _PAGE_CACHE_WC;
> + return 0;
> } else if (pat_type == _PAGE_CACHE_UC_MINUS) {
> *ret_prot = prot | _PAGE_CACHE_UC_MINUS;
> - } else if (pat_type == _PAGE_CACHE_UC ||
> - mtrr_type == MTRR_TYPE_UNCACHABLE) {
> + return 0;
> + } else if (pat_type == _PAGE_CACHE_UC) {
> + *ret_prot = prot | _PAGE_CACHE_UC;
> + return 0;
> + }
> +
> + /*
> + * Look for MTRR hint to get the effective type in case where PAT
> + * request is for WB.
> + */
> + mtrr_type = mtrr_type_lookup(start, end);
> +
> + if (mtrr_type == MTRR_TYPE_UNCACHABLE) {
> *ret_prot = prot | _PAGE_CACHE_UC;
> } else if (mtrr_type == MTRR_TYPE_WRCOMB) {
> *ret_prot = prot | _PAGE_CACHE_WC;
> @@ -233,14 +234,12 @@ int reserve_memtype(u64 start, u64 end,
>
> if (req_type == -1) {
> /*
> - * Special case where caller wants to inherit from mtrr or
> - * existing pat mapping, defaulting to UC_MINUS in case of
> - * no match.
> + * Call mtrr_lookup to get the type hint. This is an
> + * optimization for /dev/mem mmap'ers into WB memory (BIOS
> + * tools and ACPI tools). Use WB request for WB memory and use
> + * UC_MINUS otherwise.
> */
> u8 mtrr_type = mtrr_type_lookup(start, end);
> - if (mtrr_type == 0xFE) { /* MTRR match error */
> - err = -1;
> - }
>
> if (mtrr_type == MTRR_TYPE_WRBACK) {
> req_type = _PAGE_CACHE_WB;
>
>
>
Hi Venki,

I try your patch above and it works fine for my config, as your previous
patch.

Thanks for your help.

Regards.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


mingo at elte

May 31, 2008, 1:10 AM

Post #32 of 32 (878 views)
Permalink
Re: [2.6.25-git18 => 2.6.26-rc1-git1] Xorg crash with xf86MapVidMem error [In reply to]

* Rufus & Azrael <rufus-azrael [at] numericable> wrote:

> Hi Venki,
>
> I try your patch above and it works fine for my config, as your
> previous patch.

thanks - i've applied Venki's fix to tip/x86/urgent.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

First page Previous page 1 2 Next page Last page  View All Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.