|
|
@@ -531,12 +531,14 @@ static void __init reserve_crashkernel_low(void)
|
|
|
if (ret != 0) {
|
|
|
/*
|
|
|
* two parts from lib/swiotlb.c:
|
|
|
- * swiotlb size: user specified with swiotlb= or default.
|
|
|
- * swiotlb overflow buffer: now is hardcoded to 32k.
|
|
|
- * We round it to 8M for other buffers that
|
|
|
- * may need to stay low too.
|
|
|
+ * -swiotlb size: user-specified with swiotlb= or default.
|
|
|
+ *
|
|
|
+ * -swiotlb overflow buffer: now hardcoded to 32k. We round it
|
|
|
+ * to 8M for other buffers that may need to stay low too. Also
|
|
|
+ * make sure we allocate enough extra low memory so that we
|
|
|
+ * don't run out of DMA buffers for 32-bit devices.
|
|
|
*/
|
|
|
- low_size = swiotlb_size_or_default() + (8UL<<20);
|
|
|
+ low_size = max(swiotlb_size_or_default() + (8UL<<20), 256UL<<20);
|
|
|
auto_set = true;
|
|
|
} else {
|
|
|
/* passed with crashkernel=0,low ? */
|