All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Finn Thain <fthain@telegraphics.com.au>, Daniel Wagner <dwagner@suse.de>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	"James E. J. Bottomley" <jejb@linux.vnet.ibm.com>,
	linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.de>,
	Arun Easi <aeasi@marvell.com>,
	Himanshu Madhani <himanshu.madhani@oracle.com>,
	Nilesh Javali <njavali@marvell.com>,
	Quinn Tran <qutran@marvell.com>, Martin Wilck <mwilck@suse.com>,
	Roman Bolshakov <r.bolshakov@yadro.com>
Subject: Re: [PATCH v7 15/15] qla2xxx: Fix endianness annotations in source files
Date: Sun, 24 May 2020 08:50:47 -0700	[thread overview]
Message-ID: <2737709e-1423-da29-4697-dc517ad7e413@acm.org> (raw)
In-Reply-To: <alpine.LNX.2.22.394.2005211358460.8@nippy.intranet>

On 2020-05-23 21:28, Finn Thain wrote:
> 2. The get_unaligned_le32() changes produce new pointer offsets in the 
> assembly code for qla82xx_get_table_desc() and qla82xx_get_data_desc().
> 
> diff -ru /tmp/unpatched/qla_target.s /tmp/patched/qla_target.s
> --- /tmp/unpatched/qla_target.s 2020-05-24 14:02:32.178019380 +1000
> +++ /tmp/patched/qla_target.s   2020-05-24 14:01:43.487947966 +1000
> @@ -12884,10 +12884,10 @@
>         .cfi_offset 6, -16
>         movq    %rsp, %rbp
>         .cfi_def_cfa_register 6
> -       subq    $32, %rsp
> -       movq    %rdi, -24(%rbp)
> -       movq    %rsi, -32(%rbp)
> -       movq    -32(%rbp), %rax
> +       subq    $64, %rsp
> +       movq    %rdi, -56(%rbp)
> +       movq    %rsi, -64(%rbp)
> +       movq    -64(%rbp), %rax
>         movl    52(%rax), %eax
>         movl    %eax, -8(%rbp)
>         movl    $24, -12(%rbp)
> @@ -12895,62 +12895,62 @@
>         cmpl    %eax, -12(%rbp)
>         cmovbe  -12(%rbp), %eax
>         movl    %eax, %edx
> -       movq    -32(%rbp), %rax
> +       movq    -64(%rbp), %rax
>         movl    %edx, 52(%rax)
> -       movq    -24(%rbp), %rax
> +       movq    -56(%rbp), %rax
> (and so on.)
> 
> Was this expected? I find it surprising...

The functions qla82xx_get_table_desc() and qla82xx_get_data_desc() exist
in qla_nx.c. Does the above diff perhaps refer to qla_nx.s instead of
qla_target.s?

To me the change of "subq $32, %rsp" into "subq $64, %rsp" means that
the compiler reserved more space on the stack for local variables.

If I compare the assembler output for qla_nx.c then I see that
qla82xx_get_table_desc() gets inlined with my patch applied but not
without my patch applied. This is something that I had not expected but
that explains the above diff IMHO.

Bart.

  reply	other threads:[~2020-05-24 15:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18 21:16 [PATCH v7 00/15] Fix qla2xxx endianness annotations Bart Van Assche
2020-05-18 21:16 ` [PATCH v7 01/15] qla2xxx: Fix spelling of a variable name Bart Van Assche
2020-05-18 21:16 ` [PATCH v7 02/15] qla2xxx: Suppress two recently introduced compiler warnings Bart Van Assche
2020-05-18 21:17 ` [PATCH v7 03/15] qla2xxx: Simplify the functions for dumping firmware Bart Van Assche
2020-05-18 21:17 ` [PATCH v7 04/15] qla2xxx: Sort BUILD_BUG_ON() statements alphabetically Bart Van Assche
2020-05-18 21:17 ` [PATCH v7 05/15] qla2xxx: Add more BUILD_BUG_ON() statements Bart Van Assche
2020-05-18 21:17 ` [PATCH v7 06/15] qla2xxx: Make a gap in struct qla2xxx_offld_chain explicit Bart Van Assche
2020-05-18 21:17 ` [PATCH v7 07/15] qla2xxx: Increase the size of struct qla_fcp_prio_cfg to FCP_PRIO_CFG_SIZE Bart Van Assche
2020-05-18 21:17 ` [PATCH v7 08/15] qla2xxx: Change two hardcoded constants into offsetof() / sizeof() expressions Bart Van Assche
2020-05-18 21:17 ` [PATCH v7 09/15] qla2xxx: Use register names instead of register offsets Bart Van Assche
2020-05-18 21:17 ` [PATCH v7 10/15] qla2xxx: Fix the code that reads from mailbox registers Bart Van Assche
2020-05-18 21:17 ` [PATCH v7 11/15] qla2xxx: Change {RD,WRT}_REG_*() function names from upper case into lower case Bart Van Assche
2020-05-18 21:17 ` [PATCH v7 12/15] qla2xxx: Cast explicitly to uint16_t / uint32_t Bart Van Assche
2020-05-19 15:29   ` Daniel Wagner
2020-05-18 21:17 ` [PATCH v7 13/15] qla2xxx: Use make_handle() instead of open-coding it Bart Van Assche
2020-05-18 21:17 ` [PATCH v7 14/15] qla2xxx: Fix endianness annotations in header files Bart Van Assche
2020-05-18 21:17 ` [PATCH v7 15/15] qla2xxx: Fix endianness annotations in source files Bart Van Assche
2020-05-19 15:24   ` Daniel Wagner
2020-05-20  7:39     ` Finn Thain
2020-05-20  8:56       ` Daniel Wagner
2020-05-24  4:28         ` Finn Thain
2020-05-24 15:50           ` Bart Van Assche [this message]
2020-05-24 23:45             ` Finn Thain
2020-05-20  2:30 ` [PATCH v7 00/15] Fix qla2xxx endianness annotations Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2737709e-1423-da29-4697-dc517ad7e413@acm.org \
    --to=bvanassche@acm.org \
    --cc=aeasi@marvell.com \
    --cc=dwagner@suse.de \
    --cc=fthain@telegraphics.com.au \
    --cc=hare@suse.de \
    --cc=himanshu.madhani@oracle.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mwilck@suse.com \
    --cc=njavali@marvell.com \
    --cc=qutran@marvell.com \
    --cc=r.bolshakov@yadro.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.