Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp488344ybi; Fri, 26 Jul 2019 13:17:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyfFocFyI5VKgMhntir6m5XVODkn7Z0TQ/lM+gOz2JcjFlrLOs1FfnmKUN86kvSCfTME2Sh X-Received: by 2002:a17:902:ea:: with SMTP id a97mr22718386pla.182.1564172248489; Fri, 26 Jul 2019 13:17:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564172248; cv=none; d=google.com; s=arc-20160816; b=rYzTRVtwzPAfVendI9l4pq7q3MnY6URE6Iju0WRGx75v5DSMyJZI9aK0qumyhoLlJl WN92gPtZc3kGgLEaeE/3sHN2sWyVaibhHu91blPLJWIOEzfa4IVq3eplx/Sbe3BcBTB0 Ui7tSXktuMOGlclypRy8kM4KgKMw6V69r9OaXGQiVAPk0zoFLBe7/yJR1sO9Xriipq3y YSxVBWiV8mEpF2Mdtpgh30QJ6XsMKGDuFUQDCsrSnlsl7XOQjvZ8wVQZzkoOseBEaJSJ WttEoHJer6JWw4T5sCE0jpoJXpkyMBBSg5fF1lZGdc+rzVpqepPani/NlEUpRwwVe5oz jZKA== 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:date:subject:cc:to:from:ironport-sdr:ironport-sdr :ironport-sdr:dkim-signature; bh=Cw4RPUHM/P2sP0dVM4uwVpaoLdVlCAZvIzJZDpFYx1w=; b=p4XF0mLCP0GHDprPLLkVV2qrw8ko6UnyGwmzXcZjdon09T6k61EYXhpM72Gv/YcITU Vyfh8dtzrPfAhq3mrl6xhz6WpAEuoT+XnlbHeQhErn7KtbvufSDZyQjJPk/ckWEAMZqj BdYSOF20ZlH/SVF8jxLpqklfaEYifRa2q78++LCC1FDIj9aeNatyO95i/YjL0Lk4Qmwf iHNolDPR79QtmN8uGtjLkieufAUQ2iBzyn/Sh5iMWcLOtCAr2+4jE92zdMFMKwU6QmwX pcJn3sKDJ48wGzlquWV4xY/cCpaFH8/SpELap19ks/pA2BoDRILhuckd01vzcB+med6z JUjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=Hd0hT81s; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w5si21135166pfi.264.2019.07.26.13.17.12; Fri, 26 Jul 2019 13:17:28 -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; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=Hd0hT81s; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727605AbfGZTqs (ORCPT + 99 others); Fri, 26 Jul 2019 15:46:48 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:17125 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726103AbfGZTqs (ORCPT ); Fri, 26 Jul 2019 15:46:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1564170408; x=1595706408; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=w14oJ81u6w2W34wdULaaio4UuiCV/eOoDOsEOvwCQng=; b=Hd0hT81sq5ubqvd8vz4lUNBGO9PdXbZC8Z+uAcmrzID0vSTuEY9RUdfO v1Tg6N2Btkk+YPqUBxUg0YL7L/bLCUK8eSDaZOarbkiVoiL5HLWQhLCkD VyuQuWcOOWIKqvnW/NjU/Ob7quvORN/HRWcryHaktPtvJFUzXWFtiZfcY hB+rz29GMzqs2Uz+DAi70wu/f7q+y0smVtG6GplkTHj8k3AZxh4Klh9GA BaVyaJ2xMzJTebEj7DjJE0Bw6UntNFLey577ryl7vu4F3FG40chD8l6YY NttcXZxK91XctbXNP5sD/iJDVhSqnam1uDHhVUh60i1RVpml5CccdPyOD w==; IronPort-SDR: lmDKtt2MwWZh94R2HA615euf17hofFE4ZAWqC4afs0CvOIJotu4WPXWfPt+eL0iDWKKeVJOWcZ iR/Im7arInbwxW4qE0cWgi9HCIRUedBp/54ncxJwc6fRL9aEvQLO8AjUimj/OYUpZgXbvxN5Lg jQKGN22xwJ4TJ6EFsetTx0xxQx80rMqIbW4LarFuZug46IubgKHgkS3R197qQBUlJNbwRb9DcK H5td+Aq+6km0qx09Il7RFrKlOOxuWQE7WwS8ULZlwi4O/qz59WgAu7dQ/5DocEYbJu1GqeAu97 Prs= X-IronPort-AV: E=Sophos;i="5.64,312,1559491200"; d="scan'208";a="114239804" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 27 Jul 2019 03:46:47 +0800 IronPort-SDR: ZVTNzIeWh/cyf+Mmy5wN1M9PinS/6uzZxIORdZojTdVbhrrfARiMOYDw2WNh4yBAHNI7wLJ9wg 72OypoLLIy8PSu2bQDABkkbbuuuo2LWH9rXiSwhyqG31fM7bCOalESrUJ5EFFb1/ufAbxbrCE2 lYxjtUgB/VSwbuQwhZEVLsp5GFbCs4Jo1o7lWW0o2YK0BzvWcHjDmwVb3kLP4WlZAyxAPGxNli URQ+UUW+vaqMTl5/uovVGBKaKkKqxuuItPldsYUyXhtkAWOw+9vHQMAnhM82ZHOe1So/NsN/DY Dwzbc8nzKV1j8l/PvoWhOz+h Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 26 Jul 2019 12:44:56 -0700 IronPort-SDR: HAtODe7BtpcPlbhxcQtN84PgABdtn9KVeCxDnDLg0eCJzExb2XsvQ+7vVs7bSESg9dXpMWBa7v 8XA2Ccy4KEmkY7BHg5bYkxTdAX0FkephrCa6PP1UoVXT4/fKtHSJTmeFpQn1+qrodgxo9wmLRk m8h5HvbIhxFC/mq717nZ4gy7VA6Uek6OF5BZCQAoLgpZWwjfjK4ncq45/t4bNtMengEBHY6iLH iXN07HIQkdQndP8Vpuup8bVgg5HSai1M/AntD3QQWM/462VId0g4hSqGApN8ZT0mnUvkRote2j uvc= Received: from jedi-01.sdcorp.global.sandisk.com (HELO jedi-01.int.fusionio.com) ([10.11.143.218]) by uls-op-cesaip01.wdc.com with ESMTP; 26 Jul 2019 12:46:47 -0700 From: Atish Patra To: linux-kernel@vger.kernel.org Cc: Atish Patra , Alan Kao , Albert Ou , Allison Randal , Anup Patel , Daniel Lezcano , Greg Kroah-Hartman , Johan Hovold , linux-riscv@lists.infradead.org, Palmer Dabbelt , Paul Walmsley , Thomas Gleixner Subject: [PATCH 1/4] RISC-V: Remove per cpu clocksource Date: Fri, 26 Jul 2019 12:46:35 -0700 Message-Id: <20190726194638.8068-1-atish.patra@wdc.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/timer-riscv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clocksource/timer-riscv.c b/drivers/clocksource/timer-riscv.c index 5e6038fbf115..09e031176bc6 100644 --- a/drivers/clocksource/timer-riscv.c +++ b/drivers/clocksource/timer-riscv.c @@ -55,7 +55,7 @@ static u64 riscv_sched_clock(void) return get_cycles64(); } -static DEFINE_PER_CPU(struct clocksource, riscv_clocksource) = { +static struct clocksource riscv_clocksource = { .name = "riscv_clocksource", .rating = 300, .mask = CLOCKSOURCE_MASK(64), @@ -92,7 +92,6 @@ void riscv_timer_interrupt(void) static int __init riscv_timer_init_dt(struct device_node *n) { int cpuid, hartid, error; - struct clocksource *cs; hartid = riscv_of_processor_hartid(n); if (hartid < 0) { @@ -112,8 +111,7 @@ static int __init riscv_timer_init_dt(struct device_node *n) pr_info("%s: Registering clocksource cpuid [%d] hartid [%d]\n", __func__, cpuid, hartid); - cs = per_cpu_ptr(&riscv_clocksource, cpuid); - error = clocksource_register_hz(cs, riscv_timebase); + error = clocksource_register_hz(&riscv_clocksource, riscv_timebase); if (error) { pr_err("RISCV timer register failed [%d] for cpu = [%d]\n", error, cpuid); -- 2.21.0