Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2459941pxb; Sun, 16 Jan 2022 21:37:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJylvwOIhPO9jK+fPtwyTuwCBaK72Gc8nelT9sAAXkBBbouz8VEip0WbFGSxMNWVyRZ8jziU X-Received: by 2002:a17:902:da8a:b0:14a:921e:54d0 with SMTP id j10-20020a170902da8a00b0014a921e54d0mr12781902plx.55.1642397854177; Sun, 16 Jan 2022 21:37:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642397854; cv=none; d=google.com; s=arc-20160816; b=YxH7X+MaGwx6wVft2sKfW6ZIw3do46wk+Twzuhd3kRWvVK5YCtDJ6HDjks9JETDt9u BDiEC2UuS0cuxIVKAsRgJysghGdC/UW3aBv5i0F4+oHK97etXFwEdsAvSvzx//FVyfoK 2bs8ScjVgaqssRVAUA3XHfWtGB7Ipj4GS+ovAdv/WgcvtWU1PAYioCkoBzMjJ5zFiBqo fxXjZa1JoMkd2OaD/xFkG7UAyTxjuC+s3eiqBHpFp76uzBBkVwiR6AQpeR3x+ia4qoJL 0FvRndr5Q/TZm5aMlhYAs4Dp1E1lWlSvcRmMgTRhjNt/91QQ/KS8qw5owKtbem0Fxplm MXwA== 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=53hVoxSzu9ZDRX+aUFhOOHNWNJoR4jsIlAWMxOKviUY=; b=RY9HscTB7GuKWe4Fz91/VLvbF4i1XzJyVvcrGW4CIACc5tLqqFnuaMOMi6m0eKmlFo FifumDPw8Cr+yQYmuJUJmzM4s4kGA3vDz52GIzqXBAU5pzigOTS/jY1l6jAi8JlOp2ea Io2X6fxnci901IlngxUSoMkpiLjl1wl0awcVrsh8aY5Eigsb0ZS4grtib+/0A1ZxMhb4 I/m6q1ChZ42TpPGY4EWqeOExWgqFfMDgXJNCPB2lo1c5RfrNqP1wH4RcgO9sanmCGvbK MSPsyzRk3xPk1FvIA08+Hfup8C3gGCO7hS+nPjPD3DDefmfCKSERxM125RtUt0CAElKL wd4A== 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 x5si13476196pgx.20.2022.01.16.21.37.22; Sun, 16 Jan 2022 21:37:34 -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 S234851AbiAPKov (ORCPT + 99 others); Sun, 16 Jan 2022 05:44:51 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:48663 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234844AbiAPKor (ORCPT ); Sun, 16 Jan 2022 05:44:47 -0500 Received: from mail-ot1-f49.google.com ([209.85.210.49]) by mrelayeu.kundenserver.de (mreue106 [213.165.67.113]) with ESMTPSA (Nemesis) id 1Mw8cU-1mJ8pN3NlU-00s9Pb; Sun, 16 Jan 2022 11:44:46 +0100 Received: by mail-ot1-f49.google.com with SMTP id t4-20020a05683022e400b00591aaf48277so16004756otc.13; Sun, 16 Jan 2022 02:44:45 -0800 (PST) X-Gm-Message-State: AOAM530Hygi5EFzM6NBfDRVYrrnrU38e+O9R0FY1sm8W79uS07nXAWGf qQ8T6m8Ja1D9qAOylpE3MyCWjNp3n/DfniqPkNU= X-Received: by 2002:a9d:c61:: with SMTP id 88mr9417588otr.119.1642329884423; Sun, 16 Jan 2022 02:44:44 -0800 (PST) MIME-Version: 1.0 References: <20220115193245.3777833-1-laurent@vivier.eu> <20220115193245.3777833-4-laurent@vivier.eu> In-Reply-To: <20220115193245.3777833-4-laurent@vivier.eu> From: Arnd Bergmann Date: Sun, 16 Jan 2022 11:44:28 +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: 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 , Arnd Bergmann , linux-m68k Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:/zxqABAkP/uHnTARIqKoj96JMUdcRt8d0RFEaRfSXKNkyCJC+Jp JwMgstSxkp6tkhCmTXzZH/MKk0lfeYxpwwxFCdyWTgyGYTTx7lfvM8asSPEaLIFyNP0GI4P 6c2CqRYXNKaHfL8hnBA1uaikEYntcJhwBCHekvF25Pv5C9g4Suky100r8/d+P28IzIed4nX fBynf6UYmvt+30c/UWgwA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:5xefTgbJKy8=:hZpr/e2pQ7j06kl4NJrUBz HKso0/p6kafDwG5PdyApI0+DXORtR5wT6IhLZCQIxfRXgQoVczwAKJr6Gp/95xgDy6FPlJWbv rrylmPWyxVwrs35loHhyyewDdKTqT8eB++BTEkrY+/DMyOHqkMW8I6SwQkfPouZiushlB/a6t rE1KZjr4D8hIma2l201buNrIF52rkLy6dD5rMLsllWiMv/d1ZU4ugVFdFO9qI8pjeVEPbJIHb G0gnlwMM8za4BU4q7KwoZbpuTvU/7OJCC5soyZVT8J+qvlntk6deRFCcXbkgfFpgQd3S/c+YR vFGPLtYE6whhQtDTLYJZ+OAYZpjsDOIKes8vTHNwgdMblN9zEW75C7AJvkQTkXpwAt6soK673 RUnupj51Z16diIMoQcaEQgJhlfvzI/qjh+ce4CxFA9VUFJXLti0jYEw2FWw6s4u/q6lzQsO2J OdwWAxFVyb+hwcqmGwlI4BV5Dy6bZO9Pnz2rPX/92SBY04ysobbmic1P3VboQlPi5ekHyJcfk ON9fb5E49zOvFVKUCTKBx94gwt9bXbnyOEs84hVEcJeyUk709Xcjx5HUO2HpkFpROhNmndq3t OPIGSH7tvt+ia6DthsWvhRn8r49ma0w1++bT1KFpLl/EQSBOn9KfPnhqGZhKk14pdgzOkr2Nc ZqYUW0NYsiadkM8RUVlf2CrgnHLQ+pDLZiZOQQmW0TvTKBTZXVOzjPQ4geZq87T0UzRM= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 15, 2022 at 8:32 PM Laurent Vivier wrote: > + > +/* goldfish endianness depends on CPU endianness */ > +#ifdef CONFIG_CPU_BIG_ENDIAN > +#define goldfish_ioread32 ioread32be > +#define goldfish_iowrite32 iowrite32be > +#else > +#define goldfish_ioread32 ioread32 > +#define goldfish_iowrite32 iowrite32 > +#endif This is not what I meant here, as you are breaking big-endian support for all other architectures in the process. On architectures that support both big-endian and little-endian kernels, devices (including emulated ones) can't know which type of kernel you are running, so this has to be fixed by architecture. Ideally this macro should be in an architecture specific header file, but you can also just make this a check for m68k and hope that qemu doesn't duplicate this bug on architectures that gain support for this driver in the future. Arnd