Re: [kvm-unit-tests PATCH v6 08/10] s390x: define wfi: wait for interrupt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2020-04-27 14:59, Janosch Frank wrote:
On 4/24/20 12:45 PM, Pierre Morel wrote:
wfi(irq_mask) allows the programm to wait for an interrupt.

s/programm/program/

Thx,


The interrupt handler is in charge to remove the WAIT bit
when it finished handling interrupt.

...finished handling the interrupt.

OK, thx



  }
+static inline void wfi(uint64_t irq_mask)

enabled_wait()


I do not like enabled_wait(), we do not know what is enabled and we do not know what we are waiting for.

What about wait_for_interrupt()


+{
+	uint64_t psw_mask;

You can directly initialize this variable.

+
+	psw_mask = extract_psw_mask();
+	load_psw_mask(psw_mask | irq_mask | PSW_MASK_WAIT);

Maybe add a comment here:

/*
  * After being woken and having processed the interrupt, let's restore
the PSW mask.
*/

+	load_psw_mask(psw_mask);
+}
+

I can do this, but wasn't it obvious?


Regards,
Pierre

--
Pierre Morel
IBM Lab Boeblingen



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux