File tree 1 file changed +7
-6
lines changed 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -21,33 +21,34 @@ extern int __map_without_ltlbs;
21
21
static unsigned long block_mapped_ram ;
22
22
23
23
/*
24
- * Return PA for this VA if it is in an area mapped with LTLBs.
24
+ * Return PA for this VA if it is in an area mapped with LTLBs or fixmap .
25
25
* Otherwise, returns 0
26
26
*/
27
27
phys_addr_t v_block_mapped (unsigned long va )
28
28
{
29
29
unsigned long p = PHYS_IMMR_BASE ;
30
30
31
- if (__map_without_ltlbs )
32
- return 0 ;
33
31
if (va >= VIRT_IMMR_BASE && va < VIRT_IMMR_BASE + IMMR_SIZE )
34
32
return p + va - VIRT_IMMR_BASE ;
33
+ if (__map_without_ltlbs )
34
+ return 0 ;
35
35
if (va >= PAGE_OFFSET && va < PAGE_OFFSET + block_mapped_ram )
36
36
return __pa (va );
37
37
return 0 ;
38
38
}
39
39
40
40
/*
41
- * Return VA for a given PA mapped with LTLBs or 0 if not mapped
41
+ * Return VA for a given PA mapped with LTLBs or fixmap
42
+ * Return 0 if not mapped
42
43
*/
43
44
unsigned long p_block_mapped (phys_addr_t pa )
44
45
{
45
46
unsigned long p = PHYS_IMMR_BASE ;
46
47
47
- if (__map_without_ltlbs )
48
- return 0 ;
49
48
if (pa >= p && pa < p + IMMR_SIZE )
50
49
return VIRT_IMMR_BASE + pa - p ;
50
+ if (__map_without_ltlbs )
51
+ return 0 ;
51
52
if (pa < block_mapped_ram )
52
53
return (unsigned long )__va (pa );
53
54
return 0 ;
You can’t perform that action at this time.
0 commit comments