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 X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 463D4C433DF for ; Thu, 28 May 2020 16:36:17 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id C5AA3207F5 for ; Thu, 28 May 2020 16:36:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5AA3207F5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 4628F4B1DC; Thu, 28 May 2020 12:36:16 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eSu5Iw0nRHL8; Thu, 28 May 2020 12:36:15 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 351F34B1D2; Thu, 28 May 2020 12:36:15 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 6766E4B1D1 for ; Thu, 28 May 2020 12:36:14 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i8QbABi36eMI for ; Thu, 28 May 2020 12:36:13 -0400 (EDT) Received: from Galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 555F04B1D2 for ; Thu, 28 May 2020 12:36:13 -0400 (EDT) Received: from p5de0bf0b.dip0.t-ipconnect.de ([93.224.191.11] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jeLVl-0004mm-VY; Thu, 28 May 2020 18:36:06 +0200 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id 3A4C7100D01; Thu, 28 May 2020 18:36:05 +0200 (CEST) From: Thomas Gleixner To: Jianyong Wu , netdev@vger.kernel.org, yangbo.lu@nxp.com, john.stultz@linaro.org, pbonzini@redhat.com, sean.j.christopherson@intel.com, maz@kernel.org, richardcochran@gmail.com, Mark.Rutland@arm.com, will@kernel.org, suzuki.poulose@arm.com, steven.price@arm.com Subject: Re: [RFC PATCH v12 05/11] time: Add mechanism to recognize clocksource in time_get_snapshot In-Reply-To: <20200522083724.38182-6-jianyong.wu@arm.com> References: <20200522083724.38182-1-jianyong.wu@arm.com> <20200522083724.38182-6-jianyong.wu@arm.com> Date: Thu, 28 May 2020 18:36:05 +0200 Message-ID: <87tv00nhje.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1, SHORTCIRCUIT=-0.0001 Cc: justin.he@arm.com, Wei.Chen@arm.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, nd@arm.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu Jianyong Wu writes: > From: Thomas Gleixner > diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c > index 7cb09c4cf21c..a8f65b3e4ec8 100644 > --- a/kernel/time/clocksource.c > +++ b/kernel/time/clocksource.c > @@ -928,6 +928,9 @@ int __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq) > > clocksource_arch_init(cs); > > +if (WARN_ON_ONCE((unsigned int)cs->id >= CSID_MAX)) > + cs->id = CSID_GENERIC; > + This is white space damaged and certainly not from me. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm