2
0

351-irqchip-bcm-6345-l1-request-memory-region.patch 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. From patchwork Thu Mar 16 19:28:33 2023
  2. Content-Type: text/plain; charset="utf-8"
  3. MIME-Version: 1.0
  4. Content-Transfer-Encoding: 8bit
  5. X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?=
  6. <[email protected]>
  7. X-Patchwork-Id: 13178238
  8. Return-Path: <[email protected]>
  9. X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
  10. aws-us-west-2-korg-lkml-1.web.codeaurora.org
  11. Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
  12. by smtp.lore.kernel.org (Postfix) with ESMTP id 5EF2AC6FD19
  13. for <[email protected]>; Thu, 16 Mar 2023 19:28:43 +0000 (UTC)
  14. Received: ([email protected]) by vger.kernel.org via listexpand
  15. id S230076AbjCPT2l (ORCPT <rfc822;[email protected]>);
  16. Thu, 16 Mar 2023 15:28:41 -0400
  17. Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56412 "EHLO
  18. lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
  19. with ESMTP id S230039AbjCPT2k (ORCPT
  20. <rfc822;[email protected]>); Thu, 16 Mar 2023 15:28:40 -0400
  21. Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com
  22. [IPv6:2a00:1450:4864:20::42f])
  23. by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7259B7D9F;
  24. Thu, 16 Mar 2023 12:28:38 -0700 (PDT)
  25. Received: by mail-wr1-x42f.google.com with SMTP id y14so2539231wrq.4;
  26. Thu, 16 Mar 2023 12:28:38 -0700 (PDT)
  27. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
  28. d=gmail.com; s=20210112; t=1678994917;
  29. h=content-transfer-encoding:mime-version:references:in-reply-to
  30. :message-id:date:subject:cc:to:from:from:to:cc:subject:date
  31. :message-id:reply-to;
  32. bh=j8afldfRZftLeVmekmQfoh01jVdumsVP7nkKoPaU3Q0=;
  33. b=FzMRr5ekh/fDiJqTlezNj6nLjzvn5z92FtYeB8MquVSMB8PuvarccnyqAzsXiccf+v
  34. uwRFIomnTWNLGVjzc1xrB2hGiCKD3jBo5n1u8p/yEV6rpolbxVjfM7eTHXyAHXGXz7ZJ
  35. TPeVbWfAlxiSD6+BPtXr/efehcdI64fIoL6G/U1WHNMo01Tzr/Obf3y5tug17N0fGcXg
  36. CH6E5a2HguZUtwrm26LcK9IOV/7xEx5eIE1cOvTLMxPbGWaZwEjjP16HylJr06xRLhaf
  37. RpiYBT3mXwwuOx0jLOhqavY/2kZ9GVbZRWMMwZrZv9xNO13SBwc1VUVgD4k3FntnSk7Z
  38. AaOQ==
  39. X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
  40. d=1e100.net; s=20210112; t=1678994917;
  41. h=content-transfer-encoding:mime-version:references:in-reply-to
  42. :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
  43. :subject:date:message-id:reply-to;
  44. bh=j8afldfRZftLeVmekmQfoh01jVdumsVP7nkKoPaU3Q0=;
  45. b=OaA5DMgqalrfqO5iOtmmxFPsH90MkN7l4EJpyVnzuiO1Wd6rSCpqPOR7xpxZno8OPP
  46. tdfm4vzn9Ie4AUDbFKDTUlPG+tgkmIruo3K9C0VnY9DD2PRZMEYBbWaJKU1otqKt0NKu
  47. IAAHNvxvQvCESKzbXFLYwWbRKFScOSMGmGBTDfgThz51A18Ff1hJy/BmnuZk7M2TLgHO
  48. wQpy9t7oeB/Hkxl41y46emLc/nESsvwvAG/fx/zPzCe9UiaQLrdZq+BKeOwSBedktzK5
  49. U/ZTfgzU2UGSI67aGRqqGnI0uXq+MAJMK18qzM0VByxj6W+AXJ6BJr5P0quljeQ8upSg
  50. bEUg==
  51. X-Gm-Message-State: AO0yUKWnqTlccBDnqwCSRdqOBGc2FyfiLy1Tg7EjPENlISpzXuDYwW/R
  52. lJSI06rrfq+Vel/SigfpGJI=
  53. X-Google-Smtp-Source:
  54. AK7set/jYfYl9ttVzIXJO+ZQVfa6cE/yOsP8fx4teiTmGNNWyVlIJRzMAlF3IUGqRAXAmY3hAabIuQ==
  55. X-Received: by 2002:a5d:40ce:0:b0:2cd:ceab:df1a with SMTP id
  56. b14-20020a5d40ce000000b002cdceabdf1amr381006wrq.32.1678994916642;
  57. Thu, 16 Mar 2023 12:28:36 -0700 (PDT)
  58. Received: from atlantis.lan (255.red-79-146-124.dynamicip.rima-tde.net.
  59. [79.146.124.255])
  60. by smtp.gmail.com with ESMTPSA id
  61. l10-20020a5d4bca000000b002cfea3c49d5sm180041wrt.52.2023.03.16.12.28.35
  62. (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
  63. Thu, 16 Mar 2023 12:28:35 -0700 (PDT)
  64. From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= <[email protected]>
  65. To: [email protected], [email protected],
  66. [email protected], [email protected],
  67. [email protected], [email protected],
  68. [email protected]
  69. Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= <[email protected]>
  70. Subject: [PATCH v2] irqchip/bcm-6345-l1: request memory region
  71. Date: Thu, 16 Mar 2023 20:28:33 +0100
  72. Message-Id: <[email protected]>
  73. X-Mailer: git-send-email 2.30.2
  74. In-Reply-To: <[email protected]>
  75. References: <[email protected]>
  76. MIME-Version: 1.0
  77. Precedence: bulk
  78. List-ID: <linux-mips.vger.kernel.org>
  79. X-Mailing-List: [email protected]
  80. Request memory region in order to display it in /proc/iomem.
  81. Also stop printing the MMIO address since it just displays (ptrval).
  82. Signed-off-by: Álvaro Fernández Rojas <[email protected]>
  83. Acked-by: Florian Fainelli <[email protected]>
  84. ---
  85. v2: request memory region and stop displaying MMIO address.
  86. drivers/irqchip/irq-bcm6345-l1.c | 6 ++++--
  87. 1 file changed, 4 insertions(+), 2 deletions(-)
  88. --- a/drivers/irqchip/irq-bcm6345-l1.c
  89. +++ b/drivers/irqchip/irq-bcm6345-l1.c
  90. @@ -253,6 +253,9 @@ static int __init bcm6345_l1_init_one(st
  91. if (!cpu->map_base)
  92. return -ENOMEM;
  93. + if (!request_mem_region(res.start, sz, res.name))
  94. + pr_err("failed to request intc memory");
  95. +
  96. for (i = 0; i < n_words; i++) {
  97. cpu->enable_cache[i] = 0;
  98. __raw_writel(0, cpu->map_base + reg_enable(intc, i));
  99. @@ -331,8 +334,7 @@ static int __init bcm6345_l1_of_init(str
  100. for_each_cpu(idx, &intc->cpumask) {
  101. struct bcm6345_l1_cpu *cpu = intc->cpus[idx];
  102. - pr_info(" CPU%u at MMIO 0x%p (irq = %d)\n", idx,
  103. - cpu->map_base, cpu->parent_irq);
  104. + pr_info(" CPU%u (irq = %d)\n", idx, cpu->parent_irq);
  105. }
  106. return 0;