Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1035126rdb; Mon, 19 Feb 2024 01:58:43 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUkCubY7tTyOEKl80UcPXtqdcFtOIQYOoyO4I2SdOyrtUlobdum3EJeD+jTEEIZnM17CH1FpO39Gy7t46FfOlNgEMDS5WbaDBkbmUgPkg== X-Google-Smtp-Source: AGHT+IEW1A3aoJcBj10pxClOztDvf6Fug/HvZ1Xyw75vK6HYUmtrHIEyKVU1ujWoOkn1xoQXGdwM X-Received: by 2002:a05:6808:6488:b0:3c1:5af4:a89d with SMTP id fh8-20020a056808648800b003c15af4a89dmr2816600oib.12.1708336723535; Mon, 19 Feb 2024 01:58:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708336723; cv=pass; d=google.com; s=arc-20160816; b=ruaiosUM5dj4Sx3U+VjZWLxNb1SDdOotTVsXIF9a675Ozoy66jZFDeqOtCdwbFQtjr pZp5/lbtSms0Qi9wMKMZ4GjFj1og+6QXgOa4W+sNkDpwFgkGPOK7S+Zw5MkPH//GYUH5 drHdo3J2B7GBYlnyRIDLm2dkDGQjYlkcssjZj8CK/u8ritqjiqyfxfCpy/Pa7L8vBL+H P87PAwGxOA/9ykQrJR8AdfhPLhwGT/EqUSiiMC3XDNrdPBGp3mpEMwFccRvViJeDSN0T RckJ1EO+gDDt80HPEEJVpu2VhAXMlJtiEVivhKSaxu6FvaTQaU1N54ETjAciylvhhE11 07hA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature:dkim-signature; bh=U+WPdpqhJ6dppLBFxP7wVdPkEaQuPQkLuRk1nba0D8U=; fh=IYts29+St8iuIfE5EPJDlfbpRheUReZDwsYe1QToSRs=; b=mek6hiVI+P1jJwX1ol6GCUzCLRSSxmcMnX3a3WUU/pkSPGtaUwwRYY/TQAw6OVeXvb zE7qaJq+mkQ6tBuuXYrujF3taP/IPCnVnFbmDlntfJE0sVKyEu0zheOegU5MUJigePYo mUWbGHhQdK5IMUlGXgWmug+ZNZHYhCfoqASreFdtuNkUJyO2rX+LF5wVximocjAYDwgG 4n0bwRik1kYPyvjXAJBBM9ySNl44ezsd8bz1gPZM1G1/BtIYkLE3rbU9AnOknfi56Ebn DGR4Ujl9SVcfiKfXmicbwAg9PmDO6CWVVxH8reX8+S0b6TzP8vTQMBOV4syRTpfLXUkh vDcQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=jku3DWDN; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=dpxYwmVu; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-71079-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71079-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y63-20020a636442000000b005dc1b5b386asi4173078pgb.339.2024.02.19.01.58.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 01:58:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71079-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=jku3DWDN; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=dpxYwmVu; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-71079-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71079-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3509428263E for ; Mon, 19 Feb 2024 09:58:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D9AB325576; Mon, 19 Feb 2024 09:58:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="jku3DWDN"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="dpxYwmVu" Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0057524B5B; Mon, 19 Feb 2024 09:58:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=66.111.4.25 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708336691; cv=none; b=sSa0RULRXJTtLWNCcwCrKuQix8Z/ewFCdVBzCGSi9d93b/VYdkJ9ZozwDpZLrPwUZ0PJ0wehDE6w1aTTMU0SwoRmzO4wjmTjfHPisLkf3e7oXMfs37iLfDkAGsUhplY3GqHiC877ER/6cPY1Ogtbaz9gWg0SjmdmriyNSZI2w14= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708336691; c=relaxed/simple; bh=qsbrELK53euiF+j557Fesa+Wxd418Cyk4NfQ8Tbts9I=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=Wh5i+LWzmHSPxi0GDL9g3axMzP3cPTkwy5Ugp5O6OaQdcNNmwjYnVfnq0I+irXf1AoOq0FYQiDKrI88MhrywKrTBHlt+VBjbqTvXphXfNggixhMRUZ8Tpzx+Z2Gw6eA9yCYDIqXnoQqQg7fjSe496C2WGpMrsdvwvhT+9v9Erdo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=jku3DWDN; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=dpxYwmVu; arc=none smtp.client-ip=66.111.4.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 0151F5C008D; Mon, 19 Feb 2024 04:58:08 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Mon, 19 Feb 2024 04:58:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1708336687; x=1708423087; bh=U+WPdpqhJ6 dppLBFxP7wVdPkEaQuPQkLuRk1nba0D8U=; b=jku3DWDNgxb/KeDJDDfxWiAtnZ HigmjbzOxZsJVV6D6VUFcNebBHahVXuA7W4xJLTOKzZGi2iHiDqAhwRWuE5Bd9Sk ARntntAp8XIbYVe+bjxivFGJUndlIdIjuCSMmRPHTGTKPmzn8J7KbatCBdAH/rRx EY6svVDwYXPs9RNz0qayxoZH9K1n8nde1es30orWbCVhut6r8COKFIAsqGZYSYP8 DmNqoA+LjvPQbrgNLpjIsfUWdd4yVi4EX7Wv3xRn9B7pTRBs4lrrW5DwRXJfG9MI 3WYE7F503zoimI+pvwfReZEBzKglAc1sMlYbq9KsNSieIykaERESx9rP48nA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1708336687; x=1708423087; bh=U+WPdpqhJ6dppLBFxP7wVdPkEaQu PQkLuRk1nba0D8U=; b=dpxYwmVuxEiEJubqKVidgpqvarM9L3DDeiO6VQfIIG1w OW5V//d+BRlO1rfCb8h3j8QjxUsoP99qe/atADjAEqmMOkOt1WbfW6BntHCphtWl OnOMkh0KkhoSVP7y3n85MR4/WUb9DGw/05SnxSahnvz7y+4iLi9+QUVCWeRaORNG 2RnzFcZkY2v3ntdFapT7hppqLOSmxmiZpZ7K9+Ics1mYWsVY5+Be7W14vHYqUd+E OooAFuMDgTzBfz9U34iWE//mYpTWHwgUe/sdaNMLpLKyYa06zKOp/SCyeP3kbLB0 AbI8qrpfFFTnovJqiNQnCADlH2yrwMKSF3UHEJ5wow== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdekgddtlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdetrhhn ugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtth gvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedtkeet ffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrh hnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 90A79B6008D; Mon, 19 Feb 2024 04:58:07 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-144-ge5821d614e-fm-20240125.002-ge5821d61 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <7299839b-06e6-40eb-8024-93ed5f9b733f@app.fastmail.com> In-Reply-To: References: <431dd956-ad31-4da8-ad42-34f7380824bb@app.fastmail.com> Date: Mon, 19 Feb 2024 10:57:46 +0100 From: "Arnd Bergmann" To: "Kent Overstreet" , "Russell King" Cc: "Calvin Owens" , "Dave Martin" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "linux-bcachefs@vger.kernel.org" Subject: Re: [PATCH] arm: Silence gcc warnings about arch ABI drift Content-Type: text/plain On Mon, Feb 19, 2024, at 10:40, Kent Overstreet wrote: > On Mon, Feb 19, 2024 at 09:26:51AM +0000, Russell King (Oracle) wrote: >> On Mon, Feb 19, 2024 at 07:21:11AM +0100, Arnd Bergmann wrote: >> >> +1 - bcachefs definitely needs fixing. Passing all that as an argument >> not only means that it has to be read into registers, but also when >> accessing members, it has to be extracted from those registers as well. >> >> Passing that by argument is utterly insane. > > If the compiler people can't figure out a vaguely efficient way to pass > a small struct by value, that's their problem - from the way you > describe it, I have to wonder at what insanity is going on there. On most ABIs, there are only six argument registers (24 bytes) for function calls. The compiler has very little choice here if it tries to pass 32 bytes worth of data. On both x86_64 and arm64, there are theoretically enough registers to pass the data, but kernel disallows using the vector and floating point registers for passing large compounds arguments. The integer registers on x86 apparently allow passing compounds up to 16 bytes, but only if all members are naturally aligned. Since you have both __packed members and bitfields, the compiler would not even be allowed to pass the structure efficiently even if it was small enough. Arnd