Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
kernel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
redox-os
kernel
Commits
ab687852
Commit
ab687852
authored
7 years ago
by
Robert Węcławski
Browse files
Options
Downloads
Patches
Plain Diff
Convert entry count to u64, remove unnecessary parentheses
parent
a48ec82f
No related branches found
No related tags found
1 merge request
!66
Page table optimization
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/arch/x86_64/paging/entry.rs
+1
-1
1 addition, 1 deletion
src/arch/x86_64/paging/entry.rs
src/arch/x86_64/paging/table.rs
+1
-1
1 addition, 1 deletion
src/arch/x86_64/paging/table.rs
with
2 additions
and
2 deletions
src/arch/x86_64/paging/entry.rs
+
1
−
1
View file @
ab687852
...
@@ -67,6 +67,6 @@ impl Entry {
...
@@ -67,6 +67,6 @@ impl Entry {
/// Set bits 52-61 in entry, used as counter for page table
/// Set bits 52-61 in entry, used as counter for page table
pub
fn
set_counter_bits
(
&
mut
self
,
count
:
u64
)
{
pub
fn
set_counter_bits
(
&
mut
self
,
count
:
u64
)
{
self
.0
=
(
(
self
.0
&
0xc00fffff_ffffffff
)
|
(
count
<<
52
)
)
;
self
.0
=
(
self
.0
&
0xc00fffff_ffffffff
)
|
(
count
<<
52
);
}
}
}
}
This diff is collapsed.
Click to expand it.
src/arch/x86_64/paging/table.rs
+
1
−
1
View file @
ab687852
...
@@ -61,7 +61,7 @@ impl<L> Table<L> where L: TableLevel {
...
@@ -61,7 +61,7 @@ impl<L> Table<L> where L: TableLevel {
/// Set number of entries in first table entry
/// Set number of entries in first table entry
fn
set_entry_count
(
&
mut
self
,
count
:
u64
)
{
fn
set_entry_count
(
&
mut
self
,
count
:
u64
)
{
assert!
(
count
<=
ENTRY_COUNT
,
"count can't be greater than ENTRY_COUNT"
);
assert!
(
count
<=
ENTRY_COUNT
as
u64
,
"count can't be greater than ENTRY_COUNT"
);
self
.entries
[
0
]
.set_counter_bits
(
count
);
self
.entries
[
0
]
.set_counter_bits
(
count
);
}
}
...
...
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