[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] x86/APIC: make a few interrupt handler functions static


  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 30 Nov 2022 08:59:11 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bgPKsdLcbxqD2OHRzaIQxIQ1pW2Esfntfw9/qZIIVdg=; b=dh2Gk9QVkyI/UWbd1S0ip+ScoBOudqAOmK2gLIP7GW2UInsXX/6wCMa03Cb84vk2GZ/sUmVyuInyTeGXsgZ3hG/GfzWGaYZ7GFD+R98h9DZksYr6Z2gAhfYmYyPrB4dil7LeGX2UUZNLQtBjFcPSJZtO8LZKfxGnKtfTDaTS5Qy0zw2AZ7C30gTb5hj+jGQOs8WqOuqlcWp7FvslSOI+dVW3/hz0N5dLIMEgX2zVN9NqKqeDcf4HZuDIcvlT07myCfEMN5+YVRwB/13yJnJyNw6rDqi7R7PbOZ8aaJAjCZ4+gq9j+NpgZPbCRhg5myXsWeEgpNBXIbWCJwggq7+Z/Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=blgb+1t8CNOJR/POjq6ex61A3Ky1ADYKegOOaGWGQVHIM5c//W85e9+GYELINJ3k0EGxkL7/e7WocEXQB/ko8rZ3gI48m9Ssia3TrfmUJBcwlD96X4j4GO6BjftD2exmU298EHusL2o0yo4+Rj1+NmAAgPJp6eQ4Ss9Ox3hOGYnTkiHu0Y/llo6l619ndVMtjKcEjeAoR78/eSfWN749HhmhkhmRhJ8Ir7ykUmqpBh/3jaU276OhwS1Sdm0z26ehdrHG/UA1ZWw0+fHNLKOcGilagR5pkd05qOZalzYqnbolXmXWK9WXn/05eutrht3Z/FjyBuGjo9veEpEs3skjJQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 30 Nov 2022 07:59:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 29.11.2022 17:21, Andrew Cooper wrote:
> On 29/11/2022 16:05, Roger Pau Monné wrote:
>> On Tue, Nov 29, 2022 at 03:46:30PM +0100, Jan Beulich wrote:
>>> Four of them are used in apic.c only and hence better wouldn't be
>>> exposed to other CUs. To avoid the need for forward declarations, move
>>> apic_intr_init() past the four handlers.
>>>
>>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>> Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Thanks.

>> A nit below.
>>
>>> --- a/xen/arch/x86/apic.c
>>> +++ b/xen/arch/x86/apic.c
>>> @@ -127,21 +127,6 @@ void ack_bad_irq(unsigned int irq)
>>>          ack_APIC_irq();
>>>  }
>>>  
>>> -void __init apic_intr_init(void)
>>> -{
>>> -    smp_intr_init();
>>> -
>>> -    /* self generated IPI for local APIC timer */
>>> -    set_direct_apic_vector(LOCAL_TIMER_VECTOR, apic_timer_interrupt);
>>> -
>>> -    /* IPI vectors for APIC spurious and error interrupts */
>>> -    set_direct_apic_vector(SPURIOUS_APIC_VECTOR, spurious_interrupt);
>>> -    set_direct_apic_vector(ERROR_APIC_VECTOR, error_interrupt);
>>> -
>>> -    /* Performance Counters Interrupt */
>>> -    set_direct_apic_vector(PMU_APIC_VECTOR, pmu_apic_interrupt);
>>> -}
>>> -
>>>  /* Using APIC to generate smp_local_timer_interrupt? */
>>>  static bool __read_mostly using_apic_timer;
>>>  
>>> @@ -1363,7 +1348,7 @@ int reprogram_timer(s_time_t timeout)
>>>      return apic_tmict || !timeout;
>>>  }
>>>  
>>> -void cf_check apic_timer_interrupt(struct cpu_user_regs *regs)
>>> +static void cf_check apic_timer_interrupt(struct cpu_user_regs *regs)
>> Given that the function is now not exported out of apic.c, wouldn't it
>> be better to drop the apic_ prefix?
> 
> This is the handler for the apic timer, as opposed to the plethora of
> other timer interrupts we have elsewhere.
> 
> Simply "timer interrupt" is too generic a name.

I agree with Andrew here.

>> The same would likely apply to pmu_apic_interrupt() then.
> 
> This one could lose the infix.  All PMU interrupts are from an LVT
> vector.  It may have made a different back in the days of non-integrated
> APICs, but those days are long gone.

I'm happy to drop the infix. Won't bother sending a v2 just for this,
though - I'll simply put the adjusted patch in soon after the tree
has reopened.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.