Skip to content

Commit 928f79a

Browse files
committed
Merge tag 'loongarch-fixes-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
Pull LoongArch fixes from Huacai Chen: "Remove the unused dma-direct.h, and some bug & warning fixes" * tag 'loongarch-fixes-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: LoongArch: KVM: Invalidate guest steal time address on vCPU reset LoongArch: Add ifdefs to fix LSX and LASX related warnings LoongArch: Define ARCH_IRQ_INIT_FLAGS as IRQ_NOPROBE LoongArch: Remove the unused dma-direct.h
2 parents f9a59dd + 4956e07 commit 928f79a

8 files changed

Lines changed: 11 additions & 23 deletions

File tree

arch/loongarch/include/asm/dma-direct.h

Lines changed: 0 additions & 11 deletions
This file was deleted.

arch/loongarch/include/asm/hw_irq.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
extern atomic_t irq_err_count;
1111

12+
#define ARCH_IRQ_INIT_FLAGS IRQ_NOPROBE
13+
1214
/*
1315
* interrupt-retrigger: NOP for now. This may not be appropriate for all
1416
* machines, we'll see ...

arch/loongarch/include/asm/kvm_vcpu.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ static inline void kvm_restore_lasx(struct loongarch_fpu *fpu) { }
7676
#endif
7777

7878
void kvm_init_timer(struct kvm_vcpu *vcpu, unsigned long hz);
79-
void kvm_reset_timer(struct kvm_vcpu *vcpu);
8079
void kvm_save_timer(struct kvm_vcpu *vcpu);
8180
void kvm_restore_timer(struct kvm_vcpu *vcpu);
8281

arch/loongarch/kernel/fpu.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,10 @@ SYM_FUNC_END(_restore_lasx_context)
530530

531531
#ifdef CONFIG_CPU_HAS_LBT
532532
STACK_FRAME_NON_STANDARD _restore_fp
533+
#ifdef CONFIG_CPU_HAS_LSX
533534
STACK_FRAME_NON_STANDARD _restore_lsx
535+
#endif
536+
#ifdef CONFIG_CPU_HAS_LASX
534537
STACK_FRAME_NON_STANDARD _restore_lasx
535538
#endif
539+
#endif

arch/loongarch/kernel/irq.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,6 @@ void __init init_IRQ(void)
102102
mp_ops.init_ipi();
103103
#endif
104104

105-
for (i = 0; i < NR_IRQS; i++)
106-
irq_set_noprobe(i);
107-
108105
for_each_possible_cpu(i) {
109106
page = alloc_pages_node(cpu_to_node(i), GFP_KERNEL, order);
110107

arch/loongarch/kvm/switch.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,10 @@ SYM_DATA(kvm_enter_guest_size, .quad kvm_enter_guest_end - kvm_enter_guest)
277277

278278
#ifdef CONFIG_CPU_HAS_LBT
279279
STACK_FRAME_NON_STANDARD kvm_restore_fpu
280+
#ifdef CONFIG_CPU_HAS_LSX
280281
STACK_FRAME_NON_STANDARD kvm_restore_lsx
282+
#endif
283+
#ifdef CONFIG_CPU_HAS_LASX
281284
STACK_FRAME_NON_STANDARD kvm_restore_lasx
282285
#endif
286+
#endif

arch/loongarch/kvm/timer.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,3 @@ void kvm_save_timer(struct kvm_vcpu *vcpu)
188188
kvm_save_hw_gcsr(csr, LOONGARCH_CSR_ESTAT);
189189
preempt_enable();
190190
}
191-
192-
void kvm_reset_timer(struct kvm_vcpu *vcpu)
193-
{
194-
write_gcsr_timercfg(0);
195-
kvm_write_sw_gcsr(vcpu->arch.csr, LOONGARCH_CSR_TCFG, 0);
196-
hrtimer_cancel(&vcpu->arch.swtimer);
197-
}

arch/loongarch/kvm/vcpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ static int kvm_set_one_reg(struct kvm_vcpu *vcpu,
647647
vcpu->kvm->arch.time_offset = (signed long)(v - drdtime());
648648
break;
649649
case KVM_REG_LOONGARCH_VCPU_RESET:
650-
kvm_reset_timer(vcpu);
650+
vcpu->arch.st.guest_addr = 0;
651651
memset(&vcpu->arch.irq_pending, 0, sizeof(vcpu->arch.irq_pending));
652652
memset(&vcpu->arch.irq_clear, 0, sizeof(vcpu->arch.irq_clear));
653653
break;

0 commit comments

Comments
 (0)