Re: [PATCH] x86-64: disable the GART in shutdown

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jun 24, 2007 at 05:22:30PM -0700, Yinghai Lu wrote:
> On 6/23/07, Andrew Morton <[email protected]> wrote:
> >>  void __init gart_iommu_init(void)
> >>  {
> >>       struct agp_kern_info info;
> >> diff --git a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c
> >> index 9f80aad..64f2ab3 100644
> >> --- a/arch/x86_64/kernel/pci-dma.c
> >> +++ b/arch/x86_64/kernel/pci-dma.c
> >> @@ -322,6 +322,13 @@ static int __init pci_iommu_init(void)
> >>       return 0;
> >>  }
> >>
> >> +void pci_iommu_shutdown(void)
> >> +{
> >> +#ifdef CONFIG_IOMMU
> >> +     gart_iommu_shutdown();
> >> +#endif
> >> +}
> >
> >It'd be better to avoid the ifdef-in-C by providing a stub function in a
> >header file if !CONFIG_IOMMU.  That's quite standard kernel practice and
> >might help avoid some other problems...
> 
> move ifdef into gart_iommu_shudown()?

What Andrew means is
(in a header file)

#ifdef CONFIG_IOMMU
extern void gart_iommu_shutdown(void);
#else
static inline void gart_iommu_shutdown(void)
{
}
#endif /* CONFIG_IOMMU */

Cheers,
Muli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux