Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754625AbYJBPvX (ORCPT ); Thu, 2 Oct 2008 11:51:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753720AbYJBPvO (ORCPT ); Thu, 2 Oct 2008 11:51:14 -0400 Received: from g5t0007.atlanta.hp.com ([15.192.0.44]:30527 "EHLO g5t0007.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753011AbYJBPvN (ORCPT ); Thu, 2 Oct 2008 11:51:13 -0400 From: Bjorn Helgaas To: Fenghua Yu Subject: Re: [PATCH 2/2]Add Variable Page Size and IA64 Support in Intel IOMMU: IA64 Specific Part Date: Thu, 2 Oct 2008 09:51:07 -0600 User-Agent: KMail/1.9.9 Cc: "Luck, Tony" , Jesse Barnes , David Woodhouse , Ingo Molnar , Avi Kivity , Stephen Rothwell , Andrew Morton , LKML , linux-ia64@vger.kernel.org References: <20081001165750.GA21272@linux-os.sc.intel.com> In-Reply-To: <20081001165750.GA21272@linux-os.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810020951.08408.bjorn.helgaas@hp.com> X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2173 Lines: 63 On Wednesday 01 October 2008 10:57:50 am Fenghua Yu wrote: > --- a/arch/ia64/include/asm/cacheflush.h > +++ b/arch/ia64/include/asm/cacheflush.h > @@ -34,6 +34,8 @@ do { \ > #define flush_dcache_mmap_unlock(mapping) do { } while (0) > > extern void flush_icache_range (unsigned long start, unsigned long end); > +extern void clflush_cache_range(void *addr, int size); This patch adds clflush_cache_range(), but it's not used anywhere. If you do need it, it'd be nice if the arguments were the same types as for flush_icache_range(), and if there were a comment describing why it is necessary for VT-d. And maybe the name could be more like the other cache flushing functions. > +#ifdef CONFIG_PCI > +/* Many VIA bridges seem to corrupt data for DAC. Disable it here */ > + > +static __devinit void via_no_dac(struct pci_dev *dev) > +{ > + if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && forbid_dac == 0) { > + printk(KERN_INFO "PCI: VIA PCI bridge detected. Disabling DAC.\n"); Please use dev_info() here. I see you just copied this from x86, but we should fix x86, too. Or better, since this doesn't appear to be arch-specific, maybe this should be moved to drivers/pci/quirks.c alongside all the other VIA quirks. > + forbid_dac = 1; Shouldn't forbid_dac be a per-device or at least a per-bridge property rather than a global? > + } > +} > +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac); > +#endif > +/* Must execute after PCI subsystem */ > +fs_initcall(pci_iommu_init); > + > +struct dma_mapping_ops *dma_ops; > +EXPORT_SYMBOL(dma_ops); > + > +int iommu_dma_supported(struct device *dev, u64 mask) > +{ > + struct dma_mapping_ops *ops = get_dma_ops(dev); > + > +#ifdef CONFIG_PCI > + if (mask > 0xffffffff && forbid_dac > 0) { > + dev_info(dev, "PCI: Disallowing DAC for device\n"); The "PCI: " should be removed since dev_info() will add the driver name and device ID. Bjorn -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/