From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759063AbcHaKVV (ORCPT ); Wed, 31 Aug 2016 06:21:21 -0400 Received: from mail-lf0-f45.google.com ([209.85.215.45]:34260 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751128AbcHaKVT (ORCPT ); Wed, 31 Aug 2016 06:21:19 -0400 Subject: Re: [PATCH v2 12/26] MIPS: CPC: Provide a default mips_cpc_default_phys_base To: Paul Burton , linux-mips@linux-mips.org, Ralf Baechle References: <20160830172929.16948-1-paul.burton@imgtec.com> <20160830172929.16948-13-paul.burton@imgtec.com> Cc: linux-kernel@vger.kernel.org From: Sergei Shtylyov Message-ID: <6f7cbf5c-7a74-069b-6205-be0c3cf369fd@cogentembedded.com> Date: Wed, 31 Aug 2016 13:21:13 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160830172929.16948-13-paul.burton@imgtec.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello. On 8/30/2016 8:29 PM, Paul Burton wrote: > Provide a weak default implementation of mips_cpc_default_phys_base > which reads the base address of the CPC from the device tree if > possible, and failing that returns the existing physical address of the > CPC as read from CPC base address GCR. This allows for platforms to make > use of the CPC without requiring platform code. > > Signed-off-by: Paul Burton > --- > > Changes in v2: None > > arch/mips/kernel/mips-cpc.c | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/arch/mips/kernel/mips-cpc.c b/arch/mips/kernel/mips-cpc.c > index 566b8d2..b188787 100644 > --- a/arch/mips/kernel/mips-cpc.c > +++ b/arch/mips/kernel/mips-cpc.c [...] > @@ -21,6 +23,22 @@ static DEFINE_PER_CPU_ALIGNED(spinlock_t, cpc_core_lock); > > static DEFINE_PER_CPU_ALIGNED(unsigned long, cpc_core_lock_flags); > > +__weak phys_addr_t mips_cpc_default_phys_base(void) I think it would look better as: phys_addr_t __weak mips_cpc_default_phys_base(void) The other weak function you touch further in the patchset looks this way... [...] MBR, Sergei