Message ID | 20190411115623.5749-7-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/9] riscv: use asm-generic/extable.h | expand |
Στις 2019-04-11 14:56, Christoph Hellwig έγραψε: > Just in case an old interrupt is pending make sure we clear everything > asserted before this kernel started. Based on similar M-mode code in > opensbi. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- > arch/riscv/kernel/head.S | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S > index 9344d9ceda24..62d2c9c85433 100644 > --- a/arch/riscv/kernel/head.S > +++ b/arch/riscv/kernel/head.S > @@ -22,8 +22,9 @@ > > __INIT > ENTRY(_start) > - /* Mask all interrupts */ > + /* Mask and clear all interrupts */ > csrw sie, zero > + csrw sip, zero > > /* Load the global pointer */ > .option push Reviewed-by: Nick Kossifidis <mick@ics.forth.gr>
On 4/11/19 4:57 AM, Christoph Hellwig wrote: > Just in case an old interrupt is pending make sure we clear everything > asserted before this kernel started. Based on similar M-mode code in > opensbi. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- > arch/riscv/kernel/head.S | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S > index 9344d9ceda24..62d2c9c85433 100644 > --- a/arch/riscv/kernel/head.S > +++ b/arch/riscv/kernel/head.S > @@ -22,8 +22,9 @@ > > __INIT > ENTRY(_start) > - /* Mask all interrupts */ > + /* Mask and clear all interrupts */ > csrw sie, zero > + csrw sip, zero > > /* Load the global pointer */ > .option push > Reviewed-by: Atish Patra <atish.patra@wdc.com> Regards, Atish
diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S index 9344d9ceda24..62d2c9c85433 100644 --- a/arch/riscv/kernel/head.S +++ b/arch/riscv/kernel/head.S @@ -22,8 +22,9 @@ __INIT ENTRY(_start) - /* Mask all interrupts */ + /* Mask and clear all interrupts */ csrw sie, zero + csrw sip, zero /* Load the global pointer */ .option push
Just in case an old interrupt is pending make sure we clear everything asserted before this kernel started. Based on similar M-mode code in opensbi. Signed-off-by: Christoph Hellwig <hch@lst.de> --- arch/riscv/kernel/head.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)