lkml.org 
[lkml]   [2009]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUG 2.6.31-rc1] HIGHMEM64G causes hang in PCI init on 32-bit x86
Yinghai Lu wrote:
> continue;
> @@ -1409,8 +1409,10 @@ void __init e820_reserve_resources_late(
> end = round_up(start, ram_alignment(start));
> if (start == end)
> continue;
> - reserve_region_with_split(&iomem_resource, start,
> - end - 1, "RAM buffer");
> + if (end != (resource_size_t)end)
> + continue;
> + reserve_region_with_split(&iomem_resource, (resource_size_t)start,
> + (resource_size_t)(end - 1), "RAM buffer");
> }
> }
>

That doesn't quite look right; for one thing it doesn't handle the
(admittedly somewhat unlikely) case of end pointing to the end of the
address space.

Something like:

if (start > (resource_size_t)end-1)
continue;

... should work better.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.



\
 
 \ /
  Last update: 2009-06-30 02:31    [W:0.093 / U:1.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site