From: Ian Campbell <Ian.Campbell@citrix.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: "lguest@ozlabs.org" <lguest@ozlabs.org>,
Jeremy Fitzhardinge <jeremy@goop.org>,
Rusty Russell <rusty@rustcorp.com.au>,
Paul Mundt <lethal@linux-sh.org>,
"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
"x86@kernel.org" <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
"linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>,
Ingo Molnar <mingo@redhat.com>, Paul Mackerras <paulus@samba.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
Yinghai Lu <yinghai@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 01/10] irq: move some interrupt arch_* functions into struct irq_chip.
Date: Wed, 24 Mar 2010 19:16:03 +0000 [thread overview]
Message-ID: <1269458163.28761.859.camel@localhost.localdomain> (raw)
In-Reply-To: <alpine.LFD.2.00.1003241824500.3147@localhost.localdomain>
On Wed, 2010-03-24 at 17:44 +0000, Thomas Gleixner wrote:
> On Wed, 24 Mar 2010, Ian Campbell wrote:
>
> > On Mon, 2010-03-22 at 10:19 +0000, Thomas Gleixner wrote:
> > > On Sun, 21 Mar 2010, Yinghai Lu wrote:
> > >
> > > > From: Ian Campbell <ian.campbell@citrix.com>
> > > >
> > > > Move arch_init_copy_chip_data and arch_free_chip_data into function
> > > > pointers in struct irq_chip since they operate on irq_desc->chip_data.
> > >
> > > Not sure about that. These functions are solely used by x86 and there
> > > is really no need to generalize them.
> >
> > I thought the idea of struct irq_chip was to allow the potential for
> > multiple IRQ controllers in a system? Given that it seems that struct
> > irq_desc->chip_data ought to be available for use by whichever struct
> > irq_chip is managing a given interrupt. At the moment this is not
> > possible because we step around the abstraction using these arch_*
> > methods.
>
> Right, but you have exactly _ONE_ irq_chip associated to an irq_desc,
> but that same irq_chip can be associated to several irq_descs. So
> irq_desc->data is there to provide data for the irq_chip functions
> depending on what irq they handle (e.g. base_address ...).
>
> irq_desc->chip_data is set when the irq_chip is assigned to the
> irq_desc.
>
> So there is no point in having functions in irq_chip to set
> irq_desc->chip_data.
So how do you know which is the appropriate irq_chip specific function
to call given an irq_desc that you want to copy/free/migrate? The
contents of the chip_data pointer will take different forms for
different irq_chips. The way the generic code is currently structured it
appears you can't (or at least don't) just do a shallow copy by copying
the irq_desc->chip_data pointer itself -- you need to do a deep copy
using a function which understands that type of chip_data.
How is this operation different to having pointers in irq_chip for
enabling/disabling/masking interrupts for each irq_chip?
Ian.
next prev parent reply other threads:[~2010-03-24 19:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1269221770-9667-1-git-send-email-yinghai@kernel.org>
2010-03-22 1:36 ` [PATCH 01/10] irq: move some interrupt arch_* functions into struct irq_chip Yinghai Lu
2010-03-22 1:56 ` Michael Ellerman
2010-03-22 3:32 ` Yinghai Lu
2010-03-23 7:10 ` Paul Mundt
2010-03-24 13:33 ` Ian Campbell
2010-03-22 10:19 ` Thomas Gleixner
2010-03-24 13:32 ` Ian Campbell
2010-03-24 17:44 ` Thomas Gleixner
2010-03-24 19:16 ` Ian Campbell [this message]
2010-03-24 21:25 ` Thomas Gleixner
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=1269458163.28761.859.camel@localhost.localdomain \
--to=ian.campbell@citrix.com \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=jbarnes@virtuousgeek.org \
--cc=jeremy@goop.org \
--cc=lethal@linux-sh.org \
--cc=lguest@ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yinghai@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).