Ilpo Järvinen
867cae44f8
mfd: intel-m10-bmc: Manage access to MAX 10 fw handshake registers
...
On some MAX 10 cards, the BMC firmware is not available to service
handshake registers during secure update erase and write phases at
normal speeds. This problem affects at least hwmon driver. When the MAX
10 hwmon driver tries to read the sensor values during a secure update,
the reads are slowed down (e.g., reading all D5005 sensors takes ~24s
which is magnitudes worse than the normal <0.02s).
Manage access to the handshake registers using a rw semaphore and a FW
state variable to prevent accesses during those secure update phases
and return -EBUSY instead.
If handshake_sys_reg_nranges == 0, don't update bwcfw_state as it is not
used. This avoids the locking cost.
Co-developed-by: Russ Weight <russell.h.weight@intel.com>
Signed-off-by: Russ Weight <russell.h.weight@intel.com>
Co-developed-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230417092653.16487-5-ilpo.jarvinen@linux.intel.com
2023-06-15 09:19:36 +01:00
..
2022-12-07 13:28:10 +00:00
2022-12-07 13:28:13 +00:00
2022-12-07 13:28:10 +00:00
2023-04-26 11:40:32 +01:00
2019-06-19 17:09:55 +02:00
2022-12-07 13:28:10 +00:00
2022-03-23 14:51:51 +00:00
2019-05-30 11:29:22 -07:00
2019-05-30 11:29:22 -07:00
2019-06-19 17:09:55 +02:00
2022-08-16 12:46:26 +02:00
2022-12-07 13:27:20 +00:00
2022-12-07 13:28:10 +00:00
2021-11-05 14:40:26 +00:00
2023-04-13 13:13:50 -07:00
2023-02-22 08:25:53 +00:00
2023-04-26 11:40:33 +01:00
2021-04-14 16:06:40 +01:00
2023-04-26 11:40:33 +01:00
2021-11-05 14:40:26 +00:00
2022-12-07 13:27:20 +00:00
2022-12-07 13:27:20 +00:00
2020-11-19 08:34:22 +00:00
2022-12-07 13:28:13 +00:00
2023-04-26 11:40:32 +01:00
2023-04-26 11:40:27 +01:00
2020-01-07 10:08:58 +00:00
2023-04-26 11:40:32 +01:00
2023-05-25 12:35:57 +01:00
2021-01-15 13:23:36 +00:00
2023-05-25 12:35:57 +01:00
2022-12-07 13:27:20 +00:00
2023-04-26 11:40:32 +01:00
2022-12-07 13:27:20 +00:00
2023-03-17 15:16:27 +01:00
2020-01-24 07:33:58 +00:00
2019-06-19 17:09:55 +02:00
2019-07-02 12:11:31 +01:00
2019-07-02 12:11:31 +01:00
2019-07-02 12:11:31 +01:00
2019-07-02 12:11:31 +01:00
2019-11-11 08:45:03 +00:00
2023-04-26 11:40:32 +01:00
2023-04-26 11:40:32 +01:00
2023-04-26 11:40:32 +01:00
2019-06-19 17:09:55 +02:00
2023-04-26 11:40:32 +01:00
2023-04-26 11:40:31 +01:00
2023-04-26 11:40:31 +01:00
2023-04-26 11:40:30 +01:00
2020-11-19 08:34:21 +00:00
2022-12-07 13:27:21 +00:00
2022-12-07 13:27:21 +00:00
2021-08-05 14:19:59 +01:00
2022-07-19 10:54:41 +01:00
2023-04-26 11:40:34 +01:00
2022-08-16 12:46:26 +02:00
2022-03-08 09:44:06 +00:00
2023-04-26 11:40:31 +01:00
2022-12-08 12:20:58 +00:00
2022-12-07 13:28:14 +00:00
2022-04-26 15:10:29 +01:00
2023-04-26 11:40:26 +01:00
2021-10-05 08:56:08 +01:00
2020-04-24 11:18:44 +01:00
2021-08-11 16:00:53 +03:00
2022-07-19 10:54:42 +01:00
2022-09-28 16:17:41 +01:00
2023-04-26 11:40:26 +01:00
2023-04-26 11:40:28 +01:00
2020-08-13 07:50:05 +01:00
2022-03-23 14:51:44 +00:00
2023-04-26 11:40:34 +01:00
2021-12-29 13:17:01 +00:00
2021-12-29 13:17:01 +00:00
2023-06-15 09:19:36 +01:00
2023-06-15 09:19:36 +01:00
2023-06-15 09:19:36 +01:00
2021-08-12 11:39:39 +01:00
2023-04-26 11:40:27 +01:00
2022-08-16 12:46:26 +02:00
2021-11-05 14:40:27 +00:00
2023-06-15 09:18:54 +01:00
2023-02-22 08:25:51 +00:00
2023-04-26 11:40:32 +01:00
2023-02-22 08:25:51 +00:00
2020-07-01 14:54:29 +01:00
2022-12-07 13:27:22 +00:00
2022-12-07 13:27:21 +00:00
2022-09-28 16:09:50 +01:00
2023-04-26 11:40:30 +01:00
2022-12-07 13:27:22 +00:00
2022-09-28 16:17:39 +01:00
2021-09-07 08:44:07 +01:00
2022-12-07 13:28:07 +00:00
2022-12-07 13:27:22 +00:00
2022-02-09 13:00:45 +00:00
2019-07-15 20:18:40 -07:00
2023-06-15 09:18:54 +01:00
2022-12-07 13:27:22 +00:00
2023-02-22 08:25:52 +00:00
2022-12-07 13:28:10 +00:00
2022-12-07 13:27:23 +00:00
2022-12-07 13:27:23 +00:00
2022-12-07 13:28:14 +00:00
2022-12-07 13:28:12 +00:00
2022-12-07 13:28:14 +00:00
2022-12-07 13:28:12 +00:00
2022-12-07 13:28:14 +00:00
2022-07-19 10:54:38 +01:00
2022-12-07 13:28:14 +00:00
2022-03-07 14:00:27 +00:00
2022-12-07 13:28:07 +00:00
2022-12-07 13:28:10 +00:00
2021-11-05 14:40:26 +00:00
2021-07-21 11:53:42 +02:00
2022-12-07 13:28:11 +00:00
2022-12-07 13:27:23 +00:00
2022-12-07 13:27:23 +00:00
2023-04-26 11:40:29 +01:00
2022-12-08 13:15:46 +00:00
2020-05-26 10:41:40 +01:00
2022-07-19 10:54:39 +01:00
2022-12-07 13:28:08 +00:00
2022-09-28 16:09:50 +01:00
2022-09-28 16:09:50 +01:00
2022-07-19 10:54:41 +01:00
2022-12-07 13:28:10 +00:00
2020-08-23 17:36:59 -05:00
2023-02-22 11:42:29 +00:00
2023-03-20 09:08:48 +00:00
2023-05-02 10:41:31 -07:00
2022-09-09 07:54:47 +01:00
2023-04-26 11:40:31 +01:00
2023-04-26 11:40:33 +01:00
2022-12-07 13:28:16 +00:00
2023-02-22 08:25:51 +00:00
2022-12-07 13:28:11 +00:00
2019-05-30 11:26:32 -07:00
2022-12-07 13:28:11 +00:00
2023-04-26 11:40:27 +01:00
2023-02-22 08:25:52 +00:00
2023-04-26 11:40:28 +01:00
2022-09-28 16:17:40 +01:00
2020-08-23 17:36:59 -05:00
2022-12-07 13:28:11 +00:00
2022-12-07 13:27:23 +00:00
2020-11-19 08:34:21 +00:00
2022-12-07 13:27:23 +00:00
2023-05-15 16:20:22 +01:00
2023-05-15 16:19:30 +01:00
2023-05-15 16:20:22 +01:00
2022-12-07 13:28:14 +00:00
2022-12-08 13:52:58 +00:00
2022-12-08 13:52:58 +00:00
2022-12-08 13:52:58 +00:00
2021-07-13 12:20:44 +01:00
2023-04-26 11:40:34 +01:00
2023-04-26 11:40:34 +01:00
2023-04-26 11:40:34 +01:00
2022-08-16 12:46:26 +02:00
2023-06-08 18:16:28 +01:00
2022-12-07 13:28:15 +00:00
2023-04-26 11:40:34 +01:00
2023-04-26 11:40:34 +01:00
2023-04-26 11:40:26 +01:00
2023-04-26 11:40:26 +01:00
2023-04-26 11:40:26 +01:00
2022-12-07 13:27:24 +00:00
2019-06-05 17:36:37 +02:00
2023-06-02 09:09:45 +01:00
2021-08-16 13:45:34 +01:00
2022-12-07 13:27:24 +00:00
2022-12-07 13:28:11 +00:00
2022-12-07 13:28:07 +00:00
2022-12-07 13:28:15 +00:00
2023-04-26 11:40:27 +01:00
2022-03-08 09:44:05 +00:00
2022-12-08 12:38:47 +00:00
2021-04-14 16:06:26 +01:00
2022-12-07 13:28:13 +00:00
2023-04-26 11:40:31 +01:00
2023-04-26 11:40:31 +01:00
2023-04-26 11:40:32 +01:00
2021-11-05 14:40:26 +00:00
2022-12-07 13:28:15 +00:00
2022-12-07 13:27:25 +00:00
2023-04-26 11:40:27 +01:00
2021-06-02 10:51:19 +01:00
2023-02-22 08:25:53 +00:00
2023-04-26 11:40:31 +01:00
2021-11-05 14:40:02 +00:00
2022-12-07 13:27:25 +00:00
2022-12-07 13:28:13 +00:00
2019-05-30 11:29:19 -07:00
2022-12-07 13:27:25 +00:00
2022-12-07 13:27:25 +00:00
2023-04-26 11:40:30 +01:00
2023-05-18 16:06:14 +01:00
2023-05-18 16:06:14 +01:00
2023-05-18 16:06:14 +01:00
2022-12-07 13:27:25 +00:00
2022-12-07 13:27:25 +00:00
2022-12-07 13:28:15 +00:00
2022-08-16 12:46:26 +02:00
2022-12-07 13:27:26 +00:00
2022-12-07 13:28:15 +00:00
2022-12-07 13:27:26 +00:00
2020-11-19 08:34:22 +00:00
2022-06-10 14:51:36 +02:00
2022-12-07 13:27:26 +00:00
2022-06-10 14:51:36 +02:00
2023-04-26 11:40:28 +01:00
2023-04-26 11:40:30 +01:00
2022-09-28 16:17:41 +01:00
2023-02-22 08:25:52 +00:00
2022-04-28 17:24:10 +01:00
2023-06-12 12:24:30 +01:00
2023-04-26 11:40:33 +01:00
2022-04-28 17:24:40 +01:00
2021-06-15 13:02:01 +01:00
2022-12-07 13:28:11 +00:00
2019-06-19 17:09:55 +02:00
2022-11-14 10:01:39 +01:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:35 -07:00
2022-12-07 13:28:15 +00:00
2022-12-07 13:27:26 +00:00
2023-01-25 09:34:20 +01:00
2021-02-08 13:54:40 +00:00
2021-06-15 12:53:38 +01:00
2022-12-07 13:27:26 +00:00
2019-05-30 11:26:32 -07:00
2021-06-15 13:01:45 +01:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2020-07-06 08:31:57 +01:00
2019-05-30 11:26:32 -07:00
2022-12-07 13:27:26 +00:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2022-12-07 13:27:27 +00:00
2023-04-26 11:40:32 +01:00
2021-08-05 12:41:06 +01:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-11-11 08:45:02 +00:00