Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2459976pxb; Sun, 16 Jan 2022 21:37:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJzIDXjwWc5s9/Fhwlyq4bVwTXThbGVrtNR1sByWw6B/+KaV6UUnbFynJzEmwosfsIbPyWOM X-Received: by 2002:a17:902:8b8b:b0:149:6d32:4b4c with SMTP id ay11-20020a1709028b8b00b001496d324b4cmr21305857plb.8.1642397858737; Sun, 16 Jan 2022 21:37:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642397858; cv=none; d=google.com; s=arc-20160816; b=Uou4sskkAUv+ov7l1H9Df+XuoO/ZU2gXWQBdPW4ZkTSP837YAavZIfuz+YsDFPdz0Z Mx9zOe7B97ZaQGNnwd84rZQF79YQtB05KaM0cboIuwSmhocYIkXDB99hxYIHVyH9bDa9 0sOr6OAECmr6cTu9cxX0syimma4xKxVHIEO3hXBkzR1xOYb+PlZfqUV5X6/WatmteOlF vVMtfkEexLgvS0HiZCharH+Vf8RaD0n3LDARakiu9mvf7EuobUcLR/8PZLk6wM7LdP7H qZm0nI1m+Gk1+2Uv7viDRTRPt9OAkR1aPVy4o1vKswd4lUj6jdAIxn6DCMhBTkGEMJF4 cpQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id; bh=wz6JMTzXksEYvD9Ud4imB16bI7B8q3LVmbnkqI7p06I=; b=f6c0yjAa19x1D2rN5vplvVrYrSfz5lQp4P/alC2H+5gmNetlGQWlBJr/bs/YVXPie2 sAx5U93bVGLcIM/QjyT+P6JHFgpYX0ID1UXFe+ccadToZRftVQ9Qog4QKB7LFqCIH2U2 BqFSKBmQ5Qz+yE45YTfN+ucfQcZ2rzL5+BWZIQ3MDPDRkhGV8CoMnz08o8yRDnE+DTH9 NKVhqGk7ZUbxcV14ug5MNnj0f7Un36a/pnrzvvTMAdHnPJJc036M+fQMmx8/olMLcLV1 bBXGfksW7uZExGEu4/UVGp8Uf4N/+tGiHd2wK7K2YNJR2/JLU8d8Qw6iCBl29SOjTtrH d/xA== 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 z13si3339503pgu.101.2022.01.16.21.37.26; Sun, 16 Jan 2022 21:37:38 -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 S234852AbiAPK4Y (ORCPT + 99 others); Sun, 16 Jan 2022 05:56:24 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:38259 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231880AbiAPK4X (ORCPT ); Sun, 16 Jan 2022 05:56:23 -0500 Received: from [192.168.100.1] ([82.142.13.186]) by mrelayeu.kundenserver.de (mreue109 [213.165.67.119]) with ESMTPSA (Nemesis) id 1M4JeB-1n8m5I1jM1-000H4F; Sun, 16 Jan 2022 11:55:53 +0100 Message-ID: Date: Sun, 16 Jan 2022 11:55:51 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Content-Language: fr To: Arnd Bergmann 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 , linux-m68k References: <20220115193245.3777833-1-laurent@vivier.eu> <20220115193245.3777833-4-laurent@vivier.eu> From: Laurent Vivier Subject: Re: [PATCH v8 3/4] clocksource/drivers: Add a goldfish-timer clocksource In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:yAYh0kBjspao1FPwwjQFzrwNjusPh/NSMML6K9oI88CPco9mgv5 /c8hmxM+3/XybS+hh03Ui/WlejayL6CdpHYzvpCKfRB9BxeoSYxVU4d41QVwqqjO40oIWMX LGXKZfyN+s7/DnfuMHJTiwphZjQhqhivF5X6/ZBJLhkPycOrqeIKThXMI/4d6rZVZDh3IZi Pa1QcqOawYI+vk/hNl2Xg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:EHN11PVMIiQ=:NgaScoTv6k50lOY3vSUuKE 2SDTBwmugBTj1+vfwjT4agENBu+zhw6njZ13A12VeJkrJo+Nhrv/uU1lG+Fd74kRDif08WhRL PDpWTQ/S779u7VSpF8GzqKoycSt9jodI4dbSzWZhyZIf4L6elDPcZQ31VKS0sq1Dvc3ujsrsC lqdGQLB1/gdZRdpQCSgyEIfdYrb6mY+SrgIaEQ2AdsqCBHZXpmUb/lnpGqT+sdaHBPLQz7vIr 2HCJG6KsSWkdR/D9wxoIqPXlMHQ+2vpHXdLp9WO+of4UQOj8Wtyr/It2jMcczZCYtcc5wOniQ 2ECziwxaXkg+deAJcqBdVa78EvKOeD7i9Lnv5MF0YjbLCo9lVx4sCwfStV1xgurGkv/GXqbA+ YlH9hUitG05TfBqyBBIYfSS2bMGG4UcTGB7leofpk1ZhhAaLzm5V5Nrh5THMgaxvX169K/noP v55JrmFImKf/AMwGXJkmr+YOTPtjU8kBT7sWpDqtJFpqlqFrgCLDzSlRp+/lD+LBbhAGXooLd YWSdgFE4hTdWym1PUl7UpFjRzPPV2VYyiCWuE4EiRMCRB52ozEax/6jHFrhDharRE2x11DkBY DilHdwTxvVdmGMPnl8w9Xhy5BaQeXoGWF96T+qOtskO09E8fGd0ptb0A7B0/qtMM8mu8g9aZE s6yQG2AbtQeeH4v5t+m50DEMnedvLpLpDypZDXuekkyEXxaLrwYmZL6lQ0zYQdwfl4Sc= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 16/01/2022 à 11:44, Arnd Bergmann a écrit : > 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. > Is it OK if I replace "CONFIG_CPU_BIG_ENDIAN" by "CONFIG_M68K" as M68K is the only big-endian architecture using goldfish? Thanks, Laurent