Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4830734imj; Wed, 13 Feb 2019 01:42:19 -0800 (PST) X-Google-Smtp-Source: AHgI3IYRon/i+pIPvx4hZzTmrv9LmerA38Zde77R2zFsAFcxkbp6TD8LjPJ7YRnwypC7EynxE0Ci X-Received: by 2002:a17:902:bf44:: with SMTP id u4mr8918779pls.5.1550050939084; Wed, 13 Feb 2019 01:42:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550050939; cv=none; d=google.com; s=arc-20160816; b=Dg/pj+syMEWG6wShnfXXUH/XOrLdgP6bHlxRTcJNEyu9OEQucgtAfBz8qrmSkLzQXe tzTo5bssxXvK+XjcyIVCnGgANulqL5qv77MLLyOGGdAFky4FL+6QImnafdwssEovaY2G ezG4ICjct8hbygOk97x4QrBsKfP+xbCltvrLvAcpKmvW1nIhjHnkWBgU/02tcyGp6DWo 1jGH7RnkTOpep51Q/IjtijccntS9pgafdNf4Gzu4dfdSzKvl3FoBsTdAjrpL3+NZsK+n ef57vWfGnW2l7HR3+rKafA9jJEAeXgp6nm2HMNOn3eQMXm2dBpn519ULF8OIMzW3YRdB dBOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=8dmR0NFGNyhmtovA2tdJzy6bkO95KBp/gI439HNKvIY=; b=M3EPSzDrqHubpV5ZJmGKyf0KuBn5wDD736SwfJzW60bApknBAPsuoqWiQNgIiAXosF SOcAqRlmGe2kbT2bHyAkd17Dvi6zNDxo9bsDIovNeV9Y06h86GkPhSWBSMbb8X7SUc3p d8AlZh58h+e2XqD7DagxM1vsZ0jcdOeAEPD7s+NvMTZ/eEx2sji8f05jfkvf3rF7UzML kzyhYB3abd8K8wyU77ApwUrTOwlyxkx1CSk4DGP/eFLEWOlcPpDTUbnXRxI3olOik2Jf fjwT2CWhBo+Fm48KsTY+BZLrrLRqDZz90dlFPkcF3fz1NWQJ61Q4/CuybO7TMarnY20r oLsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=LSoGx5Om; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 14si13193560pgx.178.2019.02.13.01.41.59; Wed, 13 Feb 2019 01:42:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=LSoGx5Om; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733229AbfBMGnn (ORCPT + 99 others); Wed, 13 Feb 2019 01:43:43 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:55352 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727069AbfBMGnn (ORCPT ); Wed, 13 Feb 2019 01:43:43 -0500 Received: by mail-wm1-f67.google.com with SMTP id r17so1113435wmh.5 for ; Tue, 12 Feb 2019 22:43:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8dmR0NFGNyhmtovA2tdJzy6bkO95KBp/gI439HNKvIY=; b=LSoGx5OmmNj09LZqF4KwNJ5BxWG5Xt6c1MYKq1Bt9KlBgOEOVnfJK9fpL6FxiXTbFe 4caOr7tl+aFd4CEmI4eyHb6WzBEw2gofvawEUIdDRLEetnTPOx8LfKcyLDfqxQQ8/t3V b/i+ZnsYKsaZa5/5yJO51i5s36UfI0QBK/hp42Z5+shyjTU9dld0m3EUxZ5iIFmv4RGn FMkrvQruRA3JMWO7m3kYMQSu/8ADSB1Rx2QByv3FVDPVv2/WYOX3s8VNjydIq+EiE4xE bnJgEmR0suDrZMj0qvLzBizN/YfaSc2m0cLvSiVm5bHscTAeRMyXhmKZyJYwz0X9diaN IMRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8dmR0NFGNyhmtovA2tdJzy6bkO95KBp/gI439HNKvIY=; b=FCu/IjCQrWAFAMfKq3r++BXOxb9WJ58EdW9A6+Ey3qLSLo/AGTAAnPl8z5Il8jpF7S smb6sRRvZx0Q/7VIWajPA6Z+Dl9Mae3g2PeaXwbR9rY3Hm3GrYughoiBTUu5ihp5SYSj NU1ibt+zmYApECLLuDehX9HlwxFwolwg63UsE/vuXKSunLewR8Cllzhjti3jy9VIEXQc +Pr+5FK+IychC3bwHLkzw6dQZWEVQfpZOh3cQVQ1F7wg9BWAjcQ7NxSE1F8EFHklm6M4 iEf1ZfGpyj2DRBDuJjpePBJz7+vL8ly1KE1AERHvNmUeNLM5hXZ9zcFuvfrz8G5D+AY6 W5hA== X-Gm-Message-State: AHQUAuZ/GkkFZI+tsw6cHx+L4OGQgvMoMvJA/QuFAzMCOIxAwZBLJ7ay yBR5CzP0O3XUKHVtk54nApaX80LRXNqE7EfMLvJOPA== X-Received: by 2002:a1c:a3c3:: with SMTP id m186mr1906321wme.16.1550040220679; Tue, 12 Feb 2019 22:43:40 -0800 (PST) MIME-Version: 1.0 References: <1549969812-22502-1-git-send-email-atish.patra@wdc.com> <1549969812-22502-7-git-send-email-atish.patra@wdc.com> In-Reply-To: <1549969812-22502-7-git-send-email-atish.patra@wdc.com> From: Anup Patel Date: Wed, 13 Feb 2019 12:13:29 +0530 Message-ID: Subject: Re: [v4 PATCH 6/8] clocksource/drivers/riscv: Add required checks during clock source init To: Atish Patra Cc: linux-riscv@lists.infradead.org, Alan Kao , Albert Ou , Andreas Schwab , Daniel Lezcano , Dmitriy Cherkasov , Jason Cooper , Johan Hovold , "linux-kernel@vger.kernel.org List" , Marc Zyngier , Palmer Dabbelt , Paul Walmsley , Rob Herring , Thomas Gleixner Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 12, 2019 at 4:40 PM Atish Patra wrote: > > Currently, clocksource registration happens for an invalid cpu for > non-smp kernels. This lead to kernel panic as cpu hotplug registration > will fail for those cpus. Moreover, riscv_hartid_to_cpuid can return > errors now. > > Do not proceed if hartid or cpuid is invalid. Take this opprtunity to s/opprtunity/opportunity Otherwise, looks good to me. Reviewed-by: Anup Patel Regards, Anup