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 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 E3C57C433EF for ; Sat, 18 Dec 2021 21:22:03 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EYqgeLnSeTOBlWWK/Aly+jZArdcgyqC+aVpQIttqLQE=; b=M65RSEnQcaadQS Zx1bMKXgTsbWOCENlIBIEhw8+FNGqTFTTbeoy3JvcXsn+a5YtwJfoUjHO9tpDBWerZXbZcDoQKe2c 4OoaNVE6LFoWAWW1rGH3tURuYSMrDhIgyNazV5C8CZE8PA6myBA4Xc7vTmRklOyWmAtauWHTIimLu ngnbpHcgECE4tbWJPZ0A9Jpiyn3uY4vojxh1XpYdhzZze5NwTZIhEXkIGOdxyGjJ/cYI4+w1BMyLy /j6n400tfetSm4i18WcnmFmCBPY/80TGxDJsXeECXQRmcQHzQ8FJrWnDRJA1YSyNkXqROIDShJDpU UMJbrZJzVVHvAEi0iVng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1myh9N-00Ekh4-V6; Sat, 18 Dec 2021 21:21:54 +0000 Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1myh8T-00EjwT-0G; Sat, 18 Dec 2021 21:21:00 +0000 Received: by mail-ot1-x32e.google.com with SMTP id u18-20020a9d7212000000b00560cb1dc10bso7424353otj.11; Sat, 18 Dec 2021 13:20:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Hec35lasK9ZA9Al4lVu2VLAlB7ZGIYc9EtAwCKNTlw8=; b=fBftgt78xMj1xKG5HZZwIKhKCaPNvVnrKaDadtsATTpbsWGFVP5e7HSashlaWMcwqO LGw9PZb24tpFErLVXHUlIglhlIamlRCnbPR5OsIzGuKEIH1AURNfV/dBdfTBQoYJvzuO vJHwptAoNFqOBC8BK+K0vkVFi+BHhxI0ibPZCe0ZoMw3oErF2aHMJ2Qi5YW1XoA/0FmX DvxauUzfNVo2yGxIRxf4OdPGCp1xAi9orXiOGorjkgyc4oijxQ3LsGsYHHg9DqrmgOxo d9gh/VCFcHiQ0ntVUwmhI9B1jfed7aIsK1FoKUVaewVhnEosQJQvZUV3oMwwmTiQqF/E EGHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Hec35lasK9ZA9Al4lVu2VLAlB7ZGIYc9EtAwCKNTlw8=; b=FUqmogpOjVMTBbHpL3dX0mxEi2vV4cbYN9BMhXsanlxp8vd+jWWakA9kXY2CD2ePib K1El3I5kGEl9C4rvuI1peLfCJYcEvwgvk3CF0VFLHQLSj26UM30FnqyWxGhYx7iV3Fsk FkOYbrWynWFkXbG4VfqQDNgfBUiR7iRTY8AgzKL8pnWsTh+wxQeOF48vvSGWL/+za9d7 sim8auNMpEhVWqwuWlYBZmyHH7n2RQZKL7S6ZlodjxuFd1Es+kwHmaDRKZj/0szLve2k HaYdeBJOsqYAmFkkaa2CDbdMESBEnPiIq8QWSRVaLuXlefIO/Qz03BcpR57D8Q8ZozfN 05Nw== X-Gm-Message-State: AOAM533UXsPzz5ysaQeQwZkAs0R6rYXt0g4BhMi5+kABAV7i80Q2hbre 1Yr30t5pxV9bAv9tPhUx+rY= X-Google-Smtp-Source: ABdhPJyF3ZGCXzeXjVp/KVuej2Lro/GR2ZMmRe4CsBC/6he5KNwSmag2n9ENl7goEuOdRGP79z0Maw== X-Received: by 2002:a9d:2d81:: with SMTP id g1mr6637050otb.25.1639862455926; Sat, 18 Dec 2021 13:20:55 -0800 (PST) Received: from localhost (searspoint.nvidia.com. [216.228.112.21]) by smtp.gmail.com with ESMTPSA id n23sm2383616oic.26.2021.12.18.13.20.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Dec 2021 13:20:55 -0800 (PST) From: Yury Norov To: linux-kernel@vger.kernel.org, Yury Norov , "James E.J. Bottomley" , "Martin K. Petersen" , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , "Paul E. McKenney" , "Rafael J. Wysocki" , Alexander Shishkin , Alexey Klimov , Amitkumar Karwar , Andi Kleen , Andrew Lunn , Andrew Morton , Andy Gross , Andy Lutomirski , Andy Shevchenko , Anup Patel , Ard Biesheuvel , Arnaldo Carvalho de Melo , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christoph Hellwig , Christoph Lameter , Daniel Vetter , Dave Hansen , David Airlie , David Laight , Dennis Zhou , Emil Renner Berthing , Geert Uytterhoeven , Geetha sowjanya , Greg Kroah-Hartman , Guo Ren , Hans de Goede , Heiko Carstens , Ian Rogers , Ingo Molnar , Jakub Kicinski , Jason Wessel , Jens Axboe , Jiri Olsa , Joe Perches , Jonathan Cameron , Juri Lelli , Kees Cook , Krzysztof Kozlowski , Lee Jones , Marc Zyngier , Marcin Wojtas , Mark Gross , Mark Rutland , Matti Vaittinen , Mauro Carvalho Chehab , Mel Gorman , Michael Ellerman , Mike Marciniszyn , Nicholas Piggin , Palmer Dabbelt , Peter Zijlstra , Petr Mladek , Randy Dunlap , Rasmus Villemoes , Russell King , Saeed Mahameed , Sagi Grimberg , Sergey Senozhatsky , Solomon Peachy , Stephen Boyd , Stephen Rothwell , Steven Rostedt , Subbaraya Sundeep , Sudeep Holla , Sunil Goutham , Tariq Toukan , Tejun Heo , Thomas Bogendoerfer , Thomas Gleixner , Ulf Hansson , Vincent Guittot , Vineet Gupta , Viresh Kumar , Vivien Didelot , Vlastimil Babka , Will Deacon , bcm-kernel-feedback-list@broadcom.com, kvm@vger.kernel.org, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-snps-arc@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 12/17] kernel/cpu.c: fix init_cpu_online Date: Sat, 18 Dec 2021 13:20:08 -0800 Message-Id: <20211218212014.1315894-13-yury.norov@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211218212014.1315894-1-yury.norov@gmail.com> References: <20211218212014.1315894-1-yury.norov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211218_132057_101091_05D48E00 X-CRM114-Status: GOOD ( 14.17 ) 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 cpu_online_mask has an associate counter of online cpus, which should be initialized in init_cpu_online() Fixes: 0c09ab96fc82010 (cpu/hotplug: Cache number of online CPUs) Signed-off-by: Yury Norov --- kernel/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/cpu.c b/kernel/cpu.c index 407a2568f35e..cd7605204d4d 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -2616,6 +2616,7 @@ void init_cpu_possible(const struct cpumask *src) void init_cpu_online(const struct cpumask *src) { cpumask_copy(&__cpu_online_mask, src); + atomic_set(&__num_online_cpus, cpumask_weight(cpu_online_mask)); } void set_cpu_online(unsigned int cpu, bool online) -- 2.30.2 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv