Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.231.200 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796352179; b=Vv0F6qUGm17MJHJbZHZcXxy1Uvb/SpM0KsuoHM4XFGZ/cfbl3u4SRlaneXjb2yVPqjdx 8cEEvnY/LN7It1XQf9F8YKn+epTirX0W+tzhESiWosFDUSCaYmeew4UudH25nklouuEJB aHrQcR4brEZEP+O+ySzEwjxT5buZtlVJnxX/1tr8LGcNul9kTnCeQWDS5MD3DhMvUkieC o4AoGHF+u6YdcYfg+0fw+XOl2p/1yN2q5BEGo3Wyql3+lqWCOuIOgpcGl8kUT4EJ9qcOn aKkEb5umUptrL4uM4eRQks7lypeEigVpIBRPcjDsHUFjZ+XLaHKARBjbc+WlsjtyR0A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796352179; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Message-ID:Date: MIME-Version:User-Agent:Subject:To:Cc:References:Content-Language: From:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=nqU2iyzMDFBKchc8fsvqUE95yH8gVo7WsqEXNzCEru4=; b=FJtJMGAVYemfeiFNPH+fC5hbF8HmLx9dMDpKoKd89ag09pcpkBvoNurhMS03w8V0faDj GmyTBZJwp+BL4lumSgo+tutKhuSGRGYacakPuadi1NHNyjVpRqySuY+kT0VPDScC/sVJc LGR9JsejoQZvUywyjHP/nu4uGYSnmUDQDrWyeof5TLXeUVlhw8OTDqHGZQtQAGJOswQjN fiidiQj5xJkT91gqv+m87X4quOu1IeU/49woky9MPGMkyOblmQF35EynMqFBY4r5rwQUe PpHuxExjUG48fYzPOIw6Mw1HFTv0q3YHXn8yIG1aUOqcdAH/0qj6AE2yYjKHveHe5mQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=riscstar.com; spf=pass smtp.mailfrom=riscstar.com; dkim=pass header.d=riscstar.com header.i=@riscstar.com header.a=rsa-sha256 header.s=google header.b=Lkkxrt0E; arc=none smtp.remote-ip=74.125.231.200 Received: from mail-oi2-f8.google.com (mail-oi2-f8.google.com [74.125.231.200]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 34F68606A335 for ; Fri, 4 Dec 2026 02:42:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 34F68606A335 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riscstar.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=riscstar.com header.i=@riscstar.com header.a=rsa-sha256 header.s=google header.b=Lkkxrt0E Received: by mail-oi2-f8.google.com with SMTP id 5614622812f47-53c4858eb76so174206b6e.1 for ; Thu, 03 Dec 2026 18:42:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar.com; s=google; t=1796352178; x=1796956978; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=nqU2iyzMDFBKchc8fsvqUE95yH8gVo7WsqEXNzCEru4=; b=Lkkxrt0Ewx8tgDyN1dsCuGaAnhll8CBpButKMi7XqyrPHmKerLiejuAb3+IF3GTnbZ zvnsPuczV3ZBydiHyBJZd8s4BX30av9ml02s6AHWmQ/2wp49hnMpi7w7RVabCSabCDbj Oh1PmPLIhN6AtZlC2S9ZaZiSpXgvknXdbSYGepERQT9WcCMINat0Lep3NoLwHPaQt3qZ UgMKHxB2tSVRGSJmV5NANfnSXdPavHip1fzIgHxZECYJhGvywLdeU1CEkpsP/v/YeCLS 3+8z+30hMDUw6vSkjR8f+W+a6FO96Do9WCIx1PDGvUu9P4PKRda51oYlbjT2oA8qn1xe iRlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796352178; x=1796956978; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=nqU2iyzMDFBKchc8fsvqUE95yH8gVo7WsqEXNzCEru4=; b=MIPBkzq3nDvl41xa9TdpPYaRo1WFXyA8exBj9fznMg+w8suAT/Ak3x89Oe0w1LDWC5 CzSBH4NkFKE7Awn6hUhjIWu3ICmLxG/MEo+441+XyxHTFj3OThZLJ0wPjEmDb3Bi/0a1 mnYKP4ckmYInPaylrLEAzQ67RC4ey4o98zc8NBIs/MCHEbxRC87KJULtTPzdy0kQJESF N1/A9rkRalC/qN6wJOPaBxzKynpddAnrbn2TUfbucu1D82YSM5s4e3TSjWI0TcRoSZg/ SDLUN9QVaEf6Eq7gkytwc9Ac+nTFPgBaXmmqKFbUUAinAjCc6kLVuu1G8r2qOpa2ZFIg JgeA== X-Gm-Message-State: APuU4Z/Bm8V8kbBjgKHSVUeBtKR7suB2fc1C0yQxbdQMSQ83tpKsuEZP cZ0Ah+I7KQJgBqnRd6P8N/5IQ70WWumaGbiJvuFOOFQam61L6CB95vNqbgAlLDOy5I4= X-Gm-Gg: AZFdTZe7TgEWirWmxDXMvncft6quUGHZOygcCGA4UHTl2NYoelZeze7KNWrP4bCGnf5 fK8l1Mf4GcIE/3TXHsrFnGVT8v88QlFGAY3od2VSiDv6fRf31sLeKZCfu/Z89uX19kUTJ8NKI9b og/lE0oIRjSD4YYojl7W1TQUWZfDuCZjrANL+dautg+JHxSgl5/s866TAUJXEMdf4FfRMupV+uE VpRhyV/wGRK4i3nYcoOp45tya8IWC7TI6pp6rspK8+BzMs8z4q6oyXPoIphdtnQyqpxfy5w+/Ju v25a1hYTB/M3V4YKz/BMxN453nmj92uYJmlW/+RmTDLExXZfv+Vn4n2ccmkvXkCh5TDnmz0ZxWL yDRxiILOKkODZ4uZ+Q8CU8OyAJGRNqrDMWSZJvLrUQXuzZ55nC3v8IbLtTpGpmYUZXCIiYLy5uv pR/Mz2zYZEHUo/a0KR5Sloc7ZlkV2NP/uXHZHG7eeyiHOzRuzF0h+P1XttntpYRI5MFmqhliKS4 dD9zHeDpHk7x4pQ8OaLKbUkgyqKy9dhCYdZqgbcrapwViVhJIQJDuA8qWYMakZQGVz5x62rFkrv 7ydWxGVxJUvMbJkLN4J1ezjj9WN3fno= X-Received: by 2002:a05:6808:5198:b0:571:58db:418f with SMTP id 5614622812f47-57f209242d5mr619962b6e.67.1796352178229; Thu, 03 Dec 2026 18:42:58 -0800 (PST) Received: from [172.22.22.28] ([76.156.233.211]) by smtp.gmail.com with ESMTPSA id 5614622812f47-57f1f6a74e8sm572711b6e.7.2026.12.03.18.42.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Dec 2026 18:42:57 -0800 (PST) Message-ID: <89b3dc0b-42a5-46dc-9176-5a5cff685455@riscstar.com> Date: Thu, 3 Dec 2026 20:42:57 -0600 X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 2/4] reset: toshiba: introduce a TC9564 reset driver To: sashiko-reviews@lists.linux.dev Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org References: <20261203200948.1595470-1-elder@riscstar.com> <20261203200948.1595470-3-elder@riscstar.com> Content-Language: en-US From: Alex Elder In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/3/26 2:24 PM, sashiko-bot@kernel.org wrote: > Thank you for your contribution! Sashiko AI review found 2 potential > issues to consider: > - [Medium] reset: tc9564: missing readback to flush posted PCIe write in > reset_update() > - [Low] reset: tc9564: .name = KBUILD_MODNAME duplicates auxiliary > driver name > -- > > commit 6f848968fe16a18419ce4578c31fdc5a7780f95e > Author: Alex Elder > > reset: toshiba: introduce a TC9564 reset driver > > This commit adds an auxiliary reset controller driver for the Toshiba TC9564 > SoC, using MMIO registers mapped and passed as platform data by the TC9564 > clock driver. > >> diff --git a/drivers/reset/reset-tc9564.c b/drivers/reset/reset-tc9564.c >> new file mode 100644 >> index 0000000000000..218be6dbbb2a3 >> --- /dev/null >> +++ b/drivers/reset/reset-tc9564.c > > [ ... ] > >> +static int reset_update(struct reset_controller_dev *rcdev, >> + unsigned long id, bool assert) >> +{ >> + struct tc9564_reset *reset = dev_get_drvdata(rcdev->dev); >> + const struct reset_init *init = &reset_init[id]; >> + void __iomem *reg = reset->regs + init->offset; >> + u32 mask = BIT(init->bit); >> + u32 val; >> + >> + guard(spinlock_irqsave)(&reset->lock); >> + >> + val = readl(reg); >> + if (assert) >> + val |= mask; >> + else >> + val &= ~mask; >> + writel(val, reg); >> + >> + return 0; >> +} > > [Severity: Medium] > Should reset_update() read back reg with readl() after writel() to flush the > posted PCIe write? > > The reset registers are on PCIe Function 0 BAR 4, where writel() is posted. > Returning before the write reaches the hardware can shorten consumer reset > delays or let subsequent accesses to XGMAC 1 on Function 1 BAR 4 race with > the reset update. I think this is a correct observation. The spinlock does nothing to guarantee that the written value has reached its target by the time we're done. I'll add a readl() call following the writel() above. > > [ ... ] > >> +static struct auxiliary_driver tc9564_reset_driver = { >> + .name = KBUILD_MODNAME, >> + .probe = tc9564_reset_probe, >> + .id_table = tc9564_reset_ids, >> +}; >> +module_auxiliary_driver(tc9564_reset_driver); > > [Severity: Low] > Does setting .name = KBUILD_MODNAME duplicate the auxiliary driver name? > > module_auxiliary_driver() already passes KBUILD_MODNAME as the module name to > __auxiliary_driver_register(), which formats driver.name as "%s.%s" when > auxdrv->name is set. This registers the driver as reset_tc9564.reset_tc9564 > in sysfs and logs; omitting .name registers it as reset_tc9564. This is a good observation as well. If we don't set .name here, we don't get the duplication indicated. I'll remove the assignment of .name. -Alex