very interesting! Is this in response to a bug you've triggered?
i believe the scenario you outlne could trigger on 64-bit boxen, if they
try to ioremap an area not covered by the direct ptes:
and we'd incorrectly fail the ioremap() with -EINVAL, and return a hard
error to the driver - and causing broken boxes, right?
Thomas has unified most of ioremap*.c as well, and we'll make sure this
fix survives the unification. The 64-bit code limped along before by
accident, because the (pre-cleanup) 64-bit __change_page_attr() code
incorrectly returned 0 for invalid ranges:
kpte = lookup_address(address);
if (!kpte) return 0;
which masked the bug you fixed now. 32-bit always returned -EINVAL on