Skip to content

Commit

Permalink
Merge tag 'loongarch-fixes-6.11-2' of git://git.kernel.org/pub/scm/li…
Browse files Browse the repository at this point in the history
…nux/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
  • Loading branch information
Linus Torvalds committed Aug 28, 2024
2 parents f9a59dd + 4956e07 commit 928f79a
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 23 deletions.
11 changes: 0 additions & 11 deletions arch/loongarch/include/asm/dma-direct.h

This file was deleted.

2 changes: 2 additions & 0 deletions arch/loongarch/include/asm/hw_irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

extern atomic_t irq_err_count;

#define ARCH_IRQ_INIT_FLAGS IRQ_NOPROBE

/*
* interrupt-retrigger: NOP for now. This may not be appropriate for all
* machines, we'll see ...
Expand Down
1 change: 0 additions & 1 deletion arch/loongarch/include/asm/kvm_vcpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ static inline void kvm_restore_lasx(struct loongarch_fpu *fpu) { }
#endif

void kvm_init_timer(struct kvm_vcpu *vcpu, unsigned long hz);
void kvm_reset_timer(struct kvm_vcpu *vcpu);
void kvm_save_timer(struct kvm_vcpu *vcpu);
void kvm_restore_timer(struct kvm_vcpu *vcpu);

Expand Down
4 changes: 4 additions & 0 deletions arch/loongarch/kernel/fpu.S
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,10 @@ SYM_FUNC_END(_restore_lasx_context)

#ifdef CONFIG_CPU_HAS_LBT
STACK_FRAME_NON_STANDARD _restore_fp
#ifdef CONFIG_CPU_HAS_LSX
STACK_FRAME_NON_STANDARD _restore_lsx
#endif
#ifdef CONFIG_CPU_HAS_LASX
STACK_FRAME_NON_STANDARD _restore_lasx
#endif
#endif
3 changes: 0 additions & 3 deletions arch/loongarch/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ void __init init_IRQ(void)
mp_ops.init_ipi();
#endif

for (i = 0; i < NR_IRQS; i++)
irq_set_noprobe(i);

for_each_possible_cpu(i) {
page = alloc_pages_node(cpu_to_node(i), GFP_KERNEL, order);

Expand Down
4 changes: 4 additions & 0 deletions arch/loongarch/kvm/switch.S
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,10 @@ SYM_DATA(kvm_enter_guest_size, .quad kvm_enter_guest_end - kvm_enter_guest)

#ifdef CONFIG_CPU_HAS_LBT
STACK_FRAME_NON_STANDARD kvm_restore_fpu
#ifdef CONFIG_CPU_HAS_LSX
STACK_FRAME_NON_STANDARD kvm_restore_lsx
#endif
#ifdef CONFIG_CPU_HAS_LASX
STACK_FRAME_NON_STANDARD kvm_restore_lasx
#endif
#endif
7 changes: 0 additions & 7 deletions arch/loongarch/kvm/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,3 @@ void kvm_save_timer(struct kvm_vcpu *vcpu)
kvm_save_hw_gcsr(csr, LOONGARCH_CSR_ESTAT);
preempt_enable();
}

void kvm_reset_timer(struct kvm_vcpu *vcpu)
{
write_gcsr_timercfg(0);
kvm_write_sw_gcsr(vcpu->arch.csr, LOONGARCH_CSR_TCFG, 0);
hrtimer_cancel(&vcpu->arch.swtimer);
}
2 changes: 1 addition & 1 deletion arch/loongarch/kvm/vcpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ static int kvm_set_one_reg(struct kvm_vcpu *vcpu,
vcpu->kvm->arch.time_offset = (signed long)(v - drdtime());
break;
case KVM_REG_LOONGARCH_VCPU_RESET:
kvm_reset_timer(vcpu);
vcpu->arch.st.guest_addr = 0;
memset(&vcpu->arch.irq_pending, 0, sizeof(vcpu->arch.irq_pending));
memset(&vcpu->arch.irq_clear, 0, sizeof(vcpu->arch.irq_clear));
break;
Expand Down

0 comments on commit 928f79a

Please sign in to comment.