Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4392299imm; Tue, 7 Aug 2018 00:20:20 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdCZiUG2uzNDd+i9ULLOMN5qfGdChP7y6y8jVxgoHJVw+wHwPYbACAidnrIbkVlvtvXH3w7 X-Received: by 2002:a62:cc4d:: with SMTP id a74-v6mr20646756pfg.200.1533626420588; Tue, 07 Aug 2018 00:20:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533626420; cv=none; d=google.com; s=arc-20160816; b=lNVbyFDIf9tHuiqRb4JAbQLKdG9RTwMPqdPNkaT/I1czSN/iqRXhEH9pKJ2y0QPykw Q715wUA5FCz1GT1wKiT22zVx2+pHuCgg0zyZx/BL/cX66Yo443jcL3wvSB28jpZ5AAOx pBy7fK0UyEdtzorT2tzFYZt1kIgIOoffzxIReNtc/P3/FijzmrzE7Sr/IpvyWzunKXpu Qgc2R88NKFxbVbf0SfQFJhIPjH1ngfwIzvQ+hhOBSmZaJk901ejsr5AIZaLDUYIXSVDj TS0qzA5EhaO+fklf75pbcV7aDp3nKaQ3HwFh2vPda10urrN0xrQh44EprPFuoWqz0mlv ktSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:arc-authentication-results; bh=SumyTBGH8K1Xjm7Z0VbM9PbejuoGgKKJcevjU7PXX14=; b=nVGuh2KmB0h9MDlIwPKBoBLB00dwLmAe2jTQetk77MyXVLhgbqP9zewyrTQZY6m6aa qFT0cjFmChoKxLF5s7BZqLEOccB6xZEkvqE7zthV+nVTDpw7QWBFA/p3Q+grfzKXX310 oEerWhsG4ptRBnwy7/jgh1F9RkKWkyyULiot1GPn4KbKRbmdhJXmQkmYodNXC1Y2pJjx kJeLm3P42AOB0zuJa0ioDqaKNLlAKUJHqUDeTri4SIk4uCU+vBdWHAjyH/+JCYl9GTut OW8oprNNxI9Jy594G8hZKrjKDw5avmw7F8c8wHvtpXof+N8BrJv6UavKMPfqPNCScvmL /H7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w186-v6si618292pgw.355.2018.08.07.00.20.06; Tue, 07 Aug 2018 00:20:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388729AbeHGJbc (ORCPT + 99 others); Tue, 7 Aug 2018 05:31:32 -0400 Received: from ozlabs.org ([203.11.71.1]:38485 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727360AbeHGJbc (ORCPT ); Tue, 7 Aug 2018 05:31:32 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 41l5Tg6sZ1z9ryt; Tue, 7 Aug 2018 17:18:31 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au From: Michael Ellerman To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , npiggin@gmail.com Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH 1/3] powerpc: make CPU selection logic generic in Makefile In-Reply-To: <273f8ed3e980b9385c6e1b31e17f890ea08ce33c.1528365638.git.christophe.leroy@c-s.fr> References: <273f8ed3e980b9385c6e1b31e17f890ea08ce33c.1528365638.git.christophe.leroy@c-s.fr> Date: Tue, 07 Aug 2018 17:18:31 +1000 Message-ID: <874lg6d4qg.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christophe Leroy writes: > At the time being, when adding a new CPU for selection, both > Kconfig.cputype and Makefile have to be modified. > > This patch moves into Kconfig.cputype the name of the CPU to me > passed to the -mcpu= argument. > > Signed-off-by: Christophe Leroy > --- > arch/powerpc/Makefile | 8 +------- > arch/powerpc/platforms/Kconfig.cputype | 15 +++++++++++++++ > 2 files changed, 16 insertions(+), 7 deletions(-) > > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile > index 9704ab360d39..9a5642552abc 100644 > --- a/arch/powerpc/Makefile > +++ b/arch/powerpc/Makefile > @@ -175,13 +175,7 @@ ifdef CONFIG_MPROFILE_KERNEL > endif > endif > > -CFLAGS-$(CONFIG_CELL_CPU) += $(call cc-option,-mcpu=cell) > -CFLAGS-$(CONFIG_POWER5_CPU) += $(call cc-option,-mcpu=power5) > -CFLAGS-$(CONFIG_POWER6_CPU) += $(call cc-option,-mcpu=power6) > -CFLAGS-$(CONFIG_POWER7_CPU) += $(call cc-option,-mcpu=power7) > -CFLAGS-$(CONFIG_POWER8_CPU) += $(call cc-option,-mcpu=power8) > -CFLAGS-$(CONFIG_POWER9_CPU) += $(call cc-option,-mcpu=power9) > -CFLAGS-$(CONFIG_PPC_8xx) += $(call cc-option,-mcpu=860) > +CFLAGS-$(CONFIG_SPECIAL_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_SPECIAL_CPU)) This looks good. I'll rename it from "SPECIAL_CPU" to "TARGET_CPU" because that's the terminology used in the GCC docs, eg: -mcpu=name Specify the name of the target processor, optionally suffixed by one or more feature modifiers. cheers