From patchwork Fri May 21 08:58:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Richey X-Patchwork-Id: 444960 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96831C43461 for ; Fri, 21 May 2021 08:59:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 78C55613BE for ; Fri, 21 May 2021 08:59:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233884AbhEUJAn (ORCPT ); Fri, 21 May 2021 05:00:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233878AbhEUJAl (ORCPT ); Fri, 21 May 2021 05:00:41 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C30C5C061763; Fri, 21 May 2021 01:59:17 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id p6so10610743plr.11; Fri, 21 May 2021 01:59:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J2YdikRzDA0+TJpu2vHIxRfLfNi2y/X1orUObOJPMcQ=; b=YPWezR8rmITdukllwU88BHwlaqRM1dPHToJuAi/XZT4/apUsiR2eBO7sBJjPLlr8bz A+ZJ/F2lBzogpk4U2KC4tEjqlKJcytL9Mc1y9bitI7M8IdQpJY16ZqVeieIMbJTaXtcG k0CaQj/1LQiU8yyP4itYEL1YcUoHTSQKtSI+6BogDR79h2KNPNDzIr5AUViL+Ru9Wxv6 SIoBrpB2Dt9sjglTXzAG9CoOSBBj3Weu5HfJtvvXqvFYcW4LkHJU25b8YXekuYPZ6YKN kY/aFaavE7V1kunGfNIwPpISOYxvM2WeOdRTzHtYeR+wh58PQZMe2SNWFsDrEDFsE+Xp xGtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J2YdikRzDA0+TJpu2vHIxRfLfNi2y/X1orUObOJPMcQ=; b=IIiuPWTX59Ujk7C4rrdT2fxej/jbM5ssLwjSNzKHLT3t0ZWGlyb3QtmCzLVBK6sl/q pedmaRSbKcqr2SD0oeL6Dn1SFtfxqxECSrtA4KJyFJhYMYxBJqekLutQi51LQt34ndZr Dl8n377d8brpcjFXyuqG4j0KLrweuk5yBKTCNIYOthO08Wmsumn2iiIWkxQHnYMgTMmI gs2+yHuvCUYce6OoZ7BeZkmqKOub/XQFT2HBCBu4muht/+ytGUFkiHTk5OlGEmHHrqRY 005raDyrIqvLPQ5gYtdaUy7ifXwqxkiyY1/d1zUxxCO8v7avJG79VkPJS1ffcup3qQPi Kutg== X-Gm-Message-State: AOAM53063KX+cVwQF6dRocV8AjnT31jpwo90NjM0tBLUCh23wB3pXKkw 3ozEZFmEerxYmXo3msd0eww= X-Google-Smtp-Source: ABdhPJxJdEKyYhdH0U2LbRsagJ5Z264nhWDwj8nq800bCnlPbJ3QlLY4Cn8Acsh5KjT8jB1Tw01H4A== X-Received: by 2002:a17:90a:c792:: with SMTP id gn18mr9489955pjb.44.1621587557337; Fri, 21 May 2021 01:59:17 -0700 (PDT) Received: from pride.localdomain (c-174-61-140-56.hsd1.wa.comcast.net. [174.61.140.56]) by smtp.gmail.com with ESMTPSA id q3sm3914489pff.142.2021.05.21.01.59.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 May 2021 01:59:17 -0700 (PDT) From: Joe Richey To: trivial@kernel.org Cc: Joe Richey , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Paolo Bonzini , Mark Rutland , Lorenzo Pieralisi , Mauro Carvalho Chehab , Zhangfei Gao , Zhou Wang , Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn , Andi Kleen , "Chang S. Bae" , Sasha Levin , Peter Xu , Lei Cao , Daniel Lezcano , Ulf Hansson , "Rafael J. Wysocki" , Jean-Philippe Brucker , Jonathan Cameron , Greg Kroah-Hartman , Hans Verkuil , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-accelerators@lists.ozlabs.org Subject: [PATCH v2 1/7] x86/elf: Use _BITUL() macro in UAPI headers Date: Fri, 21 May 2021 01:58:42 -0700 Message-Id: <20210521085849.37676-2-joerichey94@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210521085849.37676-1-joerichey94@gmail.com> References: <20210520104343.317119-1-joerichey94@gmail.com> <20210521085849.37676-1-joerichey94@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Joe Richey Replace BIT() in x86's UPAI header with _BITUL(). BIT() is not defined in the UAPI headers and its usage may cause userspace build errors. Fixes: 742c45c3ecc9 ("x86/elf: Enumerate kernel FSGSBASE capability in AT_HWCAP2") Signed-off-by: Joe Richey --- arch/x86/include/uapi/asm/hwcap2.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/uapi/asm/hwcap2.h b/arch/x86/include/uapi/asm/hwcap2.h index 5fdfcb47000f..054604aba9f0 100644 --- a/arch/x86/include/uapi/asm/hwcap2.h +++ b/arch/x86/include/uapi/asm/hwcap2.h @@ -2,10 +2,12 @@ #ifndef _ASM_X86_HWCAP2_H #define _ASM_X86_HWCAP2_H +#include + /* MONITOR/MWAIT enabled in Ring 3 */ -#define HWCAP2_RING3MWAIT (1 << 0) +#define HWCAP2_RING3MWAIT _BITUL(0) /* Kernel allows FSGSBASE instructions available in Ring 3 */ -#define HWCAP2_FSGSBASE BIT(1) +#define HWCAP2_FSGSBASE _BITUL(1) #endif From patchwork Fri May 21 08:58:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Richey X-Patchwork-Id: 446085 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F079C433B4 for ; Fri, 21 May 2021 08:59:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 05DE3613AC for ; Fri, 21 May 2021 08:59:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234530AbhEUJAr (ORCPT ); Fri, 21 May 2021 05:00:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234353AbhEUJAn (ORCPT ); Fri, 21 May 2021 05:00:43 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CDB0C0613CE; Fri, 21 May 2021 01:59:19 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id b7so6459294plg.0; Fri, 21 May 2021 01:59:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XBuT/V3P0pWC+ggnGmOX+z+lc1lWh88kce8Okb29znM=; b=th9xtbD/aHMHBiQSY1g07NwM3TUVpqnBAcUupD1TBpQoSsfG5Oe7BGVpfS2U/UZclg Xhy8zEINjoqy+dS3JRZZreMPv3kmVVhsiQTeg4OIijjOL4mxp2M+c3FJnGOODP0uX75X +yaMqHGoq6CFlVwzsbJc9Ar5p8shcAFQHMumoNlVXUbBW78j08UG0IydZqh+Qv6eX3X/ XW01VeLen5pxgW5OJhJsK2bqSsP8MC6WEZ2VMw7svpBqhR3vgRJ6x7wxh+DFx9gNlKHf Or87tEbqDGiLmGNJ7FH7pWzJzmLZIVo7DD12Cx/LQKe11DkkbsyJe9xGm/G7n2fWjklt enqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XBuT/V3P0pWC+ggnGmOX+z+lc1lWh88kce8Okb29znM=; b=MFzPQDejX+gWvD3GWGIwpajVOKBZ1Wp3SsD4QvEDSVuC9k0zeXVq90aE4i+pP5bG5h j3u6xhEEwf+n8nmduUyxdAw4PBfK7Yz6fPsK6V5iuH1CQbIDdbxcmwvifawsbHmgILgY 7x/K9QBku4VxGEassFJzRm9nmdDbJclzfoSdLqhpvLsjAlQDcc8Q4gI73WchJB50sFFv /kFUep7mJtPrFboSqbx6oixPhypswWgXW7nmUaFdjXCOnMo7YYhs1kBUgFvQdlBhF8pM 16xXTu6mS/Yug1EgbuWEai4FOFqotnwCYcZfkqQ3319hXlob03/bNrxGOI9SITqXxC4i f4Uw== X-Gm-Message-State: AOAM532j2P6VTXrbyeBLplykXjZotaM9aPb4NZsH0uoc95lj7aIM/8/w ete8uEDNNNohAbUsa4jtcCM= X-Google-Smtp-Source: ABdhPJxN3X0zUHNKO+LXfZHgjCVL4v9DqnY3i+c5fxiXCCPHA3ZbZc9Z7NLyQm2mTJpTyKmmE4lfNg== X-Received: by 2002:a17:90b:19c2:: with SMTP id nm2mr10180945pjb.18.1621587559209; Fri, 21 May 2021 01:59:19 -0700 (PDT) Received: from pride.localdomain (c-174-61-140-56.hsd1.wa.comcast.net. [174.61.140.56]) by smtp.gmail.com with ESMTPSA id q3sm3914489pff.142.2021.05.21.01.59.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 May 2021 01:59:18 -0700 (PDT) From: Joe Richey To: trivial@kernel.org Cc: Joe Richey , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Paolo Bonzini , Mark Rutland , Lorenzo Pieralisi , Mauro Carvalho Chehab , Zhangfei Gao , Zhou Wang , Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn , Andi Kleen , "Chang S. Bae" , Sasha Levin , Peter Xu , Lei Cao , Daniel Lezcano , "Rafael J. Wysocki" , Ulf Hansson , Jean-Philippe Brucker , Zaibo Xu , Kenneth Lee , Jonathan Cameron , Hans Verkuil , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-accelerators@lists.ozlabs.org Subject: [PATCH v2 2/7] KVM: X86: Use _BITUL() macro in UAPI headers Date: Fri, 21 May 2021 01:58:43 -0700 Message-Id: <20210521085849.37676-3-joerichey94@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210521085849.37676-1-joerichey94@gmail.com> References: <20210520104343.317119-1-joerichey94@gmail.com> <20210521085849.37676-1-joerichey94@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Joe Richey Replace BIT() in KVM's UPAI header with _BITUL(). BIT() is not defined in the UAPI headers and its usage may cause userspace build errors. Fixes: fb04a1eddb1a ("KVM: X86: Implement ring-based dirty memory tracking") Signed-off-by: Joe Richey --- include/uapi/linux/kvm.h | 5 +++-- tools/include/uapi/linux/kvm.h | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 3fd9a7e9d90c..79d9c44d1ad7 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h @@ -8,6 +8,7 @@ * Note: you must update KVM_API_VERSION if you change this interface. */ +#include #include #include #include @@ -1879,8 +1880,8 @@ struct kvm_hyperv_eventfd { * conversion after harvesting an entry. Also, it must not skip any * dirty bits, so that dirty bits are always harvested in sequence. */ -#define KVM_DIRTY_GFN_F_DIRTY BIT(0) -#define KVM_DIRTY_GFN_F_RESET BIT(1) +#define KVM_DIRTY_GFN_F_DIRTY _BITUL(0) +#define KVM_DIRTY_GFN_F_RESET _BITUL(1) #define KVM_DIRTY_GFN_F_MASK 0x3 /* diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h index 3fd9a7e9d90c..79d9c44d1ad7 100644 --- a/tools/include/uapi/linux/kvm.h +++ b/tools/include/uapi/linux/kvm.h @@ -8,6 +8,7 @@ * Note: you must update KVM_API_VERSION if you change this interface. */ +#include #include #include #include @@ -1879,8 +1880,8 @@ struct kvm_hyperv_eventfd { * conversion after harvesting an entry. Also, it must not skip any * dirty bits, so that dirty bits are always harvested in sequence. */ -#define KVM_DIRTY_GFN_F_DIRTY BIT(0) -#define KVM_DIRTY_GFN_F_RESET BIT(1) +#define KVM_DIRTY_GFN_F_DIRTY _BITUL(0) +#define KVM_DIRTY_GFN_F_RESET _BITUL(1) #define KVM_DIRTY_GFN_F_MASK 0x3 /* From patchwork Fri May 21 08:58:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Richey X-Patchwork-Id: 446084 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7BA1C433B4 for ; Fri, 21 May 2021 08:59:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8C778613D4 for ; Fri, 21 May 2021 08:59:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234660AbhEUJAt (ORCPT ); Fri, 21 May 2021 05:00:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234501AbhEUJAr (ORCPT ); Fri, 21 May 2021 05:00:47 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B844C0613CE; Fri, 21 May 2021 01:59:23 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id b15-20020a17090a550fb029015dad75163dso6829558pji.0; Fri, 21 May 2021 01:59:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yM/3QdkJCppokhFbJwJxmhjVf2nsrL4HrLq6id+fxEk=; b=PvEz30dm/K8/j50iH//PbpjEfJzooQ9UREv0KIGi7QlAsFEZ5CsF415d+FyDZlTfCB mN0snlIOptA+BBG8KbBFsYIBvkvNQAYQkfzc0Ize26XRY5tDKPFkTWOJwtugVydkywob RGaYHCsyOU/+UrD+KWX0uQy3fVYCrtLsoclDKCpaDogDpyQ8WVqUWtOfSve2Pedb4L4h pKr2NJsVdJfPFoP3zAN2nmRpOn/VdbQpnJ23AIFCpYAGrlyFXPMqHjgZyfnwgrwK7sTH LjaSFQ30FByisriSdtWNp5a6twgVO4Q7jnWuw48yMjjmgNsHdoXQM5y4amxAwoWAoK+W 8PQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yM/3QdkJCppokhFbJwJxmhjVf2nsrL4HrLq6id+fxEk=; b=UaYwWz0yLN/wO3rZgrVZQWh+zP82QSZZDqj/tElyW5F9zndCl0ash67uy807gAG7ot X/FnVAtx0t/LSqQ62puI+HcWO7B7JnIW3VLgmHF6tPsFXyjMdVuvlLE9QszLE63q1ao+ 5Xzv/8gPJHFhP98ncmKWlZxz4kb5+TwJmSQDI0oOf4cHpl2cf6GMG6HTw90XpomCsjUo lE/GOzvBPEJEXhKc65nBdm0wSG/cWRQ7iEtnShKz0KCzvYhKa5bwdYOSUKvw6IG2B8+/ upQvImTh4fBR/GKJjS4oSaJtX8lEKFqrH5ELDAM9Kzrag7F4PpT+uuRushkrR0pcOw+k eoqQ== X-Gm-Message-State: AOAM530IF6ii63/MFSwgPnc2RKCsOmn/3tfqVhXsBY7o5E6xE5zAQMpt aQrVbuBmGvZRPdc5uGlEQwg= X-Google-Smtp-Source: ABdhPJzQ+uz7ynSjk7hSnQcnNXkwicmsLqykMuigPly1P5X7ww5hgmnns91iZetd85tDoMaSYRFlBg== X-Received: by 2002:a17:902:7e02:b029:f1:62ce:6674 with SMTP id b2-20020a1709027e02b02900f162ce6674mr11071326plm.39.1621587562995; Fri, 21 May 2021 01:59:22 -0700 (PDT) Received: from pride.localdomain (c-174-61-140-56.hsd1.wa.comcast.net. [174.61.140.56]) by smtp.gmail.com with ESMTPSA id q3sm3914489pff.142.2021.05.21.01.59.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 May 2021 01:59:22 -0700 (PDT) From: Joe Richey To: trivial@kernel.org Cc: Joe Richey , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Paolo Bonzini , Mark Rutland , Lorenzo Pieralisi , Mauro Carvalho Chehab , Zhangfei Gao , Zhou Wang , Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn , Sasha Levin , "Chang S. Bae" , Andi Kleen , Peter Xu , Lei Cao , Daniel Lezcano , Ulf Hansson , "Rafael J. Wysocki" , Zaibo Xu , Herbert Xu , Jean-Philippe Brucker , Hans Verkuil , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-accelerators@lists.ozlabs.org Subject: [PATCH v2 4/7] uacce: Use _BITUL() macro in UAPI headers Date: Fri, 21 May 2021 01:58:45 -0700 Message-Id: <20210521085849.37676-5-joerichey94@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210521085849.37676-1-joerichey94@gmail.com> References: <20210520104343.317119-1-joerichey94@gmail.com> <20210521085849.37676-1-joerichey94@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Joe Richey Replace BIT() in uacce's UPAI header with _BITUL(). BIT() is not defined in the UAPI headers and its usage may cause userspace build errors. Fixes: 015d239ac014 ("uacce: add uacce driver") Signed-off-by: Joe Richey --- include/uapi/misc/uacce/uacce.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/misc/uacce/uacce.h b/include/uapi/misc/uacce/uacce.h index cc7185678f47..e0b4c8a2d29c 100644 --- a/include/uapi/misc/uacce/uacce.h +++ b/include/uapi/misc/uacce/uacce.h @@ -2,6 +2,7 @@ #ifndef _UAPIUUACCE_H #define _UAPIUUACCE_H +#include #include #include @@ -23,7 +24,7 @@ * Support PASID * Support device page faults (PCI PRI or SMMU Stall) */ -#define UACCE_DEV_SVA BIT(0) +#define UACCE_DEV_SVA _BITUL(0) /** * enum uacce_qfrt: queue file region type From patchwork Fri May 21 08:58:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Richey X-Patchwork-Id: 446083 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A1A9C433B4 for ; Fri, 21 May 2021 08:59:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 714D4613AC for ; Fri, 21 May 2021 08:59:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235279AbhEUJBA (ORCPT ); Fri, 21 May 2021 05:01:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234724AbhEUJAv (ORCPT ); Fri, 21 May 2021 05:00:51 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3040CC0613CE; Fri, 21 May 2021 01:59:27 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id 10so14458366pfl.1; Fri, 21 May 2021 01:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pvy4uR7MHK/1WKiYT47mbja8P4GqAFt1Aj7E8yW5uXM=; b=uSSyhsSraLlsFnFNoDpR1APM1+BRLdPiW2ejCY2rkmTVGpSatp0sZny9Y5G5kCR8TM TKLMI2QJyUjLm+N34G62FQ48ZT1inWFJjxfYjuAQj/eLBlMHF6h0MtIktCY4AReuwiVY YYtAcCgGfFMXWjat853OCaifrEkgqx5oNpXpsrtj7GRcHiIDchp1efUoz+5mEOBWK/U1 qERDvMfR1x2F6futuol3O3YJTUHBkaeNjL+WvIEK068ueiXsT1hHqvA3x1K+/5qWFxuH hYvLARoWUwATKId0GOEBUY3yQ4zdE/YgvGHjbHiaMHpVJBvYlSrHsbbxZwTk9LLoDZxL zIlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pvy4uR7MHK/1WKiYT47mbja8P4GqAFt1Aj7E8yW5uXM=; b=W9jUEEVKbttBl9j302SlJhAx7M4lSzWo4wwe3e9kzWxKK++QrxoCSdia9YogtTkEEK 68lXFVMwnKEOGBiMWwY7FaGaK08onFpkV8jWle6BrT7S9KkHVwtOaa6Aej/f1/NRn8/g c9YH9QystjtJlLwn5FfNTDijg3EsSsSBWi0Fxj6NY+z0fTTOqRdB0Am8ehlI/fTcWZLk z2qv8rCheGLWINuVAhNzy4JxFcTj0JaF3seUOdC9LYL4lElm0b3LG1m4kl9YyBvvbvcA XcGMWYMOUn16JluCIOoLtoV3CkKSW+b5oYm5iAza738hJ0Md8OZTrCl4DEFX6Ywfq2LU cKsA== X-Gm-Message-State: AOAM533eERLzguMGwUjSsSmKjzNs+oB6FJ4tl18G+/JPb+xJEL0ycgoO wc0gpp++8CIkFZk6+bx6xE0= X-Google-Smtp-Source: ABdhPJyI3RixIPKBdANr/tzrhRQ72+6Ud//RYD9LHWOb1K8zzj+Dx5JObxX/9FxEakjEy2HXftKsvg== X-Received: by 2002:a05:6a00:134b:b029:2bf:2c30:ebbd with SMTP id k11-20020a056a00134bb02902bf2c30ebbdmr9256070pfu.74.1621587566672; Fri, 21 May 2021 01:59:26 -0700 (PDT) Received: from pride.localdomain (c-174-61-140-56.hsd1.wa.comcast.net. [174.61.140.56]) by smtp.gmail.com with ESMTPSA id q3sm3914489pff.142.2021.05.21.01.59.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 May 2021 01:59:26 -0700 (PDT) From: Joe Richey To: trivial@kernel.org Cc: Joe Richey , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Paolo Bonzini , Mark Rutland , Lorenzo Pieralisi , Mauro Carvalho Chehab , Zhangfei Gao , Zhou Wang , Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn , Andi Kleen , "Chang S. Bae" , Sasha Levin , Lei Cao , Peter Xu , "Rafael J. Wysocki" , Ulf Hansson , Daniel Lezcano , Kenneth Lee , Greg Kroah-Hartman , Herbert Xu , Hans Verkuil , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-accelerators@lists.ozlabs.org Subject: [PATCH v2 6/7] tools headers UAPI: Sync pkt_sched.h with the kernel sources Date: Fri, 21 May 2021 01:58:47 -0700 Message-Id: <20210521085849.37676-7-joerichey94@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210521085849.37676-1-joerichey94@gmail.com> References: <20210520104343.317119-1-joerichey94@gmail.com> <20210521085849.37676-1-joerichey94@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Joe Richey It looks like this process isn't automatic for some reason. This prevents some perf tools warnings and removes use of the BIT() macro which isn't present for UAPI headers. Signed-off-by: Joe Richey --- tools/include/uapi/linux/pkt_sched.h | 122 ++++++++++++++++++++++++--- 1 file changed, 112 insertions(+), 10 deletions(-) diff --git a/tools/include/uapi/linux/pkt_sched.h b/tools/include/uapi/linux/pkt_sched.h index 5c903abc9fa5..79a699f106b1 100644 --- a/tools/include/uapi/linux/pkt_sched.h +++ b/tools/include/uapi/linux/pkt_sched.h @@ -2,6 +2,7 @@ #ifndef __LINUX_PKT_SCHED_H #define __LINUX_PKT_SCHED_H +#include #include /* Logical priority bands not depending on specific packet scheduler. @@ -255,6 +256,9 @@ enum { TCA_RED_PARMS, TCA_RED_STAB, TCA_RED_MAX_P, + TCA_RED_FLAGS, /* bitfield32 */ + TCA_RED_EARLY_DROP_BLOCK, /* u32 */ + TCA_RED_MARK_BLOCK, /* u32 */ __TCA_RED_MAX, }; @@ -267,12 +271,28 @@ struct tc_red_qopt { unsigned char Wlog; /* log(W) */ unsigned char Plog; /* log(P_max/(qth_max-qth_min)) */ unsigned char Scell_log; /* cell size for idle damping */ + + /* This field can be used for flags that a RED-like qdisc has + * historically supported. E.g. when configuring RED, it can be used for + * ECN, HARDDROP and ADAPTATIVE. For SFQ it can be used for ECN, + * HARDDROP. Etc. Because this field has not been validated, and is + * copied back on dump, any bits besides those to which a given qdisc + * has assigned a historical meaning need to be considered for free use + * by userspace tools. + * + * Any further flags need to be passed differently, e.g. through an + * attribute (such as TCA_RED_FLAGS above). Such attribute should allow + * passing both recent and historic flags in one value. + */ unsigned char flags; #define TC_RED_ECN 1 #define TC_RED_HARDDROP 2 #define TC_RED_ADAPTATIVE 4 +#define TC_RED_NODROP 8 }; +#define TC_RED_HISTORIC_FLAGS (TC_RED_ECN | TC_RED_HARDDROP | TC_RED_ADAPTATIVE) + struct tc_red_xstats { __u32 early; /* Early drops */ __u32 pdrop; /* Drops due to queue limits */ @@ -894,6 +914,12 @@ enum { TCA_FQ_CE_THRESHOLD, /* DCTCP-like CE-marking threshold */ + TCA_FQ_TIMER_SLACK, /* timer slack */ + + TCA_FQ_HORIZON, /* time horizon in us */ + + TCA_FQ_HORIZON_DROP, /* drop packets beyond horizon, or cap their EDT */ + __TCA_FQ_MAX }; @@ -913,6 +939,8 @@ struct tc_fq_qd_stats { __u32 throttled_flows; __u32 unthrottle_latency_ns; __u64 ce_mark; /* packets above ce_threshold */ + __u64 horizon_drops; + __u64 horizon_caps; }; /* Heavy-Hitter Filter */ @@ -950,19 +978,56 @@ enum { TCA_PIE_BETA, TCA_PIE_ECN, TCA_PIE_BYTEMODE, + TCA_PIE_DQ_RATE_ESTIMATOR, __TCA_PIE_MAX }; #define TCA_PIE_MAX (__TCA_PIE_MAX - 1) struct tc_pie_xstats { - __u32 prob; /* current probability */ - __u32 delay; /* current delay in ms */ - __u32 avg_dq_rate; /* current average dq_rate in bits/pie_time */ - __u32 packets_in; /* total number of packets enqueued */ - __u32 dropped; /* packets dropped due to pie_action */ - __u32 overlimit; /* dropped due to lack of space in queue */ - __u32 maxq; /* maximum queue size */ - __u32 ecn_mark; /* packets marked with ecn*/ + __u64 prob; /* current probability */ + __u32 delay; /* current delay in ms */ + __u32 avg_dq_rate; /* current average dq_rate in + * bits/pie_time + */ + __u32 dq_rate_estimating; /* is avg_dq_rate being calculated? */ + __u32 packets_in; /* total number of packets enqueued */ + __u32 dropped; /* packets dropped due to pie_action */ + __u32 overlimit; /* dropped due to lack of space + * in queue + */ + __u32 maxq; /* maximum queue size */ + __u32 ecn_mark; /* packets marked with ecn*/ +}; + +/* FQ PIE */ +enum { + TCA_FQ_PIE_UNSPEC, + TCA_FQ_PIE_LIMIT, + TCA_FQ_PIE_FLOWS, + TCA_FQ_PIE_TARGET, + TCA_FQ_PIE_TUPDATE, + TCA_FQ_PIE_ALPHA, + TCA_FQ_PIE_BETA, + TCA_FQ_PIE_QUANTUM, + TCA_FQ_PIE_MEMORY_LIMIT, + TCA_FQ_PIE_ECN_PROB, + TCA_FQ_PIE_ECN, + TCA_FQ_PIE_BYTEMODE, + TCA_FQ_PIE_DQ_RATE_ESTIMATOR, + __TCA_FQ_PIE_MAX +}; +#define TCA_FQ_PIE_MAX (__TCA_FQ_PIE_MAX - 1) + +struct tc_fq_pie_xstats { + __u32 packets_in; /* total number of packets enqueued */ + __u32 dropped; /* packets dropped due to fq_pie_action */ + __u32 overlimit; /* dropped due to lack of space in queue */ + __u32 overmemory; /* dropped due to lack of memory in queue */ + __u32 ecn_mark; /* packets marked with ecn */ + __u32 new_flow_count; /* count of new flows created by packets */ + __u32 new_flows_len; /* count of flows in new list */ + __u32 old_flows_len; /* count of flows in old list */ + __u32 memory_usage; /* total memory across all queues */ }; /* CBS */ @@ -989,8 +1054,9 @@ struct tc_etf_qopt { __s32 delta; __s32 clockid; __u32 flags; -#define TC_ETF_DEADLINE_MODE_ON BIT(0) -#define TC_ETF_OFFLOAD_ON BIT(1) +#define TC_ETF_DEADLINE_MODE_ON _BITUL(0) +#define TC_ETF_OFFLOAD_ON _BITUL(1) +#define TC_ETF_SKIP_SOCK_CHECK _BITUL(2) }; enum { @@ -1022,6 +1088,7 @@ enum { TCA_CAKE_INGRESS, TCA_CAKE_ACK_FILTER, TCA_CAKE_SPLIT_GSO, + TCA_CAKE_FWMARK, __TCA_CAKE_MAX }; #define TCA_CAKE_MAX (__TCA_CAKE_MAX - 1) @@ -1148,6 +1215,19 @@ enum { #define TCA_TAPRIO_SCHED_MAX (__TCA_TAPRIO_SCHED_MAX - 1) +/* The format for the admin sched (dump only): + * [TCA_TAPRIO_SCHED_ADMIN_SCHED] + * [TCA_TAPRIO_ATTR_SCHED_BASE_TIME] + * [TCA_TAPRIO_ATTR_SCHED_ENTRY_LIST] + * [TCA_TAPRIO_ATTR_SCHED_ENTRY] + * [TCA_TAPRIO_ATTR_SCHED_ENTRY_CMD] + * [TCA_TAPRIO_ATTR_SCHED_ENTRY_GATES] + * [TCA_TAPRIO_ATTR_SCHED_ENTRY_INTERVAL] + */ + +#define TCA_TAPRIO_ATTR_FLAG_TXTIME_ASSIST _BITUL(0) +#define TCA_TAPRIO_ATTR_FLAG_FULL_OFFLOAD _BITUL(1) + enum { TCA_TAPRIO_ATTR_UNSPEC, TCA_TAPRIO_ATTR_PRIOMAP, /* struct tc_mqprio_qopt */ @@ -1156,9 +1236,31 @@ enum { TCA_TAPRIO_ATTR_SCHED_SINGLE_ENTRY, /* single entry */ TCA_TAPRIO_ATTR_SCHED_CLOCKID, /* s32 */ TCA_TAPRIO_PAD, + TCA_TAPRIO_ATTR_ADMIN_SCHED, /* The admin sched, only used in dump */ + TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME, /* s64 */ + TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME_EXTENSION, /* s64 */ + TCA_TAPRIO_ATTR_FLAGS, /* u32 */ + TCA_TAPRIO_ATTR_TXTIME_DELAY, /* u32 */ __TCA_TAPRIO_ATTR_MAX, }; #define TCA_TAPRIO_ATTR_MAX (__TCA_TAPRIO_ATTR_MAX - 1) +/* ETS */ + +#define TCQ_ETS_MAX_BANDS 16 + +enum { + TCA_ETS_UNSPEC, + TCA_ETS_NBANDS, /* u8 */ + TCA_ETS_NSTRICT, /* u8 */ + TCA_ETS_QUANTA, /* nested TCA_ETS_QUANTA_BAND */ + TCA_ETS_QUANTA_BAND, /* u32 */ + TCA_ETS_PRIOMAP, /* nested TCA_ETS_PRIOMAP_BAND */ + TCA_ETS_PRIOMAP_BAND, /* u8 */ + __TCA_ETS_MAX, +}; + +#define TCA_ETS_MAX (__TCA_ETS_MAX - 1) + #endif