Bug 719724

Summary: possible #DEFINE loop in include/linux/irqflags.h
Product: Red Hat Enterprise Linux 6 Reporter: Michael Hebenstreit <michael.hebenstreit>
Component: kernelAssignee: Prarit Bhargava <prarit>
Status: CLOSED CANTFIX QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.1CC: arozansk, luyu, mstowe
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: 2011-07-13 20:25:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Michael Hebenstreit 2011-07-07 18:59:14 UTC
Description of problem: it looks to me there is a mixup in definitions of local_irq_enable()/disable

Version-Release number of selected component (if applicable): 2.6.32-131.0.15.el6.x86_64

How reproducible: 100%
Steps to Reproduce: look at include/linux/irqflags.h

Additional info:

From RH61, "include/linux/irqflags.h"

#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
…
#define local_irq_enable() \
        do { trace_hardirqs_on(); raw_local_irq_enable(); } while (0)
#define local_irq_disable() \
        do { raw_local_irq_disable(); trace_hardirqs_off(); } while (0)
…
#else /* !CONFIG_TRACE_IRQFLAGS_SUPPORT */ …
#define raw_local_irq_disable()        local_irq_disable()

Why is in the first line local_irq_disable() defined, but in the second raw_local_irq_disable()? I could not find a different location where local_irq_disable() would be defined

From the 2.6.39 tree:

  88#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
  89#define local_irq_enable() \
  90        do { trace_hardirqs_on(); raw_local_irq_enable(); } while (0)
....
 133
 134#else /* !CONFIG_TRACE_IRQFLAGS_SUPPORT */
 135
 136#define local_irq_enable()      do { raw_local_irq_enable(); } while (0)
 137#define local_irq_disable()     do { raw_local_irq_disable(); } while (0)

Comment 2 Prarit Bhargava 2011-07-13 20:25:25 UTC
Hi -- please see linux-2.6 commit df9ee29270c11dba7d0fe0b83ce47a4d8e8d2101 

This is unlikely to be fixed for the !CONFIG_TRACE_IRQFLAGS_SUPPORT
codepath because of kabi restrictions and the large amount of code churn.

P.