Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5674269yba; Thu, 11 Apr 2019 03:21:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqxIl2keLHhgjLgGQD9V6VykK6J/myziDcjIrtIFlEp6BvFx/P/frbs2tv2Mb5e78/evzVz8 X-Received: by 2002:a63:6786:: with SMTP id b128mr46605127pgc.318.1554978116752; Thu, 11 Apr 2019 03:21:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554978116; cv=none; d=google.com; s=arc-20160816; b=kWY1Dv1xD/5Dhpq+r9LJ2Ml6wnizj+fEfG4xyZqdYe3/7rdRwLSiYCo9TheGyw1Pk5 SgSoVlueVuAWBf8XjY51vS3L9M7bot3sFIAdlbrguz59p1U8FYctREAReVQB0h00Ieu+ xxh8FdpRjNAv/VXzvAb7NWHi+bJm5c0kxYymnr3Q8dI5ReELera6iAcnKc8yFod+UK+g vrheAyi+fVPClydJqS4dq20DkEsy9XLssyHRjt79d6pjO7PIj6llIEvjt/nirfNKuXOZ fi+gSvQ6w5IKgt69H0Rz9imhsbwTJIEO4usrNsRob+iIVp28NhdC7uH2VHelM7T+TqFU 5J7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=yQGHOSC48OIUpGf1QtgmfsbHYfMuFfaHHgjPohpbRRg=; b=Yu35n969E2BCPqwoArtUbMnAmtaEt+AxyJgE+txcTk3LQTPchPnG9ceey6H+ZMz2D1 aHuJp9r8rDRk4e5DCuFCSXbQXksKfC6GF3lfXRX89iyG+5D8RjWXu4xVXqWa330lz24b brei3j6cnjVIHqK+KfGz/acH4Oa29DvDVZZqplxOPNOy2gMJVXsfBZbevSdRNTonU3nA 76L+a46Nqg0Xv9ir8COKMXDyppdsS62MbL2XVUobXrEgpUg+1COq79MDrV9wVR1LiND7 Ij7MjLHZnfIzGsj2J7QSdA+Y2AqMdRTpxskrCrQ0CyeGLI5rYIkUpkwr3ErJJI+TZirj v9Gw== 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 k190si12730847pgd.432.2019.04.11.03.21.40; Thu, 11 Apr 2019 03:21:56 -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 S1726666AbfDKKTg (ORCPT + 99 others); Thu, 11 Apr 2019 06:19:36 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:34409 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726026AbfDKKTf (ORCPT ); Thu, 11 Apr 2019 06:19:35 -0400 Received: by mail-qt1-f196.google.com with SMTP id k2so6426022qtm.1; Thu, 11 Apr 2019 03:19:35 -0700 (PDT) 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=yQGHOSC48OIUpGf1QtgmfsbHYfMuFfaHHgjPohpbRRg=; b=hZKP41bqrONwWzBMj022gRZfDburthbgrgyyZ950T7WNrR45casrRI+zdJvf/JPtfK d9PpMt8Ct79Gs6dYtMiZmqEbfIo4IfaiBuF246bPofZ2c0ra0JNd4HTOshpBpv3Yfs0N 9vVUBRYp6GS1sJLNT5A6f66+iz159q8iwi4+rlnpJOvwla5WPBEG4ZiubzBeufCwVCgp XlGSUUlOiazUzSMVoZMkf8w2Dy368KAQgIZXTeyID4bxaV9ej9rcVgVOdmRig5oZ4jJq UyIqtLwLlng1aDmWnSjSElDJikP0YkjaScuRIWyugFhroZy2lwFnGlUp2MF1J1qmTC8x 7byA== X-Gm-Message-State: APjAAAWKu0tojJBiNDq9/4LKklBCK1Cfn2LRPIOU2fP40YEHGG3xkFMO X9M1CjV3TWZsFdF5zHjdncEeDW7HYBBwiVOwuzE= X-Received: by 2002:a0c:f68a:: with SMTP id p10mr40148054qvn.126.1554977974611; Thu, 11 Apr 2019 03:19:34 -0700 (PDT) MIME-Version: 1.0 References: <20190410201300.3528984-1-arnd@arndb.de> <20190411062349.GB4126@osiris> In-Reply-To: <20190411062349.GB4126@osiris> From: Arnd Bergmann Date: Thu, 11 Apr 2019 12:19:18 +0200 Message-ID: Subject: Re: [PATCH 1/2] s390: only build for new CPUs with clang To: Heiko Carstens Cc: Martin Schwidefsky , Vasily Gorbik , clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , linux-s390 , Masahiro Yamada , Philipp Rudo , Tony Krowiak , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 11, 2019 at 8:24 AM Heiko Carstens wrote: > > On Wed, Apr 10, 2019 at 10:12:40PM +0200, Arnd Bergmann wrote: > > llvm does does not understand -march=z9-109 and older target > > specifiers, so disable the respective Kconfig settings and > > the logic to make the boot code work on old systems when > > building with clang. > > > > Signed-off-by: Arnd Bergmann > > --- > > arch/s390/Kconfig | 6 ++++++ > > arch/s390/boot/Makefile | 2 ++ > > 2 files changed, 8 insertions(+) > ... > > diff --git a/arch/s390/boot/Makefile b/arch/s390/boot/Makefile > > index c844eaf24ed7..953a74d04990 100644 > > --- a/arch/s390/boot/Makefile > > +++ b/arch/s390/boot/Makefile > > @@ -11,6 +11,7 @@ KASAN_SANITIZE := n > > KBUILD_AFLAGS := $(KBUILD_AFLAGS_DECOMPRESSOR) > > KBUILD_CFLAGS := $(KBUILD_CFLAGS_DECOMPRESSOR) > > > > +ifndef CONFIG_CC_IS_CLANG > > # > > # Use -march=z900 for als.c to be able to print an error > > # message if the kernel is started on a machine which is too old > > @@ -25,6 +26,7 @@ CFLAGS_als.o += -march=z900 > > CFLAGS_REMOVE_sclp_early_core.o += $(CC_FLAGS_MARCH) > > CFLAGS_sclp_early_core.o += -march=z900 > > endif > > +endif > > This contradicts the whole purpose of als.c - printing an error > message to the console if the kernel is compiled for a newer > architecture than it is running on (and therefore uses instructions > unknown to the current system). > If this can't be fixed/changed in clang, then it should be at least > changed to the lowest possible architecture. Ok, I'll do that. I originally did something like it, but then went back to the simpler workaround to just make it compile. Arnd