summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYang Hongyang <yanghy@cn.fujitsu.com>2009-04-06 19:01:14 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-07 08:31:10 -0700
commit50cf156af7dc68a44409bef636585ef88ebbab34 (patch)
treea70e4a9ad805904f6e98bf654d6de7a55fe77e98
parente911e0d9af90e4f1b4f2cf183a0993f9fed9f9c6 (diff)
dma-mapping: replace all DMA_40BIT_MASK macro with DMA_BIT_MASK(40)
Replace all DMA_40BIT_MASK macro with DMA_BIT_MASK(40) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/ia64/kernel/pci-dma.c2
-rw-r--r--arch/x86/kernel/pci-dma.c2
-rw-r--r--drivers/net/bnx2.c2
-rw-r--r--drivers/net/enic/enic_main.c4
-rw-r--r--drivers/net/ipg.c2
-rw-r--r--drivers/net/tg3.c6
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.h2
7 files changed, 10 insertions, 10 deletions
diff --git a/arch/ia64/kernel/pci-dma.c b/arch/ia64/kernel/pci-dma.c
index e4cb443bb98..8f34f3ddb83 100644
--- a/arch/ia64/kernel/pci-dma.c
+++ b/arch/ia64/kernel/pci-dma.c
@@ -90,7 +90,7 @@ int iommu_dma_supported(struct device *dev, u64 mask)
SAC for these. Assume all masks <= 40 bits are of this
type. Normally this doesn't make any difference, but gives
more gentle handling of IOMMU overflow. */
- if (iommu_sac_force && (mask >= DMA_40BIT_MASK)) {
+ if (iommu_sac_force && (mask >= DMA_BIT_MASK(40))) {
dev_info(dev, "Force SAC with mask %lx\n", mask);
return 0;
}
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index 90f5b9ef5de..0cf2d900422 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -258,7 +258,7 @@ int dma_supported(struct device *dev, u64 mask)
SAC for these. Assume all masks <= 40 bits are of this
type. Normally this doesn't make any difference, but gives
more gentle handling of IOMMU overflow. */
- if (iommu_sac_force && (mask >= DMA_40BIT_MASK)) {
+ if (iommu_sac_force && (mask >= DMA_BIT_MASK(40))) {
dev_info(dev, "Force SAC with mask %Lx\n", mask);
return 0;
}
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index aa75a4b9690..5fd57703c65 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -7525,7 +7525,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
/* 5708 cannot support DMA addresses > 40-bit. */
if (CHIP_NUM(bp) == CHIP_NUM_5708)
- persist_dma_mask = dma_mask = DMA_40BIT_MASK;
+ persist_dma_mask = dma_mask = DMA_BIT_MASK(40);
else
persist_dma_mask = dma_mask = DMA_BIT_MASK(64);
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 03403a51f7e..5b87105ac9e 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1685,7 +1685,7 @@ static int __devinit enic_probe(struct pci_dev *pdev,
* fail to 32-bit.
*/
- err = pci_set_dma_mask(pdev, DMA_40BIT_MASK);
+ err = pci_set_dma_mask(pdev, DMA_BIT_MASK(40));
if (err) {
err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
if (err) {
@@ -1701,7 +1701,7 @@ static int __devinit enic_probe(struct pci_dev *pdev,
goto err_out_release_regions;
}
} else {
- err = pci_set_consistent_dma_mask(pdev, DMA_40BIT_MASK);
+ err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(40));
if (err) {
printk(KERN_ERR PFX
"Unable to obtain 40-bit DMA "
diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c
index 360aa5e35fd..ed9ded939d9 100644
--- a/drivers/net/ipg.c
+++ b/drivers/net/ipg.c
@@ -2240,7 +2240,7 @@ static int __devinit ipg_probe(struct pci_dev *pdev,
pci_set_master(pdev);
- rc = pci_set_dma_mask(pdev, DMA_40BIT_MASK);
+ rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(40));
if (rc < 0) {
rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
if (rc < 0) {
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index ec32e5f2354..5ba91d7f758 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -4975,7 +4975,7 @@ static inline int tg3_40bit_overflow_test(struct tg3 *tp, dma_addr_t mapping,
{
#if defined(CONFIG_HIGHMEM) && (BITS_PER_LONG == 64)
if (tp->tg3_flags & TG3_FLAG_40BIT_DMA_BUG)
- return (((u64) mapping + len) > DMA_40BIT_MASK);
+ return (((u64) mapping + len) > DMA_BIT_MASK(40));
return 0;
#else
return 0;
@@ -13230,7 +13230,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
if (tp->tg3_flags2 & TG3_FLG2_IS_5788)
persist_dma_mask = dma_mask = DMA_32BIT_MASK;
else if (tp->tg3_flags & TG3_FLAG_40BIT_DMA_BUG) {
- persist_dma_mask = dma_mask = DMA_40BIT_MASK;
+ persist_dma_mask = dma_mask = DMA_BIT_MASK(40);
#ifdef CONFIG_HIGHMEM
dma_mask = DMA_BIT_MASK(64);
#endif
@@ -13394,7 +13394,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
printk(KERN_INFO "%s: dma_rwctrl[%08x] dma_mask[%d-bit]\n",
dev->name, tp->dma_rwctrl,
(pdev->dma_mask == DMA_32BIT_MASK) ? 32 :
- (((u64) pdev->dma_mask == DMA_40BIT_MASK) ? 40 : 64));
+ (((u64) pdev->dma_mask == DMA_BIT_MASK(40)) ? 40 : 64));
return 0;
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.h b/drivers/scsi/sym53c8xx_2/sym_hipd.h
index 76f6295ee88..b707abe9082 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.h
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.h
@@ -1087,7 +1087,7 @@ do { \
(data)->size = cpu_to_scr(len); \
} while (0)
#elif SYM_CONF_DMA_ADDRESSING_MODE == 1
-#define DMA_DAC_MASK DMA_40BIT_MASK
+#define DMA_DAC_MASK DMA_BIT_MASK(40)
#define sym_build_sge(np, data, badd, len) \
do { \
(data)->addr = cpu_to_scr(badd); \