Commit
228c4f5cfbf1cda411d9aa7204a612a63c89b1e8
Exists in
master
and in
39 other branches
8mp-imx_5.4.70_2.3.0, 8qm-imx_5.4.70_2.3.0, emb_imx_lf-5.15.y, emb_lf-6.1.y, imx_3.0.35_4.1.0, imx_3.10.17_1.0.1_ga, imx_3.10.53_1.1.0_ga, imx_3.14.28_1.0.0_ga, imx_4.1.15_1.0.0_ga, pitx_8mp_lf-5.10.y, rt-smarc-imx_4.1.15_1.0.0_ga, rt_linux_5.15.71, smarc-8m-android-11.0.0_2.0.0, smarc-imx6_4.14.98_2.0.0_ga, smarc-imx6_4.9.88_2.0.0_ga, smarc-imx7_4.14.98_2.0.0_ga, smarc-imx7_4.9.11_1.0.0_ga, smarc-imx7_4.9.88_2.0.0_ga, smarc-imx_3.10.53_1.1.0_ga, smarc-imx_3.14.28_1.0.0_ga, smarc-imx_4.1.15_1.0.0_ga, smarc-imx_4.9.11_1.0.0_ga, smarc-imx_4.9.51_imx8m_ga, smarc-imx_4.9.88_2.0.0_ga, smarc-m6.0.1_2.1.0-ga, smarc-n7.1.2_2.0.0-ga, smarc-rel_imx_4.1.15_1.2.0_ga, smarc_8m_00d0_imx_4.14.98_2.0.0_ga, smarc_8m_imx_4.14.78_1.0.0_ga, smarc_8m_imx_4.14.98_2.0.0_ga, smarc_8m_imx_4.19.35_1.1.0, smarc_8mm_imx_4.14.78_1.0.0_ga, smarc_8mm_imx_4.14.98_2.0.0_ga, smarc_8mm_imx_4.19.35_1.1.0, smarc_8mm_imx_5.4.24_2.1.0, smarc_8mp_lf-5.10.y, smarc_8mq_imx_5.4.24_2.1.0, smarc_8mq_lf-5.10.y, smarc_imx_lf-5.15.y
ioat3: dca and raid operations are incompatible
RAID operations cause a system hang on platforms with DCA
(Direct-Cache-Access) enabled. So turn off RAID capabilities in this
case.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Showing
3 changed files
with
9 additions
and
1 deletions
Side-by-side Diff
... |
... |
@@ -103,7 +103,7 @@ |
103
|
103 |
return res; |
104
|
104 |
} |
105
|
105 |
|
106
|
|
-static int system_has_dca_enabled(struct pci_dev *pdev) |
|
106 |
+int system_has_dca_enabled(struct pci_dev *pdev) |
107
|
107 |
{ |
108
|
108 |
if (boot_cpu_has(X86_FEATURE_DCA)) |
109
|
109 |
return dca_enabled_in_bios(pdev); |
... |
... |
@@ -1117,6 +1117,7 @@ |
1117
|
1117 |
int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca) |
1118
|
1118 |
{ |
1119
|
1119 |
struct pci_dev *pdev = device->pdev; |
|
1120 |
+ int dca_en = system_has_dca_enabled(pdev); |
1120
|
1121 |
struct dma_device *dma; |
1121
|
1122 |
struct dma_chan *c; |
1122
|
1123 |
struct ioat_chan_common *chan; |
... |
... |
@@ -1137,6 +1138,11 @@ |
1137
|
1138 |
dma->device_prep_dma_interrupt = ioat3_prep_interrupt_lock; |
1138
|
1139 |
|
1139
|
1140 |
cap = readl(device->reg_base + IOAT_DMA_CAP_OFFSET); |
|
1141 |
+ |
|
1142 |
+ /* dca is incompatible with raid operations */ |
|
1143 |
+ if (dca_en && (cap & (IOAT_CAP_XOR|IOAT_CAP_PQ))) |
|
1144 |
+ cap &= ~(IOAT_CAP_XOR|IOAT_CAP_PQ); |
|
1145 |
+ |
1140
|
1146 |
if (cap & IOAT_CAP_XOR) { |
1141
|
1147 |
is_raid_device = true; |
1142
|
1148 |
dma->max_xor = 8; |
... |
... |
@@ -39,6 +39,8 @@ |
39
|
39 |
#define IOAT_VER_3_0 0x30 /* Version 3.0 */ |
40
|
40 |
#define IOAT_VER_3_2 0x32 /* Version 3.2 */ |
41
|
41 |
|
|
42 |
+int system_has_dca_enabled(struct pci_dev *pdev); |
|
43 |
+ |
42
|
44 |
struct ioat_dma_descriptor { |
43
|
45 |
uint32_t size; |
44
|
46 |
union { |