Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 583708

Summary: enable_drhd_fault_handling sometimes defined twice in include/linux/dmar.h
Product: Red Hat Enterprise Linux 5 Reporter: Igor Zhbanov <izh1979>
Component: kernelAssignee: Red Hat Kernel Manager <kernel-mgr>
Status: CLOSED NOTABUG QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: low    
Version: 5.5CC: anton, izh1979, kolyshkin
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-18 16:16:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Igor Zhbanov 2010-04-19 14:12:42 UTC
Description of problem:
Hello!

If you look at include/linux/dmar.h you will find this:
...
#if defined(CONFIG_DMAR) || defined(CONFIG_INTR_REMAP)
...
#else
...
static inline int enable_drhd_fault_handling(void)
{
        return -1;
}
#endif /* !CONFIG_DMAR && !CONFIG_INTR_REMAP */
...
...
#ifdef CONFIG_INTR_REMAP
...
#else
static inline int enable_drhd_fault_handling(void)
{
        return -1;
}
...
#endif
...

So when both CONFIG_DMAR and CONFIG_INTR_REMAP are not defined, the function
enable_drhd_fault_handling is defined twice.
As I see in drivers/pci/dmar.c, non-empty definition of this function
is inside #ifdef CONFIG_INTR_REMAP.
And I suggest to remove first definition from include/linux/dmar.h

All these changes are releted to linux-2.6-misc-vt-d-backport-of-intel-vt-d-support-to-rhel5.patch.

Version-Release number of selected component (if applicable):
kernel-2.6.18-194.el5.src.rpm

How reproducible:
Always.

Steps to Reproduce:
1.Build kernel.

Comment 1 Kirill Kolyshkin 2010-05-17 17:01:30 UTC
I (and a plenty of other OpenVZ users) have the same issue here.

The workaround is to enable the following options in .config:
CONFIG_PCI_MSI=y # Needed by DMAR
CONFIG_DMAR=y    # Needed for compilation to work

We have a handful of similar cases then the RHEL kernel does not compile using custom .config. I didn't care submitting those here -- the question is should I?

Comment 2 Jes Sorensen 2013-03-18 16:16:38 UTC
Recompiling with a custom .config is not supported