From patchwork Thu Feb 15 17:17:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 201662 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp548791dyb; Thu, 15 Feb 2024 09:18:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWp17BUCskMGVk8sdHwgO6yehvED7NSBXKJbouVxtknBAhdgPPT1rvsA8K2QjvInuzZS3GmI3Sqs2hpAwxWjPaVs/SjUQ== X-Google-Smtp-Source: AGHT+IEbw+D/p3kJhLx21zdsxit9crLT6BghjPqDiDyYrLjkElSI1DtVeODb0lCxKq/2iyt7Eiyj X-Received: by 2002:a17:902:fe18:b0:1db:398c:3413 with SMTP id g24-20020a170902fe1800b001db398c3413mr2190476plj.46.1708017517128; Thu, 15 Feb 2024 09:18:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708017517; cv=pass; d=google.com; s=arc-20160816; b=ovbd1582/kfyqWyIwrdsAf+KRNjyOfeeHKMhsqF9oeex5K7asMX6WhXQXep/z/tR2U yVoQVZ78LYVjp3kKAeTZzhRi1W5OHYtSnx1NIySuBK7BXKGsdbT8yfUrdATad/Jb4hPm TF6CT4IcxBlvcztPqtAIFNaBJqQNajI1aYt/yGd5NDVPUBDPGql6mTZUf3nwHJqlPWHT kEPloN4B3+FXmL1XmMqv7/Uh2ce4zEJJACJVAcRRTsV6yeLdBcAstonyfEV6ckYFM8fr VZzFcn25Unu77lg9yu62XvlR/Xa4hhca7SgGLRYGsOxXBk63sLGDS1slSwjNgfHD91oF txHg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=LWD6NBu3YiSI1wWq6kinvIvYBM4vO3pv/UsA9bvpgzQ=; fh=w2wKCE38naN0/k+QB0Ip7Si7m0GIz+xPzwj1+AYcH4k=; b=pttTkZSWZFu3JThMHLvHEdKseNUiRglajTGiyuKGpoZSmyELvTvpUKpH5Yg/lqDYuM MkmhndtpAad9rotsLt9WwfuNCWFHIrpxWlwD7/txy0Wf2RDhxyqnQHzmwApV3N7JIjB9 A2AXBNTkSxNVdwewmfLmAPtsacatwoycSzLE1PETmqlwzbDfACeVvFFHpie2co4zb9/1 DJdavGZgyQ6JLH0jGmt4Ny/rkl+AX3qtsjjl03Ielwko4XW4R8eEtINg8nkv7oTHzDzW YtFEmkXWQVLJP/FRvYFKB1b6y9ELS75q0ObsBx2VnWCEjizFxj0At7owPCjjKf1XdT1o oRVw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GvSPP72q; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-67387-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67387-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u16-20020a170903125000b001db2d82e7f1si1457643plh.137.2024.02.15.09.18.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 09:18:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67387-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GvSPP72q; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-67387-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67387-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 91EA6282738 for ; Thu, 15 Feb 2024 17:18:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA8DF136676; Thu, 15 Feb 2024 17:18:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GvSPP72q" Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (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 711B2136983; Thu, 15 Feb 2024 17:17:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708017478; cv=none; b=HH4dtq/UOJRKhCOzkwlHHVbgcrNY/zlxvOP66ZawKEExackHxeH/jR2YVSUm41AG990TbkFWs1HCGtFvplYviPBTHvbQ4rcifvuSz02+mI+QVwsdRoUMgJxxF1dM4XAmGsxqhRdPSEMK5gp98eT5BpsAikOoalOlgJwlNQ/paio= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708017478; c=relaxed/simple; bh=gv5DE7RXsTmH4yqXPX4t1wYgvuqILt6r3eF0XEGiPNI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AHkPBghjmXYdCP8cRpZZ5z9BdFEbk9qyOJp6uR8HCPK+93P9eyRi469lDdYXxsB1/DhsIQrSkXwnTov73LpnnQfBNI70veE4RBMpb17w61bJUJXOB7Lccn+XB03k/bUWoQZ+nU3WmEJSMX+MpgG4zhr6jLwbayJcDSVXmUhR4uQ= 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=GvSPP72q; arc=none smtp.client-ip=209.85.167.45 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 Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-51181d8f52fso1400942e87.3; Thu, 15 Feb 2024 09:17:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708017474; x=1708622274; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LWD6NBu3YiSI1wWq6kinvIvYBM4vO3pv/UsA9bvpgzQ=; b=GvSPP72qNDUfoP1jX15Gj5FDl9IADUxKWYljrXFzxrEyw4wfrAhbB8vlUtQ9nKXZVp PrF1m/x1bx5iaVEDb5u60zhqksBLS/jAgtBT32v4SVA88wdIJf/8HZo3suPjGZf4zju+ B/qRbvueSQmyh9rKarhQTg0dn1gzhaLlNxgyQgDXa81MA6aXMM2WV7O1C9/PklE0tnbK ve0Qglbd/1QqY6wj+yNoym4GjMqoYhrgQYed4CUkkEYOLmNj/RuJvWdJ0+1hw9CzyF3Q O5QvMO9I/IuS6Pgp5E0K4/d1F1HOGBZOM+cHkXkPc7fIBg8+imhbGHOqyqVs59QRIK4y aWFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708017474; x=1708622274; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LWD6NBu3YiSI1wWq6kinvIvYBM4vO3pv/UsA9bvpgzQ=; b=gtIQxG//Ep3mPNERhoFigrgZxuWFWoba3Ayz8r2eH8dWfexi75KJpfkVmDMnl14ZoE L+Bkv1vxgugHuYKwhhKWZzrxO5N08jwvzcs2Cfs9kvWEt/euv+Ck61r3PAFbsX/LK096 k5jHLsNBdruZlwl+UcNrSv0nvwBLVTrFFt0e0MKcskItOo1u5v93rVikZbghT1Yl5eeI XlOf2gM8BaaxgvRH1TVx4ZfeHSIJOi/lW8wunguyr+CqpSi8mWHhsoTGoEIpDmmq87de 4fARE+E/Zcp4h/UbR3tPzjfKVfcSpNq/6oNWwat3pODqfOiOdez+/5J0Ewssq7rvX+CY eqJQ== X-Forwarded-Encrypted: i=1; AJvYcCXfbxnYFRfpwa9yygmiHIATmw8XrKZ/YtwZRiknsY1HQmjDW9tZVbzmlscesBAc9i0n7Z95ZrvYtrHH0uCtzS8CH0hwcrwyTuBcC5c9WRa82TDy6YN6SEQTQJMnHkd920GGb5EaO3JUSvo+CJtbHmXJfRMikVGKnaCpTuVCDSE3+0Oi/BqRYQ== X-Gm-Message-State: AOJu0YwIvXCsdQ+LLY48Rwsif5VXEfDRu3CZX3KnxfGSJ5AEBiDumE4J 3zxSNkbL7X1wTQ49OK2Q+rfTiC6phpdwWcaZylkVjW3wchPS3D2E X-Received: by 2002:ac2:5bc4:0:b0:511:4844:77f2 with SMTP id u4-20020ac25bc4000000b00511484477f2mr1787996lfn.40.1708017474151; Thu, 15 Feb 2024 09:17:54 -0800 (PST) Received: from localhost ([178.176.56.174]) by smtp.gmail.com with ESMTPSA id x21-20020ac24895000000b00511570772f1sm309401lfc.303.2024.02.15.09.17.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 09:17:53 -0800 (PST) From: Serge Semin To: Thomas Bogendoerfer , Greg Kroah-Hartman , Jiri Slaby , Arnd Bergmann , Jiaxun Yang Cc: Serge Semin , Alexey Malahov , Stephen Rothwell , Andrew Morton , linux-mips@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] mips: cm: Add CM GCR and L2-sync base address getters declarations Date: Thu, 15 Feb 2024 20:17:27 +0300 Message-ID: <20240215171740.14550-3-fancer.lancer@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240215171740.14550-1-fancer.lancer@gmail.com> References: <20240215171740.14550-1-fancer.lancer@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790986176304038266 X-GMAIL-MSGID: 1790986176304038266 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. --- arch/mips/include/asm/mips-cm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/include/asm/mips-cm.h b/arch/mips/include/asm/mips-cm.h index 1f143dfad7a2..6dbe74dc323d 100644 --- a/arch/mips/include/asm/mips-cm.h +++ b/arch/mips/include/asm/mips-cm.h @@ -32,6 +32,7 @@ extern void __iomem *mips_cm_l2sync_base; * name mips_cm_phys_base (without underscores). */ extern phys_addr_t __mips_cm_phys_base(void); +extern phys_addr_t mips_cm_phys_base(void); /** * __mips_cm_l2sync_phys_base - retrieve the physical base address of the CM @@ -46,6 +47,7 @@ extern phys_addr_t __mips_cm_phys_base(void); * underscores). */ extern phys_addr_t __mips_cm_l2sync_phys_base(void); +extern phys_addr_t mips_cm_l2sync_phys_base(void); /* * mips_cm_is64 - determine CM register width