hc
2024-05-10 10ebd8556b7990499c896a550e3d416b444211e6
kernel/arch/riscv/include/asm/irqflags.h
....@@ -1,14 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (C) 2012 Regents of the University of California
3
- *
4
- * This program is free software; you can redistribute it and/or
5
- * modify it under the terms of the GNU General Public License
6
- * as published by the Free Software Foundation, version 2.
7
- *
8
- * This program is distributed in the hope that it will be useful,
9
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- * GNU General Public License for more details.
124 */
135
146
....@@ -21,31 +13,31 @@
2113 /* read interrupt enabled status */
2214 static inline unsigned long arch_local_save_flags(void)
2315 {
24
- return csr_read(sstatus);
16
+ return csr_read(CSR_STATUS);
2517 }
2618
2719 /* unconditionally enable interrupts */
2820 static inline void arch_local_irq_enable(void)
2921 {
30
- csr_set(sstatus, SR_SIE);
22
+ csr_set(CSR_STATUS, SR_IE);
3123 }
3224
3325 /* unconditionally disable interrupts */
3426 static inline void arch_local_irq_disable(void)
3527 {
36
- csr_clear(sstatus, SR_SIE);
28
+ csr_clear(CSR_STATUS, SR_IE);
3729 }
3830
3931 /* get status and disable interrupts */
4032 static inline unsigned long arch_local_irq_save(void)
4133 {
42
- return csr_read_clear(sstatus, SR_SIE);
34
+ return csr_read_clear(CSR_STATUS, SR_IE);
4335 }
4436
4537 /* test flags */
4638 static inline int arch_irqs_disabled_flags(unsigned long flags)
4739 {
48
- return !(flags & SR_SIE);
40
+ return !(flags & SR_IE);
4941 }
5042
5143 /* test hardware interrupt enable bit */
....@@ -57,7 +49,7 @@
5749 /* set interrupt enabled status */
5850 static inline void arch_local_irq_restore(unsigned long flags)
5951 {
60
- csr_set(sstatus, flags & SR_SIE);
52
+ csr_set(CSR_STATUS, flags & SR_IE);
6153 }
6254
6355 #endif /* _ASM_RISCV_IRQFLAGS_H */