Received: by 10.223.176.46 with SMTP id f43csp2701280wra; Mon, 22 Jan 2018 01:53:52 -0800 (PST) X-Google-Smtp-Source: AH8x227LVuZDzMGy6zqHNAsmjs9zz/tQIoBbuPbfwHh30lIuKPu/kOSgguF+YJ0NmFo1pafFSlVd X-Received: by 2002:a17:902:8b8a:: with SMTP id ay10-v6mr3077061plb.156.1516614832350; Mon, 22 Jan 2018 01:53:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516614832; cv=none; d=google.com; s=arc-20160816; b=EY6JnAJWS22bcfLqCP6YODt7etngOkkzAz8S2GRJ05QB12nXvWw4CEZiDiLVsxz6Lr pmvEO3TpDTX+XPzBWDM0+qxi91OPwCa9skiQQzYSLMZ8YXVVuflTC3BIAq090LOqGlqe mfxflW2LHFLpu3O9BIpxl20rqqpMKrsshiW0JRyCm8bozPWeDJ64LbBPUYy1Z9R/ppuB dJy7IEPKS5SElTi46flwyXrv1UoSrC5VrwG5U2GxtkXj7hLT0khzGRDplCcIUDKVhhpj A/X3UHVUQ4YNkMAReeeNqZd+b5mN7HGO4W7Cv6HN+dyjRiFtNqJaEf6C5a6yTOSqK7aX FYoA== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=a8tg1PeTXRAWPzPh6BCo3zGm6MjxuAtjbqB25xLLxoA=; b=akLgjbig/w1/zLArz/xoVaVkUCGLgtVWFjjasjtPsj/1jxRzKRGURW6hX2uUSfSON1 6nXAuwGv/B/IACZifC/ljnlHXWi73LP7N98TWysNIXTCmmc9QBcnlhq5BNGcAmRDrIWj zqQgBwOHa6Ahznr8DRy/rrFpnl72uVyWgHa3AWbmAF9XaqGDwm5XkYPICkWHWhVAOig3 rOztAbdGLVQEkKXUin7xIOOWHUSCk4iBGoZ3oRH8VBbSupH36gb7lFvdD/X28z10u7HZ e2NpXHSwEh7xMYZUo/df9o7sR+HOHrUtDxlLozCqV98v3wXQrRhW6QlkxhpBeS/hrmKb XA7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=WvDqcoNe; 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 o12si13452623pgn.121.2018.01.22.01.53.38; Mon, 22 Jan 2018 01:53:52 -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=fail header.i=@gmail.com header.s=20161025 header.b=WvDqcoNe; 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 S1751144AbeAVJxN (ORCPT + 99 others); Mon, 22 Jan 2018 04:53:13 -0500 Received: from mail-oi0-f68.google.com ([209.85.218.68]:44272 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750997AbeAVJxK (ORCPT ); Mon, 22 Jan 2018 04:53:10 -0500 Received: by mail-oi0-f68.google.com with SMTP id s11so3447411oih.11; Mon, 22 Jan 2018 01:53:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=a8tg1PeTXRAWPzPh6BCo3zGm6MjxuAtjbqB25xLLxoA=; b=WvDqcoNeX2mSxNGqeChE+Y0HwF8d2r7fpD3UCiF3RvArNGNBrliHvbDFgj3RQUBbZn Z5mZciaLaYhr5TyNBvzqkBn8MwOeerzGmb9WFUeM6YW0DstwNx/NOCUYnJudxSqJuxFw w6HX5OMOAqRcLpRdae9TARR49hw9WDBNZj3zyx02MPGIJQK8vtwJb2ucdbH75AMcSnky hnprrsUVr1DIa5csVESX1lIrc/WTMy+6ix5qHGZI2AzcbtmKxtQ6cINvZeHcehh2O5Au Yu1NUSVtN3iDhUodWF1lYMECPACllFE3u5gBjX0/jyBsl+jvX7/3Lrs+Y6QFEqODel0P UhWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=a8tg1PeTXRAWPzPh6BCo3zGm6MjxuAtjbqB25xLLxoA=; b=RjLlSbmtJpZaiHOK6++BElNcy/rcngj/BSsrfkDh67IeGpwywctumTP9UqBXvQ0qcG fmdqmeBkN6plTMuwUvoLh4+q2u4vkR1sMGKtOxZ0rnJ1gXlAFUS4LTqD/PMzu0aiaqSl Ysx/UlQU0kIgraksrPchAqqmoa/4IOc3gBZiH3xPjf4uILjCee8aaq7YkLrH+XzLMAm+ 2Ah/MiYolpZ57Yy65QS78xDXy55RwC8g8NE2F8wWpOr7KoazEPQHY8+5W68+Q9dfimDV dWUu/fOPsFblerA0lEFUf8QYCNhvFXIccmXjMGZrkyFaxD6RhqJcjVPaOgSed2+78jM4 rzyQ== X-Gm-Message-State: AKwxytfSHHx74QwwH1iSfTtqulKGdVNgxk9ZS4Fxt3i2sLh1yQ0nnwcK HxoHrYaz1oMGGCIwVjPjgnTcIHRNATmGmI9+/eM= X-Received: by 10.202.232.211 with SMTP id f202mr1888903oih.128.1516614788020; Mon, 22 Jan 2018 01:53:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.68.119 with HTTP; Mon, 22 Jan 2018 01:53:07 -0800 (PST) In-Reply-To: References: <5930d2df872116555cc553284b6c111dce29e298.1515766253.git.green.hu@gmail.com> From: Arnd Bergmann Date: Mon, 22 Jan 2018 10:53:07 +0100 X-Google-Sender-Auth: BVs8BHkHuMDHGAie8SWKljDDxKc Message-ID: Subject: Re: [PATCH v6 06/36] nds32: Kernel booting and initialization To: Greentime Hu Cc: Greentime , Linux Kernel Mailing List , linux-arch , Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Networking , Vincent Chen , DTML , Al Viro , David Howells , Will Deacon , Daniel Lezcano , linux-serial@vger.kernel.org, Geert Uytterhoeven , Linus Walleij , Mark Rutland , Greg KH , Guo Ren , Randy Dunlap , David Miller , Jonas Bonn , Stefan Kristiansson , Stafford Horne , Vincent Chen 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 Mon, Jan 22, 2018 at 10:49 AM, Greentime Hu wrote: > 2018-01-20 0:41 GMT+08:00 Arnd Bergmann : >>> This implementation is referenced from openrisc. >>> https://lkml.org/lkml/2017/11/17/228 >> >> It's correct on openrisc, because that has a reliable cycle counter, >> and that gets used in its delay function: >> >> void __delay(unsigned long cycles) >> { >> cycles_t start = get_cycles(); >> while ((get_cycles() - start) < cycles) >> cpu_relax(); >> } >> >> In my review comment that you cited, I assumed that nds32 had similar >> hardware. >> >> However, as you explained earlier, the nds32 architecture does not provide >> a cycle counter and the clocksource resolution is not high enough to >> be a good replacement, so you have to use the traditional delay >> calibration. >> > > Hi, Arnd: > > Thank you for your explanation. > Will it be ok if I code it like this? > > config GENERIC_CALIBRATE_DELAY > def_bool y Yes, I think that should be sufficient. Arnd