Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2324870rwi; Sat, 15 Oct 2022 11:40:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4PEbPhzDR9BA6wEftrprBxzIJHLItj72jZHuxkop+PPFHDgnK7sJOEyiVxuDXkwqxANZkW X-Received: by 2002:a17:90a:5e04:b0:20b:1f20:5069 with SMTP id w4-20020a17090a5e0400b0020b1f205069mr23604549pjf.126.1665859203533; Sat, 15 Oct 2022 11:40:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665859203; cv=none; d=google.com; s=arc-20160816; b=LWu+DUK3UX8xAe3dB+8g2ApqefLhLT3g9l3gw0aTeSBEl7K1+DwrKFYtP47LBWBmni s1m/aa7cspC3zjsWmI4n4PuNLBieZ0Otq1ML6inE2ep2t9wIn/pJ/6MS0OpRfATfhI/S UEJG+F1mbjZ0tmsmEhELNwL0vO2VMCCTkP219xCeCut6htc5BWExKlZQvi42ycV1rYsy 5/qH5XZ/fVyIXXmZZqgI97SyIhzGI2Tk6LGTplGBJw5lQhTI6hDdNUmeQWKWGaruLgyn qlzHX0qcRS/88B5vxpBoZPJ3Pk8AS8uQ+xBJ7CgQ+2ugM6AcaxUzqrTcUhIqZFw3li3t 7sqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4wAaC7lbGaB3AX/Lsftuvb2OO1sJpQJ6Ykn9DFNJXY0=; b=FpnybyFYQJSmpuRYeqfvtcr9MTVjxhwFyBAJnmErDFyAlpbj6ulUzjCH30BowafDwv 8Y5hJ8OmvX13iAQJ6mKMBwfXkJeS6XNNRkwsH6Xb10iM+gHLY7bXzc/cvfcBUz/nYrWL prKSG3O2Z76kmQFSxOfDUVDxmZ7x1NT6wlzbJD8ZiwnWJ1yQhSoSzPem9v7+n52pW1ko j/hEWvvdUf9Qbp7/9+ayiH+ckEtG/s27/vJ3AB8snm4L5sdjuXKRuuSWrdV/7Hu7AXAE wRjZSYI5ZBIMHuzlZ182vG1xiA+FD+24ne9OlE+F2jC/Q0x9JsWKT/QDPgIOpxpSrtIL rbjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FyRwiQ1K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mw18-20020a17090b4d1200b001f31f339134si14651226pjb.152.2022.10.15.11.39.50; Sat, 15 Oct 2022 11:40:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FyRwiQ1K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229665AbiJOSIx (ORCPT + 99 others); Sat, 15 Oct 2022 14:08:53 -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-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> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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