lkml.org 
[lkml]   [2008]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] switch vector_irq[] from irq number to irq_desc pointer v2
On Fri, Sep 19, 2008 at 01:40:23PM -0700, Yinghai Lu wrote:
> On Fri, Sep 19, 2008 at 1:04 PM, Dean Nelson <dcn@sgi.com> wrote:
> > Change per_cpu variable vector_irq[] from holding an 'int' irq number to
> > holding a 'struct irq_desc' pointer.
>
> why?
>
> Eric wants to change int irq to some struct irq later?

Well, it was my take on what Eric was saying in the following:

On Mon, Aug 11, 2008 at 12:39:22PM -0700, Eric W. Biederman wrote:
>
> We create a common factor of assign_irq_vector that looks something like:
>
> bool __grab_irq_vector(struct irq_desc *desc, unsigned vector, cpumask_t new_domain)
> {
> /* Must be called with vector lock */
> struct irq_cfg *cfg;
> bool grabbed = false;
> unsigned int old_vector;
> cpumask_t mask;
> int cpu;
>
> cfg = get_irqp_cfg(irq);
> old_vector = cfg->vector;
> cpus_and(mask, new_domain, cpu_online_map);
>
> for_each_cpu_mask_nr(cpu, mask) {
> if (per_cpu(vector_irq, cpu)[vector])
> goto out;
> }
> /* Available reserve it */
> for_each_cpu_mask_nr(cpu, mask)
> per_cpu(vector_irq, cpu)[vector] = desc;

The previous line made me think that was what he wanted....

> if (cfg->vector) {
> cfg->move_in_progress;
> cfg->old_domain = cfg->domain;
> }
> cfg->vector = vector;
> cfg->domain = mask;
> grabbed = true;
>
> out:
> return grabbed;
> }

... Along with the following paragraph.

> I think vector_irq should return an irq_desc and have an entry for
> all of the static vectors as well (if we are going to do weird
> things with dynamic high priority vector allocation, and dynamic
> detection of which vectors assign_irq_vector may use).

If that's not what Eric meant, then I got it wrong and you can reject
the patchset.

Dean



\
 
 \ /
  Last update: 2008-09-20 01:29    [W:0.095 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site