Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1415484imm; Thu, 5 Jul 2018 22:59:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdesPriK7+GlaE1wxfe3qpTqNXStJ86kiSpghxi5jtGerkbR0nb8BLfNdmRjkrkk0tml9ax X-Received: by 2002:a63:5106:: with SMTP id f6-v6mr7975907pgb.95.1530856798966; Thu, 05 Jul 2018 22:59:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530856798; cv=none; d=google.com; s=arc-20160816; b=R8Fl6lWN5U4WSm+wuyo1Z8mknsxVT3CVKWkv5rrdo+c4GX2+vPBobBT2nvXEaVfBz/ cs2gsx0FmuyzWxkRatpn7Tvmqj8Qkla9bw5oienuHDKxmfskM2Ys2TselZfX2ay/pvD+ pCdq2CUiw5t1BnVfZu5vf04wkRAnE0StrXH87AcNG3o+hD6rEzYpsjzYTfdgy8JmdJYi ga/gfsRAcjh5tfTmZCEwmhXDQsmaKUsrQCOtOLOE86BDw3/Mf+bNEcHblS6+1I3xvlmR VwSpWql3ZJRZKFy2PLulEpmVzXFCCaNEVBZqh25qCQy1J+4Ucr6WiNBtRTy9c/RfCNb3 AI6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=Ni+6NgjHOt1El5RQZw6jPGIZiF1aATkauU95E/0sduM=; b=zGC+kK19P/M6GA0fqEAVqMubXe4DmlL9+7BAXCkR1mAUWARjSVnOfGTWpGx1oKxHYT Yb+bKQml0WPoFl2YaOeNFiw8gIKHIGvQsTyMWlRvQWVXd98VFSW85hYSBKGfl6vQaoQH Pli62uKZ2i8jkfavuZqc4wcoHq7jEEkT5i4g9THI6FayFnIWvCFPHGdw4tOoHkCJjsc7 9/Dt+z/a47ST8QjAYeV06Dpngb7KRbDfnZdt99DIKEOt1GGCvJsezYAn2Pzk+W/dItBI DNHRfRsILihrXPSDamaZOdR8ElGYk2ycc1Oi8zvC1qCc/jZvZxBKy/z4PKawSr7ZuUKB Cwww== ARC-Authentication-Results: i=1; mx.google.com; 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 t22-v6si7344879plo.263.2018.07.05.22.59.44; Thu, 05 Jul 2018 22:59:58 -0700 (PDT) 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; 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 S934471AbeGFF5q (ORCPT + 99 others); Fri, 6 Jul 2018 01:57:46 -0400 Received: from smtp2200-217.mail.aliyun.com ([121.197.200.217]:53040 "EHLO smtp2200-217.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932778AbeGFF5o (ORCPT ); Fri, 6 Jul 2018 01:57:44 -0400 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.09664869|-1;CH=green;FP=0|0|0|0|0|-1|-1|-1;HT=e01e04463;MF=ren_guo@c-sky.com;NM=1;PH=DS;RN=11;RT=11;SR=0;TI=SMTPD_---.CMxR2eD_1530856629; Received: from localhost(mailfrom:ren_guo@c-sky.com fp:SMTPD_---.CMxR2eD_1530856629) by smtp.aliyun-inc.com(10.147.41.138); Fri, 06 Jul 2018 13:57:09 +0800 Date: Fri, 6 Jul 2018 13:57:09 +0800 From: Guo Ren To: Daniel Lezcano Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, jason@lakedaemon.net, arnd@arndb.de, c-sky_gcc_upstream@c-sky.com, gnu-csky@mentor.com, thomas.petazzoni@bootlin.com, wbx@uclibc-ng.org, green.hu@gmail.com Subject: Re: [PATCH V2 18/19] clocksource: add C-SKY clocksource drivers Message-ID: <20180706055709.GA8707@guoren> References: <20180705033020.GA8023@guoren> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 05, 2018 at 11:23:36AM +0200, Daniel Lezcano wrote: > > So I still need "for_each_cpu(cpu, cpu_possible_mask)" to init every > > csky_to ... > > That is what is unclear for me. percpu or IRQF_PERCPU ? IRQF_PERCPU > Have a look at the commit 9995f4f184613fb02ee73092b03545520a72b104, > changelog and the comment in the init function. > > Can you give a similar description for this timer ? Ok, thx for the tip. > > #define STATUS_CLR BIT(0) > > > > #define CONTRL_RST BIT(0) > > #define CONTRL_START BIT(1) > > > > #define CONFIG_EN BIT(0) > > #define CONFIG_IRQ_EN BIT(1) > > NATCHIP_STATUS_CLR > NATCHIP_CONTROL_RST > NATCHIP_CONTROL_START > > NATCHIP_CONFIG_EN > NATCHIP_CONFIG_IRQ_EN Ok > >>> + .rating = 300, > >>> + .features = CLOCK_EVT_FEAT_DYNIRQ | CLOCK_EVT_FEAT_PERIODIC | > >>> + CLOCK_EVT_FEAT_ONESHOT, > >>> + .set_state_shutdown = nc_timer_shutdown, > >>> + .set_state_periodic = nc_timer_set_periodic, > >>> + .set_next_event = nc_timer_set_next_event, > >> > >> set_oneshot ? > > Yes oneshort, but also could support periodic. But in fact, it only > > works with oneshort. > > In the flags, it is specified periodic and oneshot but only the > set_periodic ops is set. Got it, add set_oneshot. > > Thx, I'll modify it like this: > > div = (timer_of_rate(&to) / TIMER_FREQ) - 1; > > I wanted to be sure it wasn't the latter. In this case, you don't need > parenthesis, so just add the spaces around the '/' operator. Ok Guo Ren