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 E16BAC48260 for ; Mon, 19 Feb 2024 09:27:21 +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:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=amHlTdwprP6gwmpb4w5uP8fkwOLtdll5SzvK8b1Qe+A=; b=iM/NJeTUliGBCy cH8PpDzPBfk7Qt4Zn/ELPufCEce3ChwQNiLFyUd8pQ3Cn6qfnLGyC40AV3CgJAWgAtEdBINzCE0SK byO6qfBotRXl7ann/eY1nCfgGNc1u+d+hzOxpD7xgE0Z0X2DWoHDYTKm/dAo+boAc05OyjPHyvExu 2PVqei1ev+LgfTM3tjXStdNF2vo6yNoz6RMatAWPY1fKneZ/gzUGBk6onIHuqgzMdPWNc7wgJMARU tBlO7VIdRHb0ab3++2jj9oSHYawXKSl+xItmADl1ISHsMdLvr/sgJvbkigK5dB1YcS49fofgIEtXr vLgLmmeY7AsSVKR0MjnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rbzvW-00000009oGn-28Vf; Mon, 19 Feb 2024 09:27:06 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rbzvS-00000009oG9-3Z0T for linux-arm-kernel@lists.infradead.org; Mon, 19 Feb 2024 09:27:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=/LzjvA8uDCXuz1zAKNQ/JIcMEOk4CVtuLJzwpOkdWrY=; b=BIrabAyZ8H2iJoFDb7tlM63h4l H76D4cYaNEZF5I8dY23y8rCEtyQ6fr+MXAIsGmyZKHE52skjAw/RurHXN52SfRtkhGmrEA+iw3CzE l9qVcW+QMNKoDcVJhrrn/OD/dpslVZkPc3Q/CImSSBN9OFK1vbUpnf4m6Cf98GgUHCJ7560xygNi1 AbiQSCpfThgGr9XeBqHgUL2SHeV1mXZC4gFFmL0MACVhmvKzuFsIIN767oHljmjXGgtB1nhqpPT9Q 85WaKiGLU/DN/mEQYQS1QrGUkdqerCnGXLtajv0Rob8cSgbgqFUxmimY90rtM5nFnSQjbGcJJ7YFB UtRFz0NQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:56090) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rbzvK-0005wJ-01; Mon, 19 Feb 2024 09:26:54 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rbzvH-0008FV-N8; Mon, 19 Feb 2024 09:26:51 +0000 Date: Mon, 19 Feb 2024 09:26:51 +0000 From: "Russell King (Oracle)" To: Arnd Bergmann Cc: Calvin Owens , Dave Martin , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "linux-bcachefs@vger.kernel.org" , Kent Overstreet Subject: Re: [PATCH] arm: Silence gcc warnings about arch ABI drift Message-ID: References: <431dd956-ad31-4da8-ad42-34f7380824bb@app.fastmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <431dd956-ad31-4da8-ad42-34f7380824bb@app.fastmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240219_012702_912247_09CA058C X-CRM114-Status: GOOD ( 16.31 ) 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 Mon, Feb 19, 2024 at 07:21:11AM +0100, Arnd Bergmann wrote: > I think these should be addressed in bcachefs instead. > While it's not the fault of bcachefs that the calling > convention changed between gcc versions, have a look at > the actual structure layout: > > struct bch_val { > __u64 __nothing[0]; > }; > struct bpos { > /* > * Word order matches machine byte order - btree code treats a bpos as a > * single large integer, for search/comparison purposes > * > * Note that wherever a bpos is embedded in another on disk data > * structure, it has to be byte swabbed when reading in metadata that > * wasn't written in native endian order: > */ > #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ > __u32 snapshot; > __u64 offset; > __u64 inode; > #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ > __u64 inode; > __u64 offset; /* Points to end of extent - sectors */ > __u32 snapshot; > #else > #error edit for your odd byteorder. > #endif > } __packed > struct bch_backpointer { > struct bch_val v; > __u8 btree_id; > __u8 level; > __u8 data_type; > __u64 bucket_offset:40; > __u32 bucket_len; > struct bpos pos; > } __packed __aligned(8); > > This is not something that should ever be passed by value > into a function. +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. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel