From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4FB9741B33; Mon, 28 Aug 2023 16:39:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D9AB44026D; Mon, 28 Aug 2023 16:39:19 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 459414021E for ; Mon, 28 Aug 2023 16:39:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693233557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aWBwD8eDsP5q3E71DgSYBmeAKknL4TtN7CfRhWrf8l0=; b=MSFAebX7EhNusfTZL5aIa9ojJQbyp2rY37XxqGk+YGr4gbqt0kfiiFrudyR8LNYF87WUv1 PAplkfE8ub+zLBQ2PATO3rTbJhmtvXQ+aKXvVImof2FKcbdKGduw0K8ceON8mWn3wq++s9 bwDIqfHwXvrqsZDZHvfCvHtFPvNLl/s= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-518-XxDk1lwlN9q7-xBQ-I4oNA-1; Mon, 28 Aug 2023 10:39:16 -0400 X-MC-Unique: XxDk1lwlN9q7-xBQ-I4oNA-1 Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-4fe55c417fcso4039836e87.0 for ; Mon, 28 Aug 2023 07:39:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693233555; x=1693838355; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aWBwD8eDsP5q3E71DgSYBmeAKknL4TtN7CfRhWrf8l0=; b=jkYFJfULDtIwgOmSBBlARppe82rqriywX6a+Y7nBUunAZfIIwrY179hMeUaFfP42hp HZfD5vRMKaAC0ZyPjpF5PM4UBfnr4MUcC3NX7Hbt0phIkQJV8y3FV/aH6ePaXc3nKePy qp4rh1h/Zuy2Ei4Nt5XvVQ4DauHr/Hu7BNpz3mDOPEixc181RSxIO4V5r0MhAz/46Dfm I5WcTcJT/oZu1L1KfGblblJ31dMvNsAdGmd3rpCFcR1YKcwOL173FdlC39rbEO0/KdJM 3NkymLbKJXsaXWnA7hd+cT02EFoOCw7hCBR+/9f1xmwR9+x7/oWMpS+K/Q0PkojRVj3v alKA== X-Gm-Message-State: AOJu0Yx8OPVuhc8Gv7W8OvX9TipEqFTZyW95MrSfYhEOmnqFSwNyWixE ydT3nSAoWlJWnF5ES9QuFXQlmq+jgCqnv3/48jkJruaKYovUZq3XjEYiplzkFrXYflAFsdhKKqe QrhVxUuESwUBTg509Xmk= X-Received: by 2002:a05:6512:ad2:b0:4fe:4f8:8e75 with SMTP id n18-20020a0565120ad200b004fe04f88e75mr21102585lfu.68.1693233555085; Mon, 28 Aug 2023 07:39:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFabPoL9to/t1jophZIfz4p03MPeBYNB2iDBtBlJ8kv4OGtaMZ8vKDt1H2xgCJ11E5VgQ0sGNRS6lCPFnDREfk= X-Received: by 2002:a05:6512:ad2:b0:4fe:4f8:8e75 with SMTP id n18-20020a0565120ad200b004fe04f88e75mr21102574lfu.68.1693233554717; Mon, 28 Aug 2023 07:39:14 -0700 (PDT) MIME-Version: 1.0 References: <20230825152850.1107690-1-bruce.richardson@intel.com> <20230828103933.1047285-1-bruce.richardson@intel.com> In-Reply-To: <20230828103933.1047285-1-bruce.richardson@intel.com> From: David Marchand Date: Mon, 28 Aug 2023 16:39:02 +0200 Message-ID: Subject: Re: [PATCH v2] eal/x86: fix build on systems with WAITPKG support To: Bruce Richardson Cc: dev@dpdk.org, roretzla@linux.microsoft.com, =?UTF-8?Q?Morten_Br=C3=B8rup?= , Stephen Hemminger X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Aug 28, 2023 at 12:40=E2=80=AFPM Bruce Richardson wrote: > > When doing a build for a system with WAITPKG support and a modern > compiler, we get build errors for the "_umonitor" intrinsic, due to the > casting away of the "volatile" on the parameter. > > ../lib/eal/x86/rte_power_intrinsics.c: In function 'rte_power_monitor': > ../lib/eal/x86/rte_power_intrinsics.c:113:22: error: passing argument 1 > of '_umonitor' discards 'volatile' qualifier from pointer target type > [-Werror=3Ddiscarded-qualifiers] > 113 | _umonitor(pmc->addr); > | ~~~^~~~~~ > > We can avoid this issue by casting through "uintptr_t" and thereby > remove the volatile without warning. We also ensure comments are > correct for each leg of the ifdef..else..endif block. > > Fixes: 60943c04f3bc ("eal/x86: use intrinsics for power management") > Cc: roretzla@linux.microsoft.com > > Signed-off-by: Bruce Richardson > Acked-by: Morten Br=C3=B8rup > Tested-by: David Marchand Applied to fix build on the main branch, thanks. We can look at the casting helper as a followup. --=20 David Marchand