projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mm/kasan: prevent deadlock in kasan reporting
[linux-2.6-block.git]
/
mm
/
early_ioremap.c
diff --git
a/mm/early_ioremap.c
b/mm/early_ioremap.c
index 17ae14b5aefa2e5302a90e5b748a719e22a22f3b..6d5717bd7197ba0428c32941df27d90da04264b5 100644
(file)
--- a/
mm/early_ioremap.c
+++ b/
mm/early_ioremap.c
@@
-126,7
+126,7
@@
__early_ioremap(resource_size_t phys_addr, unsigned long size, pgprot_t prot)
/*
* Mappings have to be page-aligned
*/
/*
* Mappings have to be page-aligned
*/
- offset =
phys_addr & ~PAGE_MASK
;
+ offset =
offset_in_page(phys_addr)
;
phys_addr &= PAGE_MASK;
size = PAGE_ALIGN(last_addr + 1) - phys_addr;
phys_addr &= PAGE_MASK;
size = PAGE_ALIGN(last_addr + 1) - phys_addr;
@@
-189,7
+189,7
@@
void __init early_iounmap(void __iomem *addr, unsigned long size)
if (WARN_ON(virt_addr < fix_to_virt(FIX_BTMAP_BEGIN)))
return;
if (WARN_ON(virt_addr < fix_to_virt(FIX_BTMAP_BEGIN)))
return;
- offset =
virt_addr & ~PAGE_MASK
;
+ offset =
offset_in_page(virt_addr)
;
nrpages = PAGE_ALIGN(offset + size) >> PAGE_SHIFT;
idx = FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*slot;
nrpages = PAGE_ALIGN(offset + size) >> PAGE_SHIFT;
idx = FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*slot;
@@
-234,7
+234,7
@@
void __init copy_from_early_mem(void *dest, phys_addr_t src, unsigned long size)
char *p;
while (size) {
char *p;
while (size) {
- slop =
src & ~PAGE_MASK
;
+ slop =
offset_in_page(src)
;
clen = size;
if (clen > MAX_MAP_CHUNK - slop)
clen = MAX_MAP_CHUNK - slop;
clen = size;
if (clen > MAX_MAP_CHUNK - slop)
clen = MAX_MAP_CHUNK - slop;