Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD63BC6FD1D for ; Tue, 14 Mar 2023 10:12:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230149AbjCNKMA (ORCPT ); Tue, 14 Mar 2023 06:12:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230154AbjCNKLo (ORCPT ); Tue, 14 Mar 2023 06:11:44 -0400 Received: from xry111.site (xry111.site [89.208.246.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 999DD9B2DF for ; Tue, 14 Mar 2023 03:11:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1678788655; bh=W9skhsvXEGQ08C7gklvlc3PjcG4M+gp62gDeZRXjb6E=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=nGayq+lZCB/U9zaPu9LsWK93kFNf8NW8Z9MDjdYrRURLr72YFyigIXNUCWtW+ltO1 clJGtkh5KLqnhjAqsXJS5Dty2n2F5zkD9Dj6XNSW0ZPGqqxQO4+pE/2spQ15WtojCH GJCacm6boFHGCOEeT8dK3uWyO8h6C/9RBnzeqG+I= Received: from [192.168.124.9] (unknown [113.140.29.13]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384)) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 901BD65CBE; Tue, 14 Mar 2023 06:10:53 -0400 (EDT) Message-ID: <109608ce770c2da249a7624f55666da640260f28.camel@xry111.site> Subject: Re: [PATCH] LoongArch: Make WriteCombine configurable for ioremap() From: Xi Ruoyao To: Huacai Chen Cc: Huacai Chen , loongarch@lists.linux.dev, Xuefeng Li , Guo Ren , Xuerui Wang , Jiaxun Yang , linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn Date: Tue, 14 Mar 2023 18:10:46 +0800 In-Reply-To: References: <20230314085433.4078119-1-chenhuacai@loongson.cn> <21f5aba50b7732b48d2610a5015186adf6bdfb38.camel@xry111.site> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2023-03-14 at 18:02 +0800, Huacai Chen wrote: > > Hmm, is it possible to make a PCI quirk so SUC/WUC will be decided > > automatically from the vendor:device ID of the PCI root controller? > > Then we don't need to rely on the user or distro maintainer to select a= n > > option.=C2=A0 I see there is already many architecture-dependant #if > > directives in drivers/pci/quirks.c so I guess such a quirk is acceptabl= e > > in PCI tree... > Not a good idea, pci quirks need too long a time to review, and we > don't know when this issue can be fixed in hardware. How about make a PCI fixup in arch/loongarch/pci/pci.c then? I think we just need to set a flag in the fixup, then check the flag in ioremap_wc... --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University