From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="l1NnkLAV" 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-Google-Smtp-Source: AGHT+IFqMNmDL2GVO2cyYm+vIEEaj43NPiUKo2CRXyyGfQmLknY9TtLFDSxdZDVwWotlePg1wJz6nw== 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 636DCCD1283 for ; Fri, 29 Mar 2024 18:03:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5QmboRdvGgb6JELGDAPj+TgMYGfIflY9Plp3Wnv7TZQ=; b=H+nm+M13DOJzpd sgWiuQmOeavFwfJKTqO29mcVzn9yyXP1roBIdi17lKU8XryW2vGlh4qARXanVkxe/hIhUhkQhZgwL Ab78TTxqZm9oy3RdrHcY23qVs8fOrOKug9aSJ9V/Y5tgjkTNeSuZGWykxvaZbZSItL+ZyUbX+jueB QewmtJvEqbGXdat/F0MKmSWoXXwkwUMM1/5pv9tpnsFBgcB6+FQIT5aRhdWAOZbzpWFfPOU4ChBNe AllEH8FkbzzkAldrBtzBgZMw199yikwOzp2VODZLUCaiBKet9YIYj0OBKYZ4LwHcfSAvWR5Rojfg8 Q9BGY8Sh+cOy4t43G0mA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rqGZG-00000001YWi-3pKA; Fri, 29 Mar 2024 18:03:06 +0000 Received: from mail-il1-x136.google.com ([2607:f8b0:4864:20::136]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rqGZD-00000001YVf-1NGy for linux-riscv@lists.infradead.org; Fri, 29 Mar 2024 18:03:04 +0000 Received: by mail-il1-x136.google.com with SMTP id e9e14a558f8ab-36867dfe940so7463345ab.3 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=lists.infradead.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=lO2RcpYbiUUmJP8++XV/c4+r2rkGLedUW48LGVj9uCGQuZNMTYzR14ycuDZTpb82aK +LKWg2Nc1CUgH66Y9A6yLShRhi8OsmtSml64jSq+EKIVhrsB6TmmWQfqSuqb0NCkNbZc mk50XDvNqYEM++oURzXG+PT7RLliRpOXDxs1BeaYeVVpypKDUNwzhvIw5ij71KALt8bi dBUto9T4+LikeKra00P2Wx1METDnLlwJJKFiPg3KZqZ7gtRrlkP6KiLsnsJzeyDgy+Jv IoTAdwQJChQj6YCrlMm5fZirJKTmuqHrD7P5YJlG2qeHSN18ptKGaXV1yqFLxhqogY/K ig0g== 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=QOeNK5UYv2517iFbuboRBNxa0S6TtivOfh/UBQXg/BSGNyMpSQY7I/md2yJv6YKR8x c7J339ezzAoNnLux6ydQN3DbO4Do7SkYn91VLkD+wasG6yydfmbiS8vfR3zDvI4knqXm xGWNfroTM/emR1N0KWB6C5Snm8DBzY5SbyGNfGDZwhfVzn27kI0QeUkhicWtcTaPd1/M 0zrkYTRMxZwM9KzjyxZCIHQvaAi8eO8z9N8kzpOsLSO0TuBoOBdRjRydHO1f4klRktQt 22FkPlKM/Bujid6RU8LlMYaVYpEMW3JsvYMayVldsSOkDkOo939vNy2/KCUGyccLVqCp 2NKw== X-Forwarded-Encrypted: i=1; AJvYcCUCJ64sIovOXARKw9xGFYC3BYUXbV/JHo3R9JL1fzHnyHPbe/J0c9HxMry7OYJVF2Guvs3RMJQ0j35tkXJzyukLVe/sVz0HLBN0y+W0Q5Bu X-Gm-Message-State: AOJu0Yzcp5TGrpVCL6vWAafuD9jW+xzhivM8C29mZqCKERrKRChZg348 tXlJ447+sMUbg3y2/S5zOMkbOgaR+C82YR1+npQMw0nYFjUGjVfy0X60SptUnys= X-Google-Smtp-Source: AGHT+IFqMNmDL2GVO2cyYm+vIEEaj43NPiUKo2CRXyyGfQmLknY9TtLFDSxdZDVwWotlePg1wJz6nw== 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 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: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240329_110303_384151_D669CDAD X-CRM114-Status: GOOD ( 11.20 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 680E2CD1283 for ; Fri, 29 Mar 2024 18:03:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=j7bWJoKlN9tbTCvtHLM9hDoll0qpGm4dsEReItfx5+g=; b=eDi9rJWwi8PUus Fl5G7NelrsrmtPzxmwDy3Obe/E3+vH8KVTRs1huxQcXVUzM7rUVbjLavT7UBTuFQ5IsvMQ3qfs0m6 ztxl+rWfXanEnnmdBbswS1gEhmzThmE+MBin2J/aCa7X7D/uCuN+nTlqI36nX3X8OTqoU6wv5CZhy N1ux1F6jJPPShJoun6hejhg4Mnv6pDppJoI3CECjTFcQxFtjxXUsX9FXjMvRnFp/K1mUjQZOzn8p2 80kpAoTYvYcaxf57xlnuXeaf9x1TYeHV/zTnWxnpm2ZbNV6TpGEl6vnQb9AG9yuXkKfCbjgnHqNh9 ckxChHbu2FKWhVZs87mA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rqGZH-00000001YX4-2Zur; Fri, 29 Mar 2024 18:03:07 +0000 Received: from mail-il1-x129.google.com ([2607:f8b0:4864:20::129]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rqGZD-00000001YVe-1NSP for linux-arm-kernel@lists.infradead.org; Fri, 29 Mar 2024 18:03:05 +0000 Received: by mail-il1-x129.google.com with SMTP id e9e14a558f8ab-36867dfe940so7463355ab.3 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=lists.infradead.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=lO2RcpYbiUUmJP8++XV/c4+r2rkGLedUW48LGVj9uCGQuZNMTYzR14ycuDZTpb82aK +LKWg2Nc1CUgH66Y9A6yLShRhi8OsmtSml64jSq+EKIVhrsB6TmmWQfqSuqb0NCkNbZc mk50XDvNqYEM++oURzXG+PT7RLliRpOXDxs1BeaYeVVpypKDUNwzhvIw5ij71KALt8bi dBUto9T4+LikeKra00P2Wx1METDnLlwJJKFiPg3KZqZ7gtRrlkP6KiLsnsJzeyDgy+Jv IoTAdwQJChQj6YCrlMm5fZirJKTmuqHrD7P5YJlG2qeHSN18ptKGaXV1yqFLxhqogY/K ig0g== 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=lA5UVk+FIM5P0H6/IOg/UbMrCwXLPeYOTDuTJqmbqrxseRY3ql82S8y1O/nahJsWDz 4hfmyQg8iIm5sPAaPtVykI85XpiHuN6CeIz2tz4eMIBND8FU6pkch91doVMD9EFZC6OQ isI4RltyNmVnvEGXmGBYsRQm8diCJHJRsba3vpT7Myytsa4C+zCgJ1slT2ZT5wDFmIOi rJZjib7I2er2gjjlOs2PVjOvhsiQo3wr6zTVTPY7QeBixytRsmYg3RbPTDxumXECI2Xr 1v+gX8G/nj6KAqKQH1ku2BafKYls6hLuMIlhhV4RdbMSFJTgHYafEyoTgdHmF03KJbYd Kbqg== X-Forwarded-Encrypted: i=1; AJvYcCXxKEPA7F73qSSg1n5oG4SwYRPaqu9UCBmN2LhbR5ga3Tk8WHgsbM4viZgjVTGP4lzhOgDmKp9RcnPdK3qVVQqEXbM/NoYyYDRPOnyPby6f+JK0n74= X-Gm-Message-State: AOJu0YwNJW2AjhhQ66BvwIdwSEHFk5Tkc497Mi+T+6d+0z7j64TwSBEc yzlfoNRrKCbavurBJhwTMtsixf1YOVdUaiPbqRi6ky7IppK3JJIXVHnbozypx2I= X-Google-Smtp-Source: AGHT+IFqMNmDL2GVO2cyYm+vIEEaj43NPiUKo2CRXyyGfQmLknY9TtLFDSxdZDVwWotlePg1wJz6nw== 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 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: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240329_110303_382195_4FCD0FA7 X-CRM114-Status: GOOD ( 12.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1DE49CD1283 for ; Fri, 29 Mar 2024 18:03:50 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256 header.s=google header.b=Z2GQBYoc; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4V5pF0474Xz3vZ5 for ; Sat, 30 Mar 2024 05:03:48 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256 header.s=google header.b=Z2GQBYoc; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sifive.com (client-ip=2607:f8b0:4864:20::129; helo=mail-il1-x129.google.com; envelope-from=samuel.holland@sifive.com; receiver=lists.ozlabs.org) Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4V5pD83x1hz3c7s for ; Sat, 30 Mar 2024 05:03:02 +1100 (AEDT) Received: by mail-il1-x129.google.com with SMTP id e9e14a558f8ab-368a360bb1aso11730055ab.0 for ; Fri, 29 Mar 2024 11:03:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1711735379; x=1712340179; darn=lists.ozlabs.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=Z2GQBYoc9jgOaDFJ6lCE3rKaojJF7X6vuSeZ8rJB2fAHHWnccG9obKKkU41FvAZIpx banmmp3HnlmMMNX9e0aFPfIVkl7AsA9hllpg69SuGpq08J1jV8GyC4TKqsjRhVpoq9Sp rB/C2b9mufkXht4s4amWUegJ+yekXUpclm7jUFnycWBVjpdX8Eex5xcx5JsSxl/05zM4 +IA90g79dIfSqx/bK6Kg00FCOJGSFLoLHN034EG9/HnNlndeSwensZX2vJwisZfgnkrV LnTJIF5B9oLLCEWaUhucuCd8fDxqHXZaGUSmYW7VW/3he/Wv/XsU+0zFmTSTZ5zb8rZG bADw== 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=WwTopL2YFxcs4xL6c6qRxywX0yYs4MqilePhDzZV6aThVk5ULCfZtViaR+C8wo5cvL PVUlCRywUKQ9yexvmnuPzNs/Pf2AzFXRA+RgUJFkgEcLjBcVW+KxxQzGNZOCTFD9aCSV pHjiERaDvEhs+sNm8aZlfiLBiqmyXSVclvVwDQFSUbnGCcC3NjDUDuCM8E7kw4Uz/GDe k9FqnzCY1FZ5ogUQcCJlfXWJeENQ+S1IGWMLuxOB3+kNwQxURIQEDXdrFfo6+WZ09DIX M1Np9bCk7+CkQ6Ze0E5MR4qqeHbQhSQcdcBO9HBrhI78dbbEDZXcEnl7LS4OxGEpXtNa 5H4w== X-Forwarded-Encrypted: i=1; AJvYcCWZj+SRZZjpDsqOVAJ3ZKPz8JF0WbeEs+m2HAvA25fPifsd+3gDrV9hfB+GRH6/Yfoh1jCNdPym7riWJW31nY3aNIAjuox8groR6HGtGw== X-Gm-Message-State: AOJu0YybrQno00MD5pv3tOooG9ctvFl4GmkcYooZQCzDxfQgP9vN+rXH ZO3mpyv3vOpcDSBovmFrLezjSafaXQ8JT2htulkJvgAH8qg7bxlHn0mLztHvN5Y= X-Google-Smtp-Source: AGHT+IFqMNmDL2GVO2cyYm+vIEEaj43NPiUKo2CRXyyGfQmLknY9TtLFDSxdZDVwWotlePg1wJz6nw== 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 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 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 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Thomas Gleixner , Dave Hansen , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, Ingo Molnar , Borislav Petkov , loongarch@lists.linux.dev, linux-riscv@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, Christoph Hellwig , linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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