Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp981159ybh; Mon, 13 Jul 2020 06:27:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy65wW2keKhsVuu7feYjV7BJ2i1i94g45POTX6BsbVcrx346Me5r/muxFqlkEhZEeMbjt2R X-Received: by 2002:a17:906:b888:: with SMTP id hb8mr73072007ejb.124.1594646831986; Mon, 13 Jul 2020 06:27:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594646831; cv=none; d=google.com; s=arc-20160816; b=Gt1wEgYmxprDidToIW9GWPJQ+NWOQO8zUtveV4KW2lDM0a/3dlOK/TrrzBcsz2Awnu Kcn8LAeNU2dM5BEvFuJyw5hUgB6eSuvPidF9YvnSXXdY+MVDcjDO7oysvQPEW3kYjkzb G5SX7gGqRvDAQV7s3JbtgfkEvyOSP0BlOpD9kjn3bV8QsTMvD8FjC3qaSAlZa5q5PI0b WzVHmU9CnN5EQIQrKOLbRjLqyY90x8iU9wbb5gHpXRpq4CYCLFCvxnku9xYuoU4YVrkz h60MVyrNKo0jzDFyHE/qj1G3V44lZqO/fD7XDWhOI/3Gi5VqNYZ0HD3e3y18gY2tlONo xasA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references; bh=o8vynvTElHVQBFh6SS8udck/EBH5BDrPVyG9aBk6UGc=; b=J5lbpMbQ9g7nLYhzW89awSPWSE7vmrEHqx5956IEtVPWHA5UVqDFQCUprX8/LJ+vip sIKSSy9nt5XpBw+FvBX8UPuUdDzBNcl2tkpsqrwHxRA+WvmDJLA2YslWAWs6WIJA0/xY /iaLpcePnI8rsvQc0MOAwAoPgAGPyXhy/uZVgK8P1WCJV9Bwjk1UeGPqOHoIVf/GrBYK Vn5YyAiqd2sJxDRZiAUZANyBKlgaQdv8eWtgdXOmejlEMjNpUzFkmSUDLkNHrXHojN1l oglxh9fmfr5quzU2NrVHVQ1z6bLSld4K5BbM04CVgCZ9j4GjZzj8kt/psdjPG7ipPkwj 5L1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i26si9544722edv.525.2020.07.13.06.26.49; Mon, 13 Jul 2020 06:27:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729952AbgGMN0E (ORCPT + 99 others); Mon, 13 Jul 2020 09:26:04 -0400 Received: from foss.arm.com ([217.140.110.172]:34636 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729613AbgGMN0E (ORCPT ); Mon, 13 Jul 2020 09:26:04 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 973A930E; Mon, 13 Jul 2020 06:26:03 -0700 (PDT) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B07D83F887; Mon, 13 Jul 2020 06:26:02 -0700 (PDT) References: <20200701190656.10126-1-valentin.schneider@arm.com> <20200701190656.10126-7-valentin.schneider@arm.com> <20200713123959.GI10769@hirez.programming.kicks-ass.net> User-agent: mu4e 0.9.17; emacs 26.3 From: Valentin Schneider To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, morten.rasmussen@arm.com Subject: Re: [PATCH v3 6/7] sched/topology: Introduce SD metaflag for flags needing > 1 groups In-reply-to: <20200713123959.GI10769@hirez.programming.kicks-ass.net> Date: Mon, 13 Jul 2020 14:25:56 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/07/20 13:39, Peter Zijlstra wrote: > On Wed, Jul 01, 2020 at 08:06:54PM +0100, Valentin Schneider wrote: >> +/* Generate a mask of SD flags with the SDF_NEEDS_GROUPS metaflag */ >> +#define SD_FLAG(name, idx, mflags) (BIT(idx) * (((mflags) & SDF_NEEDS_GROUPS) / SDF_NEEDS_GROUPS)) | > > #define SD_FLAGS(name, idx, mflags) (!!((mflags) & SDF_NEEDS_GROUPS) * BIT(idx)) > Was paranoid about really getting a 1 or a 0, but AFAICT the standard does agree with you! >> +static const int SD_DEGENERATE_GROUPS_MASK = >> +#include >> +0; >> +#undef SD_FLAG >> + >> #ifdef CONFIG_SCHED_DEBUG >> #define SD_FLAG(_name, idx, mflags) [idx] = {.meta_flags = mflags, .name = #_name}, >> static const struct { >> -- >> 2.27.0 >>