Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tools
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test-restored
platform
vendor
qcom-opensource
tools
Commits
7852158a
Commit
7852158a
authored
8 years ago
by
Linux Build Service Account
Committed by
Gerrit - the friendly Code Review server
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge "lrdp-v2: slab: kernel 4.9 based change to calculate VMEMMAP_SIZE"
parents
c39edd6e
9f77d735
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
linux-ramdump-parser-v2/mm.py
+11
-4
11 additions, 4 deletions
linux-ramdump-parser-v2/mm.py
with
11 additions
and
4 deletions
linux-ramdump-parser-v2/mm.py
+
11
−
4
View file @
7852158a
# Copyright (c) 2013-201
6
, The Linux Foundation. All rights reserved.
# Copyright (c) 2013-201
7
, The Linux Foundation. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 and
...
...
@@ -135,6 +135,7 @@ def get_vmemmap(ramdump):
# See: include/asm-generic/pgtable-nopud.h,
# arch/arm64/include/asm/pgtable-hwdef.h,
# arch/arm64/include/asm/pgtable.h
# kernel/arch/arm64/include/asm/memory.h
if
(
ramdump
.
kernel_version
<
(
3
,
18
,
0
)):
nlevels
=
int
(
ramdump
.
get_config_val
(
"
CONFIG_ARM64_PGTABLE_LEVELS
"
))
else
:
...
...
@@ -151,15 +152,21 @@ def get_vmemmap(ramdump):
spsize
=
ramdump
.
sizeof
(
'
struct page
'
)
vmemmap_size
=
bitops
.
align
((
1
<<
(
va_bits
-
page_shift
))
*
spsize
,
pud_size
)
pfn_offset
=
(
ramdump
.
phys_offset
>>
page_shift
)
offset
=
pfn_offset
*
spsize
if
(
ramdump
.
kernel_version
<
(
3
,
18
,
31
)):
vmalloc_end
=
ramdump
.
page_offset
-
pud_size
-
vmemmap_size
# vmalloc_end = 0xFFFFFFBC00000000
el
se
:
el
if
(
ramdump
.
kernel_version
<
(
4
,
9
,
0
))
:
# for version >= 3.18.31,
# vmemmap is shifted to base addr (0x80000000) pfn.
pfn_offset
=
(
ramdump
.
phys_offset
>>
page_shift
)
offset
=
pfn_offset
*
spsize
vmalloc_end
=
ramdump
.
page_offset
-
pud_size
-
vmemmap_size
-
offset
else
:
# for version >= 4.9.0,
struct_page_max_shift
=
6
#vmemmap_size = ( 1 << (39 - 12 - 1 + 6))
vmemmap_size
=
(
1
<<
(
va_bits
-
page_shift
-
1
+
struct_page_max_shift
))
vmalloc_end
=
ramdump
.
page_offset
-
vmemmap_size
-
offset
return
vmalloc_end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment