From nobody Tue Dec 3 17:12:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1732003991; cv=none; d=zohomail.com; s=zohoarc; b=XVRZZ6rehKMTBuRmgUyl+I/xeNkHpIU9pkewPTi3dfm2ytLCXH8ABN8j50CMdnz8CC1BdWasl7HJL95iVzaXyRcz8ghUnp0Jz/EVJ4RWCqnIlEn0oBtzg+yAz4PiYv8VFurUWYzaX4xgECcarAwBr0BujSehf2jagj00QlXdLLQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732003991; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+7bXGfBZyvdIZPTmXb4+ST5abFWGGKww59gbl5MyekQ=; b=VrFvKVnbQNUWItrTP/eT+KW5iWZ3mGvFaTJIT4+z0eCZWNRDmPd/p69D9vu96VYatQBTbWL1r9SvHkrwhvdpOPrwZ9B1r0XeikZXYw9zYTOmeszvFPjAAa6GOU8dyZbzzGFSFCc05VPDPdsq07OAjYyTRir9wrLktDDUp+74c5s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1732003991058869.6194781838225; Tue, 19 Nov 2024 00:13:11 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.839718.1255496 (Exim 4.92) (envelope-from ) id 1tDJLu-0004PB-38; Tue, 19 Nov 2024 08:12:50 +0000 Received: by outflank-mailman (output) from mailman id 839718.1255496; Tue, 19 Nov 2024 08:12:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tDJLu-0004P3-0f; Tue, 19 Nov 2024 08:12:50 +0000 Received: by outflank-mailman (input) for mailman id 839718; Tue, 19 Nov 2024 08:12:49 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tDJLt-0004Ox-8v for xen-devel@lists.xenproject.org; Tue, 19 Nov 2024 08:12:49 +0000 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [2a00:1450:4864:20::635]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 0e569e6a-a64e-11ef-99a3-01e77a169b0f; Tue, 19 Nov 2024 09:12:45 +0100 (CET) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a9a6b4ca29bso593358066b.3 for ; Tue, 19 Nov 2024 00:12:45 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa20df52adasm620714866b.81.2024.11.19.00.12.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Nov 2024 00:12:44 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 0e569e6a-a64e-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MzUiLCJoZWxvIjoibWFpbC1lajEteDYzNS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6IjBlNTY5ZTZhLWE2NGUtMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMyMDAzOTY1LjIwMDE5OSwic2VuZGVyIjoiamJldWxpY2hAc3VzZS5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1732003964; x=1732608764; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=+7bXGfBZyvdIZPTmXb4+ST5abFWGGKww59gbl5MyekQ=; b=AgUs1Dfn91gKWrFVIwXE0tj+tPZ9LexlpXPufIUsSA7HsGGrYwudqmw/+kxzrFBByx IdmaveHvTZuYAc9Nn+bFOvzceaZomADuOXUI79BGg/6nm1TFcjK164QPUJ+nqjTAgyqR EOxnNCCCL0rArc8qEe1je4NBmFx0hwGKjuor2wlCDNiWcytFsiSu5lMBmLqhUVlxHnc0 F4MWUaqOJVjDnsNZBsesbmf9f/wnzMAWcH94v3DL+c03AKso4HS6l+9J74/slSx44D79 H1gM7inwWJMVxsTl1oo+6O1l/q1YVesvcIhG94AQ3gsRNvWnN16s8hevfOm9rB5XTLRz KlQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732003964; x=1732608764; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+7bXGfBZyvdIZPTmXb4+ST5abFWGGKww59gbl5MyekQ=; b=OLNiTcupNFNZX/ciZP7XKYVhw07pHWaz7ILfFsggSDrBBklS8UOoKQq0a527b/N42Q gZMFnifaNhUCHXTRVIz9A8L7FlhoFTlYR+md59NmjJxlwSfKWxrGg1+hN+VEXlt9JGBC 8+Pj5ks1O38RHpyq269N7Kc6pQRZuKLWgVD3EUQBMsL/U4H8OKloAp37AZu7Sc7jawtD 3zxMaJQe6ON6315pesmNz9K+7uD37/iB8dKj772YFnc4lPbXSdGoW6PIwQVZvZdWBe7Y glJubvApVHKFuJ6pLPhD1U0RjXgFW68vfRKd9su026NELCR2X7kymY+iFGWIZZvGJE+Y zX3g== X-Gm-Message-State: AOJu0Yzug2NBXmvjV2oBVBgeQAPovubbcL77zHHquENb/gExsPftgBxr 9q5ZdYnoHGgH+mV3VKPCO8uP1soleGxLi+mpGCCZgBrN23y3jYeK3l0Q25Xucw9Fhs6Pk+erThk = X-Google-Smtp-Source: AGHT+IGfEobCDnR+0BVd+TV/EDYd/Jy+aAxF5dEjs6K9N2/qtzeAdIyQmomQ033PZeHDuVN4nKoNaA== X-Received: by 2002:a17:907:981:b0:a99:f779:ae0c with SMTP id a640c23a62f3a-aa483450acbmr1482197966b.25.1732003964659; Tue, 19 Nov 2024 00:12:44 -0800 (PST) Message-ID: <06b4f2c5-8470-4375-9311-c31921d7aaa8@suse.com> Date: Tue, 19 Nov 2024 09:12:43 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH] x86/pmstat: deal with Misra 8.4 violations To: xen-devel Cc: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Stefano Stabellini , "consulting@bugseng.com" , Andrew Cooper , Nicola Vetrini References: <4de83f5b-5fde-44a9-8943-b1bb3f41d2e3@citrix.com> Content-Language: en-US From: Jan Beulich Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07j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ZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <4de83f5b-5fde-44a9-8943-b1bb3f41d2e3@citrix.com> Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1732003992604116600 Content-Type: text/plain; charset="utf-8" While the override #define-s in x86_64/platform_hypercall.c are good for the consuming side of the compat variants of set_{cx,px}_pminfo(), the producers lack the respective declarations. Include pmstat.h early, before the overrides are put in place, while adding explicit declarations of the compat functions (alongside structure forward declarations). Reported-by: Andrew Cooper Signed-off-by: Jan Beulich Acked-by: Andrew Cooper Tested-by: Andrew Cooper --- a/xen/arch/x86/x86_64/platform_hypercall.c +++ b/xen/arch/x86/x86_64/platform_hypercall.c @@ -4,8 +4,8 @@ =20 EMIT_FILE; =20 -#include #include +#include =20 #define xen_platform_op compat_platform_op #define xen_platform_op_t compat_platform_op_t --- a/xen/include/xen/pmstat.h +++ b/xen/include/xen/pmstat.h @@ -7,6 +7,12 @@ =20 int set_px_pminfo(uint32_t acpi_id, struct xen_processor_performance *perf= ); long set_cx_pminfo(uint32_t acpi_id, struct xen_processor_power *power); +#ifdef CONFIG_COMPAT +struct compat_processor_performance; +int compat_set_px_pminfo(uint32_t acpi_id, struct compat_processor_perform= ance *perf); +struct compat_processor_power; +long compat_set_cx_pminfo(uint32_t acpi_id, struct compat_processor_power = *power); +#endif uint32_t pmstat_get_cx_nr(unsigned int cpu); int pmstat_get_cx_stat(unsigned int cpu, struct pm_cx_stat *stat); int pmstat_reset_cx_stat(unsigned int cpu);