mbox series

[RFC,v2,0/2] Add driver for PAPR watchdog timers

Message ID 20220509174357.5448-1-cheloha@linux.ibm.com
Headers show
Series Add driver for PAPR watchdog timers | expand


Scott Cheloha May 9, 2022, 5:43 p.m. UTC
This second RFC incorporates feedback from the previous RFC:


v2 changes of note:

- Add a firmware feature flag for the H_WATCHDOG feature,

- Register a platform_device for the first watchdog timer during a
  pseries initcall if we have FW_FEATURE_WATCHDOG.  Use id zero, as
  there could be more than one timer in the future.

- Alphabetize Makefile changes.

- Add missing copyright information to pseries-wdt.c.

- Add an 'action' module parameter that configures how the guest is
  terminated on watchdog expiration.

- Use dev_*() for logging critical errors instead of pr_*().

- Handle the H_NOOP case when trying to stop the watchdog.  If the 
  given watchdog is not actually running, H_WATCHDOG returns H_NOOP.
  This is harmless, so we should treat it as a success.

- We don't need pseries_wdt_remove() at all.

- Check watchdog_active() before stopping/starting the timer across

- Consolidate all code from pseries_wdt_module_init() into
  pseries_wdt_probe().  We can then use module_platform_driver().

I have one lingering question:

- The pseries-wdt module is not "automatically" loaded during boot.

  When I do

	# modprobe pseries-wdt

  the driver attaches to the platform bus as expected and the
  /dev/watchdog* devices for the pseries-wdt.0 platform device
  are created.

  I was under the impression that driver/device matching for
  the platform bus was simple string comparison.

  ... what am I doing wrong?  Is this expected behavior?  Do
  I need to do additional configuration to get the module to
  load automatically at boot time?