← Documents Documentation/watchdog/mlx-wdt.rst GitHub 원문 ↗

Linux 6.18.37 · Watchdog / Hardware

Mellanox watchdog drivers

Mellanox 스위치의 Type 1·2·3 watchdog, main·auxiliary 동작과 regmap 연동을 설명합니다.

Source pathDocumentation/watchdog/mlx-wdt.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

mlx-wdt.rst:1-66

Mellanox 스위치의 Type 1·2·3 watchdog, main·auxiliary 동작과 regmap 연동을 설명합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 =========================
2 Mellanox watchdog drivers
3 =========================
4
5 for x86 based system switches
6 =============================
7
8 This driver provides watchdog functionality for various Mellanox
9 Ethernet and Infiniband switch systems.
10
11 Mellanox watchdog device is implemented in a programmable logic device.
12
13 There are 2 types of HW watchdog implementations.
14
15 Type 1:
16 Actual HW timeout can be defined as a power of 2 msec.
17 e.g. timeout 20 sec will be rounded up to 32768 msec.
18 The maximum timeout period is 32 sec (32768 msec.),
19 Get time-left isn't supported
20
21 Type 2:
22 Actual HW timeout is defined in sec. and it's the same as
23 a user-defined timeout.
24 Maximum timeout is 255 sec.
25 Get time-left is supported.
26
27 Type 3:
28 Same as Type 2 with extended maximum timeout period.
29 Maximum timeout is 65535 sec.
30
31 Type 1 HW watchdog implementation exist in old systems and
32 all new systems have type 2 HW watchdog.
33 Two types of HW implementation have also different register map.
34
35 Type 3 HW watchdog implementation can exist on all Mellanox systems
36 with new programmer logic device.
37 It's differentiated by WD capability bit.
38 Old systems still have only one main watchdog.
39
40 Mellanox system can have 2 watchdogs: main and auxiliary.
41 Main and auxiliary watchdog devices can be enabled together
42 on the same system.
43 There are several actions that can be defined in the watchdog:
44 system reset, start fans on full speed and increase register counter.
45 The last 2 actions are performed without a system reset.
46 Actions without reset are provided for auxiliary watchdog device,
47 which is optional.
48 Watchdog can be started during a probe, in this case it will be
49 pinged by watchdog core before watchdog device will be opened by
50 user space application.
51 Watchdog can be initialised in nowayout way, i.e. oncse started
52 it can't be stopped.
53
54 This mlx-wdt driver supports both HW watchdog implementations.
55
56 Watchdog driver is probed from the common mlx_platform driver.
57 Mlx_platform driver provides an appropriate set of registers for
58 Mellanox watchdog device, identity name (mlx-wdt-main or mlx-wdt-aux),
59 initial timeout, performed action in expiration and configuration flags.
60 watchdog configuration flags: nowayout and start_at_boot, hw watchdog
61 version - type1 or type2.
62 The driver checks during initialization if the previous system reset
63 was done by the watchdog. If yes, it makes a notification about this event.
64
65 Access to HW registers is performed through a generic regmap interface.
66 Programmable logic device registers have little-endian order.
67

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

스위치 시스템과 PLD watchdog

1-14

`mlx-wdt` 드라이버는 x86 기반 Mellanox Ethernet·InfiniBand 스위치 시스템의 watchdog 기능을 제공합니다. Watchdog 장치는 programmable logic device, 즉 PLD 안에 구현됩니다.

원문은 하드웨어 timeout 표현과 기능에 따라 세 구현 유형을 구분합니다.

=========================
Mellanox watchdog drivers
=========================

for x86 based system switches
=============================

This driver provides watchdog functionality for various Mellanox
Ethernet and Infiniband switch systems.

Mellanox watchdog device is implemented in a programmable logic device.

There are 2 types of HW watchdog implementations.

Type 1·2·3의 timeout

15-39

Type 1은 실제 하드웨어 timeout을 2의 거듭제곱 밀리초로만 표현합니다. 예를 들어 20초 요청은 32768ms로 올림됩니다. 최대값은 32768ms, 즉 32초이며 남은 시간 조회를 지원하지 않습니다.

Type 2는 초 단위 timeout을 사용해 사용자 요청값과 실제값이 같습니다. 최대값은 255초이고 남은 시간 조회를 지원합니다.

Type 3은 Type 2와 같은 동작에 최대 timeout을 65535초로 확장한 구현입니다.

오래된 시스템에는 Type 1이 있고 새 시스템에는 Type 2가 있으며 register map도 서로 다릅니다. Type 3은 새 PLD가 있는 Mellanox 시스템에서 사용할 수 있고 WD capability bit로 구분합니다. 오래된 시스템은 main watchdog 하나만 가집니다.

Mellanox watchdog 유형
유형실제 timeout최대Get time-left
Type 12의 거듭제곱 ms로 올림32768ms / 32초미지원
Type 2사용자 지정 초와 동일255초지원
Type 3Type 2와 동일65535초지원

timeout 표현, 최대값, time-left 지원을 비교합니다.

Type 1:
  Actual HW timeout can be defined as a power of 2 msec.
  e.g. timeout 20 sec will be rounded up to 32768 msec.
  The maximum timeout period is 32 sec (32768 msec.),
  Get time-left isn't supported

Type 2:
  Actual HW timeout is defined in sec. and it's the same as
  a user-defined timeout.
  Maximum timeout is 255 sec.
  Get time-left is supported.

Type 3:
  Same as Type 2 with extended maximum timeout period.
  Maximum timeout is 65535 sec.

Type 1 HW watchdog implementation exist in old systems and
all new systems have type 2 HW watchdog.
Two types of HW implementation have also different register map.

Type 3 HW watchdog implementation can exist on all Mellanox systems
with new programmer logic device.
It's differentiated by WD capability bit.
Old systems still have only one main watchdog.

main·auxiliary와 만료 동작

40-53

Mellanox 시스템은 main과 auxiliary 두 watchdog을 가질 수 있으며 같은 시스템에서 동시에 켤 수 있습니다.

만료 동작은 시스템 reset, 팬을 최고 속도로 시작, register counter 증가입니다. 팬 최고 속도와 counter 증가는 reset 없이 수행되며 선택적인 auxiliary watchdog에서 제공합니다.

Probe 중 watchdog을 시작할 수도 있습니다. 이 경우 사용자 공간 애플리케이션이 장치를 열기 전까지 watchdog core가 ping합니다.

nowayout으로 초기화하면 한 번 시작한 watchdog을 멈출 수 없습니다.

Mellanox watchdog 동작
동작시스템 reset대상
System resetmain
팬 최고 속도아니요선택적 auxiliary
Register counter 증가아니요선택적 auxiliary

만료 시 선택 가능한 동작과 reset 여부입니다.

Mellanox system can have 2 watchdogs: main and auxiliary.
Main and auxiliary watchdog devices can be enabled together
on the same system.
There are several actions that can be defined in the watchdog:
system reset, start fans on full speed and increase register counter.
The last 2 actions are performed without a system reset.
Actions without reset are provided for auxiliary watchdog device,
which is optional.
Watchdog can be started during a probe, in this case it will be
pinged by watchdog core before watchdog device will be opened by
user space application.
Watchdog can be initialised in nowayout way, i.e. oncse started
it can't be stopped.

mlx_platform 연동과 regmap

54-66

`mlx-wdt`는 문서의 모든 하드웨어 watchdog 구현을 지원하며 공통 `mlx_platform` 드라이버에서 probe됩니다.

`mlx_platform`은 적절한 register 집합, `mlx-wdt-main` 또는 `mlx-wdt-aux` identity, 초기 timeout, 만료 동작, 구성 flag를 제공합니다. Flag에는 `nowayout`, `start_at_boot`, Type 1 또는 Type 2 하드웨어 버전이 들어갑니다.

초기화 때 이전 시스템 reset이 watchdog 때문인지 검사하고 맞으면 이벤트를 알립니다. 하드웨어 register는 generic regmap으로 접근하며 PLD register byte order는 little-endian입니다.

mlx-wdt 초기화
mlx_platform이 register·identity·timeout·action 제공nowayout·start_at_boot·HW version 적용이전 reset 원인 검사·필요 시 알림regmap으로 little-endian PLD register 접근

platform 정보에서 watchdog 장치를 구성하는 순서입니다.

This mlx-wdt driver supports both HW watchdog implementations.

Watchdog driver is probed from the common mlx_platform driver.
Mlx_platform driver provides an appropriate set of registers for
Mellanox watchdog device, identity name (mlx-wdt-main or mlx-wdt-aux),
initial timeout, performed action in expiration and configuration flags.
watchdog configuration flags: nowayout and start_at_boot, hw watchdog
version - type1 or type2.
The driver checks during initialization if the previous system reset
was done by the watchdog. If yes, it makes a notification about this event.

Access to HW registers is performed through a generic regmap interface.
Programmable logic device registers have little-endian order.