lkml.org 
[lkml]   [2013]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: Add check for number of available vectors before CPU down [v3]


On 12/23/2013 02:12 AM, Chen, Gong wrote:
> On Fri, Dec 20, 2013 at 10:50:09AM -0500, Prarit Bhargava wrote:
>> +int check_vectors(void)
>> +{
>> + int irq, cpu;
>> + unsigned int vector, this_count, count;
>> + struct irq_desc *desc;
>> + struct irq_data *data;
>> + struct cpumask *affinity;
>> +
>> + this_count = 0;
>> + for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS; vector++) {
>> + irq = __this_cpu_read(vector_irq[vector]);
>> + if (irq >= 0) {
>> + desc = irq_to_desc(irq);
>> + data = irq_desc_get_irq_data(desc);
>> + affinity = data->affinity;
>> + if (irq_has_action(irq) || !irqd_is_per_cpu(data) ||
> This line looks weird. Why counter will be increased once the irq has
> action? Do you mean
>
> if (irq_has_action(irq) && !irqd_is_per_cpu(data) &&
> !cpumask_subset(affinity, cpu_online_mask))
>
>

Yes, you're absolutely right. I mixed up the and and or's on this line of code.
I will send out a patch against tip shortly.

P.


\
 
 \ /
  Last update: 2013-12-23 14:21    [W:0.118 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site