mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Shevchenko, Andriy" <andriy.shevchenko@intel.com>
To: "tglx@linutronix.de" <tglx@linutronix.de>,
	"Zijlstra, Peter" <peter.zijlstra@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Interrupt flags mismatch check in __setup_irq()
Date: Wed, 1 Aug 2018 20:05:08 +0000	[thread overview]
Message-ID: <9d935c253796909c5d005dd9416f33cb5bbd8537.camel@intel.com> (raw)

Hi!

Recently I have experienced some nasty issue

genirq: Flags mismatch irq 18. 00002000 (intel_mrfld_pwrbtn) vs.
00002000 (bcove_irq_chip_pwrbtn)

but it is not a merit of my message here.

While trying to understand the logic behind real code and what is wished
(based on a comment) I have got differences.

Thus, I wrote small python script [1] to understand better.
I assume it has few false-positives, but I also believe that logic and
comment are not in alignment and we might need to fix logic, comment, or
both.

Can you check that script and tell me if there is (in __setup_irq()
check) an issue or not?

[1]: https://gist.github.com/andy-shev/b85c5129fcfe63cb88849805e5a7e3a4

P.S. Small explanation, the functions are mapped to the following logic:

codebase() - repeats what we have in kernel
comment() - my understanding how it's supposed to work
algo() - abstraction of algorithm, so, can be extended thru the RULES
set

It prints out in case when codebase() != comment() for the same pair of
flags.

-- 
Andy Shevchenko <andriy.shevchenko@intel.com>
Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo

             reply	other threads:[~2018-08-01 20:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01 20:05 Shevchenko, Andriy [this message]
2018-08-01 20:37 ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9d935c253796909c5d005dd9416f33cb5bbd8537.camel@intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.zijlstra@intel.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®