mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ata: pata_ep93xx: add missing "cc" clobber to inline asm
@ 2026-06-01 18:34 Rosen Penev
  2026-07-20 21:09 ` Rosen Penev
  0 siblings, 1 reply; 3+ messages in thread
From: Rosen Penev @ 2026-06-01 18:34 UTC (permalink / raw)
  To: linux-ide; +Cc: Damien Le Moal, Niklas Cassel, open list

The inline assembly in ep93xx_pata_delay() uses a "subs" instruction
which modifies the ARM condition code flags. Add a "cc" clobber so
the compiler knows the flags are altered. Without it, the compiler may
reorder flag-dependent instructions across the asm block when the
function is inlined, potentially causing incorrect control flow.

Assisted-by: Opencode:Big-Pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/ata/pata_ep93xx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c
index aa6f8172925d..838cab54d58a 100644
--- a/drivers/ata/pata_ep93xx.c
+++ b/drivers/ata/pata_ep93xx.c
@@ -211,6 +211,7 @@ static void ep93xx_pata_delay(unsigned long count)
 		"bge 0b\n"
 		: "=r" (count)
 		: "0" (count)
+		: "cc"
 	);
 }
 
-- 
2.54.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ata: pata_ep93xx: add missing "cc" clobber to inline asm
  2026-06-01 18:34 [PATCH] ata: pata_ep93xx: add missing "cc" clobber to inline asm Rosen Penev
@ 2026-07-20 21:09 ` Rosen Penev
  2026-07-20 23:02   ` Damien Le Moal
  0 siblings, 1 reply; 3+ messages in thread
From: Rosen Penev @ 2026-07-20 21:09 UTC (permalink / raw)
  To: linux-ide; +Cc: Damien Le Moal, Niklas Cassel, open list

On Mon, Jun 1, 2026 at 11:35 AM Rosen Penev <rosenp@gmail.com> wrote:
>
> The inline assembly in ep93xx_pata_delay() uses a "subs" instruction
> which modifies the ARM condition code flags. Add a "cc" clobber so
> the compiler knows the flags are altered. Without it, the compiler may
> reorder flag-dependent instructions across the asm block when the
> function is inlined, potentially causing incorrect control flow.
>
> Assisted-by: Opencode:Big-Pickle
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
should I resend?
> ---
>  drivers/ata/pata_ep93xx.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c
> index aa6f8172925d..838cab54d58a 100644
> --- a/drivers/ata/pata_ep93xx.c
> +++ b/drivers/ata/pata_ep93xx.c
> @@ -211,6 +211,7 @@ static void ep93xx_pata_delay(unsigned long count)
>                 "bge 0b\n"
>                 : "=r" (count)
>                 : "0" (count)
> +               : "cc"
>         );
>  }
>
> --
> 2.54.0
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ata: pata_ep93xx: add missing "cc" clobber to inline asm
  2026-07-20 21:09 ` Rosen Penev
@ 2026-07-20 23:02   ` Damien Le Moal
  0 siblings, 0 replies; 3+ messages in thread
From: Damien Le Moal @ 2026-07-20 23:02 UTC (permalink / raw)
  To: Rosen Penev, linux-ide; +Cc: Niklas Cassel, open list

On 7/21/26 06:09, Rosen Penev wrote:
> On Mon, Jun 1, 2026 at 11:35 AM Rosen Penev <rosenp@gmail.com> wrote:
>>
>> The inline assembly in ep93xx_pata_delay() uses a "subs" instruction
>> which modifies the ARM condition code flags. Add a "cc" clobber so
>> the compiler knows the flags are altered. Without it, the compiler may
>> reorder flag-dependent instructions across the asm block when the
>> function is inlined, potentially causing incorrect control flow.
>>
>> Assisted-by: Opencode:Big-Pickle
>> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> should I resend?

Oops. This fell through the cracks. Yes, please resend and add a fixes tag as well.

-- 
Damien Le Moal
Western Digital Research

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-20 23:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-01 18:34 [PATCH] ata: pata_ep93xx: add missing "cc" clobber to inline asm Rosen Penev
2026-07-20 21:09 ` Rosen Penev
2026-07-20 23:02   ` Damien Le Moal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome