Skip to content

Commit 45763bf

Browse files
committed
Merge tag 'char-misc-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver updates from Greg KH: "Here is the big char/misc driver patch pull request for 5.1-rc1. The largest thing by far is the new habanalabs driver for their AI accelerator chip. For now it is in the drivers/misc directory but will probably move to a new directory soon along with other drivers of this type. Other than that, just the usual set of individual driver updates and fixes. There's an "odd" merge in here from the DRM tree that they asked me to do as the MEI driver is starting to interact with the i915 driver, and it needed some coordination. All of those patches have been properly acked by the relevant subsystem maintainers. All of these have been in linux-next with no reported issues, most for quite some time" * tag 'char-misc-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (219 commits) habanalabs: adjust Kconfig to fix build errors habanalabs: use %px instead of %p in error print habanalabs: use do_div for 64-bit divisions intel_th: gth: Fix an off-by-one in output unassigning habanalabs: fix little-endian<->cpu conversion warnings habanalabs: use NULL to initialize array of pointers habanalabs: fix little-endian<->cpu conversion warnings habanalabs: soft-reset device if context-switch fails habanalabs: print pointer using %p habanalabs: fix memory leak with CBs with unaligned size habanalabs: return correct error code on MMU mapping failure habanalabs: add comments in uapi/misc/habanalabs.h habanalabs: extend QMAN0 job timeout habanalabs: set DMA0 completion to SOB 1007 habanalabs: fix validation of WREG32 to DMA completion habanalabs: fix mmu cache registers init habanalabs: disable CPU access on timeouts habanalabs: add MMU DRAM default page mapping habanalabs: Dissociate RAZWI info from event types misc/habanalabs: adjust Kconfig to fix build errors ...
2 parents da2577f + 142a0f8 commit 45763bf

File tree

315 files changed

+60732
-1926
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

315 files changed

+60732
-1926
lines changed

CREDITS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,7 @@ S: Brazil
12211221

12221222
N: Oded Gabbay
12231223
1224-
D: AMD KFD maintainer
1224+
D: HabanaLabs and AMD KFD maintainer
12251225
S: 12 Shraga Raphaeli
12261226
S: Petah-Tikva, 4906418
12271227
S: Israel

Documentation/ABI/stable/sysfs-bus-vmbus

+33
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,36 @@ KernelVersion: 4.16
146146
Contact: Stephen Hemminger <[email protected]>
147147
Description: Binary file created by uio_hv_generic for ring buffer
148148
Users: Userspace drivers
149+
150+
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/intr_in_full
151+
Date: February 2019
152+
KernelVersion: 5.0
153+
Contact: Michael Kelley <[email protected]>
154+
Description: Number of guest to host interrupts caused by the inbound ring
155+
buffer transitioning from full to not full while a packet is
156+
waiting for buffer space to become available
157+
Users: Debugging tools
158+
159+
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/intr_out_empty
160+
Date: February 2019
161+
KernelVersion: 5.0
162+
Contact: Michael Kelley <[email protected]>
163+
Description: Number of guest to host interrupts caused by the outbound ring
164+
buffer transitioning from empty to not empty
165+
Users: Debugging tools
166+
167+
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/out_full_first
168+
Date: February 2019
169+
KernelVersion: 5.0
170+
Contact: Michael Kelley <[email protected]>
171+
Description: Number of write operations that were the first to encounter an
172+
outbound ring buffer full condition
173+
Users: Debugging tools
174+
175+
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/out_full_total
176+
Date: February 2019
177+
KernelVersion: 5.0
178+
Contact: Michael Kelley <[email protected]>
179+
Description: Total number of write operations that encountered an outbound
180+
ring buffer full condition
181+
Users: Debugging tools
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
What: /sys/kernel/debug/habanalabs/hl<n>/addr
2+
Date: Jan 2019
3+
KernelVersion: 5.1
4+
5+
Description: Sets the device address to be used for read or write through
6+
PCI bar. The acceptable value is a string that starts with "0x"
7+
8+
What: /sys/kernel/debug/habanalabs/hl<n>/command_buffers
9+
Date: Jan 2019
10+
KernelVersion: 5.1
11+
12+
Description: Displays a list with information about the currently allocated
13+
command buffers
14+
15+
What: /sys/kernel/debug/habanalabs/hl<n>/command_submission
16+
Date: Jan 2019
17+
KernelVersion: 5.1
18+
19+
Description: Displays a list with information about the currently active
20+
command submissions
21+
22+
What: /sys/kernel/debug/habanalabs/hl<n>/command_submission_jobs
23+
Date: Jan 2019
24+
KernelVersion: 5.1
25+
26+
Description: Displays a list with detailed information about each JOB (CB) of
27+
each active command submission
28+
29+
What: /sys/kernel/debug/habanalabs/hl<n>/data32
30+
Date: Jan 2019
31+
KernelVersion: 5.1
32+
33+
Description: Allows the root user to read or write directly through the
34+
device's PCI bar. Writing to this file generates a write
35+
transaction while reading from the file generates a read
36+
transcation. This custom interface is needed (instead of using
37+
the generic Linux user-space PCI mapping) because the DDR bar
38+
is very small compared to the DDR memory and only the driver can
39+
move the bar before and after the transaction
40+
41+
What: /sys/kernel/debug/habanalabs/hl<n>/device
42+
Date: Jan 2019
43+
KernelVersion: 5.1
44+
45+
Description: Enables the root user to set the device to specific state.
46+
Valid values are "disable", "enable", "suspend", "resume".
47+
User can read this property to see the valid values
48+
49+
What: /sys/kernel/debug/habanalabs/hl<n>/i2c_addr
50+
Date: Jan 2019
51+
KernelVersion: 5.1
52+
53+
Description: Sets I2C device address for I2C transaction that is generated
54+
by the device's CPU
55+
56+
What: /sys/kernel/debug/habanalabs/hl<n>/i2c_bus
57+
Date: Jan 2019
58+
KernelVersion: 5.1
59+
60+
Description: Sets I2C bus address for I2C transaction that is generated by
61+
the device's CPU
62+
63+
What: /sys/kernel/debug/habanalabs/hl<n>/i2c_data
64+
Date: Jan 2019
65+
KernelVersion: 5.1
66+
67+
Description: Triggers an I2C transaction that is generated by the device's
68+
CPU. Writing to this file generates a write transaction while
69+
reading from the file generates a read transcation
70+
71+
What: /sys/kernel/debug/habanalabs/hl<n>/i2c_reg
72+
Date: Jan 2019
73+
KernelVersion: 5.1
74+
75+
Description: Sets I2C register id for I2C transaction that is generated by
76+
the device's CPU
77+
78+
What: /sys/kernel/debug/habanalabs/hl<n>/led0
79+
Date: Jan 2019
80+
KernelVersion: 5.1
81+
82+
Description: Sets the state of the first S/W led on the device
83+
84+
What: /sys/kernel/debug/habanalabs/hl<n>/led1
85+
Date: Jan 2019
86+
KernelVersion: 5.1
87+
88+
Description: Sets the state of the second S/W led on the device
89+
90+
What: /sys/kernel/debug/habanalabs/hl<n>/led2
91+
Date: Jan 2019
92+
KernelVersion: 5.1
93+
94+
Description: Sets the state of the third S/W led on the device
95+
96+
What: /sys/kernel/debug/habanalabs/hl<n>/mmu
97+
Date: Jan 2019
98+
KernelVersion: 5.1
99+
100+
Description: Displays the hop values and physical address for a given ASID
101+
and virtual address. The user should write the ASID and VA into
102+
the file and then read the file to get the result.
103+
e.g. to display info about VA 0x1000 for ASID 1 you need to do:
104+
echo "1 0x1000" > /sys/kernel/debug/habanalabs/hl0/mmu
105+
106+
What: /sys/kernel/debug/habanalabs/hl<n>/set_power_state
107+
Date: Jan 2019
108+
KernelVersion: 5.1
109+
110+
Description: Sets the PCI power state. Valid values are "1" for D0 and "2"
111+
for D3Hot
112+
113+
What: /sys/kernel/debug/habanalabs/hl<n>/userptr
114+
Date: Jan 2019
115+
KernelVersion: 5.1
116+
117+
Description: Displays a list with information about the currently user
118+
pointers (user virtual addresses) that are pinned and mapped
119+
to DMA addresses
120+
121+
What: /sys/kernel/debug/habanalabs/hl<n>/vm
122+
Date: Jan 2019
123+
KernelVersion: 5.1
124+
125+
Description: Displays a list with information about all the active virtual
126+
address mappings per ASID

Documentation/ABI/testing/sysfs-bus-intel_th-output-devices

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ Date: June 2015
33
KernelVersion: 4.3
44
Contact: Alexander Shishkin <[email protected]>
55
Description: (RW) Writes of 1 or 0 enable or disable trace output to this
6-
output device. Reads return current status.
6+
output device. Reads return current status. Requires that the
7+
correstponding output port driver be loaded.
78

89
What: /sys/bus/intel_th/devices/<intel_th_id>-msc<msc-id>/port
910
Date: June 2015
1011
KernelVersion: 4.3
1112
Contact: Alexander Shishkin <[email protected]>
1213
Description: (RO) Port number, corresponding to this output device on the
13-
switch (GTH).
14+
switch (GTH) or "unassigned" if the corresponding output
15+
port driver is not loaded.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
What: /sys/class/habanalabs/hl<n>/armcp_kernel_ver
2+
Date: Jan 2019
3+
KernelVersion: 5.1
4+
5+
Description: Version of the Linux kernel running on the device's CPU
6+
7+
What: /sys/class/habanalabs/hl<n>/armcp_ver
8+
Date: Jan 2019
9+
KernelVersion: 5.1
10+
11+
Description: Version of the application running on the device's CPU
12+
13+
What: /sys/class/habanalabs/hl<n>/cpld_ver
14+
Date: Jan 2019
15+
KernelVersion: 5.1
16+
17+
Description: Version of the Device's CPLD F/W
18+
19+
What: /sys/class/habanalabs/hl<n>/device_type
20+
Date: Jan 2019
21+
KernelVersion: 5.1
22+
23+
Description: Displays the code name of the device according to its type.
24+
The supported values are: "GOYA"
25+
26+
What: /sys/class/habanalabs/hl<n>/eeprom
27+
Date: Jan 2019
28+
KernelVersion: 5.1
29+
30+
Description: A binary file attribute that contains the contents of the
31+
on-board EEPROM
32+
33+
What: /sys/class/habanalabs/hl<n>/fuse_ver
34+
Date: Jan 2019
35+
KernelVersion: 5.1
36+
37+
Description: Displays the device's version from the eFuse
38+
39+
What: /sys/class/habanalabs/hl<n>/hard_reset
40+
Date: Jan 2019
41+
KernelVersion: 5.1
42+
43+
Description: Interface to trigger a hard-reset operation for the device.
44+
Hard-reset will reset ALL internal components of the device
45+
except for the PCI interface and the internal PLLs
46+
47+
What: /sys/class/habanalabs/hl<n>/hard_reset_cnt
48+
Date: Jan 2019
49+
KernelVersion: 5.1
50+
51+
Description: Displays how many times the device have undergone a hard-reset
52+
operation since the driver was loaded
53+
54+
What: /sys/class/habanalabs/hl<n>/high_pll
55+
Date: Jan 2019
56+
KernelVersion: 5.1
57+
58+
Description: Allows the user to set the maximum clock frequency for MME, TPC
59+
and IC when the power management profile is set to "automatic".
60+
61+
What: /sys/class/habanalabs/hl<n>/ic_clk
62+
Date: Jan 2019
63+
KernelVersion: 5.1
64+
65+
Description: Allows the user to set the maximum clock frequency of the
66+
Interconnect fabric. Writes to this parameter affect the device
67+
only when the power management profile is set to "manual" mode.
68+
The device IC clock might be set to lower value then the
69+
maximum. The user should read the ic_clk_curr to see the actual
70+
frequency value of the IC
71+
72+
What: /sys/class/habanalabs/hl<n>/ic_clk_curr
73+
Date: Jan 2019
74+
KernelVersion: 5.1
75+
76+
Description: Displays the current clock frequency of the Interconnect fabric
77+
78+
What: /sys/class/habanalabs/hl<n>/infineon_ver
79+
Date: Jan 2019
80+
KernelVersion: 5.1
81+
82+
Description: Version of the Device's power supply F/W code
83+
84+
What: /sys/class/habanalabs/hl<n>/max_power
85+
Date: Jan 2019
86+
KernelVersion: 5.1
87+
88+
Description: Allows the user to set the maximum power consumption of the
89+
device in milliwatts.
90+
91+
What: /sys/class/habanalabs/hl<n>/mme_clk
92+
Date: Jan 2019
93+
KernelVersion: 5.1
94+
95+
Description: Allows the user to set the maximum clock frequency of the
96+
MME compute engine. Writes to this parameter affect the device
97+
only when the power management profile is set to "manual" mode.
98+
The device MME clock might be set to lower value then the
99+
maximum. The user should read the mme_clk_curr to see the actual
100+
frequency value of the MME
101+
102+
What: /sys/class/habanalabs/hl<n>/mme_clk_curr
103+
Date: Jan 2019
104+
KernelVersion: 5.1
105+
106+
Description: Displays the current clock frequency of the MME compute engine
107+
108+
What: /sys/class/habanalabs/hl<n>/pci_addr
109+
Date: Jan 2019
110+
KernelVersion: 5.1
111+
112+
Description: Displays the PCI address of the device. This is needed so the
113+
user would be able to open a device based on its PCI address
114+
115+
What: /sys/class/habanalabs/hl<n>/pm_mng_profile
116+
Date: Jan 2019
117+
KernelVersion: 5.1
118+
119+
Description: Power management profile. Values are "auto", "manual". In "auto"
120+
mode, the driver will set the maximum clock frequency to a high
121+
value when a user-space process opens the device's file (unless
122+
it was already opened by another process). The driver will set
123+
the max clock frequency to a low value when there are no user
124+
processes that are opened on the device's file. In "manual"
125+
mode, the user sets the maximum clock frequency by writing to
126+
ic_clk, mme_clk and tpc_clk
127+
128+
129+
What: /sys/class/habanalabs/hl<n>/preboot_btl_ver
130+
Date: Jan 2019
131+
KernelVersion: 5.1
132+
133+
Description: Version of the device's preboot F/W code
134+
135+
What: /sys/class/habanalabs/hl<n>/soft_reset
136+
Date: Jan 2019
137+
KernelVersion: 5.1
138+
139+
Description: Interface to trigger a soft-reset operation for the device.
140+
Soft-reset will reset only the compute and DMA engines of the
141+
device
142+
143+
What: /sys/class/habanalabs/hl<n>/soft_reset_cnt
144+
Date: Jan 2019
145+
KernelVersion: 5.1
146+
147+
Description: Displays how many times the device have undergone a soft-reset
148+
operation since the driver was loaded
149+
150+
What: /sys/class/habanalabs/hl<n>/status
151+
Date: Jan 2019
152+
KernelVersion: 5.1
153+
154+
Description: Status of the card: "Operational", "Malfunction", "In reset".
155+
156+
What: /sys/class/habanalabs/hl<n>/thermal_ver
157+
Date: Jan 2019
158+
KernelVersion: 5.1
159+
160+
Description: Version of the Device's thermal daemon
161+
162+
What: /sys/class/habanalabs/hl<n>/tpc_clk
163+
Date: Jan 2019
164+
KernelVersion: 5.1
165+
166+
Description: Allows the user to set the maximum clock frequency of the
167+
TPC compute engines. Writes to this parameter affect the device
168+
only when the power management profile is set to "manual" mode.
169+
The device TPC clock might be set to lower value then the
170+
maximum. The user should read the tpc_clk_curr to see the actual
171+
frequency value of the TPC
172+
173+
What: /sys/class/habanalabs/hl<n>/tpc_clk_curr
174+
Date: Jan 2019
175+
KernelVersion: 5.1
176+
177+
Description: Displays the current clock frequency of the TPC compute engines
178+
179+
What: /sys/class/habanalabs/hl<n>/uboot_ver
180+
Date: Jan 2019
181+
KernelVersion: 5.1
182+
183+
Description: Version of the u-boot running on the device's CPU
184+
185+
What: /sys/class/habanalabs/hl<n>/write_open_cnt
186+
Date: Jan 2019
187+
KernelVersion: 5.1
188+
189+
Description: Displays the total number of user processes that are currently
190+
opened on the device's file

0 commit comments

Comments
 (0)