Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2813287imu; Fri, 23 Nov 2018 15:20:17 -0800 (PST) X-Google-Smtp-Source: AFSGD/UARZIrbh8iqsWcOYJN7IUakLo2YqK9cBDr34xU+i6SxeBR4oqqH7rjqxaE9fa5w5VRuTgA X-Received: by 2002:a62:de06:: with SMTP id h6mr14071143pfg.158.1543015217666; Fri, 23 Nov 2018 15:20:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543015217; cv=none; d=google.com; s=arc-20160816; b=NywTFJvBqSzHTBNJcsHjPYIvIXdtVYyQb8fsO/q24lhh/6AODYrRX+8LqEJC0p72aD PDMtG1c5Q5w8+sI9p3Mz03OJhtNwEKs804BYvfUbn7CRuXE0TyqZjL6GEtR9uwbIEoNm rysvfU8K70aea8HSoTOVD8uMu3DBYCL/6Q+bpvKs4qRhKCkXnBT26ojZTXXfbsTiA5cR RvnFqdheLzuDd5aEOUx+KLay2ppol7heWCoZG4qNxV1U5MTQfkwbMnO43N52GO151B2G cMr744mSW2rMzSvLJ/exursiIaHwZbYWJiSbhbGMhKLjUbDeL5SC4+bplvYGjGBktYxY biow== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=/gdyEMmwIpDA7UWL4y3n+Qu2eQKbycMOptMcNyq9TtM=; b=IHjF70UnptQC72jtmlaaMnJZHGSjLEhS+m0V3WbVg7RXvid/IVF8Sqrvkwh+zzIA8a vwAZ5kORdcQ6yTtMmXm8ep925H84VN32sgAgaQ7rKgbIyOtZrMTyZ1/OGuUJDFvLDSZD zjJAgph1U3oM160jqSiBLpQJn91F39srrLHGLRg1BQxkn6XV7mD8RwXRCJsKLSTL+tNw W3MmEPlOz5c1FcZrj7ThVnN6zbPEXBGuO3hilBlLGAAz1doNVeO24GQbZLOOuNSXhf4X uzd9lUJioCZAVSwALcDOIx72YxuVPqNUeBb6a3ZzRCrCAyC+Jd25/fv+e9E8JfSNN9VE z0gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KUIwFAUo; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cc8-v6si62735482plb.377.2018.11.23.15.20.02; Fri, 23 Nov 2018 15:20:17 -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=@linaro.org header.s=google header.b=KUIwFAUo; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437728AbeKWCK3 (ORCPT + 99 others); Thu, 22 Nov 2018 21:10:29 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:37796 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437719AbeKWCK2 (ORCPT ); Thu, 22 Nov 2018 21:10:28 -0500 Received: by mail-wm1-f67.google.com with SMTP id p2-v6so9466432wmc.2 for ; Thu, 22 Nov 2018 07:30:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/gdyEMmwIpDA7UWL4y3n+Qu2eQKbycMOptMcNyq9TtM=; b=KUIwFAUojixNVqwyOkA7px+DwBP5BnsrypPW6Kf08K20Abmxx6gpgVglCYlWsOr+SK PjETrOPTMoaqBrmjHlOpWe7+XI8iU4+Ifg6x1Dn/qazVdHkDQm7j6n0m0T+dC+FeaEaF rs/qWJkmYQmSkgn+a/DUBff1eTXBCB3jus6V0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/gdyEMmwIpDA7UWL4y3n+Qu2eQKbycMOptMcNyq9TtM=; b=Vl3HVqE53Gnb/BE4TO8ZzQkDK56KOOAUSevtOuEBDrN05IjoLEfSDYpKguVcYqG1SQ AhFmAkLrJ/Ga2xh24VaaBy/bOYBkJnSx6mTlKUEXP6LfnroE7taqxqhJ2hV4i0LCWefu K/BuJSP9/a980TLJQDJKRTrNprlZoilb0Gud6LfDMw8FAde9h1aI6Ncw35HVFv7S8zS9 temJtvoOSB5u0PuzyzpZFHTgOB2YwBCqAAshl2nVtJmnUM0DcDkVkZ4xXnxTQr0Zg6Tx sagKg6rsn1lHO2nyBHNcqpa/Y6CMdb7iyFAqN4ixHEL7us1e9xa51ITRp8Y70Qdta7uY Mknw== X-Gm-Message-State: AA+aEWbGhATITKzk0OHxSWifrq0i/DPtlMXR1ldK3t6OrOdtyDH+dS0k AaRLnh5sxcc2JgRoK0vgxivkfaeidFE= X-Received: by 2002:a1c:cec1:: with SMTP id e184mr2247209wmg.75.1542900636264; Thu, 22 Nov 2018 07:30:36 -0800 (PST) Received: from [192.168.0.40] (44.65.136.77.rev.sfr.net. [77.136.65.44]) by smtp.googlemail.com with ESMTPSA id p14sm15918641wrt.37.2018.11.22.07.30.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Nov 2018 07:30:35 -0800 (PST) Subject: Re: [PATCH] arm64: dts: renesas: r8a7796: Add CMT device nodes To: Biju Das , Rob Herring , Mark Rutland Cc: Simon Horman , Magnus Damm , "linux-renesas-soc@vger.kernel.org" , "devicetree@vger.kernel.org" , Geert Uytterhoeven , Chris Paterson , Thomas Gleixner , John Stultz , Fabrizio Castro , "linux-kernel@vger.kernel.org" , Marc Zyngier References: <1540542307-63158-1-git-send-email-biju.das@bp.renesas.com> <1be47ef6-1a92-e032-12c1-1deae5b67960@linaro.org> <67cf2385-9379-f02a-36fd-b2e07dfd5497@linaro.org> From: Daniel Lezcano Message-ID: <84b6bc0e-486d-e9f4-7579-0d6b513c15ba@linaro.org> Date: Thu, 22 Nov 2018 16:30:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Added Marc Zyngier in Cc. On 22/11/2018 16:16, Biju Das wrote: > Hello Daniel, > > Thanks for the feedback. > >>>> Subject: Re: [PATCH] arm64: dts: renesas: r8a7796: Add CMT device >>>> nodes >>>> >>>> On 19/11/2018 16:50, Biju Das wrote: >>>>> Hi Daniel, >>>>> >>>>> Thanks for the feedback. >>>>> >>>>>>>> Subject: Re: [PATCH] arm64: dts: renesas: r8a7796: Add CMT device >>>>>>>> nodes >>>>>>>> >>>>>>>> On 26/10/2018 10:25, Biju Das wrote: >>>>>>>>> This patch adds CMT{0|1|2|3} device nodes for r8a7796 SoC. >>>>>>>>> >>>>>>>>> Signed-off-by: Biju Das >>>>>>>>> --- >>>>>>>>> This patch is tested against renesas-dev >>>>>>>>> >>>>>>>>> I have executed on inconsistency-check, nanosleep and >>>>>>>>> clocksource_switch selftests on this arm64 SoC. The >>>>>>>>> inconsistency-check and nanosleep tests are working fine.The >>>>>>>>> clocksource_switch asynchronous test is failing due to >>>>>>>>> inconsistency-check >>>>>>>> failure on "arch_sys_counter". >>>>>>>>> >>>>>>>>> But if i skip the clocksource_switching of "arch_sys_counter", >>>>>>>>> the asynchronous test is passing for CMT0/1/2/3 timer. >>>>>>>>> >>>>>>>>> Has any one noticed this issue? >>>>>>>> >>>>>>>> So now that you mention that, I've been through the >>>>>>>> clocksource_switch on another ARM64 platform (hikey960) and >>>>>>>> disabled the >>>>>>>> ARM64_ERRATUM_858921 config option. I can see the same issue. >>>>>>>> >>>>>>>> Is this option set on your config ? >>>>>>> >>>>>>> No. As per " config ARM64_ERRATUM_858921", it is "Workaround for >>>>>> Cortex-A73 erratum 858921" >>>>>>> >>>>>>> Our SoC is 2xCA-57 + 4 x CA-53. Does it impact CA-57 + CA_53? >>>>>> >>>>>> Dunno :/ >>>>>> >>>>>>> Any way I will enable this config option and will provide you the >> results. >>>>>> >>>>>> Ok, thanks! >>>>> >>>>> The following config is enabled by default on upstream >>>>> kernel(4.20-rc3) CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y >>>>> CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y >>>>> CONFIG_FSL_ERRATUM_A008585=y >>>>> CONFIG_HISILICON_ERRATUM_161010101=y >>>>> CONFIG_ARM64_ERRATUM_858921=y >>>>> >>>>> For a quick testing, I have activated the erratum using the >>>>> property >>>> "fsl,erratum-a008585" on device tree. >>>>> With this I confirm the issue is fixed. >>>>> >>>>> I have some questions on this. >>>>> 1) Based on the test result ,do you think renesas soc also >>>>> impacted by the >>>> ARM64_ERRATUM_858921? >>>>> 2) Is there any way to find, is this Erratum actually causing the >>>> asynchronous test to fail? >>>> >>>> I guess, you can hack the __fsl_a008585_read_reg macro and check if >>>> the invalid condition is reached. >>>> >>>> This thread https://lkml.org/lkml/2018/5/10/773 will give you all the >>>> answers you are looking for (well very likely). >>>> >>>> Let me know if it helped. >>> >>> In our case , Delta: 174760 ns >>> >>> 1530553351:205762284 >>> 1530553351:205762404 >>> -------------------- >>> 1530553351:205951226 >>> 1530553351:205776466 >>> -------------------- >>> >>> I have tried the workaround for ARM64_ERRATUM_858921, that also fixes >> the issue. >>> >>> But all the workaround disables ARM64 VDSO. How do we conclude that is >> it VDSO issue or ARM64_ERRATUM issue? >> >> May be disable all errata and set vdso_default to false? >> >> [ ... ] >> >> -static bool vdso_default = true; >> +static bool vdso_default = false; >> >> [ ... ] > > I have disabled the activation of errata from device tree and set vdso_default=false. > With this also it works fine. So looks like arm64 vdso is the issue in our case. > > Do you agree with the conclusion? I agree we have an element to investigate the issue. That is very specific to this timer and a good knowledge of the internals is required. Certainly Marc Zyngier or Mark Rutland can help here. > [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=6 > [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 > [ 0.000000] arch_timer: cp15 timer(s) running at 8.32MHz (virt). > [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1eb398c07, max_idle_ns: 440795202503 ns > [ 0.000004] sched_clock: 56 bits at 8MHz, resolution 120ns, wraps every 2199023255503ns -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog