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
510610f9
Commit
510610f9
authored
Sep 07, 2023
by
Helge Deller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parisc: BTLB: Add BTLB insert and purge firmware function wrappers
Signed-off-by:
Helge Deller
<
deller@gmx.de
>
parent
eda20521
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
9 deletions
+36
-9
arch/parisc/include/asm/pdc.h
arch/parisc/include/asm/pdc.h
+3
-0
arch/parisc/kernel/firmware.c
arch/parisc/kernel/firmware.c
+33
-9
No files found.
arch/parisc/include/asm/pdc.h
View file @
510610f9
...
...
@@ -46,6 +46,9 @@ int pdc_cache_info(struct pdc_cache_info *cache);
int
pdc_spaceid_bits
(
unsigned
long
*
space_bits
);
#ifndef CONFIG_PA20
int
pdc_btlb_info
(
struct
pdc_btlb_info
*
btlb
);
int
pdc_btlb_insert
(
unsigned
long
long
vpage
,
unsigned
long
physpage
,
unsigned
long
len
,
unsigned
long
entry_info
,
unsigned
long
slot
);
int
pdc_btlb_purge_all
(
void
);
int
pdc_mem_map_hpa
(
struct
pdc_memory_map
*
r_addr
,
struct
pdc_module_path
*
mod_path
);
#endif
/* !CONFIG_PA20 */
int
pdc_pim_toc11
(
struct
pdc_toc_pim_11
*
ret
);
...
...
arch/parisc/kernel/firmware.c
View file @
510610f9
...
...
@@ -696,18 +696,42 @@ int pdc_spaceid_bits(unsigned long *space_bits)
*/
int
pdc_btlb_info
(
struct
pdc_btlb_info
*
btlb
)
{
int
retval
;
int
retval
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
pdc_lock
,
flags
);
retval
=
mem_pdc_call
(
PDC_BLOCK_TLB
,
PDC_BTLB_INFO
,
__pa
(
pdc_result
),
0
);
memcpy
(
btlb
,
pdc_result
,
sizeof
(
*
btlb
));
spin_unlock_irqrestore
(
&
pdc_lock
,
flags
);
spin_lock_irqsave
(
&
pdc_lock
,
flags
);
retval
=
mem_pdc_call
(
PDC_BLOCK_TLB
,
PDC_BTLB_INFO
,
__pa
(
pdc_result
),
0
);
memcpy
(
btlb
,
pdc_result
,
sizeof
(
*
btlb
));
spin_unlock_irqrestore
(
&
pdc_lock
,
flags
);
if
(
retval
<
0
)
{
btlb
->
max_size
=
0
;
}
return
retval
;
if
(
retval
<
0
)
{
btlb
->
max_size
=
0
;
}
return
retval
;
}
int
pdc_btlb_insert
(
unsigned
long
long
vpage
,
unsigned
long
physpage
,
unsigned
long
len
,
unsigned
long
entry_info
,
unsigned
long
slot
)
{
int
retval
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
pdc_lock
,
flags
);
retval
=
mem_pdc_call
(
PDC_BLOCK_TLB
,
PDC_BTLB_INSERT
,
(
unsigned
long
)
(
vpage
>>
32
),
(
unsigned
long
)
vpage
,
physpage
,
len
,
entry_info
,
slot
);
spin_unlock_irqrestore
(
&
pdc_lock
,
flags
);
return
retval
;
}
int
pdc_btlb_purge_all
(
void
)
{
int
retval
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
pdc_lock
,
flags
);
retval
=
mem_pdc_call
(
PDC_BLOCK_TLB
,
PDC_BTLB_PURGE_ALL
);
spin_unlock_irqrestore
(
&
pdc_lock
,
flags
);
return
retval
;
}
/**
...
...
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