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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC04BC433FE for ; Sat, 15 Oct 2022 18:08:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229556AbiJOSIw (ORCPT ); Sat, 15 Oct 2022 14:08:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbiJOSIv (ORCPT ); Sat, 15 Oct 2022 14:08:51 -0400 Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 285EE4B0DF; Sat, 15 Oct 2022 11:08:51 -0700 (PDT) Received: by mail-qk1-x730.google.com with SMTP id a18so4480317qko.0; Sat, 15 Oct 2022 11:08:51 -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=In/ZhKN+YrAA9jxH6S0pMSwyt8+fSRlL+xUPmYYSFId+qeVd2MtQf8cVR5D9dBlSEX f367jri8TMqnqNVE+XA/ky5kepNodJGCVkdDOYqX88oXy+mK438Q+UOo3uDwlK5hVHvQ DtAfaTX/FEb9jGQu+DKmOWUrFUidI0zMIOmTxJ0m5emBgW+tIZdZXVpnXSyDTt2ORRCC O6Jo3o/d8qnZc8FyaOoGX+nrkgwEvI4TFqN3S62TlsDrOvx7DfmtPy49hWOEhtx4e6YN TujxPHFTjsCuJsSDljgNs/2Fc6YD/oymZTzVofwgGGGxYoa9I2A7y2IBNDDFap4eH++j TxqQ== X-Gm-Message-State: ACrzQf2zVduqQonrJkeUiWgp2uluPdJj1nopCEc/yql8C+54xiG5RTrG nnPIlOW6N9NHgxsoV6sAHF0= 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 Cc: x86@kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , Palmer Dabbelt , Paul Walmsley , Albert Ou , Jonas Bonn , Stefan Kristiansson , Stafford Horne , openrisc@lists.librecores.org, Michael Ellerman , linuxppc-dev@lists.ozlabs.org, Heiko Carstens , Vasily Gorbik , Alexander Gordeev , linux-s390@vger.kernel.org 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> Precedence: bulk List-ID: X-Mailing-List: linux-s390@vger.kernel.org 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