← Documents Documentation/ABI/testing/sysfs-bus-platform GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

Platform bus driver and device attributes

Platform device의 driver override, NUMA node, MSI vector, uevent MODALIAS와 devicetree·driver-name 형식을 설명합니다.

Source pathDocumentation/ABI/testing/sysfs-bus-platform
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

Override matching rules

sysfs-bus-platform:1-21

driver_override는 OF·ACPI·ID table·name matching보다 우선할 단일 driver 이름을 지정하며 자동 unbind나 module load는 수행하지 않습니다.

Topology and interrupts

sysfs-bus-platform:22-45

numa_node는 firmware가 알려준 node를, msi_irqs는 할당 vector file과 유효 vector의 msi mode를 제공합니다.

Device creation alias

sysfs-bus-platform:46-56

modalias는 device creation uevent의 MODALIAS와 같으며 devicetree 장치와 기타 platform 장치가 서로 다른 형식을 사용합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 What: /sys/bus/platform/devices/.../driver_override
2 Date: April 2014
3 Contact: Kim Phillips <kim.phillips@freescale.com>
4 Description:
5 This file allows the driver for a device to be specified which
6 will override standard OF, ACPI, ID table, and name matching.
7 When specified, only a driver with a name matching the value
8 written to driver_override will have an opportunity to bind
9 to the device. The override is specified by writing a string
10 to the driver_override file (echo vfio-platform > \
11 driver_override) and may be cleared with an empty string
12 (echo > driver_override). This returns the device to standard
13 matching rules binding. Writing to driver_override does not
14 automatically unbind the device from its current driver or make
15 any attempt to automatically load the specified driver. If no
16 driver with a matching name is currently loaded in the kernel,
17 the device will not bind to any driver. This also allows
18 devices to opt-out of driver binding using a driver_override
19 name such as "none". Only a single driver may be specified in
20 the override, there is no support for parsing delimiters.
21
22 What: /sys/bus/platform/devices/.../numa_node
23 Date: June 2020
24 Contact: Barry Song <song.bao.hua@hisilicon.com>
25 Description:
26 This file contains the NUMA node to which the platform device
27 is attached. It won't be visible if the node is unknown. The
28 value comes from an ACPI _PXM method or a similar firmware
29 source. Initial users for this file would be devices like
30 arm smmu which are populated by arm64 acpi_iort.
31
32 What: /sys/bus/platform/devices/.../msi_irqs/
33 Date: August 2021
34 Contact: Barry Song <song.bao.hua@hisilicon.com>
35 Description:
36 The /sys/devices/.../msi_irqs directory contains a variable set
37 of files, with each file being named after a corresponding msi
38 irq vector allocated to that device.
39
40 What: /sys/bus/platform/devices/.../msi_irqs/<N>
41 Date: August 2021
42 Contact: Barry Song <song.bao.hua@hisilicon.com>
43 Description:
44 This attribute will show "msi" if <N> is a valid msi irq
45
46 What: /sys/bus/platform/devices/.../modalias
47 Description:
48 Same as MODALIAS in the uevent at device creation.
49
50 A platform device that it is exposed via devicetree uses:
51
52 - of:N`of node name`T`type`
53
54 Other platform devices use, instead:
55
56 - platform:`driver name`
57

3. 한국어 전문 번역

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

Platform driver matching override

1-21
항목한국어 전문 번역
What/sys/bus/platform/devices/.../driver_override
Date2014년 4월
ContactKim Phillips <kim.phillips@freescale.com>
Description표준 OF, ACPI, ID table, name matching보다 우선할 driver를 지정합니다. 지정하면 driver_override에 쓴 값과 이름이 같은 driver만 bind할 기회를 얻습니다. 빈 문자열로 clear하면 표준 matching rule로 돌아갑니다. 쓰기만으로 현재 driver에서 자동 unbind하거나 지정 driver를 자동 load하지 않습니다. 일치하는 이름의 driver가 kernel에 load되지 않았으면 어느 driver에도 bind되지 않습니다. "none" 같은 이름으로 driver binding을 거부할 수도 있습니다. Override에는 driver 하나만 지정할 수 있고 delimiter parsing은 지원하지 않습니다.
echo vfio-platform > \
driver_override

echo > driver_override

Platform 장치 NUMA node

22-31
항목한국어 전문 번역
What/sys/bus/platform/devices/.../numa_node
Date2020년 6월
ContactBarry Song <song.bao.hua@hisilicon.com>
DescriptionPlatform 장치가 연결된 NUMA node를 담습니다. Node를 알 수 없으면 file이 보이지 않습니다. 값은 ACPI _PXM method 또는 유사한 firmware source에서 옵니다. 초기 사용자는 arm64 acpi_iort가 생성하는 Arm SMMU 같은 장치입니다.

Platform 장치 MSI vector 목록

32-39
항목한국어 전문 번역
What/sys/bus/platform/devices/.../msi_irqs/
Date2021년 8월
ContactBarry Song <song.bao.hua@hisilicon.com>
Description/sys/devices/.../msi_irqs 디렉터리는 가변적인 file 집합을 담고 각 file 이름은 장치에 할당된 해당 MSI IRQ vector 번호입니다.

Platform 장치 MSI vector mode

40-45
항목한국어 전문 번역
What/sys/bus/platform/devices/.../msi_irqs/<N>
Date2021년 8월
ContactBarry Song <song.bao.hua@hisilicon.com>
Description<N>이 유효한 MSI IRQ이면 이 속성은 "msi"를 표시합니다.

Platform 장치 MODALIAS

46-56
항목한국어 전문 번역
What/sys/bus/platform/devices/.../modalias
Date원문에 명시되지 않음
Description장치 생성 시 uevent의 MODALIAS와 같습니다. Devicetree를 통해 노출된 platform 장치와 그 밖의 platform 장치는 서로 다른 형식을 사용합니다.
of:N`of node name`T`type`

platform:`driver name`