[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] x86/APIC: make a few interrupt handler functions static
- To: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
- From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- Date: Tue, 29 Nov 2022 16:21:50 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=MXW05O58NixGhXdhHN3mZrIM0EL887lxF/qHl1K1M4k=; b=irmwicbAe5m67efdnDDm+Nva6xQV2o4taSQFrLGAaZnZcznUcGlONxj9xeec05vZggVS6eYlH/TJa38M7kY+qfa30oKWvQK4wnBVjmSfDkvctshFjHz7CmkwTJdLEguDGzSo36BycY7vTzUhBT+MtrrwMEfWeXphmPKccAjx8ym67G7gfLJByWsOn1+56UDJ289Etx7I14UDsBRFjKmxkzkAHaHFo5yI0LR4EKC3WcKQ35S9U1jaE6/hqO7a+gdyFJS5DmmMr8f+35F1WuQ2/WPDEGDzf8ghsJ4wsnOL4aBP4xfVITwpp9Sk5ioBAT0PjP3WyWu2IBo1Ba461LXGiQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CwIMMPexHxXhVm+wkIKUJhx/f3kCnABi87kQOa3byXLHse1l6BHrHJuPWKNrmtFH+u7JgEaW+x21Z1lzupQpl4kqHYjHmQ29R7paN39XLnPD8aBfOQPZzj5fcoAneYIMpdU+otB8/iy7AnkxBWwmhK16H5pAyOa09KudSDZ1byVAYiibY4V2XXjeNL5uo2unMdW5QRI+XH+e9r9q2rSV+aCNKLXvorZWWPKZkSyAJ4HJeKZjROW5rBigSIENz1m3BzVnR9P75V6MLqPQNQCyRQ0iCJAzOn0OQENB5gPRgXUGRfc5rk5W3yUQIWgCVzJyjxleg3skrcVaSzTd7OHYNw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Tue, 29 Nov 2022 16:22:08 +0000
- Ironport-data: A9a23:HeUm660EchBNsGrBePbD5fBwkn2cJEfYwER7XKvMYLTBsI5bpzFTm jNNUD+FafiNZWD1KtlxPIWw9UoA7ZaAzoQyHlY6pC1hF35El5HIVI+TRqvS04F+DeWYFR46s J9OAjXkBJppJpMJjk71atANlVEliefTAOK5ULSfUsxIbVcMYD87jh5+kPIOjIdtgNyoayuAo tq3qMDEULOf82cc3lk8tuTS9nuDgNyo4GlC5wVkNKgQ1LPjvyJ94Kw3dPnZw0TQGuG4LsbiL 87fwbew+H/u/htFIrtJRZ6iLyXm6paLVeS/oiI+t5qK23CulQRrukoPD9IOaF8/ttm8t4sZJ OOhF3CHYVxB0qXkwIzxWvTDes10FfUuFLTveRBTvSEPpqFvnrSFL/hGVSkL0YMkFulfMU1n7 u4kLAk2YS/errvuxuOLY9FKv5F2RCXrFNt3VnBI6xj8VapjbbWdBqLA6JlfwSs6gd1IEbDGf c0FZDFzbRPGJRpSJlMQD5F4l+Ct7pX9W2QA9BTJ+uxouC6Pl2Sd05C0WDbRUvWMSd9YgQCzo WXe8n6iKhobKMae2XyO9XfEaurnzX+rAt5KSeHQGvhCr3adx0g2KT4tcEqXm8WzshKfZNlwJ BlBksYphe1onKCxdfH/VRClpH+PvjYHRsFdVeY97Wml2qfSpgqUGGUAZjpAc8A98t87QyQw0 V2ElM+vAiZg2JWKTVqN+7HSqim9URX5NkcHbC4ACAcAvd/qpdlvigqVFoo4VqmoktfyBDf8h SiQqzQzjKkSishN0Lin+VfAgHSnoZ2hohMJ2zg7l1mNtmtRDLNJraTygbQHxZ6s9Lqkc2Q=
- Ironport-hdrordr: A9a23:JWVQfKFrUlkcLDJUpLqFwJLXdLJyesId70hD6qkvc3Fom52j/f xGws5x6fatskdrZJkh8erwW5Vp2RvnhNNICPoqTM2ftW7dySeVxeBZnMHfKljbdxEWmdQtsp uIH5IeNDS0NykDsS+Y2nj2Lz9D+qjgzEnAv463oBlQpENRGthdBmxCe2Sm+zhNNW177O0CZf +hD6R8xwaISDAyVICWF3MFV+/Mq5nik4/nWwcPA1oK+RSDljSh7Z/9Cly90g0FWz1C7L8++S yd+jaJp5mLgrWe8FvxxmXT55NZlJ/IzcZCPtWFjow4OyjhkQGhYaVmQvmnsCouqO+ixV42mJ 3nogsmPe5093TNF1vF7yfF6k3F6nID+nXiwViXjT/IusriXg83DMJHmMZwbgbZw1BIhqA+7I t7m0ai87ZHBxLJmyrwo/LSUQtxq0ayqX0+1cYOkn1kV5cEYrM5l/1cwKoVKuZEIMvJ0vFhLA BcNrCb2B+QSyLCU5nthBgq/DVrZAVqIv7JeDlYhiXf6UkqoJkw9Tpl+CVYpAZByHt1ceg72w yPWJ4Y641mX4sYa7lwC/wGRtbyAmvRQQjUOGbXOlj/ErobUki94qIfzY9Fk91CQqZ4uqcaid DEShdVpGQyc0XhBYmH24BK6AnERCG4US72ws9T6pBlsvmkLYCbehGrWRQriY+tsv8fCsrUV7 K6P49XGebqKS/rFZxS1wPzVpFOIT0VUdETuNw8R1WSy/i7YrHCp6jearLeNbDtGTErVif2BW YCRiH6IIFa4kWiShbD8WzssrPWCznCFL5LYdvnFrIoufkw36V3w3gooEX84N2XIjtftaFzdF diIdrc49GGmVU=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHZBAFkcdSZ5ocJ5UOIQIf8MA/Xq65WEOmAgAAEcgA=
- Thread-topic: [PATCH] x86/APIC: make a few interrupt handler functions static
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>
>
> 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.
> 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.
~Andrew
|