From patchwork Tue Nov 20 14:43:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pasha Tatashin X-Patchwork-Id: 10690649 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5E18215A7 for ; Tue, 20 Nov 2018 16:03:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4DF622AA8F for ; Tue, 20 Nov 2018 16:03:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 422492AA95; Tue, 20 Nov 2018 16:03:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 336762AA8F for ; Tue, 20 Nov 2018 16:03:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=z03ZNZBVriyVlOwq/igQLMQUe163PCL2k1w3D78mc9E=; b=VIm45tmq0KA8Y+ BKkQXaHx7gt4P6DzJvC+PS7V2nPBwGRWYAKyvIsUKco3JgLtELkgkDcLD7jbypE6HsVMeksH5ZLsk EomI9pBUhx+hVev230SLeRo0sXY4phyhPHdeXF6/Wugbzh0Quhcw9bUb5g9Ji+3rISvBO5LyJrzUd oL+etiboQoeCb/UFWVKI2ZAGyZzOWiliUxlWwLmHAPwp3IXltmwTYmBnjsARFMdZpH/JTK6lX/KUt ldIJ8eenIgjWeji1K1mGxssJI0CK86wGXq0bN1d38qbYNRuiombzXYvFUaP1gzA3ChI5KMcfatAFw 37rYjgeHdiaGmKsaVpVg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP8UR-0008MD-PR; Tue, 20 Nov 2018 16:03:03 +0000 Received: from merlin.infradead.org ([205.233.59.134]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP8Fn-0003nl-E4 for linux-arm-kernel@bombadil.infradead.org; Tue, 20 Nov 2018 15:47:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=qzCcWYsD+UTNiISg748ippafAvv89tYKpp8xGRH3LJU=; b=w9qSUa9ohms+tqAxmqyYSY9+pA tlEtzJDB9jQwcyvmMn7VqPs328/m6JmUrC7SKc31IkLRCk1J6hTIR3HRl5ei7UqBxIEUKNI4jcW37 Q/xBYM0+e+3T6WpPbbb3Ly+J1KdlgwwM/zpUGIBO4ABllEmroPMZ3nrACbySIK6VzQX3dhxq6Oesi NVQn0ITW0nDtsDnwwRaYrx1qMJbCm6CWKoJ65+m/lfnS7fJZCaAG0fPvH8JwtHUSSQDgxUgFeHnRI cQbbL0gWRRgRfV7zuptn04aKAXyNRyWPA6ol/HbyNG6suH34FOcecUnP7/b9HpFkiiw+HauB3OA2M MohhDSDQ==; Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP7Gu-0000Lj-Vk for linux-arm-kernel@lists.infradead.org; Tue, 20 Nov 2018 14:45:01 +0000 Received: by mail-qt1-x843.google.com with SMTP id r14so214054qtp.1 for ; Tue, 20 Nov 2018 06:44:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=qzCcWYsD+UTNiISg748ippafAvv89tYKpp8xGRH3LJU=; b=aLBNi9Msbt3OHRGbvE31rPK6Ycv6uzcd4E1X+Wc+41tCiXPJn7EJL13/3ly4LEZ+Qf Jtrcw0LkX2KEduIY7o2N2b5I/VX4tC5MaN0eEvVaMNCvTjVUw+3OtNos4HHfZ0ENFFtU E2mLnhuykBQwzKuomZQz/9F8guGdxlmh+5Wv5unGs7nkZduCMFn/U723g9KKJVz6m7cH YYiq7Mse09dN6NlbQgp1pkcE6ml8hzRCUzQNxx32GhR6foCIWm9AwsRsDyuJSzYbICJ5 IaRbzvnO7yCIb/DrKFSVjqL8tqbfN3lmdVBuhHqmfGwKQB11yhTa4MAlYegrmXDSk4RJ cFqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=qzCcWYsD+UTNiISg748ippafAvv89tYKpp8xGRH3LJU=; b=kbrUTK3DaCDVlC6WN2IlMxmat3UR6nBw+Vg5w3SgZ/06rnUbAsteXJl/aX3jIfTvMU o8y87al9fkko0No3OCQPHePWeJpjOa2AZPWkFmhf9Fq6LeERUdAO5Cn4VUxE1L9bIk6P XdMsncp+vl1hAJL7g7npy1vZdWMTkgqt0WTrr2bT7SaQek6OLzVwTfn4Kj/7j2yZzoYc tK+tTBvFXDe9j1n2ztFYtqH6UMBOk10I12nMHRBQbmd0eOgmhnflLn3+/DBSBiMq86PB f+jtoZhhDFBKVWrEQ4I1i7O1TIWXJ+ZrRWRXcyQ5VGPxszW7ZMDkapUSemP4fNZABBtP hmEw== X-Gm-Message-State: AA+aEWaeDyWufPJAtFmOJzjTzTOmI7fo47LnTRcedHseQy/REWWFlSpW QYF3ZXgAzYt8eNrtK8uzkqFR6A== X-Google-Smtp-Source: AFSGD/U1/HAJFPRjSyNFX/rpp6DQhibBVAKdsYmABetBUsk3aC+CCYAa3b3jXonBQ3jM84uYwOCPTg== X-Received: by 2002:a0c:c192:: with SMTP id n18mr2030055qvh.99.1542725023032; Tue, 20 Nov 2018 06:43:43 -0800 (PST) Received: from localhost.localdomain (c-73-69-118-222.hsd1.nh.comcast.net. [73.69.118.222]) by smtp.gmail.com with ESMTPSA id r16sm30046529qkh.71.2018.11.20.06.43.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Nov 2018 06:43:42 -0800 (PST) From: Pavel Tatashin To: catalin.marinas@arm.com, will.deacon@arm.com, akpm@linux-foundation.org, rppt@linux.vnet.ibm.com, mhocko@suse.com, ard.biesheuvel@linaro.org, andrew.murray@arm.com, james.morse@arm.com, marc.zyngier@arm.com, sboyd@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, pasha.tatashin@soleen.com Subject: [PATCH v2 0/1] Early boot time stamps for arm64 Date: Tue, 20 Nov 2018 09:43:39 -0500 Message-Id: <20181120144340.30201-1-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181120_094501_038105_507347E7 X-CRM114-Status: GOOD ( 12.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Changelog: v1 - v2 Addressed comments from Marc Zyngier I made early boot time stamps available for SPARC and X86. x86: https://lore.kernel.org/lkml/20180719205545.16512-1-pasha.tatashin@oracle.com sparc: https://www.spinics.net/lists/sparclinux/msg18063.html As discussed at plumbers, I would like to add the same for arm64. The implementation does not have to be perfect, and should work only when early clock is easy to determine. arm64 defines a clock register, and thus makes it easy, but on some platforms frequency register is broken, so if it is not known, simply don't initialize clock early. dmesg before: https://paste.ubuntu.com/p/3pJ5kgJHyN dmesg after: https://paste.ubuntu.com/p/RHKGVd9nSM As seen from the above with base smp_init is finished after 0.47s: [ 0.464585] SMP: Total of 8 processors activated. But, in reality, 3.2s is missing which is a quiet long considering this is only 60G domain. Pavel Tatashin (1): arm64: Early boot time stamps arch/arm64/kernel/setup.c | 25 +++++++++++++++++++++++++ drivers/clocksource/arm_arch_timer.c | 8 ++++---- include/clocksource/arm_arch_timer.h | 3 +++ 3 files changed, 32 insertions(+), 4 deletions(-)