[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Arm: rename smp_clear_cpu_maps()
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
- Date: Thu, 17 Apr 2025 10:48:42 +0200
- Arc-authentication-results: i=1; bugseng.com; arc=none smtp.remote-ip=162.55.131.47
- Arc-message-signature: i=1; d=bugseng.com; s=openarc; a=rsa-sha256; c=relaxed/relaxed; t=1744879722; h=DKIM-Signature:MIME-Version:Date:From:To:Cc:Subject:In-Reply-To: References:Message-ID:X-Sender:Organization:Content-Type: Content-Transfer-Encoding; bh=R7MrtEuaio1dEUqqHW0mHSP6vjdDz05jioxyuZBttSA=; b=ilnF+x1/liE8H2ZN6scuJoGgnDHRKempqWzzyB61lxD3JgQu+wYg6usOQWXl87Ahigq9 i8ReIBNprPi7FgwQZOMl+hzHvtxR0c1ZM2qXbRI7hhZ3MMlzIi07xGE8vfAoaP6h8vyn2 U8/MUfqNxTNn0gVkKHSBxxd3yoAgWbtMAr8LkMgjvh9GyvTbvQmyxFuco6u2TpUCbN0+M pWNHIVHmiirUJ+cjyeZCQIOy4AWAznN1t0dO0Lduz2iO0P/lytX2gYeXaPxTpIOSUMHF1 dYuNTJGYY/3b9Xtiw0jrDlJyFNaEc8Z1oZzppRSFB0+dLNhT4ZJdEbIV4awij4c6Ry2SA b0nQGNA5411NNExgQsT89R+JTo0EZAqP+Q12te00p9cI3oBEiXXpOdSPuemn0u7EL4p3I wI+ExLlJtnXmQ9v5QBDVztcszCxbnbLYuCCR2+UBabPonDnUU9pHGKg+tzM75ilG6l0HM LaK8kVtdn/E+oziEG7OsgjbopaCGKwZWcmhy3FaSMFLuoxQu6kVBJeOsKnOqZp79oYUcn Q18f3uqYZORp8kOKbgKjXREi/DasSCUxOAmQhaTHasjdVjSYoxTogBLI6ubq58bnwmkX9 yTbA2ANIJW0a9ErQv7BGxUAfNic/ajZSCAxVSHoS6wBgeNdKSS91Nxj9qPBKZ40=
- Arc-seal: i=1; d=bugseng.com; s=openarc; a=rsa-sha256; cv=none; t=1744879722; b=VA0KRYIvNp1jEN7xEAh7MSGQDyqxt9HKx8aUqf8db/vBfUE9KUJQAS3t7nMlUztnBv+C 1trOTds046tLA7fgUolZfqpOcSzgEP0WHIN/AiLnPKrXu2ZnX4pc8LwMBY28NxZ3tQhBA IuaJCcVaamou0henaXg5kIOvlyjbqaE9shNR2jT9zv8wlnyYpLCUXQtxAnOctJ2bza9AP cuxT9o72bfphov/4QVcONjNm+M+ywdOcoXaaoP70WI3vaTGevUkrEbQfvJJ93t6+6+Y5j TUCQJUhZPQ2jXH5Wq0F8da36oyLMRH84MZv+fJxsYiKcelaYqpgCTdFaxJYLDJ/qMk9UE g+6I4NLcZv1WSNQH8Hv62FG14Kjz0bzvv1iZrdOKHEO016/jWyRPT7IKmtveE9WLIlDFP Dyz98mafsv8sRp9Yiwz/ORBOm2/nL2im+vpzFl6e1CM1h28j9o+LdfOc0VzMAV3LvIMFJ yJ1hfXuF8QmKnP/HSBfKU9YOu/tn/0DJHSyZTZ4yyCaV4owZhP5iy+RZ35CERn+1627ah 2B66FQlCM1QIb6LQoqy1jjzJZsBm1L1TsyIvGOxfMhIYoVCV3dynaO47UBCKwNEXbe7ib YeOVhJCStQbI97sMhDHnDfNKPxeDRhFdlwGRk1W78DKjxXoxtol0fAAdknYCf4Y=
- Authentication-results: bugseng.com; arc=none smtp.remote-ip=162.55.131.47
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, consulting@xxxxxxxxxxx
- Delivery-date: Thu, 17 Apr 2025 08:48:48 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 2025-04-17 10:36, Jan Beulich wrote:
The function has lost all clearing operations. Use the commonly
available name (declared in xen/smp.h), that x86 also uses.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
I would have expected this to also address a Misra violation
(declaration without definition), but I can't spot any rule (having
looked through 8.x in particular) to this effect.
The rule you are looking for is 8.6: " An identifier with external
linkage shall have exactly one external definition", which is explicitly
deviated in Xen to allow declarations that have no definition,
especially in the case where definitions may be optimized out by the
compiler or are simply compiled out. I don't recall the specific
discussion that led to this deviation, but I can dug it up, if needed.
--- a/xen/arch/arm/include/asm/smp.h
+++ b/xen/arch/arm/include/asm/smp.h
@@ -29,7 +29,6 @@ int cpu_up_send_sgi(int cpu);
extern void init_secondary(void);
extern void smp_init_cpus(void);
-extern void smp_clear_cpu_maps (void);
extern unsigned int smp_get_max_cpus(void);
#define cpu_physical_id(cpu) cpu_logical_map(cpu)
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -317,7 +317,7 @@ void asmlinkage __init start_xen(unsigne
/* Initialize traps early allow us to get backtrace when an error
occurred */
init_traps();
- smp_clear_cpu_maps();
+ smp_prepare_boot_cpu();
device_tree_flattened = early_fdt_map(fdt_paddr);
if ( !device_tree_flattened )
--- a/xen/arch/arm/smpboot.c
+++ b/xen/arch/arm/smpboot.c
@@ -107,8 +107,7 @@ static void remove_cpu_sibling_map(int c
free_cpumask_var(per_cpu(cpu_core_mask, cpu));
}
-void __init
-smp_clear_cpu_maps (void)
+void __init smp_prepare_boot_cpu(void)
{
cpumask_set_cpu(0, &cpu_online_map);
cpumask_set_cpu(0, &cpu_possible_map);
--
Nicola Vetrini, B.Sc.
Software Engineer
BUGSENG (https://bugseng.com)
LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253
|