From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23D59CA9EA1 for ; Fri, 18 Oct 2019 08:30:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 01F81222BD for ; Fri, 18 Oct 2019 08:30:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2632831AbfJRIar (ORCPT ); Fri, 18 Oct 2019 04:30:47 -0400 Received: from [217.140.110.172] ([217.140.110.172]:58292 "EHLO foss.arm.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1727573AbfJRIar (ORCPT ); Fri, 18 Oct 2019 04:30:47 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4F9EF32B; Fri, 18 Oct 2019 01:30:16 -0700 (PDT) Received: from [192.168.1.103] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C62413F718; Fri, 18 Oct 2019 01:30:13 -0700 (PDT) Subject: Re: [PATCH] lib/vdso: Use __arch_use_vsyscall() to indicate fallback To: Andy Lutomirski , Huacai Chen , Maxime Bizon Cc: Thomas Gleixner , chenhuacai@gmail.com, LKML , stable , Arnd Bergmann , Paul Burton , linux-mips@vger.kernel.org, linux-arm-kernel References: <1571367619-13573-1-git-send-email-chenhc@lemote.com> From: Vincenzo Frascino Message-ID: <6581a6e8-45c9-a80c-d2a4-33466f5712fd@arm.com> Date: Fri, 18 Oct 2019 09:32:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Hi Andy and Hucan, On 10/18/19 4:15 AM, Andy Lutomirski wrote: > On Thu, Oct 17, 2019 at 7:57 PM Huacai Chen wrote: >> >> In do_hres(), we currently use whether the return value of __arch_get_ >> hw_counter() is negtive to indicate fallback, but this is not a good >> idea. Because: >> >> 1, ARM64 returns ULL_MAX but MIPS returns 0 when clock_mode is invalid; >> 2, For a 64bit counter, a "negtive" value of counter is actually valid. > > s/negtive/negative > > What's the actual bug? Is it that MIPS is returning 0 but the check > is < 0? Sounds like MIPS should get fixed. > I submitted a patch for this yesterday to the MIPS maintainers [1]. The MIPS32 r1 implementation had a bug when VDSO_CLOCK_NONE was set. The issue has been reported by Maxime Bizon who tested the fix as well. [1] https://patchwork.kernel.org/patch/11193391/ -- Regards, Vincenzo