File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 3434#define ICC_SRE __ACCESS_CP15(c12, 0, c12, 5)
3535#define ICC_IGRPEN1 __ACCESS_CP15(c12, 0, c12, 7)
3636#define ICC_BPR1 __ACCESS_CP15(c12, 0, c12, 3)
37+ #define ICC_RPR __ACCESS_CP15(c12, 0, c11, 3)
3738
3839#define __ICC_AP0Rx (x ) __ACCESS_CP15(c12, 0, c8, 4 | x)
3940#define ICC_AP0R0 __ICC_AP0Rx(0)
@@ -245,6 +246,21 @@ static inline void gic_write_bpr1(u32 val)
245246 write_sysreg (val , ICC_BPR1 );
246247}
247248
249+ static inline u32 gic_read_pmr (void )
250+ {
251+ return read_sysreg (ICC_PMR );
252+ }
253+
254+ static inline void gic_write_pmr (u32 val )
255+ {
256+ write_sysreg (val , ICC_PMR );
257+ }
258+
259+ static inline u32 gic_read_rpr (void )
260+ {
261+ return read_sysreg (ICC_RPR );
262+ }
263+
248264/*
249265 * Even in 32bit systems that use LPAE, there is no guarantee that the I/O
250266 * interface provides true 64bit atomic accesses, so using strd/ldrd doesn't
Original file line number Diff line number Diff line change @@ -114,6 +114,21 @@ static inline void gic_write_bpr1(u32 val)
114114 write_sysreg_s (val , SYS_ICC_BPR1_EL1 );
115115}
116116
117+ static inline u32 gic_read_pmr (void )
118+ {
119+ return read_sysreg_s (SYS_ICC_PMR_EL1 );
120+ }
121+
122+ static inline void gic_write_pmr (u32 val )
123+ {
124+ write_sysreg_s (val , SYS_ICC_PMR_EL1 );
125+ }
126+
127+ static inline u32 gic_read_rpr (void )
128+ {
129+ return read_sysreg_s (SYS_ICC_RPR_EL1 );
130+ }
131+
117132#define gic_read_typer (c ) readq_relaxed(c)
118133#define gic_write_irouter (v , c ) writeq_relaxed(v, c)
119134#define gic_read_lpir (c ) readq_relaxed(c)
You can’t perform that action at this time.
0 commit comments