Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
0eef331a
Commit
0eef331a
authored
May 03, 2014
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sparc64: Use 'ILOG2_4MB' instead of constant '22'.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
ee73887e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
+10
-10
arch/sparc/include/asm/pgtable_64.h
arch/sparc/include/asm/pgtable_64.h
+1
-1
arch/sparc/kernel/head_64.S
arch/sparc/kernel/head_64.S
+2
-2
arch/sparc/kernel/ktlb.S
arch/sparc/kernel/ktlb.S
+1
-1
arch/sparc/mm/init_64.c
arch/sparc/mm/init_64.c
+6
-6
No files found.
arch/sparc/include/asm/pgtable_64.h
View file @
0eef331a
...
...
@@ -918,7 +918,7 @@ static inline bool kern_addr_valid(unsigned long addr)
if
((
paddr
>>
MAX_PHYS_ADDRESS_BITS
)
!=
0UL
)
return
false
;
return
test_bit
(
paddr
>>
22
,
sparc64_valid_addr_bitmap
);
return
test_bit
(
paddr
>>
ILOG2_4MB
,
sparc64_valid_addr_bitmap
);
}
extern
int
page_in_phys_avail
(
unsigned
long
paddr
);
...
...
arch/sparc/kernel/head_64.S
View file @
0eef331a
...
...
@@ -282,8 +282,8 @@ sun4v_chip_type:
stx
%
l2
,
[%
l4
+
0x0
]
ldx
[%
sp
+
2047
+
128
+
0x50
],
%
l3
!
physaddr
low
/
*
4
MB
align
*/
srlx
%
l3
,
22
,
%
l3
sllx
%
l3
,
22
,
%
l3
srlx
%
l3
,
ILOG2_4MB
,
%
l3
sllx
%
l3
,
ILOG2_4MB
,
%
l3
stx
%
l3
,
[%
l4
+
0x8
]
/
*
Leave
service
as
-
is
,
"call-method"
*/
...
...
arch/sparc/kernel/ktlb.S
View file @
0eef331a
...
...
@@ -277,7 +277,7 @@ kvmap_dtlb_load:
#ifdef CONFIG_SPARSEMEM_VMEMMAP
kvmap_vmemmap
:
sub
%
g4
,
%
g5
,
%
g5
srlx
%
g5
,
22
,
%
g5
srlx
%
g5
,
ILOG2_4MB
,
%
g5
sethi
%
hi
(
vmemmap_table
),
%
g1
sllx
%
g5
,
3
,
%
g5
or
%
g1
,
%
lo
(
vmemmap_table
),
%
g1
...
...
arch/sparc/mm/init_64.c
View file @
0eef331a
...
...
@@ -588,7 +588,7 @@ static void __init remap_kernel(void)
int
i
,
tlb_ent
=
sparc64_highest_locked_tlbent
();
tte_vaddr
=
(
unsigned
long
)
KERNBASE
;
phys_page
=
(
prom_boot_mapping_phys_low
>>
22UL
)
<<
22UL
;
phys_page
=
(
prom_boot_mapping_phys_low
>>
ILOG2_4MB
)
<<
ILOG2_4MB
;
tte_data
=
kern_large_tte
(
phys_page
);
kern_locked_tte_data
=
tte_data
;
...
...
@@ -1881,7 +1881,7 @@ void __init paging_init(void)
BUILD_BUG_ON
(
NR_CPUS
>
4096
);
kern_base
=
(
prom_boot_mapping_phys_low
>>
22UL
)
<<
22UL
;
kern_base
=
(
prom_boot_mapping_phys_low
>>
ILOG2_4MB
)
<<
ILOG2_4MB
;
kern_size
=
(
unsigned
long
)
&
_end
-
(
unsigned
long
)
KERNBASE
;
/* Invalidate both kernel TSBs. */
...
...
@@ -1937,7 +1937,7 @@ void __init paging_init(void)
shift
=
kern_base
+
PAGE_OFFSET
-
((
unsigned
long
)
KERNBASE
);
real_end
=
(
unsigned
long
)
_end
;
num_kernel_image_mappings
=
DIV_ROUND_UP
(
real_end
-
KERNBASE
,
1
<<
22
);
num_kernel_image_mappings
=
DIV_ROUND_UP
(
real_end
-
KERNBASE
,
1
<<
ILOG2_4MB
);
printk
(
"Kernel: Using %d locked TLB entries for main kernel image.
\n
"
,
num_kernel_image_mappings
);
...
...
@@ -2094,7 +2094,7 @@ static void __init setup_valid_addr_bitmap_from_pavail(unsigned long *bitmap)
if
(
new_start
<=
old_start
&&
new_end
>=
(
old_start
+
PAGE_SIZE
))
{
set_bit
(
old_start
>>
22
,
bitmap
);
set_bit
(
old_start
>>
ILOG2_4MB
,
bitmap
);
goto
do_next_page
;
}
}
...
...
@@ -2143,7 +2143,7 @@ void __init mem_init(void)
addr
=
PAGE_OFFSET
+
kern_base
;
last
=
PAGE_ALIGN
(
kern_size
)
+
addr
;
while
(
addr
<
last
)
{
set_bit
(
__pa
(
addr
)
>>
22
,
sparc64_valid_addr_bitmap
);
set_bit
(
__pa
(
addr
)
>>
ILOG2_4MB
,
sparc64_valid_addr_bitmap
);
addr
+=
PAGE_SIZE
;
}
...
...
@@ -2267,7 +2267,7 @@ int __meminit vmemmap_populate(unsigned long vstart, unsigned long vend,
void
*
block
;
if
(
!
(
*
vmem_pp
&
_PAGE_VALID
))
{
block
=
vmemmap_alloc_block
(
1UL
<<
22
,
node
);
block
=
vmemmap_alloc_block
(
1UL
<<
ILOG2_4MB
,
node
);
if
(
!
block
)
return
-
ENOMEM
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment