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
9625ab90
Commit
9625ab90
authored
May 25, 2002
by
Paul Mackerras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PPC32: add definitions for fls(), pmd_free_tlb() and pte_free_tlb(),
now used in generic code.
parent
85b59311
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
include/asm-ppc/bitops.h
include/asm-ppc/bitops.h
+12
-0
include/asm-ppc/pgalloc.h
include/asm-ppc/pgalloc.h
+3
-0
No files found.
include/asm-ppc/bitops.h
View file @
9625ab90
...
...
@@ -262,6 +262,18 @@ static __inline__ int ffs(int x)
return
__ilog2
(
x
&
-
x
)
+
1
;
}
/*
* fls: find last (most-significant) bit set.
* Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
*/
static
__inline__
int
fls
(
unsigned
int
x
)
{
int
lz
;
asm
(
"cntlzw %0,%1"
:
"=r"
(
lz
)
:
"r"
(
x
));
return
32
-
lz
;
}
/*
* hweightN: returns the hamming weight (i.e. the number
* of bits set) of a N-bit word
...
...
include/asm-ppc/pgalloc.h
View file @
9625ab90
...
...
@@ -20,6 +20,7 @@ extern void pgd_free(pgd_t *pgd);
*/
#define pmd_alloc_one(mm,address) ({ BUG(); ((pmd_t *)2); })
#define pmd_free(x) do { } while (0)
#define pmd_free_tlb(tlb,x) do { } while (0)
#define pgd_populate(mm, pmd, pte) BUG()
#define pmd_populate_kernel(mm, pmd, pte) \
...
...
@@ -32,6 +33,8 @@ extern struct page *pte_alloc_one(struct mm_struct *mm, unsigned long addr);
extern
void
pte_free_kernel
(
pte_t
*
pte
);
extern
void
pte_free
(
struct
page
*
pte
);
#define pte_free_tlb(tlb, pte) pte_free((pte))
#define check_pgt_cache() do { } while (0)
#endif
/* _PPC_PGALLOC_H */
...
...
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