From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DFD13C433FE for ; Sat, 15 Oct 2022 18:09:49 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4MqWW00nq2z3chb for ; Sun, 16 Oct 2022 05:09:48 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=FyRwiQ1K; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::736; helo=mail-qk1-x736.google.com; envelope-from=yury.norov@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=FyRwiQ1K; dkim-atps=neutral Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4MqWTy5kpNz2yYj for ; Sun, 16 Oct 2022 05:08:53 +1100 (AEDT) Received: by mail-qk1-x736.google.com with SMTP id 8so4458428qka.1 for ; Sat, 15 Oct 2022 11:08:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=4wAaC7lbGaB3AX/Lsftuvb2OO1sJpQJ6Ykn9DFNJXY0=; b=FyRwiQ1Kkh2U3R7rwv/cUWgWbhnhVuRAkvLikv3swWoWi+Qni43MwmjlvAl7Qd5YWU e3eQ8r4coovbGUfjgmrmah9muM3lMIJqLMPtobpzhigxXHyNURqImNwciQiRzGsAHdHO qXOEVFqd/G+S/R1kNsVrId98EksJPTRvXw6S31DLxWwCE/s50meM1rY5rsjT96D1ObDy lCH7/wDPhN4Zl3js/rayUXV95GaO+0Ed0I7Aor4TcANC3GM2Q2PJASLmjnpLgyV/gbKH KXTHOpPBMJ9ORopJ3VS/8U3M5d4tTN/mU0ZQfTgvUx8AXj2lFRY2L268IjoNTL418YNj eMZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=4wAaC7lbGaB3AX/Lsftuvb2OO1sJpQJ6Ykn9DFNJXY0=; b=q1aAP1HSuIdOPBLL7lymC/YUMlkDzPelj3pv/Cpd1vmNeXU81DEg0Kp8LrNZYpVYjV pdyrirH+d8BuIjRBZeAuVRV3lK88mBcDbl30ci+z8aRyFzXMQcO0eirWjnqgy1VvkO/y zyXb8c9ub7OOZg3f06EVv7HlN01769UpD0SxG3gURXZuUTOLwZxBnDVfvFqtegWwKuBA 25hHtmeFSjXFHeUtVNElf8ccwzbZDogIuGP1aYPCjARk6VSg5/iV+BYoyn8iU3W/ML+d 9H05bq4SuQQBWO64xU+jGalcU0zRjiozG91OHfX3NpOL76PBdoFCwOUdaCI5ta0oWbqP UZ3g== X-Gm-Message-State: ACrzQf2P4SWn+strQbOu3/fCKMQLdqC8AyLn/YDjwWqa+T4m0KdOcKLc +vWDH4oQso+J9RR90Rtscgs= X-Google-Smtp-Source: AMsMyM6RKmR37GztXAcqofHNQn3klZzUQq+GK3VRFWmYfAI4qhzKm9L4cuQOR6HCO3RXlQARuABfrA== X-Received: by 2002:a37:6303:0:b0:6ec:554b:131d with SMTP id x3-20020a376303000000b006ec554b131dmr2532393qkb.166.1665857330103; Sat, 15 Oct 2022 11:08:50 -0700 (PDT) Received: from localhost ([2601:4c1:c100:2270:2b6d:8b98:c35a:4b7]) by smtp.gmail.com with ESMTPSA id h6-20020a05620a400600b006b949afa980sm5294690qko.56.2022.10.15.11.08.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Oct 2022 11:08:49 -0700 (PDT) Date: Sat, 15 Oct 2022 11:08:51 -0700 From: Yury Norov To: Andrew Jones Subject: Re: [PATCH v3 0/2] Fix /proc/cpuinfo cpumask warning Message-ID: References: <20221014155845.1986223-1-ajones@ventanamicro.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221014155845.1986223-1-ajones@ventanamicro.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jonas Bonn , linux-s390@vger.kernel.org, Alexander Gordeev , Dave Hansen , Vasily Gorbik , Heiko Carstens , x86@kernel.org, linux-kernel@vger.kernel.org, Stefan Kristiansson , openrisc@lists.librecores.org, Ingo Molnar , Borislav Petkov , Paul Walmsley , Stafford Horne , Palmer Dabbelt , linux-riscv@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, Thomas Gleixner , Albert Ou Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, Oct 14, 2022 at 05:58:43PM +0200, Andrew Jones wrote: > Commit 78e5a3399421 ("cpumask: fix checking valid cpu range") has > started issuing warnings[*] when cpu indices equal to nr_cpu_ids - 1 > are passed to cpumask_next* functions. seq_read_iter() and cpuinfo's > start and next seq operations implement a pattern like > > n = cpumask_next(n - 1, mask); > show(n); > while (1) { > ++n; > n = cpumask_next(n - 1, mask); > if (n >= nr_cpu_ids) > break; > show(n); > } > > which will issue the warning when reading /proc/cpuinfo. > > [*] Warnings will only appear with DEBUG_PER_CPU_MAPS enabled. > > This series address the issue for x86 and riscv, but from a quick > grep of cpuinfo seq operations, I think at least openrisc, powerpc, > and s390 also need an equivalent patch. While the test is simple (see > next paragraph) I'm not equipped to test on each architecture. > > To test, just build a kernel with DEBUG_PER_CPU_MAPS enabled, boot to > a shell, do 'cat /proc/cpuinfo', and look for a kernel warning. > > While the patches are being posted together in a series since they're > for two different architectures they don't necessarily need to go > through the same tree. Acked-by: Yury Norov