From nobody Fri Oct 2 12:19:58 2026 Received: from mail-oo1-f54.google.com (mail-oo1-f54.google.com [209.85.161.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A5A937C92C for ; Fri, 31 Jul 2026 20:53:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785531223; cv=none; b=Zye/on26cuAPGUWyL0zgE8DsiHHIJrBT+PEzekcN7uCUh1QLnQVNoGmxNlW/HT3io12qDA6FPEVqQAhmUK7SAIIy41oeggg2uGIP02CEGv+wNa+z2uv6wuWPl7Y8gyAN1vEpXA8n2IwnGnyBYwskY0TsYoQ/7kDsfHYMd56dnLY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785531223; c=relaxed/simple; bh=4522mCTvgT2yfneBofEbQXuDlkWezOwq6bSe0P2wqq8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pcMjYkne3aB8NDkoMpeCWYNOY48/phkZfHsv57LxxSFWfINVtxmBMMiwrRK4tLgKyHLVg7fYrVjGURjNXxE8bX/iGhMTqLZpfpQvcgYlabwVgWD2hfK0ZcOyPrHBRtCl39LuogsL0u2c0uNa0wvrgXRu3/UHjnXqk3Z7C3HjBeA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=otZ+0zaL; arc=none smtp.client-ip=209.85.161.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="otZ+0zaL" Received: by mail-oo1-f54.google.com with SMTP id 006d021491bc7-6aae384221fso726986eaf.0 for ; Fri, 31 Jul 2026 13:53:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785531221; x=1786136021; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=SmAY5H801iHfliFhsAjZ9+4GXlwH499qZe6BQlMTr30=; b=otZ+0zaLs95/vqNB/LkXHLdii4miM5GZaZoz5omcoBI2Q0q8aw0GBXVlO2SEI3w4+z aQG+d91jHWE85TYa5RpK4m7p+ytl0uJNn2lrhIh7vye33q74UeL50izAp5yOxmPfl4+a PEnEm7yoFdJ2K3YBB/3C3fX2ofV10RPtyXsyFOE0+fcujorPc6Ni5ijk8cXHGqHyIU6W 9ZDWrKM1hfFmaMrtMbpFliuJM0cAmUo6397L7xCNv0ucpNuMtePNa1oIkJSwTFQzw+vW H7MoSFq/3SZQa90fzCjIo/bMRAug2sVWD55yCFmFf3fl/Px1taUTdo/nxlfMfFsPpcEz 34/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785531221; x=1786136021; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=SmAY5H801iHfliFhsAjZ9+4GXlwH499qZe6BQlMTr30=; b=sctk89w1dYYLTjO1C563RQZ9PzkZDBEfAfAhM8ZHlLfa+U36QVDFjF+cY1DFPzeO3Z fFgVKyFl4rEP3CT0dzDgGUwABzA6jsWTbSqPE5gFhRBR7a1E4TtyfrNOfY19luSpd8jF tKLMEZdY0kM4UV+Lh9xyxqBCWNgV17prfMaEH2S64Qew63utDWPh4PzTpnA9V4KIQmvx HId6tEhXWllQqY5mTRjlo6ADOaO6Ge9lvZ+aZ1XnekJRM2Op2epmk6TPZLp/bul/bwaN etiRw6KXyRtPvZk2BZjeKxZ30NFAcuM4uIsgqE6g53+Gxvz43BbVbatIVDmI9ti4XAC2 i7LA== X-Forwarded-Encrypted: i=1; AHgh+RqttpH3nhhMGMaU2BLJBnqmkbhvKVEeZoL2iyNBQTrtNgsgIhTUHI21dPbYk3VSZMhDaEAp5AFe7YUeBro=@vger.kernel.org X-Gm-Message-State: AOJu0YyXiWY+ke4FACvCeZiWjtU97pdRE8xjaffVdp0XhchRFYLCiU8w pqnD3aQs8I4+L7DefXUfnuR/7FnSr3Po/T08f7l/7KzirFjS2UG9K90o X-Gm-Gg: AR+sD13G86lnAuE+Cp8q2QTjPgYushIgQndOUUnYo/gAPSCURMmKweNO888rjhW/UdI XPMDNa3mMbQ1RGQHflPky3I3Z3LCxJ2oogDu5r3WJaySblYDmypnVv625IqlQvyiTnhEE6LTTy4 P2yrX/UVHR7tJ3Js6Ewdz3rHaGkq9YfedWczAkpsK8znA62ru5P5+m9RsFOIqDWe+pP+3oS6LjI Jv8CTFZs3fEjFF5jKZE8gjQl7/EfLnDvkFuh3FlzghwcmFpM+1CcUqPGx4Cf1bG5u1Wwr5kNx+6 3JdEqrkYBmmRk04yCgc/3+29LCxSw09Qb8EcU0ihGAbQ05zPutBIYIymY4dh2BJVnkbaEFlB1+A gjXxxF/n/i2Kt5LKPqaUwRv4LxJhQRdP1suZ/CDa9JbgQJthUiB6Q07XhQJu/xlNXvDS2h/AC8P JGG7druVHp5fNElMJP5KuTmGLXC7i3oHwp6lNUpf4YEflOzMqilONGfE9ZtjguzdWIXyJKbXBDd JONp4QycW8l2ZpYxBFTlXQKohM3HuVPZDh06bGz0XcUHEOm0h3MFBcIxBsgT2RJ8kaB4SaBY/zN tYTP+vcILii+y0Kf9OmsKJKSzwPeZOTFyrOelA== X-Received: by 2002:a05:6820:162b:b0:6aa:e5e4:359b with SMTP id 006d021491bc7-6ae4312ae22mr3060818eaf.0.1785531221120; Fri, 31 Jul 2026 13:53:41 -0700 (PDT) Received: from ryzen.lan ([2601:644:8000:7a86::e34]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-458f6064d2esm2218765fac.3.2026.07.31.13.53.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2026 13:53:40 -0700 (PDT) From: Rosen Penev To: linux-ide@vger.kernel.org Cc: Damien Le Moal , Niklas Cassel , Jeff Garzik , Rafal Prylowski , linux-kernel@vger.kernel.org (open list) Subject: [PATCHv3] ata: pata_ep93xx: add missing "cc" and "memory" clobbers to inline asm Date: Fri, 31 Jul 2026 13:53:38 -0700 Message-ID: <20260731205338.8011-1-rosenp@gmail.com> X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Additionally, add a "memory" clobber to prevent the compiler from reordering I/O accesses across this delay loop. On older ARM architectures like ARMv4T used in EP93xx, __iormb()/__iowmb() may evaluate to empty when CONFIG_ARM_DMA_MEM_BUFFERABLE is not set, leaving writel()/readl() without a compiler memory barrier. Without a "memory" clobber here, the compiler optimizer might reorder independent I/O accesses across the delay, violating ATA PIO timing requirements. This also brings the ARM path in line with the non-ARM fallback which uses cpu_relax() (a compiler barrier). Fixes: 2fff27512600 ("PATA host controller driver for ep93xx") Assisted-by: Opencode:Big-Pickle Signed-off-by: Rosen Penev --- v3: add memory barrier v2: add Fixes tag 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 587caadf78cb..6d948e41bc59 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" : "=3Dr" (count) : "0" (count) + : "cc", "memory" ); #else while (count--) --=20 2.55.0