Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp840574rdb; Fri, 23 Feb 2024 01:19:53 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXP+PWRnYr3dAe3m97pmctQmwG7E8YtUP8erAC7+MLRbNIzm/dsP57ignXAWOaegfDK1hijtRfrlCry9t78h8TbRP/EXJcSzj+mkqSCMw== X-Google-Smtp-Source: AGHT+IFclXy89fzH7vmzZdtpmGEBUUFrbFJMPT9ZMoWjMSsMWlPSJ2W/VYuYqHj5zkLf5hwAg3Sn X-Received: by 2002:a25:7546:0:b0:dc2:3f75:1f79 with SMTP id q67-20020a257546000000b00dc23f751f79mr1643744ybc.23.1708679993117; Fri, 23 Feb 2024 01:19:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708679993; cv=pass; d=google.com; s=arc-20160816; b=1FmrJrKtD7FOquSzNEOLqDgkBkoWItZEVM6ZfE985W71eRNSqqnjTavqsWnjjjyKNl cGU2nfeet5ZiLdu4KComFt/vwmcd38NwIOvzLHQSPKjSLhul9QlB0clPkZ/1bZPn0nSp 9t2CSO1Yo6uTLitcEw06jXNGZgviOFSwCk0wqb+Y5nQE4RpddIiLKD2G9ooEcfgqU8N8 AagKwzegjrGOSDTxDsZcbyzfc5IZq4V/xQGGvwhWJBpZetb6gp2IG7P2K7r9ZJ/mjupE dxiCPqn/mjz4JEyGicW3tUyZHuC7thA+Yvbeo4q0bOkRB8bOa0gQTYKxRAVmWNEJm2EF FZvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=cp5jNViZjxAjL72UUM4tb5/d3TXnKlkiyFCiXhAzJEk=; fh=VvS/3wpzBWtXeGWzAoODk7k3kFIqs/DHlycSZjyFdzI=; b=bxTNzvKJB/PBBwuKdIVEWKXJxDWtv8rq0wepmhL4wdhNl8me7SSceBJf/PtLcFL+EO ioc1kMJQJTjRj6f4WbI/r6HLfFp8IoEZkbQj/W9QyDDZ+WjIAdh+TTSvDNa+8hzSNpw9 +6fy9o6hGUr3GURyYNqi9ThVXIu+SZm2AQU4Zch7MoXWOyfmJpYzH9qggp/IniNLDwXY HWPItJGWYzk2I8bJ7ZxCl6eHz1VQede5C5hLWattnyq/9JGeJhVMjb3mQf2HDmhkOiPP 1pNc4JQqt1atvMYud9B5qW5trnzB9i6fiO3GcHzhi5PGH3Marp5pG6OHs7y6JSORmJAj g8VA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=alpha.franken.de); spf=pass (google.com: domain of linux-kernel+bounces-77996-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77996-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id a2-20020a05622a02c200b0042e219f8227si9666832qtx.371.2024.02.23.01.19.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 01:19:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77996-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=alpha.franken.de); spf=pass (google.com: domain of linux-kernel+bounces-77996-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77996-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BECD81C2121C for ; Fri, 23 Feb 2024 09:19:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CAECA5CDD2; Fri, 23 Feb 2024 09:19:29 +0000 (UTC) Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BE4A75C61F; Fri, 23 Feb 2024 09:19:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.175.24.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708679969; cv=none; b=Gd3XEreIpvCUgMy62kxyTdbkrXLyyzmJAWuKjPa43op9w7EH7Orf9/dXFJfOhkz7xRd8i8S+XBa2QH8crG+YiBTihrMeWAMbf7ONBBdnv94EBswyi4jaIxmjONF0us5K4vIH2ZCnUujEOlR71rlHHx9G69h8io5vSsjG73eSOpM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708679969; c=relaxed/simple; bh=6CMFof3aEOjiVtZ6J4iQukC3w3fqUlorNiOBhG5SfRM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TFnvUCXRlwTDURFCjOl+oMKx1Q0/W7y6I0Xa4KneWgUmV+YLftv59A59ObTVZBPRzjM8zbjch14Atrz1vpyq3rC4DodFE6NSiNuvVOIlSqxgB5cvIAjFc00u/kVpqaTfBygtTr+8sMJoQurzy2yV+RvtDWTpPDHy9W1HsPw67fg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de; spf=pass smtp.mailfrom=alpha.franken.de; arc=none smtp.client-ip=193.175.24.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alpha.franken.de Received: from uucp by elvis.franken.de with local-rmail (Exim 3.36 #1) id 1rdRi6-0003J9-00; Fri, 23 Feb 2024 10:19:14 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id 089C8C0267; Fri, 23 Feb 2024 10:06:33 +0100 (CET) Date: Fri, 23 Feb 2024 10:06:33 +0100 From: Thomas Bogendoerfer To: Serge Semin Cc: Greg Kroah-Hartman , Jiri Slaby , Arnd Bergmann , Jiaxun Yang , Alexey Malahov , Stephen Rothwell , Andrew Morton , linux-mips@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/4] mips: cm: Add CM GCR and L2-sync base address getters declarations Message-ID: References: <20240215171740.14550-1-fancer.lancer@gmail.com> <20240215171740.14550-3-fancer.lancer@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Feb 21, 2024 at 09:39:58PM +0300, Serge Semin wrote: > On Tue, Feb 20, 2024 at 06:24:25PM +0100, Thomas Bogendoerfer wrote: > > On Thu, Feb 15, 2024 at 08:17:27PM +0300, Serge Semin wrote: > > > Based on the design pattern utilized in the CM GCR and L2-sync base > > > address getters implementation the platform-specific code is capable to > > > re-define the getters and re-use the weakly defined initial versions. But > > > since the re-definition is supposed to be done in another source file the > > > interface methods have been globally defined which in its turn causes the > > > "no previous prototype" warning printed should the re-definition is > > > finally introduced. Since without the global declarations the pattern can > > > be considered as incomplete and causing the warning printed, fix it by > > > providing the respective methods prototype declarations in > > > "arch/mips/include/asm/mips-cm.h". > > > > > > Signed-off-by: Serge Semin > > > > > > --- > > > > > > Note as I mentioned in the previous patch, since the weak implementation > > > of the getters isn't utilized other than as a default implementation of > > > the original methods, we can convert the denoted pattern to a simple > > > __weak attributed methods. Let me know if that would be more preferable. > > > > > how about simply remove __mips_cm_l2sync_phys_base() and do everything > > via mips_cm_phys_base(). And at the moment without anyone overriding > > mips_cm_phys_base I tend to keep static without __weak. If someone > > needs, we can change it. Does this make sense ? > > To be honest my arch code (not submitted yet) do override the > mips_cm_l2sync_phys_base() method. The memory just behind the CM2 that's fine, I just wanted to know a reason for having it provided as weak symbol. > What about instead of that I'll just convert both mips_cm_phys_base() > and mips_cm_l2sync_phys_base() to being defined with the underscored > methods body and assign the __weak attribute to them? works for me ;-) I'll pick patch 3/4 of this series, so no need to resend them. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]