Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754767AbYJBRqX (ORCPT ); Thu, 2 Oct 2008 13:46:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753448AbYJBRqP (ORCPT ); Thu, 2 Oct 2008 13:46:15 -0400 Received: from mga09.intel.com ([134.134.136.24]:40180 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752508AbYJBRqN convert rfc822-to-8bit (ORCPT ); Thu, 2 Oct 2008 13:46:13 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.33,352,1220252400"; d="scan'208";a="446274182" From: "Yu, Fenghua" To: Bjorn Helgaas CC: "Luck, Tony" , Jesse Barnes , David Woodhouse , Ingo Molnar , Avi Kivity , Stephen Rothwell , Andrew Morton , LKML , "linux-ia64@vger.kernel.org" Date: Thu, 2 Oct 2008 10:46:04 -0700 Subject: RE: [PATCH 2/2]Add Variable Page Size and IA64 Support in Intel IOMMU: IA64 Specific Part Thread-Topic: [PATCH 2/2]Add Variable Page Size and IA64 Support in Intel IOMMU: IA64 Specific Part Thread-Index: Ackkpri0hgK7prZWQuWvidNHQFNkRQADjXSQ Message-ID: References: <20081001165750.GA21272@linux-os.sc.intel.com> <200810020951.08408.bjorn.helgaas@hp.com> In-Reply-To: <200810020951.08408.bjorn.helgaas@hp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3044 Lines: 74 >> --- 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. Clflush_cache_range() is used in __iommu_flush_cache() in include/linux/intel-iommu.h. >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. Since clflush_cache_range(start, size) is defined in x86, I just want to keep the same definition. So this patch set won't change __iommu_flush_cache(). Otherwise, the patch set will have #ifdef CONFIG_IA64 in __iommu_flush_cache() which is not desired. Does this make sense? >> +#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. I'll move this to drivers/pci/quirks.c and use dev_info(). >> + forbid_dac = 1; > >Shouldn't forbid_dac be a per-device or at least a per-bridge >property rather than a global? This patch set is mainly for IA64 porting purpose. I will use the same forbid dac code as x86-64 and will send a follow-up patch to deal with forbid dac. >> + } >> +} >> +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. Will change this. Bjorn -- To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- 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/