powerpc fixes for 6.14 #2

- Fix to handle PE state in pseries_eeh_get_state()
  - Handle unset of tce window if it was never set
 
 Thanks to: Narayana Murty N, Ritesh Harjani (IBM), Shivaprasad G Bhat, Vaishnavi Bhat.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEqX2DNAOgU8sBX3pRpnEsdPSHZJQFAmeaLBEACgkQpnEsdPSH
 ZJQ/sxAAh8iKF6Rnzw3xn5uURua1+26osK2H1XgU7be0A9vlMWLBaqCzOkleNBsF
 xMd+MBIbCGkv1LrYYLXLzc4Dt4B3lEfTA39sWlbGOJ+YAHhXqUAdSUtvUFeO/bSk
 svOeDYpVvUnOh2wXdPEQNFV1yKdVmIub7QdfFja9lvW9+d/DpBXnsEL6h7ToMrdl
 jTGICR32ieuhcdYJSm/B2LUXwqcga1oUBE0oMEg4g8f3as5pi1s7yE7kDhOj0MnH
 u7NFlOnThd+i/jX25/J2lwUZDB6ZHgIfZdHiQAM3/z7jbV736R9jK6tT98EFXZii
 n0CyhHyvMxLdMzneAfY5BDBahZEPYQSVXm4woCboJQUlCJbsB6PX9hX7kiGMJelo
 eSAs+/wPcnTG+E29lpMsXXTIf6lZkGar32tfuF76ZBHJs1D5LJKhO51wCZauBFqn
 dkLY0XiQLTRJxfmw0zwdNLKiKeyUYOgmfRUSvpRTjtrgdIZ5uKQ9FX7mg91fI2hr
 Cv8KUVWVcnHYrgPulUSSVmYZrfd2FhwZlc1V224l4Flh9ODZALf1ldH6VhqhJAeL
 waDDhldTgNlsZxUbtUZlDkyGbIO0IVfJTXBr7UGggLkUCJfEdPvDSJNAReOGfuWv
 pIszzk4oDv22/Lnk/zT0e3ZL++2rDcXjIjVFJQ/hfKfAAiP4myw=
 =rhA9
 -----END PGP SIGNATURE-----

Merge tag 'powerpc-6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Madhavan Srinivasan:

 - Fix to handle PE state in pseries_eeh_get_state()

 - Handle unset of tce window if it was never set

Thanks to Narayana Murty N, Ritesh Harjani (IBM), Shivaprasad G Bhat,
and Vaishnavi Bhat.

* tag 'powerpc-6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/pseries/iommu: Don't unset window if it was never set
  powerpc/pseries/eeh: Fix get PE state translation
This commit is contained in:
Linus Torvalds 2025-01-29 10:55:04 -08:00
commit aa5216a2b0
2 changed files with 7 additions and 2 deletions

View File

@ -581,7 +581,9 @@ static int pseries_eeh_get_state(struct eeh_pe *pe, int *delay)
switch(rets[0]) {
case 0:
result = EEH_STATE_MMIO_ACTIVE |
EEH_STATE_DMA_ACTIVE;
EEH_STATE_DMA_ACTIVE |
EEH_STATE_MMIO_ENABLED |
EEH_STATE_DMA_ENABLED;
break;
case 1:
result = EEH_STATE_RESET_ACTIVE |

View File

@ -2208,6 +2208,9 @@ static long spapr_tce_unset_window(struct iommu_table_group *table_group, int nu
const char *win_name;
int ret = -ENODEV;
if (!tbl) /* The table was never created OR window was never opened */
return 0;
mutex_lock(&dma_win_init_mutex);
if ((num == 0) && is_default_window_table(table_group, tbl))