Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2670444pxf; Sun, 14 Mar 2021 07:43:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1K90moe/FEXB95N8NmKYpuJS6GrpAu7QQrf0q5jgawGynun08Eu8MUswbH3LceIPcTkJ4 X-Received: by 2002:a17:906:ecaa:: with SMTP id qh10mr19005045ejb.425.1615732996082; Sun, 14 Mar 2021 07:43:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615732996; cv=none; d=google.com; s=arc-20160816; b=cp/tK/r/jfpa2gJ1k0Jd7HRdiwFUzzHRwzkDMnIpowxLqgO4wSByVwp0Urk8c9xyCN AKTaHiMnDux0szXUUWpOk3HRfEaLnSXqQ+c31OHv4ibcljbZvqmtbBdQ3N/afCtf35Ij YDvZOG4BCsFasURLuaNLWAOFapbuduFm5OBbkG2pooW6nJ65+EQSWgCrXrrMzH40PehA 33CWazt/grPlUBOG15xo5cr9cV5NXu2k00+gBNxUl6tg5ffCuo9/X0qISujVEetnSt2y /P8HvhALbnU8rnzxuYutLE+R/nQEYNJc5mBAeo3R/FyMFybPltbaolJJsU2TdISOGpRS C67A== 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:dkim-signature; bh=bqQ7BWzs0leRC0mvm+I19KmZ7oC1YUe+0V+fLsVPHow=; b=ZmWnnweFUhHsBwR+qnpHrbPdkCJPHwfN7fThBKcAlycq43pMslhBh8bHEN9g/jb9dc bWchZwkVjseNnOl34kWzF6l/u5xVlud+5gbQO+GW6P6h6IvYttCyj8cgi4abzdPZujm+ DdXJ7NIoh9IX07Cqq+/f9whp6no/kjeUyfGy8YKHMI4iKxTKd48EuwQVLYW+E7yXe5/A M8hfeR7aZeZ5WGWuX7BbCrWzX/z2I3MxnL3FWGnR+8baQ4t5uEEs11tL9eIvgVl6JanB mrqIj72iKlxjOnMdShcNAQS+i8syIg8b8WKG4ZKBlQCtAlD4KeYfgNex60c+xK7MkOUG GCOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CSqz1Z+q; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ce13si9017382edb.43.2021.03.14.07.42.17; Sun, 14 Mar 2021 07:43:16 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CSqz1Z+q; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230441AbhCNOdz (ORCPT + 99 others); Sun, 14 Mar 2021 10:33:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbhCNOdl (ORCPT ); Sun, 14 Mar 2021 10:33:41 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A7C0C061574 for ; Sun, 14 Mar 2021 07:33:41 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id ox4so46380310ejb.11 for ; Sun, 14 Mar 2021 07:33:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bqQ7BWzs0leRC0mvm+I19KmZ7oC1YUe+0V+fLsVPHow=; b=CSqz1Z+qhr2AFvmFjC2pnfSPNn4YcayScF73cKhnFjoiESI4H+ihCQr9X4JAk2tHvh HwvYxw0zVuF2286U4yb7e/rNkfPyyh5jcp+cQXpRZ/Dqd4SWK6NFvptIiI7zTfKtuFSk 91zBhOilifSO/aMEbkC5KrLlv35RcCH/KoSyNgKN2G+jmU+PzVoRbaYUnNwA/1J/AoIg nFmZUCe/wSecZ1ehh9TB5ZbCEzzOMlyNgjILB3/+sXGd2yxJRtu58oEBoSiKbp2oUHRh jdrKaT0mSuM1TxK/rh0KtrIrT4teSq3cE1RNoIKThzY/lenYGrZndZJnABo1CA5D1zy6 bwLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bqQ7BWzs0leRC0mvm+I19KmZ7oC1YUe+0V+fLsVPHow=; b=Wcpccem09VKlhhZSNNujE9h9JX7Lm2egLQtyOn0sV6fqW7HnQgIM2zmqJWeKaVO2/z LYDBYR7Fd+v66E56xh50L9YgRoSE6jOW9vV+WO54Rjmbat0lLUCBFHYAi66EArsk0UvG a1krFr1P2eCTB9M9oiDbrt+bwuQGV77Llu34N9ALWpen7Ov/vGCDhTcWRdD8XbBFwaOj A7i2oxHeflC3k056NonG9ZbfNIZLOVdnhFIGA2EppREdNMPZLOKrck1M4vLL84NecYSC gdF4MGZtzSwnM/0O0WjArAcyykYhPWIPkxGH2bgheVojMqKMuulhczQ4h0T662LgqkPO IHfg== X-Gm-Message-State: AOAM53243FYAN7/cJHDuvlbSXlfYwyI31siY+9lGk6UjPoBbRqqtuC9C SRu202Whw4ptlyM7V2lhaDd7TBNhuAnxhgD3ZRw= X-Received: by 2002:a17:906:7150:: with SMTP id z16mr18515701ejj.103.1615732419947; Sun, 14 Mar 2021 07:33:39 -0700 (PDT) MIME-Version: 1.0 References: <20210313122342.69995-1-masahiroy@kernel.org> In-Reply-To: <20210313122342.69995-1-masahiroy@kernel.org> From: Max Filippov Date: Sun, 14 Mar 2021 07:33:28 -0700 Message-ID: Subject: Re: [PATCH v2 1/2] xtensa: move CONFIG_CPU_*_ENDIAN defines to Kconfig To: Masahiro Yamada Cc: Chris Zankel , "open list:TENSILICA XTENSA PORT (xtensa)" , Nick Desaulniers , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 13, 2021 at 4:24 AM Masahiro Yamada wrote: > > Move the definition of CONFIG_CPU_*_ENDIAN to Kconfig, the best place > for CONFIG options. > > I slightly simplified the test code. You can use the -P option to suppress > linemarker generation. The grep command is unneeded. > > $ echo __XTENSA_EB__ | xtensa-linux-gcc -E - > # 1 "" > # 1 "" > # 1 "" > # 1 "" > 1 > > $ echo __XTENSA_EB__ | xtensa-linux-gcc -E -P - > 1 > > Signed-off-by: Masahiro Yamada > --- > > Changes in v2: > - more cleanups > > arch/xtensa/Kconfig | 6 ++++++ > arch/xtensa/Makefile | 9 +-------- > arch/xtensa/boot/Makefile | 4 ---- > arch/xtensa/boot/boot-elf/Makefile | 6 +----- > arch/xtensa/boot/boot-redboot/Makefile | 6 +----- > 5 files changed, 9 insertions(+), 22 deletions(-) Thanks. I've made one change and applied both patches to my xtensa tree. [...] > diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile > index cf0940708702..f43c731dec89 100644 > --- a/arch/xtensa/Makefile > +++ b/arch/xtensa/Makefile > @@ -52,14 +52,7 @@ ifneq ($(CONFIG_LD_NO_RELAX),) > KBUILD_LDFLAGS := --no-relax > endif > > -ifeq ($(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#"),1) > -CHECKFLAGS += -D__XTENSA_EB__ > -KBUILD_CPPFLAGS += -DCONFIG_CPU_BIG_ENDIAN > -endif > -ifeq ($(shell echo __XTENSA_EL__ | $(CC) -E - | grep -v "\#"),1) > -CHECKFLAGS += -D__XTENSA_EL__ > -KBUILD_CPPFLAGS += -DCONFIG_CPU_LITTLE_ENDIAN > -endif > +CHECKFLAGS += -D $(if $(CONFIG_CPU_BIG_ENDIAN),__XTENSA_EB__,__XTENSA_EL__) I've removed the space between -D and the $(if ...) to make the result look like the rest of -D options. -- Thanks. -- Max