From: Yang Hongyang <yanghy@cn.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>,
"David S. Miller" <davem@davemloft.net>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Borislav Petkov <petkovbb@googlemail.com>
Subject: [PATCH 10/12]Replace all DMA_24BIT_MASK micro with DMA_BIT_MASK(24)
Date: Thu, 19 Feb 2009 14:53:18 +0800 [thread overview]
Message-ID: <499D01DE.2030204@cn.fujitsu.com> (raw)
In-Reply-To: <499CFDC8.1070600@cn.fujitsu.com>
Replace all DMA_24BIT_MASK micro with DMA_BIT_MASK(24)
Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
---
arch/ia64/kernel/pci-dma.c | 2 +-
arch/x86/include/asm/dma-mapping.h | 4 ++--
arch/x86/kernel/pci-dma.c | 2 +-
drivers/base/isa.c | 2 +-
drivers/pnp/card.c | 2 +-
drivers/pnp/core.c | 2 +-
sound/pci/als4000.c | 4 ++--
sound/pci/azt3328.c | 4 ++--
sound/pci/es1938.c | 4 ++--
sound/pci/sonicvibes.c | 4 ++--
10 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/arch/ia64/kernel/pci-dma.c b/arch/ia64/kernel/pci-dma.c
index 0fce76f..3a486fb 100644
--- a/arch/ia64/kernel/pci-dma.c
+++ b/arch/ia64/kernel/pci-dma.c
@@ -92,7 +92,7 @@ int iommu_dma_supported(struct device *dev, u64 mask)
/* Copied from i386. Doesn't make much sense, because it will
only work for pci_alloc_coherent.
The caller just has to use GFP_DMA in this case. */
- if (mask < DMA_24BIT_MASK)
+ if (mask < DMA_BIT_MASK(24))
return 0;
/* Tell the device to use SAC when IOMMU force is on. This
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h
index 0d49479..f26869e 100644
--- a/arch/x86/include/asm/dma-mapping.h
+++ b/arch/x86/include/asm/dma-mapping.h
@@ -244,7 +244,7 @@ static inline unsigned long dma_alloc_coherent_mask(struct device *dev,
dma_mask = dev->coherent_dma_mask;
if (!dma_mask)
- dma_mask = (gfp & GFP_DMA) ? DMA_24BIT_MASK : DMA_BIT_MASK(32);
+ dma_mask = (gfp & GFP_DMA) ? DMA_BIT_MASK(24) : DMA_BIT_MASK(32);
return dma_mask;
}
@@ -253,7 +253,7 @@ static inline gfp_t dma_alloc_coherent_gfp_flags(struct device *dev, gfp_t gfp)
{
unsigned long dma_mask = dma_alloc_coherent_mask(dev, gfp);
- if (dma_mask <= DMA_24BIT_MASK)
+ if (dma_mask <= DMA_BIT_MASK(24))
gfp |= GFP_DMA;
#ifdef CONFIG_X86_64
if (dma_mask <= DMA_BIT_MASK(32) && !(gfp & GFP_DMA))
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index 7aa572f..91f4e46 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -239,7 +239,7 @@ int dma_supported(struct device *dev, u64 mask)
/* Copied from i386. Doesn't make much sense, because it will
only work for pci_alloc_coherent.
The caller just has to use GFP_DMA in this case. */
- if (mask < DMA_24BIT_MASK)
+ if (mask < DMA_BIT_MASK(24))
return 0;
/* Tell the device to use SAC when IOMMU force is on. This
diff --git a/drivers/base/isa.c b/drivers/base/isa.c
index 479694b..91dba65 100644
--- a/drivers/base/isa.c
+++ b/drivers/base/isa.c
@@ -141,7 +141,7 @@ int isa_register_driver(struct isa_driver *isa_driver, unsigned int ndev)
isa_dev->dev.release = isa_dev_release;
isa_dev->id = id;
- isa_dev->dev.coherent_dma_mask = DMA_24BIT_MASK;
+ isa_dev->dev.coherent_dma_mask = DMA_BIT_MASK(24);
isa_dev->dev.dma_mask = &isa_dev->dev.coherent_dma_mask;
error = device_register(&isa_dev->dev);
diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c
index efea128..4a651f6 100644
--- a/drivers/pnp/card.c
+++ b/drivers/pnp/card.c
@@ -167,7 +167,7 @@ struct pnp_card *pnp_alloc_card(struct pnp_protocol *protocol, int id, char *pnp
card->dev.parent = &card->protocol->dev;
dev_set_name(&card->dev, "%02x:%02x", card->protocol->number, card->number);
- card->dev.coherent_dma_mask = DMA_24BIT_MASK;
+ card->dev.coherent_dma_mask = DMA_BIT_MASK(24);
card->dev.dma_mask = &card->dev.coherent_dma_mask;
dev_id = pnp_add_card_id(card, pnpid);
diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c
index 14814f2..5dba909 100644
--- a/drivers/pnp/core.c
+++ b/drivers/pnp/core.c
@@ -137,7 +137,7 @@ struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *protocol, int id, char *pnpid
INIT_LIST_HEAD(&dev->options);
dev->protocol = protocol;
dev->number = id;
- dev->dma_mask = DMA_24BIT_MASK;
+ dev->dma_mask = DMA_BIT_MASK(24);
dev->dev.parent = &dev->protocol->dev;
dev->dev.bus = &pnp_bus_type;
diff --git a/sound/pci/als4000.c b/sound/pci/als4000.c
index ba57005..b3bdf8c 100644
--- a/sound/pci/als4000.c
+++ b/sound/pci/als4000.c
@@ -872,8 +872,8 @@ static int __devinit snd_card_als4000_probe(struct pci_dev *pci,
return err;
}
/* check, if we can restrict PCI DMA transfers to 24 bits */
- if (pci_set_dma_mask(pci, DMA_24BIT_MASK) < 0 ||
- pci_set_consistent_dma_mask(pci, DMA_24BIT_MASK) < 0) {
+ if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 ||
+ pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) {
snd_printk(KERN_ERR "architecture does not support 24bit PCI busmaster DMA\n");
pci_disable_device(pci);
return -ENXIO;
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c
index 333007c..8522b2f 100644
--- a/sound/pci/azt3328.c
+++ b/sound/pci/azt3328.c
@@ -2125,8 +2125,8 @@ snd_azf3328_create(struct snd_card *card,
chip->irq = -1;
/* check if we can restrict PCI DMA transfers to 24 bits */
- if (pci_set_dma_mask(pci, DMA_24BIT_MASK) < 0 ||
- pci_set_consistent_dma_mask(pci, DMA_24BIT_MASK) < 0) {
+ if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 ||
+ pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) {
snd_printk(KERN_ERR "architecture does not support "
"24bit PCI busmaster DMA\n"
);
diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c
index 4cd9a1f..34e74e4 100644
--- a/sound/pci/es1938.c
+++ b/sound/pci/es1938.c
@@ -1608,8 +1608,8 @@ static int __devinit snd_es1938_create(struct snd_card *card,
if ((err = pci_enable_device(pci)) < 0)
return err;
/* check, if we can restrict PCI DMA transfers to 24 bits */
- if (pci_set_dma_mask(pci, DMA_24BIT_MASK) < 0 ||
- pci_set_consistent_dma_mask(pci, DMA_24BIT_MASK) < 0) {
+ if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 ||
+ pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) {
snd_printk(KERN_ERR "architecture does not support 24bit PCI busmaster DMA\n");
pci_disable_device(pci);
return -ENXIO;
diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c
index cd408b8..60079be 100644
--- a/sound/pci/sonicvibes.c
+++ b/sound/pci/sonicvibes.c
@@ -1229,8 +1229,8 @@ static int __devinit snd_sonicvibes_create(struct snd_card *card,
if ((err = pci_enable_device(pci)) < 0)
return err;
/* check, if we can restrict PCI DMA transfers to 24 bits */
- if (pci_set_dma_mask(pci, DMA_24BIT_MASK) < 0 ||
- pci_set_consistent_dma_mask(pci, DMA_24BIT_MASK) < 0) {
+ if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 ||
+ pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) {
snd_printk(KERN_ERR "architecture does not support 24bit PCI busmaster DMA\n");
pci_disable_device(pci);
return -ENXIO;
--
1.6.0.3
--
Regards
Yang Hongyang
next prev parent reply other threads:[~2009-02-19 6:52 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-19 6:35 [PATCH 00/12]Next:Get rid of all the old micro DMA_XXBIT_MASK and use DMA_BIT_MASK(n) instead Yang Hongyang
2009-02-19 6:38 ` [PATCH 01/12]Replace all DMA_64BIT_MASK micro with DMA_BIT_MASK(64) Yang Hongyang
2009-02-19 6:40 ` [PATCH 02/12]Replace all DMA_48BIT_MASK micro with DMA_BIT_MASK(48) Yang Hongyang
2009-02-19 6:41 ` [PATCH 03/12]Replace all DMA_40BIT_MASK micro with DMA_BIT_MASK(40) Yang Hongyang
2009-02-19 6:44 ` [PATCH 04/12]Replace all DMA_39BIT_MASK micro with DMA_BIT_MASK(39) Yang Hongyang
2009-02-19 6:45 ` [PATCH 05/12]Replace all DMA_35BIT_MASK micro with DMA_BIT_MASK(35) Yang Hongyang
2009-02-19 6:46 ` [PATCH 06/12]Replace all DMA_32BIT_MASK micro with DMA_BIT_MASK(32) Yang Hongyang
2009-02-19 6:48 ` [PATCH 07/12]Replace all DMA_31BIT_MASK micro with DMA_BIT_MASK(31) Yang Hongyang
2009-02-19 6:49 ` [PATCH 00/12]Next:Get rid of all the old micro DMA_XXBIT_MASK and use DMA_BIT_MASK(n) instead Américo Wang
2009-02-19 8:52 ` Yang Hongyang
2009-02-19 6:49 ` [PATCH 08/12]Replace all DMA_30BIT_MASK micro with DMA_BIT_MASK(30) Yang Hongyang
2009-02-19 6:51 ` [PATCH 09/12]Replace all DMA_28BIT_MASK micro with DMA_BIT_MASK(28) Yang Hongyang
2009-02-19 6:53 ` Yang Hongyang [this message]
2009-02-19 6:54 ` [PATCH 11/12]Remove defines of DMA_XXBIT_MASK micro Yang Hongyang
2009-02-19 8:14 ` Ingo Molnar
2009-02-19 8:56 ` Yang Hongyang
2009-02-19 9:32 ` [PATCHv2 00/11]Get rid of all the old macro DMA_nBIT_MASK and use DMA_BIT_MASK(n) instead Yang Hongyang
2009-02-19 9:36 ` [PATCHv2 01/11]Replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64) Yang Hongyang
2009-02-19 9:38 ` [PATCHv2 02/11]Replace all DMA_48BIT_MASK macro with DMA_BIT_MASK(48) Yang Hongyang
2009-02-19 9:40 ` [PATCHv2 03/11]Replace all DMA_40BIT_MASK macro with DMA_BIT_MASK(40) Yang Hongyang
2009-02-19 9:42 ` [PATCHv2 04/11]Replace all DMA_39BIT_MASK macro with DMA_BIT_MASK(39) Yang Hongyang
2009-02-19 9:43 ` [PATCHv2 05/11]Replace all DMA_35BIT_MASK macro with DMA_BIT_MASK(35) Yang Hongyang
2009-02-19 9:45 ` [PATCHv2 06/11]Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) Yang Hongyang
2009-02-19 12:50 ` Stefan Richter
2009-02-19 9:47 ` [PATCHv2 07/11]Replace all DMA_31BIT_MASK macro with DMA_BIT_MASK(31) Yang Hongyang
2009-02-19 9:48 ` [PATCHv2 08/11]Replace all DMA_30BIT_MASK macro with DMA_BIT_MASK(30) Yang Hongyang
2009-02-19 9:50 ` [PATCHv2 09/11]Replace all DMA_28BIT_MASK macro with DMA_BIT_MASK(28) Yang Hongyang
2009-02-19 9:51 ` [PATCHv2 10/11]Replace all DMA_24BIT_MASK macro with DMA_BIT_MASK(24) Yang Hongyang
2009-02-19 9:53 ` [PATCHv2 11/11]Update the old macro DMA_nBIT_MASK related documentations Yang Hongyang
2009-02-19 12:47 ` [PATCHv2 00/11]Get rid of all the old macro DMA_nBIT_MASK and use DMA_BIT_MASK(n) instead Stefan Richter
2009-02-19 15:08 ` Ingo Molnar
2009-02-19 23:14 ` Andrew Morton
2009-02-20 10:29 ` Ingo Molnar
2009-02-19 6:55 ` [PATCH 12/12]Update related documentations Yang Hongyang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=499D01DE.2030204@cn.fujitsu.com \
--to=yanghy@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=petkovbb@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.