Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2560903pxb; Mon, 17 Jan 2022 00:44:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJyhlwyLYvx9jx12By9xFAA9T6t7PvyMRIEzZ65F4uYh2/LRzZ+5xzyzsmy8OrYl5lXidcy3 X-Received: by 2002:a05:6a00:1818:b0:4c1:6983:f1c9 with SMTP id y24-20020a056a00181800b004c16983f1c9mr20100960pfa.59.1642409092058; Mon, 17 Jan 2022 00:44:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642409092; cv=none; d=google.com; s=arc-20160816; b=jL656dTgke1QStkRyoIgx58cV8DPZG+yl1BMBipuiYGgoSZTi1bmyMsJO8E7eKV1/G nojSf3jVnVgBN9pmXG5MdDJgMVISejQqkBmSrobcjVVhs9GlOO2Pp2HxmaOIM2MFMUpR jYDsbqpzGcxtpDFV7h6hYR2t7d1S/87csvsCOwEu1q9Wq+lKPVOyP5tZwdAq5Rng8H9y tOyEnCsK1zSvGKoSfr5XKjYafcbUlQPh1xhDT4XOcvJA7G/wXnpOjr2ehPpQvzMb5lUk 7044Ba4s3661u3FklJjjeRKL+o6RZdlfoLnii0PkcMoX5+oaKPjG2qgRZzniQzYYjy2h nKNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=7Z5IzEgBzWkUNfgaQ8w9x1WqyipiXLZ+eIMkOFvJUcI=; b=H/Kg50CaPYhkWUohjuQxUXZS7XZFBnd1/UrwQG73/RlzogS6sxGJD4hFRD/hSEVPYJ Cm28BXuUAGScar4xlN6lxcA2fD6aQg9sT6bFYNM+QbUGrh6lJ7PUwiSU0+a6e8x/Zrhr 7yV2RYSlBQc4iROZNKe/113VVBhPmM7dw2EUR9TE9tfsf9UW7+qvCGcMg28krHsbewDp /KJio6LwnRdA8Cm8GGL7nQJq7OqH/jhAE0n6TsvIgIVmL2RHTod/RyCNT38IFxPOoyE6 JsGY96I9zeydRttjEGBlKsGDnUUveTD44khb2uXOLkNSonYHUp5RUh9PBP4tUal/3PBk uufQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q8si16231255plh.424.2022.01.17.00.44.40; Mon, 17 Jan 2022 00:44:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235587AbiAPQUC (ORCPT + 99 others); Sun, 16 Jan 2022 11:20:02 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:53869 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232279AbiAPQUB (ORCPT ); Sun, 16 Jan 2022 11:20:01 -0500 Received: from mail-wm1-f44.google.com ([209.85.128.44]) by mrelayeu.kundenserver.de (mreue012 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MK5BG-1mt7ZZ2yII-00LVJU; Sun, 16 Jan 2022 17:19:59 +0100 Received: by mail-wm1-f44.google.com with SMTP id d187-20020a1c1dc4000000b003474b4b7ebcso17092231wmd.5; Sun, 16 Jan 2022 08:19:59 -0800 (PST) X-Gm-Message-State: AOAM531RozIZHsAFI5VdAvCW2ptj0agn0wZcVzCK8YSxvBeFsChcXmx2 kTg6pHuMpx7PWTwCt6WYuivJYap0LTMxNSvbK5U= X-Received: by 2002:a05:600c:5c1:: with SMTP id p1mr23740237wmd.1.1642349999360; Sun, 16 Jan 2022 08:19:59 -0800 (PST) MIME-Version: 1.0 References: <20220115193245.3777833-1-laurent@vivier.eu> <20220115193245.3777833-4-laurent@vivier.eu> <77e747de-c7d6-314d-e0b0-58852d463326@vivier.eu> In-Reply-To: <77e747de-c7d6-314d-e0b0-58852d463326@vivier.eu> From: Arnd Bergmann Date: Sun, 16 Jan 2022 17:19:43 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v8 3/4] clocksource/drivers: Add a goldfish-timer clocksource To: Laurent Vivier Cc: Arnd Bergmann , Linux Kernel Mailing List , John Stultz , linux-rtc@vger.kernel.org, Jiaxun Yang , Daniel Lezcano , Thomas Gleixner , Alessandro Zummo , Alexandre Belloni , Stephen Boyd , Geert Uytterhoeven , linux-m68k Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:bThAav2QClU2G8a4VqvDbdC7de32a8IVLrelQESCHmeQjbSLhUj pgzKAzKuhznJp4iR70zztH7hqKuLV4WG2pbQB+KyMhjbvGIRkh33vdizgGaFQU/LFgJNhTJ RHGZetorKATZCv865TdUJZoAPz10ZxbwXIf1UOjDOIUjjmXKTRq1MZUjjxmxJxT9YB558cU pGO4H7hvHDQ4In3U6SQOg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:GsuQMbQxaAQ=:6+LJzRMiLXZF0auSsX8SEM MLG9fkQZT+uzptLgd27Z6+Tk6POLO144shBEmlig0IaK+982IGiD/vTBgRYEeIYL1X9cGoDZ7 /T1uHAHO2z8OdTEDPumbealgUyGPudLt/SBhDSMn5S7RggfbW/k9kiAzir1kuFDCRLMUmAZlK 1ZdP1S3qMCDCQRo4sAmRMtuDgMIF7mF8ekho1ujiMuAcDsKtB8RsVtLEe2alRYTDuUAEEW3B+ Og90QGYSXJGSDiPSS+AzGArG8vHds1rcwz6BbKVDUg8mA/AdQZfpZ8VLVw0WnjbeZOKF+0ypj JgP0pI6yAlZSwA9t6ZeF/cQrmPgrenk++eCnlK+CD/ZJhX9ZaMijCnVZ1Ly9Q6nU/VCJ4vMro /zdhzKEzGDsDO/zsY90bcDVHzJl0ctPZvajREIgUUxKC3tVgXN+kG0UDvdLjsCrH4Lz8K6LQG 6eo0vDnGXAEMT3q2+LjEhLVLas6T8ESv1PkrSYo/ciX3IuHmI7wASI4dsqUTfJVBmGO7Qf2dh qS8eCGzYdEULU4s2tbfADKP8YILsGw2UH/tj6bSvTXuqu/ZZnyVUUsGwjQDieQelfyFrHH9fM eMRolJMPuzyRLe/zTvI09FoGV51Hw7tfjRSbcwyi64BegguroYZ2zu0nT43q2avq8shy3806Z 6F5TbM5qrlfePvjRfsWe9QDeEC6Xai0dfqgJLOSgevwye1kC363JL76OQohsjjz3RbtdhAMPZ czQhkH4diTUNQ9D/v5ITwPWKeWwWOYoyiRNRzBsvZjdc2mN+ROo5HTjbvKSbUJex+IjWV8zcK CCrm/tZhCjd2J3sxyKdQGn/yj4UiiHLsoKPdK+OTDNOeCmxt1k= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 16, 2022 at 12:54 PM Laurent Vivier wrote: > > Virtio has exactly the same problem in the past (prio to v1.0), and it uses __LITTLE_ENDIAN in > virtio_legacy_is_little_endian() to know the endianness of the device. Right, that was my point, let's not duplicate the bug from pre-standard virtio. > So the code can become: > > #ifdef __LITTLE_ENDIAN > #define goldfish_ioread32 ioread32 > #define goldfish_iowrite32 iowrite32 > #else > #define goldfish_ioread32 ioread32be > #define goldfish_iowrite32 iowrite32be > #endif This is exactly the same as what you had before, it continues to break when host and guest disagree on the endianess. > What do you prefer: CONFIG_M68K or __LITTLE_ENDIAN? Checking for CONFIG_M68K at least has a chance of working, provided that all existing qemu implementations agree on the semantics here. Arnd