Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp138849lqz; Fri, 29 Mar 2024 11:03:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVm8Jnz5TOCsjRnXVJ0C4OzUMuDXn4I/FxW0zP3B1+hT6XUoyu9hcpPCAJTwtUiujwr+HIPYYxbjXgQQ6JoQwMPZfH8KVAcgW4uAFfOBQ== X-Google-Smtp-Source: AGHT+IHp9jqb5WyOY+bzdLldyPaC1bsj/2cwxfFmiWVHOfT3BxeNUkMfzUqlF3GO9X2idtlAavbZ X-Received: by 2002:a17:90a:4d86:b0:2a0:5880:bf01 with SMTP id m6-20020a17090a4d8600b002a05880bf01mr2863540pjh.28.1711735394109; Fri, 29 Mar 2024 11:03:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711735394; cv=pass; d=google.com; s=arc-20160816; b=0xFFFK8eqV0dTb+W/xWLj7gAbx93qqPiL9E4kgvVqOb3aYKlOz21dBNFPkOShCvkMN xpfz9fW0KvYAE6EXH6bE/ubDWS81Ud0TMTJh9BweLzba+bSYgX6QHV+2OYpV+gDEwnA5 Leswhi/8wUeiwpqgs2UbDMEXBCkHYIkNBJLLKFiIl063+ZP7E7Ys/MvxtvyOgC2RUqJ+ DjFvrDEBzqrP3WOW3Ps8tLzSdZNO2kHn/K3gBRaW2OAA4hMSfyEB2MYTyh6AyA2HKh/t qyKYRA1MQkIpVDzF7NIRJDZ3D51JyA8U11zvI16jgfgR0nlyNXVVTPqyRujnQhGbc+QZ rCCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=QdcMw9p8wYMiyXmXvRCHMMbWNQHaQ3aY6vG2uVIiJB8=; fh=tVKXAcoiGH1n5ptJ+e9sGqDobtYZdj7KFsOoeTEqSfA=; b=y1yfSI2m0HxPN/SfGsWwSeoORIgUJA9lmHuG7L8w5JaSw78hItyrsY0VTQVk9b6rsj VVj4F8pdYdLB1j5lL5fr8LJH9tcUcEhLZpfsEjiRdqsEJ1ArfShn0FntlMNnq08oj931 DpeU9Emb/7wWA1zUVjyERXM1XopwsXnGoUKEgBzUvPaQk/jLddIKFZydSDD7G60KVj8+ EQMcUrNRo0EOWMiFEd8P1hwaD5ZjTp1DFp0ue30wvMHcByw1JI2vHbobUZ2trt31JjKl L9NKjm+QP9ZTJDn7mQHiZMjvnOpW1ZNFXSOv0Xs1X6vidcpSmgdietbEs4M61AXcg/vQ 2h4g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=l1NnkLAV; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-125268-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125268-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id t17-20020a17090ad15100b002a08f6ef208si6028556pjw.27.2024.03.29.11.03.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 11:03:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125268-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=l1NnkLAV; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-125268-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125268-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 9F445B2277C for ; Fri, 29 Mar 2024 18:03:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 514F413777B; Fri, 29 Mar 2024 18:03:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="l1NnkLAV" Received: from mail-il1-f170.google.com (mail-il1-f170.google.com [209.85.166.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F179A52F79 for ; Fri, 29 Mar 2024 18:02:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711735381; cv=none; b=ki18wsgYX34HqueBEvMa0ZPGyxls7UJNwMYvMiPxWx3VYn+bRwxJctIw+/33/oRjxKYueQb+Pc1noE2IsI8iPicgG1W1w2nBzQK5asUuJXbXtHeskrvnxtosOw7uNzKCQjurqMHLhg4gzxb5dIaYazO0A91ygTbJGEdyOnHSZjg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711735381; c=relaxed/simple; bh=+S3hlEF4bZldPHqmLCThWpT6aoGahvI+J6fFNIlvYoo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=RpTpbIj6kV7N8a+sC6tWOJ/MUiLXj4d1CSWkFdUoSbvBvdC/6bWlCcHa3qBptzsEjWUEbBxsKEi1MnOw64dWQG/E2z3q5vm+qyFBfT0rgpWIxAMMfSLRsSpKdBVN0Hpm+gcV+ArNlhdrX3xRn4WCx5YVlvr1RivybWOjrnEKPt8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com; spf=pass smtp.mailfrom=sifive.com; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b=l1NnkLAV; arc=none smtp.client-ip=209.85.166.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-il1-f170.google.com with SMTP id e9e14a558f8ab-3666affcb59so8544725ab.2 for ; Fri, 29 Mar 2024 11:02:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1711735379; x=1712340179; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=QdcMw9p8wYMiyXmXvRCHMMbWNQHaQ3aY6vG2uVIiJB8=; b=l1NnkLAV8jpGHw8+yZzd6AWT6yP57DzKtKZX+GioxGIKexWlgIW0fhWfFb2cv4x/xH cNPzgK6ASnebgSbnHirtnFrN5pR2RlrryO9oZq5+rmfqvBCd2GSY082+KLpkCo6q05VB /q+4N0igCBX4IKPSGy43sr0HBa/ZJvZaW0cCnto1tH4+mvBLdaJcxd5r+gosgK4kX5Zz ISMgUToRYfB5k7+f4nIAZEOnJyZC/copoActlzd4P8bgRdAay8mt5VB/8ACwg+K25Jju PHFA8tnylcTeb7CxGWM3L8Z8+l9xuuKMFWqJosmZa+8fNU8n6uTGcYFg3mHH2OeuhAaP oLKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711735379; x=1712340179; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QdcMw9p8wYMiyXmXvRCHMMbWNQHaQ3aY6vG2uVIiJB8=; b=kDUFJ3mlr9+TNOTzU9EK5sLKA4zVldfJ1/SNm1ZHq+k1nTPHdfpb8rpJmr8mN20Gby EDeyZcbBSRGnxiYbF76QE5jkhtAdHN8bKTd80TDJEcgEzVHoFxWRWzK77+Ze3I01sJnG QQ5whnwi/IBxLm5YTXvzEvHcj3VMWCBxulHMoQiQyZzWNgoiAUzZw40fZidNBNlEcPFi 7CauGNovk20K7QNFr//UFXCMrRS/cXbo8XUkQqGhGCVMY/6WZVbDxY/dUm45s2NVQDZT C/Zt8c+LU0pjjPuaq1uJfj7AqTvb7s1/6qNqQ5X5eL3A2/JAyFAIYk7WlNUhL1PMzDct r6Cw== X-Gm-Message-State: AOJu0YxUESUEBQa5yWcOJs87674dgAFPxpNBUdCnqGkDuIHpIm7CcL7q zjU4zMn5mr7st6CqY3xFVNTUspEXd4a7wCh84KCdfnhjRbrTO8vb1r/BMgKt5ew= X-Received: by 2002:a92:ca4e:0:b0:366:ab6f:f6a with SMTP id q14-20020a92ca4e000000b00366ab6f0f6amr3003624ilo.24.1711735379197; Fri, 29 Mar 2024 11:02:59 -0700 (PDT) Received: from [100.64.0.1] ([170.85.6.190]) by smtp.gmail.com with ESMTPSA id k4-20020a056e021a8400b003689a9e5017sm1217549ilv.47.2024.03.29.11.02.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Mar 2024 11:02:58 -0700 (PDT) Message-ID: <0319d84e-ec4c-45a6-9edd-a606809371d8@sifive.com> Date: Fri, 29 Mar 2024 13:02:56 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 10/15] x86: Implement ARCH_HAS_KERNEL_FPU_SUPPORT To: Dave Hansen , Andrew Morton , x86@kernel.org Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, Christoph Hellwig , loongarch@lists.linux.dev, amd-gfx@lists.freedesktop.org, Borislav Petkov , Dave Hansen , Ingo Molnar , Thomas Gleixner , linux-arm-kernel@lists.infradead.org References: <20240329072441.591471-1-samuel.holland@sifive.com> <20240329072441.591471-11-samuel.holland@sifive.com> From: Samuel Holland Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2024-03-29 12:28 PM, Dave Hansen wrote: > On 3/29/24 00:18, Samuel Holland wrote: >> +# >> +# CFLAGS for compiling floating point code inside the kernel. >> +# >> +CC_FLAGS_FPU := -msse -msse2 >> +ifdef CONFIG_CC_IS_GCC >> +# Stack alignment mismatch, proceed with caution. >> +# GCC < 7.1 cannot compile code using `double` and -mpreferred-stack-boundary=3 >> +# (8B stack alignment). >> +# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 >> +# >> +# The "-msse" in the first argument is there so that the >> +# -mpreferred-stack-boundary=3 build error: >> +# >> +# -mpreferred-stack-boundary=3 is not between 4 and 12 >> +# >> +# can be triggered. Otherwise gcc doesn't complain. >> +CC_FLAGS_FPU += -mhard-float >> +CC_FLAGS_FPU += $(call cc-option,-msse -mpreferred-stack-boundary=3,-mpreferred-stack-boundary=4) >> +endif > > I was expecting to see this (now duplicate) hunk come _out_ of > lib/Makefile somewhere in the series. > > Did I miss that, or is there something keeping the duplicate there? This hunk is removed in patch 15/15, after the conversion of lib/test_fpu.c: https://lore.kernel.org/linux-kernel/20240329072441.591471-16-samuel.holland@sifive.com/ Regards, Samuel