Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3415217pxb; Sun, 20 Feb 2022 19:23:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJyhTu8qC/4ubcK5Lh9jcTeWl6aMi8w2+HB+2Oniy/O8gAnY0fvDiPcoXpDV/yqi0GX/sRmF X-Received: by 2002:a17:906:3514:b0:6cf:ea52:50 with SMTP id r20-20020a170906351400b006cfea520050mr14168360eja.134.1645413833214; Sun, 20 Feb 2022 19:23:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645413833; cv=none; d=google.com; s=arc-20160816; b=ebCubxDoNsRY/+hdeRKP1oznx7FPlXUMVOEsj+yVLvJBMRJMd5N884jHPrw6/bJ0/N k49D3ADL5lP/TAW/5gFzR0JocA7F1jaC1R8YGsU9PBay2ng7GI8e4V+aKJowEyNv+R4X N0VRo559DUSeo/IZRjYR9h+tCtgstnjKQJu0GvwEbFFFLuZ61N+ZCoVKER/nwWelVYbY 0qe7vWrKvDZm0vuts8Spsj/yr230kIQ92rjuyIAqvh9lagLBcGHd4oeoqOL2P+GNXHzY DBob33URfXZmPg94SBn3n6l5+UXoLS/0k3fWjkbI2A/u+IQH6N90ddiBk0wCHQfnq2s7 wEkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=C/B2PB/90PSsYzD+wuWX/B/B9NzI01aOji81RDU7/X8=; b=u2it9ZiIJ4EE0HyhvxV5qSsBvADfbMlIaxWHXFhV6mRVKyKZSKNz9X8crMbqSJdkwh EdJhEZplmH9yRDH+rrl7Mm/5Esc0nvpFdwbUOCl4DYd3gGewfiMDwXgBlO82vkd8okvH 47mcd4feXl7Y4xteV4GsYzd7AlO5AI4e7gUgUnpZer5NgoGa4yIdXa0DvFxtEBcy7EMU 6nLk3AfBQPQ3UC+reuFpHG1uoB0aiDQlhOp6tfD2JBoH3OAQt3RCLIZ1WietMf2UEdyd V0WFHmeNGN+f5pn/xvLzvcjoFUshhd7eweyze4CLZLeib+qb9f4tYnNsw95zNIpJS/5Q AZjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=gcsDqFRv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u7si9308435edo.603.2022.02.20.19.23.31; Sun, 20 Feb 2022 19:23:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=gcsDqFRv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244576AbiBTTGF (ORCPT + 99 others); Sun, 20 Feb 2022 14:06:05 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:34248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237468AbiBTTGD (ORCPT ); Sun, 20 Feb 2022 14:06:03 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73AEF4C7B0; Sun, 20 Feb 2022 11:05:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1645383920; bh=6KNpyc0ZW7k54/xmz9GluUG6R/Rcoqer5CR8Xt+p03g=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=gcsDqFRvghF/nV5U7WrtjeBCt9E9BnAx7jpWah7N1dQJH7AhpruPDtVJEiZpJWaJ8 nV47flPc2mS6ZNYVMU7+ITwYbC0BFXPQqMcCP4kzsr1vEbu+4RN9s7M0j40vQ91l7Y joWLjbIRBk8swaJY0OQT6843u5vEOcutrhMxy6BM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [141.30.226.129] ([141.30.226.129]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N8GMq-1oH0Qy243s-014GKV; Sun, 20 Feb 2022 20:05:20 +0100 Subject: Re: [PATCH v2] hwmon: (dell-smm) Improve assembly code To: David Laight , "pali@kernel.org" Cc: "jdelvare@suse.com" , "linux@roeck-us.net" , "linux-hwmon@vger.kernel.org" , "linux-assembly@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20220219211011.16600-1-W_Armin@gmx.de> <6f4c21b5e1cb4fa38a5e0c1716658329@AcuMS.aculab.com> From: Armin Wolf Message-ID: <77eeca08-e970-84df-6490-36e330ce91ca@gmx.de> Date: Sun, 20 Feb 2022 20:05:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <6f4c21b5e1cb4fa38a5e0c1716658329@AcuMS.aculab.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Provags-ID: V03:K1:CP19/Q2N1lpZ0Mfk8s8lmQfk+E3TuQKYsTQR3rNDSbjop2IP5zl NRSDyx9Dz1A+mYyGXBMjYveHMeY+RXMRQGq69ubLFDTBMB3tESHHguBeJWBCFgHksnTbR8j VOOPrVt7JGwaWKjz9JQv1i2fuFjL4A0CE3qguAVqyCSpPOyrG0QWYw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8KisGDTSM4DhlnQ+YZdVDxrerfGRbbVh2brpft Fs8tpeQuAPeVEF/fdZ2O/rL24B7oDG+QLtMvj4Ff5fPILxTczNt4se2HACEpmdOiIQDrOKSn3 yhsVDjbinVO/zM= X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 20.02.22 um 19:48 schrieb David Laight: > From: Armin Wolf >> Sent: 19 February 2022 21:10 >> >> The new assembly code works on both 32 bit and 64 bit >> cpus and allows for more compiler optimisations by not >> requiring smm_regs to be packed > I'm intrigued about the __packed.. > > Prior to 5.17-rc1 __packed was only applied to the fields after 'eax'. > This actually has no effect (on any architecture) because there is > no padding to remove - so all the later fields are still assumed to > be 32bit aligned. > > 5.17-rc1 (565210c781201) moved the __packed to the end of the > structure. > AFAICT this structure is only ever used in one file and for on-stack > items. It will always actually be aligned and is only read by the > code in the file - so why was it ever marked __packed at all! > On x86 it would make no difference anyway. > > I can only guess it was to ensure that the asm code didn't go > 'wrong' because of the compiler adding 'random' padding. > That isn't what __packed is for at all. > The linux kernel requires that the compiler doesn't add 'random' > padding - even if the C standard might allow it. > > David > > - > Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK > Registration No: 1397386 (Wales) > Your right, after looking at the assembly output, i can confirm that the removal of __packed changed nothing. Maybe i should update this part of the commit message as well. Armin Wolf