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 C7C6CC4332F for ; Sat, 15 Oct 2022 18:08:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229554AbiJOSIx (ORCPT ); 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-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-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 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 557F1C4332F for ; Sat, 15 Oct 2022 18:09:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=00+MRNOCjRwcfnsaZ1RFVpr+897FgsrbT+rddAs8Xgc=; b=a6R2VcUBbOlVgq uQEExMEyo/zNschBlqp8JBVTvnxlHa/CvFMyV+pOrx4R0wA341GH1G1YdseQ9UF5/YX0tRSCL5PhN F5Lfh9wPfNKkGojZbYB+tiWWuPeNQBwjOgkHZCnJT/kLSWjDgSyemBlaSzDaAJDCqAsl9d3GvRhBG TzVY5ITfgE7yDmqK7btVY1yC/c8pY5ZPaeqRhycJ7o36nXxcx/m3cbfk+K+AKl8rOAIpfNIlMfICn A78hzV+JZ+Yb6Aa5jc+YJOm6Bz2/EfByWMw4sr7NltAEiv25pO9buVbyI3uk3veOkUBgsKRtLessz a8sz73DkbVoAvmn+9tqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ojlal-00HOBL-ME; Sat, 15 Oct 2022 18:08:59 +0000 Received: from mail-qk1-x735.google.com ([2607:f8b0:4864:20::735]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ojlai-00HO8w-Rl for linux-riscv@lists.infradead.org; Sat, 15 Oct 2022 18:08:58 +0000 Received: by mail-qk1-x735.google.com with SMTP id a5so4445817qkl.6 for ; 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=VWAIbMITWEPUgV7xhZRU4NOS0Tr+XFM25jN7d4ZbFRBTT+keLnZXC6ghkXoa7oYng4 hetYX5SgZ4atIea3jsUSIeuJKdQx/zMq9yWFv4SXkoOOToHWe1OciAl4lxMe/LdhPmVx mFyeP2LenobhO1E07SnwSxLtFheVfLASjg4+Gu2wK3DCgDbz2b3YlKdO+NBU13z63FQs grqLbEkNr4GkjzeJWQ+pUG7Xv+TrEjkgZBOkUUVCMoMRDGEc7zjppljg4R0vRgWZsi/H Igw7GpPOTUJuu8miuUyu8o0ucH+mgb0V7SNs8ftRXxZ77EjKEu5w37kkMU5rhkWibwHf S8Yw== X-Gm-Message-State: ACrzQf388gX3sei0CXAmnUgUKjEuzUhTFWR0dSgn4CVMhY75a+iSszfT C83UBWJ5TpiBQtVmCw+Bzqs= 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-Disposition: inline In-Reply-To: <20221014155845.1986223-1-ajones@ventanamicro.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221015_110856_905238_88DB05D2 X-CRM114-Status: GOOD ( 16.96 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.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 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 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.librecores.org (lists.librecores.org [88.198.125.70]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CB6FC433FE for ; Sun, 6 Nov 2022 21:19:35 +0000 (UTC) Received: from [172.31.1.100] (localhost.localdomain [127.0.0.1]) by mail.librecores.org (Postfix) with ESMTP id 404B7211B0; Sun, 6 Nov 2022 22:19:34 +0100 (CET) Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) by mail.librecores.org (Postfix) with ESMTPS id 58BF424B93 for ; Sat, 15 Oct 2022 20:08:51 +0200 (CEST) Received: by mail-qk1-f173.google.com with SMTP id b25so4446464qkk.7 for ; 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=4qY4RlxxlaYaOA+fjfLP2eg+yX8l/U3plMBOrRvMvr38lCxnIbIQ7DqsstdUCEgRvG U8laeS+PeL1+iC3yZm1tXSLFAKS32Mm/Goakivh8u5fel0VK1n/xgh9HAMTvQDjhj6gi TgX9d3h7v005sv4vJkCplkxr4Q78k2R7oD9gC+1p+6Yj88Fzfa8MIT85mQtHhvm1c0KU Pc9s3gbHyV/Me1Fa8qGYUU/3LAYnUDp7CYStG+hP3hO2lmPINmc2+2wg4by8URVyjP4y mS9Bh7/PnzkkZ7U6hOkOprwgbCzGg4d29wBkM3JZ5DRdkmitxpQKpFFNbBqoLb1ATBAj iNuA== X-Gm-Message-State: ACrzQf3Udd6HVjUOXTpy6iehkUPVn4zBwR6Uo/hPnV53KB+iYXXrr26F UtJ5m70tdSBLwPlVrsLdvxY= 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-Mailman-Approved-At: Sun, 06 Nov 2022 22:19:32 +0100 X-BeenThere: openrisc@lists.librecores.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion around the OpenRISC processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jonas Bonn , linux-s390@vger.kernel.org, Alexander Gordeev , Dave Hansen , Vasily Gorbik , Michael Ellerman , Heiko Carstens , x86@kernel.org, linux-kernel@vger.kernel.org, openrisc@lists.librecores.org, Ingo Molnar , Borislav Petkov , Paul Walmsley , Palmer Dabbelt , linux-riscv@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, Thomas Gleixner , Albert Ou Errors-To: openrisc-bounces@lists.librecores.org Sender: "OpenRISC" 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