[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4638D775.3010905@garzik.org>
Date: Wed, 02 May 2007 14:24:53 -0400
From: Jeff Garzik <jeff@...zik.org>
To: Michael Chan <mchan@...adcom.com>
CC: David Miller <davem@...emloft.net>, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH 3/20][BNX2]: Add 40-bit DMA workaround for 5708.
Michael Chan wrote:
> On Wed, 2007-05-02 at 11:29 -0400, Jeff Garzik wrote:
>> Michael Chan wrote:
>>> A non-IOMMU system using 64-bit dma_addr_t will always set
>>> CONFIG_HIGHMEM, right?
>> No.
>>
> May be I misunderstood the code in illegal_highdma() in net/core/dev.c
> where it is checking to see if it needs to linearize the SKB when the
> device does not support 64-bit DMA. I'm using similar assumptions for
> the 40-bit address check in the patch.
That function is just checking for highmem pages, no more, no less.
Your question quoted far above presumes that no 64-bit systems exist
lacking IOMMUs, which is not the case. 64-bit platforms with a 64-bit
dma_addr_t will /not/ set CONFIG_HIGHMEM, regardless of IOMMU presence.
Probably you want to base your actions on some combination of
* CONFIG_64BIT
* sizeof(dma_addr_t)
* pci_set_dma_mask() for >32 bit platforms
Regards,
Jeff
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists