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

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


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 29 Nov 2022 17:05:55 +0100
  • 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=fzbSsX3HDf7CfnUgJV7rp+sWAYeSupJsGqT9bocxve0=; b=Giyu8nzr96q6ZfjbqSYoSn5qRqCtZMgvUG+IVLv8O4ZVyloRuuMtvV1rFTZNWvBa/nwmljErCFIXi0jOtkgq0moRLotmV7Jdhst52rOPXNUAl7mCZWX8EzLHpLttg0usmTDRxE82AFuFvxjJ3QVLVyapc29c2bTZlwRX6iaf8cpLKSoTuOT+Cp56xDhvF8Xs0+9vQeqKf3g3dAxgLyDWWbgX9srExGEF+zb7fxROePScjiBTnwVAsASHCwxw4Tb3DBkH5nkaRhbNLupTE31BFN59ml5BY6yT1Zk6Rns+BCDVs9fi5EgrUm4eZ8vW7BqguC/cYXkSVkxmLs79tInXdQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NPYmice7Tzb+zIYA4INp3laMyoRCkUzjok1mkzHLmwUvucfU7Fi4bSv5kfHraPC8AfpcllVmZ7BnOrAvTp7OB/cuTVFQDHz0ZA850m/TIpGidVayopUl10mwFwaMcwKfPMm+ZrLx5yXUNtlaujq/ogUli+GD/Jh0c3mT5bTQ8IoEJw197V4rjr6cumNipWhzatCtmOsanHG3vGA8AHT6Qmikyz2JrS9P6xWhW4J1Ye9o9l5IyM9sTP/6NE8ZLnRy0pki48oTjjBjrBR8odAlAZzpXYrK/76yjciG5BU7v1ue083lyc5Ej2fTfXQC5/BS5l6ISXMzIIxKCbXC7y3VQQ==
  • 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>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 29 Nov 2022 16:06:11 +0000
  • Ironport-data: A9a23:MWCKoKzBwabz8Ip0v4J6t+cQxyrEfRIJ4+MujC+fZmUNrF6WrkUAm GtKWm6PO6uMNmH2LY0gPNy3pkNU6sDSztMwSwtt+SAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHfykTbaeYUidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw//F+U0HUMja4mtC5AVnP6ET5zcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KUdu1 fwiJSEvUkDZqNms7LOgZvZ2i+12eaEHPKtH0p1h5RfwKK9+BLzmHeDN79Ie2yosjMdTG/qYf 9AedTdkcBXHZVtIJ0sTD5U92uyvgxETcRUB8A7T+fVxvjiVlVQruFTuGIO9ltiiX8Jak1zev mvb12/4HgsbJJqUzj/tHneE1rOfx3mgANh6+LuQp9c6w1izwWIvMBgGUXG1haXm0h+BYocKQ 6AT0m90xUQoz2SpRNTgWxyzoFafowURHdFXFoUS+AyLj6bZ/QudLmwFVSJaLswrstcsQj4n3 UPPmMnmbRRwtJWFRHTb8a2bxQ5eIgAQJG4GICMBEw0M5oC7pJlp10qVCNF+DKSyk9v5Xynqx CyHpzQ/gLNVitMX06K8/hbMhDfESoX1czPZLz7/BgqNhj6Vrqb8D2B0wTA3Ncp9Ebs=
  • Ironport-hdrordr: A9a23:pN1mE6/EQCR3mnOC/E9uk+G4dr1zdoMgy1knxilNoENuH/Bwxv rFoB1E73TJYVYqN03IV+rwXZVoZUmsjaKdhrNhRotKPTOWwVdASbsP0WKM+V3d8kHFh41gPO JbAtJD4b7LfCdHZKTBkW6F+r8bqbHokZxAx92uqUuFJTsaF52IhD0JbjpzfHcGJjWvUvECZe ehD4d81kydUEVSSv7+KmgOXuDFqdGOvJX6YSQeDxpixBiSgSiu4LvaFQHd+hsFSTtAzZor7G CAymXCl++emsD+7iWZ+37Y7pxQltek4txfBPaUgsxQBiTwhh2ubIFBXaTHmDwuuumg5Hsjjd GJiRY9OMZY7W/XYwiO0FDQ8jil9Axrx27pyFeej3emicvlRAgiA84EoY5CaBPW52cpodk5ic twriqknqsSKSmFsDX25tDOWR0vvk2ooUA6mepWq3BES4MRZJJYsIRa1kJIF5UrGj789ekcYa BTJfCZwMwTXUKRbnjfsGUq6NuwXk4rFhPDeUQGstz96UkioFlJi28jgOAPlHYJ85wwD7Ne4f 7fD6hunLZSCucLcKNUHo46MIWKI12IZSiJHHOZIFzhGq1CEWnKsYTL7LI84/zvUIAUzaE1hI /KXDpjxCEPknrVeI2zNaBwg1PwqD3XZ0Wu9ige3ek0hlTEfsurDcXZI2pe1vdJoJ0kc7/msr iISdZr6sTYXBvT8LZyrnPDsqZpWAgjue0uy6IGsgG107X2A7yvkNDnW9DuA5eoOQoYewrEcw g+tX7IVYh90nw=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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?

The same would likely apply to pmu_apic_interrupt() then.

Thanks, Roger.



 


Rackspace

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