From patchwork Tue Oct 8 23:45:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 11180171 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E2BB31575 for ; Tue, 8 Oct 2019 23:45:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C4900218DE for ; Tue, 8 Oct 2019 23:45:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="B6RHNGrO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729744AbfJHXpI (ORCPT ); Tue, 8 Oct 2019 19:45:08 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:39135 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726068AbfJHXpI (ORCPT ); Tue, 8 Oct 2019 19:45:08 -0400 Received: by mail-pg1-f193.google.com with SMTP id e1so187299pgj.6 for ; Tue, 08 Oct 2019 16:45:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=g6+fgv7o5Mc/zUQb4lUQ0sPjn9LWoOyx6TnpyyZahZg=; b=B6RHNGrOm07WuboIxNb1d1jtA7CxE+Hg4E/LLnretKo9zn+WzF/8/gnt7eHlHC7kuV a6O5MtzttqIam4d9/Sfwv7663+um+CwN1uJMQAk6inURP47Sw3biIBa5adylsqJrHD7k eAh0rhspz/fShqdgLZyVDhAKqUlBvWElg4vrk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=g6+fgv7o5Mc/zUQb4lUQ0sPjn9LWoOyx6TnpyyZahZg=; b=lnSpXO7qF60H94yaGLM7TrzR5huNdIlVWDnJbNNTFt8fkNWT6zbwXATWMYvHlaayLv Z5RPIl4d7hHgTw5nqFYsgjxfa2CDM5fUKJOw7nLHUN1qDZH3T1cKuwCTQACevC1Sxptk dsfzd0KXLD84FPoawd4CPuZ5vrdzOFTbU+avhjP60z27PZBAnZuRxxhB912lQIE4QmD/ mZNy+CN4+QZcmj7Mjaz1zNqjDcQH4MQ30iPWECLIyjFRotL37j4iGFkAbOxwjXYACplf 31qxfEwjtJeCB2VNtD7aFF99N/VZfyXDg0/rPWtxUeK8VqRcjGVb2vU1O3n9ADxQxn7o 5B9w== X-Gm-Message-State: APjAAAUaffQdsYp3SIwqr7k7p7GMoozyZL1RMiO9tnvfcbzULlz7LTqu INlC1YoDU0tqszNdALODqaYiYQ== X-Google-Smtp-Source: APXvYqyhBo3fTurEQKhDAY4F2lAq09MkB0eqZgCj9Vojx0DdkadMQ+Ue0N/CEyFcdaBCAoLbQXbrFA== X-Received: by 2002:a63:eb08:: with SMTP id t8mr1120368pgh.49.1570578307734; Tue, 08 Oct 2019 16:45:07 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id s202sm210671pfs.24.2019.10.08.16.45.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2019 16:45:07 -0700 (PDT) From: Stephen Boyd To: Andy Gross , Bjorn Andersson Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Venkata Narendra Kumar Gutta , Evan Green Subject: [PATCH v2 1/2] soc: qcom: llcc: Name regmaps to avoid collisions Date: Tue, 8 Oct 2019 16:45:04 -0700 Message-Id: <20191008234505.222991-2-swboyd@chromium.org> X-Mailer: git-send-email 2.23.0.581.g78d2f28ef7-goog In-Reply-To: <20191008234505.222991-1-swboyd@chromium.org> References: <20191008234505.222991-1-swboyd@chromium.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org We'll end up with debugfs collisions if we don't give names to the regmaps created by this driver. Change the name of the config before registering it so we don't collide in debugfs. Fixes: 7f9c136216c7 ("soc: qcom: Add broadcast base for Last Level Cache Controller (LLCC)") Cc: Venkata Narendra Kumar Gutta Cc: Evan Green Signed-off-by: Stephen Boyd Reviewed-by: Evan Green --- drivers/soc/qcom/llcc-slice.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom/llcc-slice.c b/drivers/soc/qcom/llcc-slice.c index 9090ea12eaf3..4a6111635f82 100644 --- a/drivers/soc/qcom/llcc-slice.c +++ b/drivers/soc/qcom/llcc-slice.c @@ -48,7 +48,7 @@ static struct llcc_drv_data *drv_data = (void *) -EPROBE_DEFER; -static const struct regmap_config llcc_regmap_config = { +static struct regmap_config llcc_regmap_config = { .reg_bits = 32, .reg_stride = 4, .val_bits = 32, @@ -323,6 +323,7 @@ static struct regmap *qcom_llcc_init_mmio(struct platform_device *pdev, if (IS_ERR(base)) return ERR_CAST(base); + llcc_regmap_config.name = name; return devm_regmap_init_mmio(&pdev->dev, base, &llcc_regmap_config); } From patchwork Tue Oct 8 23:45:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 11180169 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 66DB517D4 for ; Tue, 8 Oct 2019 23:45:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 46C002190F for ; Tue, 8 Oct 2019 23:45:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="TCcdP4Nb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727769AbfJHXpM (ORCPT ); Tue, 8 Oct 2019 19:45:12 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:46428 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729868AbfJHXpL (ORCPT ); Tue, 8 Oct 2019 19:45:11 -0400 Received: by mail-pf1-f196.google.com with SMTP id q5so340221pfg.13 for ; Tue, 08 Oct 2019 16:45:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hFAVYC3XM0iiwUmU9uc9RvZO3TOksuf/Klbv6GZY3e8=; b=TCcdP4NbmK6Zd+nsndsXfWNT7g9i4ibsEB7+fNkqpXk7gUh5AYroitEfrHKYA/Hf1S YM/7jXfa0Hkno3hSUrsbodKo8cY5Z1Ieqo8Fokem2qAdb5gpt6ZO97ZwtgJBbYm8tHpB jP44MEzKc0rA36mIWZTVpBbjXrdEXP5iO/hro= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hFAVYC3XM0iiwUmU9uc9RvZO3TOksuf/Klbv6GZY3e8=; b=k4qEFrlb9aSUDgvCaPeFRdeDS0A7A4mYU5EIBzroT/Q7e93ArDurUnLp9hWX0B7TLp gmo+Mg+c65nBJtz1Y7EUWN930iOFFKhqdDA7C2MxK84b0D3Xcn0ftzfc5tDET/cufVTI hekYvAJHkm8WUUILECSiUNt9HxIaUPddOXC7KI9BtJPHYC5WtLVVI9ohjGWRER65MyTj bL6YfyCHKNaE3flQ7H8catHnQyCM3A96NjcLGb7c0EV2Z2Uz+HDBdqUomh7rDB+5qSx5 czAtw5LaasQyeQR2pp3wKdEkz3mlrLqRF1gofP3ang+ylGVt4/YeuCgI8ov6jErBYnCw k95w== X-Gm-Message-State: APjAAAWZZSuvsQsT1e2PKSEfkx85Ox1vv0irv61UYKkGYGf9S1rcATFf fNKwD8IuOQF3Cxo/OybNSTSOdQ== X-Google-Smtp-Source: APXvYqyFFkKcFGWjRDwVFDODJz9fk+odgUjS03Z5Bp8Lldzec7aMPglCruu+rdoEmgfH13/vgMG6Aw== X-Received: by 2002:aa7:95a2:: with SMTP id a2mr572338pfk.252.1570578308881; Tue, 08 Oct 2019 16:45:08 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id s202sm210671pfs.24.2019.10.08.16.45.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2019 16:45:08 -0700 (PDT) From: Stephen Boyd To: Andy Gross , Bjorn Andersson Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Venkata Narendra Kumar Gutta , Evan Green Subject: [PATCH v2 2/2] soc: qcom: llcc: Move regmap config to local variable Date: Tue, 8 Oct 2019 16:45:05 -0700 Message-Id: <20191008234505.222991-3-swboyd@chromium.org> X-Mailer: git-send-email 2.23.0.581.g78d2f28ef7-goog In-Reply-To: <20191008234505.222991-1-swboyd@chromium.org> References: <20191008234505.222991-1-swboyd@chromium.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This is now a global variable that we're modifying to fix the name. That isn't terribly thread safe and it's not necessary to be a global so let's just move this to a local variable instead. This saves space in the symtab and actually reduces kernel image size because the regmap config is large and we can replace the initialization of that structure with a memset and a few member assignments. Cc: Venkata Narendra Kumar Gutta Cc: Evan Green Signed-off-by: Stephen Boyd --- drivers/soc/qcom/llcc-slice.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/soc/qcom/llcc-slice.c b/drivers/soc/qcom/llcc-slice.c index 4a6111635f82..50aea3f0be41 100644 --- a/drivers/soc/qcom/llcc-slice.c +++ b/drivers/soc/qcom/llcc-slice.c @@ -48,13 +48,6 @@ static struct llcc_drv_data *drv_data = (void *) -EPROBE_DEFER; -static struct regmap_config llcc_regmap_config = { - .reg_bits = 32, - .reg_stride = 4, - .val_bits = 32, - .fast_io = true, -}; - /** * llcc_slice_getd - get llcc slice descriptor * @uid: usecase_id for the client @@ -314,6 +307,12 @@ static struct regmap *qcom_llcc_init_mmio(struct platform_device *pdev, { struct resource *res; void __iomem *base; + struct regmap_config llcc_regmap_config = { + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .fast_io = true, + }; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, name); if (!res)