Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp794119imu; Fri, 7 Dec 2018 09:01:06 -0800 (PST) X-Google-Smtp-Source: AFSGD/XQy8FHCBIJYnkLYcJ1A7MC4AvuvE1KGGnVWiqGeCh3UwMz+p4WSGse/BDSp6bFMubI7TMm X-Received: by 2002:a63:e545:: with SMTP id z5mr2619156pgj.195.1544202066598; Fri, 07 Dec 2018 09:01:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544202066; cv=none; d=google.com; s=arc-20160816; b=dZTEdkvAFJPMmEHRvdb4GyGn9AfeIpyQigRckq9Uf8S2vs1Om3zJKBhuFZYUpuES0k 5w+n/Wxf7a78mFDDkNRbQNDPgp/IZV+csE0wmge7s6PorO7ToyglidNz4IRKSTRPJNb2 ybInK1CEMy1hecdtgaz1eCf7FShF/8nQQ1GbxrCOQoNpipljhHxmdqpvwInsPLte5Qs8 xz4PDbp3MWBvMQWGRZXNlV7s/BKFP4xshFYtoO2EVPoQhqWPxsbcbcgNBX46OnkKfuTL jTb0Xcqvc7AAKIzAJToO5U/3dSehy6wJrMEIaf+ZRxX2cWIjGI3Jkw1P592ah/1SlAQF 5tzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=EFeBTriw3WtWApru9lpzGXgxuzTUuNPf+UmnstYWyfo=; b=wkYEe+2ciGdvt3TBtFjEr4/rk4P06LR9q7NKan4ycrf49H+UaufPqflWMbLvKOO3tx mbN/bjvVI7LAJUJzP6iFd7TfGVzh/iSg/PZC0ThFm2Wre69JOOsTS3lct4wmcdXjr67s p3wQG3+/4hg4U/H+5/Ni1eOkbGodvObn9auyxF1kae19ZDActPsOt+kadLAHFgeS9zPq PdKkPg/63esbuUz8Qdg2tmrIPDeiBZV9lR78utNyJuZTSqjbT7r7gJQLO7hrK6iq2JxE 1vKrM/9+ZmW0W3dOqkArd6tSIURNX4BcU/kY4+x/c4eQQHIhBX6HaN2Wy8UOxYiESliQ tzlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=BYwU1Xbd; 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 3si3380214plv.258.2018.12.07.09.00.49; Fri, 07 Dec 2018 09:01:06 -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=@sifive.com header.s=google header.b=BYwU1Xbd; 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 S1726076AbeLGRAK (ORCPT + 99 others); Fri, 7 Dec 2018 12:00:10 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:41632 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726034AbeLGRAJ (ORCPT ); Fri, 7 Dec 2018 12:00:09 -0500 Received: by mail-pl1-f196.google.com with SMTP id u6so2084184plm.8 for ; Fri, 07 Dec 2018 09:00:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=EFeBTriw3WtWApru9lpzGXgxuzTUuNPf+UmnstYWyfo=; b=BYwU1Xbdvx6Q+0Bwj5O0fkF1gdaXKBYs1Gdgxpg/1EFnVof2s9zFEIWDRIIVeDIdoD AauX9wMFSaErn7ezTncsU5a1AEfBeMlPL50W7UaNh8pzg6tvLuhh6V6Vxhyv9+INOmWH vWRylC3oSDFZD4ifHmnmrMNZ7gQ9BcOeLPvrgzUgLJ/Rid4w1IKl4BbeTreJGKR2eAvp Hy7H/AW1NrfMPqArAfEIO3MBtiTxlkmjXExDNKt6baOqsSi4hChcUxPsNoWeGWUvuDUy pioPhFAhWqCO9nc0MBotg7KnAyarrLjSjMjumwa2VyX/gKOaPasPAmIlj8Nxvd0g+j0O 2qfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=EFeBTriw3WtWApru9lpzGXgxuzTUuNPf+UmnstYWyfo=; b=arYdst6v4b+gS0JXjYZ+4kJL1f9Tf5ih4k6wvJKIicvv0d3D1w19TqwtV9PCTf3r0J lBgkqxwQ2zg37D1yNKlJ0TJ5pKzdRYtlrm+7W6leFp4onnxNRlfuAa4u1V3pcTH+HRA4 /hOCBpoUR/7QlzzEbOCpbkPN2ianSock2hxOHSLL2o0+wkXRclBidKOOMXwP8NN/qxiU UN/0IpeAutHJO/gmMtTT6vZo8mzK1+6E8Fvu5dVXe5g98DOOPgweZ2mMxJmObFKPFCT7 GWq9XOqQ2t+iJUEAS741MGopSF9F6SADGcND7fja0WWUVEd63UqQwxPE13a+BsJ4PJu0 +LhQ== X-Gm-Message-State: AA+aEWZ/4ayZZ593HKGsvfZbYzQP/Xpz9B0Aminyqq5YEIcoWdLlHZI8 SIhZAigMxtQCqxaNGgfF5clS2cDmep4= X-Received: by 2002:a17:902:714c:: with SMTP id u12mr2818163plm.234.1544202008731; Fri, 07 Dec 2018 09:00:08 -0800 (PST) Received: from localhost ([216.3.10.7]) by smtp.gmail.com with ESMTPSA id 125sm8733897pfd.124.2018.12.07.09.00.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Dec 2018 09:00:07 -0800 (PST) Date: Fri, 07 Dec 2018 09:00:07 -0800 (PST) X-Google-Original-Date: Fri, 07 Dec 2018 08:46:10 PST (-0800) Subject: Re: [PATCH 3/4] RISC-V: Remove per cpu clocksource In-Reply-To: <1543870651-16669-4-git-send-email-atish.patra@wdc.com> CC: linux-kernel@vger.kernel.org, atish.patra@wdc.com, aou@eecs.berkeley.edu, daniel.lezcano@linaro.org, devicetree@vger.kernel.org, dmitriy@oss-tech.org, linux-riscv@lists.infradead.org, mark.rutland@arm.com, robh+dt@kernel.org, tglx@linutronix.de, anup@brainfault.org, Damien.LeMoal@wdc.com From: Palmer Dabbelt To: atish.patra@wdc.com Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 03 Dec 2018 12:57:30 PST (-0800), atish.patra@wdc.com wrote: > There is only one clocksource in RISC-V. The boot cpu initializes > that clocksource. No need to keep a percpu data structure. > > Signed-off-by: Atish Patra > --- > drivers/clocksource/riscv_timer.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/clocksource/riscv_timer.c b/drivers/clocksource/riscv_timer.c > index 96af7058..39de6e49 100644 > --- a/drivers/clocksource/riscv_timer.c > +++ b/drivers/clocksource/riscv_timer.c > @@ -49,7 +49,7 @@ static unsigned long long riscv_clocksource_rdtime(struct clocksource *cs) > return get_cycles64(); > } > > -static DEFINE_PER_CPU(struct clocksource, riscv_clocksource) = { > +static struct clocksource riscv_clocksource = { > .name = "riscv_clocksource", > .rating = 300, > .mask = CLOCKSOURCE_MASK(BITS_PER_LONG), > @@ -106,7 +106,6 @@ static long __init riscv_timebase_frequency(struct device_node *node) > static int __init riscv_timer_init_dt(struct device_node *n) > { > int cpuid, hartid, error; > - struct clocksource *cs; > > hartid = riscv_of_processor_hartid(n); > cpuid = riscv_hartid_to_cpuid(hartid); > @@ -116,8 +115,7 @@ static int __init riscv_timer_init_dt(struct device_node *n) > > /* This should be called only for boot cpu */ > riscv_timebase = riscv_timebase_frequency(n); > - cs = per_cpu_ptr(&riscv_clocksource, cpuid); > - clocksource_register_hz(cs, riscv_timebase); > + clocksource_register_hz(&riscv_clocksource, riscv_timebase); > > error = cpuhp_setup_state(CPUHP_AP_RISCV_TIMER_STARTING, > "clockevents/riscv/timer:starting", Reviewed-by: Palmer Dabbelt