1. 27 5月, 2022 2 次提交
  2. 25 5月, 2022 1 次提交
  3. 20 5月, 2022 8 次提交
  4. 19 5月, 2022 1 次提交
  5. 18 5月, 2022 5 次提交
  6. 17 5月, 2022 6 次提交
  7. 15 5月, 2022 1 次提交
    • M
      irqchip/gic-v3: Refactor ISB + EOIR at ack time · 6efb5092
      Mark Rutland 提交于
      There are cases where a context synchronization event is necessary
      between an IRQ being raised and being handled, and there are races such
      that we cannot rely upon the exception entry being subsequent to the
      interrupt being raised. To fix this, we place an ISB between a read of
      IAR and the subsequent invocation of an IRQ handler.
      
      When EOI mode 1 is in use, we need to EOI an interrupt prior to invoking
      its handler, and we have a write to EOIR for this. As this write to EOIR
      requires an ISB, and this is provided by the gic_write_eoir() helper, we
      omit the usual ISB in this case, with the logic being:
      
      |	if (static_branch_likely(&supports_deactivate_key))
      |		gic_write_eoir(irqnr);
      |	else
      |		isb();
      
      This is somewhat opaque, and it would be a little clearer if there were
      an unconditional ISB, with only the write to EOIR being conditional,
      e.g.
      
      |	if (static_branch_likely(&supports_deactivate_key))
      |		write_gicreg(irqnr, ICC_EOIR1_EL1);
      |
      |	isb();
      
      This patch rewrites the code that way, with this logic factored into a
      new helper function with comments explaining what the ISB is for, as
      were originally laid out in commit:
      
        39a06b67 ("irqchip/gic: Ensure we have an ISB between ack and ->handle_irq")
      
      Note that since then, we removed the IAR polling in commit:
      
        342677d7 ("irqchip/gic-v3: Remove acknowledge loop")
      
      ... which removed one of the two race conditions.
      
      For consistency, other portions of the driver are made to manipulate
      EOIR using write_gicreg() and explcit ISBs, and the gic_write_eoir()
      helper function is removed.
      
      There should be no functional change as a result of this patch.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Cc: Marc Zyngier <maz@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: NMarc Zyngier <maz@kernel.org>
      Link: https://lore.kernel.org/r/20220513133038.226182-3-mark.rutland@arm.com
      6efb5092
  8. 14 5月, 2022 1 次提交
    • J
      arm: use fallback for random_get_entropy() instead of zero · ff8a8f59
      Jason A. Donenfeld 提交于
      In the event that random_get_entropy() can't access a cycle counter or
      similar, falling back to returning 0 is really not the best we can do.
      Instead, at least calling random_get_entropy_fallback() would be
      preferable, because that always needs to return _something_, even
      falling back to jiffies eventually. It's not as though
      random_get_entropy_fallback() is super high precision or guaranteed to
      be entropic, but basically anything that's not zero all the time is
      better than returning zero all the time.
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Reviewed-by: NRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NJason A. Donenfeld <Jason@zx2c4.com>
      ff8a8f59
  9. 13 5月, 2022 15 次提交