ACPI fixes for 6.6-rc7

- Fix ACPI initialization ordering on ARM that was changed incorrectly
    during the 6.5 development cycle (Hanjun Guo).
 
  - Make acpi_register_gsi() return an error code as appropriate when
    irq_create_fwspec_mapping() returns 0 on failure (Sunil V L).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmUyn4wSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxALAQAKMk/F3980W2zItc7KmNXRBXMYvMoQTe
 FGZxRbL1QLo3f3eNVblDWDVB4/YgDFG9w9Kz77/a9R3hpOdIbpuXDYcClAnv2jVA
 axZk8mviJIPM2hYu4KuhAgl5gqiJtqE+DqVOf3ebuPj8TGKVYgS6liffaMewodbP
 zqEknwIEvhnNdBkq8rHJ3nHjpdKWVn8MNaHU5tHUNabCKAqQMtH3QuBE0a9LWODu
 h4rMUVidkm7cBEfPaCmPsAc533qonDwNd7VTXsgSAhLhoWlBd+oaXRnMtyxs7Mxx
 8h2T/i4nuu7RG1NBjw4TpEgZyu/2+VKacrhrFt/hD4plMzQo273uhQPPjPvzjroS
 3s2PiuQyoxwYwulbXEPjuU/soG8HCbg6IFyeXcigru2bDF3DpD3RpKRpCFpFGEeo
 /YqGppJC7K1eRgvB5c5qhfFxBEThjAd49jYm93NpMs4w7fFNbQchjToLCTkgiLFs
 o+TmtRQ5eLJXjchRrNBYZ974XutV9ewaM98uC7QgZfp2bcGeP8OgOpoNwRmpVI+V
 MCWZy+RI+x0caEnUVg4V35otMj5gBwJFmm34mAojkEc+Yuu2sqI1VO7FUMcKpfTz
 xIu1RASlZUlKwa+3ykjUG5oNKatUXOm33RxcAaOOfYw0yWIkqdIUCCVFqJDGo+vF
 Q/GxZEHwy7UO
 =VCpn
 -----END PGP SIGNATURE-----

Merge tag 'acpi-6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki:
 "These fix the ACPI initialization ordering on ARM and ACPI IRQ
  management in the cases when irq_create_fwspec_mapping() fails.

  Specifics:

   - Fix ACPI initialization ordering on ARM that was changed
     incorrectly during the 6.5 development cycle (Hanjun Guo)

   - Make acpi_register_gsi() return an error code as appropriate when
     irq_create_fwspec_mapping() returns 0 on failure (Sunil V L)"

* tag 'acpi-6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: bus: Move acpi_arm_init() to the place of after acpi_ghes_init()
  ACPI: irq: Fix incorrect return value in acpi_register_gsi()
This commit is contained in:
Linus Torvalds 2023-10-20 13:47:05 -07:00
commit f20f29cbcb
2 changed files with 7 additions and 2 deletions

View File

@ -1410,10 +1410,10 @@ static int __init acpi_init(void)
acpi_init_ffh();
pci_mmcfg_late_init();
acpi_arm_init();
acpi_viot_early_init();
acpi_hest_init();
acpi_ghes_init();
acpi_arm_init();
acpi_scan_init();
acpi_ec_init();
acpi_debugfs_init();

View File

@ -57,6 +57,7 @@ int acpi_register_gsi(struct device *dev, u32 gsi, int trigger,
int polarity)
{
struct irq_fwspec fwspec;
unsigned int irq;
fwspec.fwnode = acpi_get_gsi_domain_id(gsi);
if (WARN_ON(!fwspec.fwnode)) {
@ -68,7 +69,11 @@ int acpi_register_gsi(struct device *dev, u32 gsi, int trigger,
fwspec.param[1] = acpi_dev_get_irq_type(trigger, polarity);
fwspec.param_count = 2;
return irq_create_fwspec_mapping(&fwspec);
irq = irq_create_fwspec_mapping(&fwspec);
if (!irq)
return -EINVAL;
return irq;
}
EXPORT_SYMBOL_GPL(acpi_register_gsi);