作者
QQ群:852283276
微信:arm80x86
微信公众号:青儿创客基地
B站:主页 https://space.bilibili.com/208826118
64bit DMA on 32bit CPU
sg列表中使用dma_addr_t
,
struct scatterlist {
#ifdef CONFIG_DEBUG_SG
unsigned long sg_magic;
#endif
unsigned long page_link;
unsigned int offset;
unsigned int length;
dma_addr_t dma_address;
#ifdef CONFIG_NEED_SG_DMA_LENGTH
unsigned int dma_length;
#endif
};
dma_addr_t
定义,
#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
typedef u64 dma_addr_t;
#else
typedef u32 dma_addr_t;
#endif /* dma_addr_t */
CONFIG_ARCH_DMA_ADDR_T_64BIT
在下面文件中使用,
---- ARCH_DMA_ADDR_T_64BIT Matches (5 in 4 files) ----
bus.c (drivers\pci) line 101 : #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
pci_bus_alloc_resource in bus.c (drivers\pci) : #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
tegra_cursor_plane_update in dc.c (drivers\gpu\drm\tegra) : #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
starfire.c (drivers\net\ethernet\adaptec) line 139 : #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
types.h (include\linux) line 146 : #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
config ARCH_DMA_ADDR_T_64BIT
bool "Support for the Large DMA Address"
多了几个警告,修补修正无所谓,不影响其实,
In file included from drivers/gpu/drm/xilinx/xilinx_drm_plane.c:18:0:
drivers/gpu/drm/xilinx/xilinx_drm_plane.c: In function 'xilinx_drm_plane_mode_set':
drivers/gpu/drm/xilinx/xilinx_drm_plane.c:255:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
src_w, crtc_x, src_h, crtc_y, (void *)obj->paddr);
^
include/drm/drmP.h:202:41: note: in definition of macro 'DRM_DEBUG_KMS'
drm_ut_debug_printk(__func__, fmt, ##args); \
drivers/net/ethernet/xilinx/xilinx_emacps.c: In function 'xemacps_descriptor_init':
drivers/net/ethernet/xilinx/xilinx_emacps.c:1800:2: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat=]
dev_dbg(&lp->pdev->dev, "RX ring %d bytes at 0x%x mapped %p\n",
^
drivers/net/ethernet/xilinx/xilinx_emacps.c:1842:2: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat=]
dev_dbg(&lp->pdev->dev, "TX ring %d bytes at 0x%x mapped %p\n",
^
In file included from include/linux/pm_qos.h:10:0,
from include/linux/netdevice.h:28,
from drivers/net/ethernet/xilinx/xilinx_emacps.c:26:
drivers/net/ethernet/xilinx/xilinx_emacps.c:1860:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
lp->tx_bd, (void *)lp->tx_bd_dma, lp->tx_skb);
^
include/linux/device.h:1121:41: note: in definition of macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, format, ##arg); \
^
drivers/net/ethernet/xilinx/xilinx_emacps.c:1863:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
lp->rx_bd, (void *)lp->rx_bd_dma, lp->rx_skb);
^
include/linux/device.h:1121:41: note: in definition of macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, format, ##arg); \