drivers: power: report battery voltage in AOSP compatible format
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / lib / swiotlb.c
index d23762e6652c1e02bf87f070d3164afa93dc91a8..b21a43a46761cb3beb66d619127c1979afaa21eb 100644 (file)
@@ -117,7 +117,11 @@ unsigned long swiotlb_nr_tbl(void)
 EXPORT_SYMBOL_GPL(swiotlb_nr_tbl);
 
 /* default to 64MB */
-#define IO_TLB_DEFAULT_SIZE (64UL<<20)
+#ifdef CONFIG_MTK_LM_MODE
+#define IO_TLB_DEFAULT_SIZE (SZ_64M)
+#else
+#define IO_TLB_DEFAULT_SIZE ((1 << IO_TLB_SHIFT) * IO_TLB_SEGSIZE)
+#endif // end of CONFIG_MTK_LM_MODE
 unsigned long swiotlb_size_or_default(void)
 {
        unsigned long size;
@@ -149,7 +153,7 @@ void swiotlb_print_info(void)
        vstart = phys_to_virt(io_tlb_start);
        vend = phys_to_virt(io_tlb_end);
 
-       printk(KERN_INFO "software IO TLB [mem %#010llx-%#010llx] (%luMB) mapped at [%p-%p]\n",
+       printk(KERN_ALERT"software IO TLB [mem %#010llx-%#010llx] (%luMB) mapped at [%p-%p]\n",
               (unsigned long long)io_tlb_start,
               (unsigned long long)io_tlb_end,
               bytes >> 20, vstart, vend - 1);
@@ -690,6 +694,7 @@ swiotlb_full(struct device *dev, size_t size, enum dma_data_direction dir,
         */
        printk(KERN_ERR "DMA: Out of SW-IOMMU space for %zu bytes at "
               "device %s\n", size, dev ? dev_name(dev) : "?");
+       BUG();
 
        if (size <= io_tlb_overflow || !do_panic)
                return;