From patchwork Wed Jun 2 21:52:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 452549 Delivered-To: patch@linaro.org Received: by 2002:a02:c735:0:0:0:0:0 with SMTP id h21csp942623jao; Wed, 2 Jun 2021 14:53:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfWWF2dQ8LiVJWg+6+5BFDNme/o13gcXW7e0K1M/HmIXhCO5D4+FpbxwpwJcLoXlKyhj+n X-Received: by 2002:a17:90a:a087:: with SMTP id r7mr7735846pjp.84.1622670793145; Wed, 02 Jun 2021 14:53:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622670793; cv=none; d=google.com; s=arc-20160816; b=MarQnOFzh8M+KLt4ZWsQBCW+D5pSIbP84P937GrVTHBOkmnKZnQUxcy1TPNl9/A1PM YAgG3ORb4UbLUjv2FBfRXNuOl9vwaffFhRGH+V16ffyOnwelzD3fmMwzgbDgSDwQ8CQF ysiPMnXKe3jho6NddH7nfb08Z1YjbBOKPBp1P+23tdC9oJjymkexah/eTPAqYb9mnlmU yZ3WokRHRI5axcYx0NkoYfnPFeCNyHYG4liwTUw6m5HcvVpYaMmdYuHGny8WtUSoAGAX RomeTP5E/qeFbD6cw4R2Ahzh1Wfl6/W+HeMkp9s8ZlNOkGEd5GzN3qhFnNqBPsgNYxrT lYiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=294OLwHTColeKIbvM+Vxirn0n1T4QgV6EDZpTr74zIQ=; b=nrd3HD2VuZ/R5bCyghr+7Lgt/cDK1v35sTP9HWodNx57yc0Nnt06B1iyhL8Js5OOys W7ve7SFjwvvURsAfWYCSOfa6Pc6zUkhxqlPq3LJJ31OVAzBLdpEeBc7qc4G+qUX0zqlw REejujKPwCWWxURR/2u5r0NZ0LCEGXDsukSDuN0u00Sv3x5+MrCLGKMIpqo6V9IEWaKA luBOZ6Iui6+lzKfpBgHH75QygSLApRsHjwyfaHYYjMglwlGxvkZy5QqJEsCBUuYLdm09 Jk/6OAIM7XtC4KMC2sJPzD0CqwY6fNRXDwZgp3CE8OdBUfsnmfIhDpHdv4BP4r0OcOEc Hh6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@chromium.org header.s=google header.b=TPRhf40q; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id v15si962606plg.225.2021.06.02.14.53.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Jun 2021 14:53:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=fail header.i=@chromium.org header.s=google header.b=TPRhf40q; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 42F546EE79; Wed, 2 Jun 2021 21:53:04 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by gabe.freedesktop.org (Postfix) with ESMTPS id BCDB86EE5E for ; Wed, 2 Jun 2021 21:53:02 +0000 (UTC) Received: by mail-pj1-x1035.google.com with SMTP id l10-20020a17090a150ab0290162974722f2so2622047pja.2 for ; Wed, 02 Jun 2021 14:53:02 -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=294OLwHTColeKIbvM+Vxirn0n1T4QgV6EDZpTr74zIQ=; b=TPRhf40qFHect27NNVxe5HetAqBac8ZEqrTA6gXjniSh3j9Js2prokUdMKY1HzVkAF xf+7Wv8hjoeFaBhzy4ZlNv1Uk7WKURjIros/bhV+1xfc/X3fh3PR0afmqqHwLqfq6GgS UAm2fggL0u2uN7X88Tmj9A/BaL/6sRP9TOyPI= 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=294OLwHTColeKIbvM+Vxirn0n1T4QgV6EDZpTr74zIQ=; b=ICW3os+EyXQrbRHT6ixVAq8kBRbb/+aM7JJI4rGRoZ7ejyKUuHvtEV0GCLYXtWdmcF MV2rytt0C+urawTPzghZsc96XnJn6sMwLt28zvProrux8LLKtDis0OSgSuG5IIU5ZUD9 LcTloz77h1p56uRxG7cl6OzDSew5AFC77h6rPPwjehm+HA/XlF0xszXPzJJUcNL71VL/ y2tBn/9Vm+tpcMM1o/a3NtwWwR/enbuC19Nk0shYltdiE9zMi/fsoHHbMBCYu3mzRyzT +hyRlOLUCIPgfzccPA1s3rZWLRaAXuC8SoQQYfrmVgSku6T7J01Kp7d0u3AaFB/EuMwD 4rOw== X-Gm-Message-State: AOAM532Ie6pZCd+8vca/ymrLibAUrY3DuuzVHqUNVx2jdVhnFfNhHj6O MgGEN0kuhryWKPXevauEMmvGlA== X-Received: by 2002:a17:902:b48d:b029:fd:e7d2:4e98 with SMTP id y13-20020a170902b48db02900fde7d24e98mr32198306plr.55.1622670782179; Wed, 02 Jun 2021 14:53:02 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id w26sm646667pgl.50.2021.06.02.14.52.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Jun 2021 14:52:59 -0700 (PDT) From: Kees Cook To: Dave Airlie Subject: [PATCH 2/3] drm/msm/a6xx: add CONFIG_QCOM_LLCC dependency Date: Wed, 2 Jun 2021 14:52:51 -0700 Message-Id: <20210602215252.695994-3-keescook@chromium.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210602215252.695994-1-keescook@chromium.org> References: <20210602215252.695994-1-keescook@chromium.org> MIME-Version: 1.0 X-Patch-Hashes: v=1; h=sha256; g=b3814fe4bd33921403b01af8b87c0ad8bda4b97e; i=F41GiRbSdBaON2nBD/u4X1mdcnbCCx8eKO1cTn6eM9g=; m=lCmQIRI6GhZ9M8T5GPwD8Xs9Sn4SkeWxgYU4anLVMAw=; p=GXRYnPgQOHuLukoESgGOFME4H/mwNAwviL4ERy8Ru18= X-Patch-Sig: m=pgp; i=arnd@arndb.de; s=0x0x8972F4DFDC6DC026; b=iQIzBAABCgAdFiEEpcP2jyKd1g9yPm4TiXL039xtwCYFAmC3/bMACgkQiXL039xtwCZ8cQ/+KNj z11/7Hu0gAQx32xz2aL+8PMUyEZJqRMjh5EGmjm0yiQX4o3bHcTetWySoAhqwuIk0pCd3BTuP4gco KSpa/Z+9Jt+BynDVOQlpeHeWbyLLpdiQCkoF4pXNNhzOo+MbIuS74tCICtglNjGNxftt2fKDuVHhj i4V6elio1VpugMPwKfrfjYHPEdQ4372aKhuXo4spji9jt66KRthG50aWFnfvp3nFTsVMAIJshMb13 bkAVIQIDjxmtHn8iKn/W2yvjQ7IFqE3wtOuKG+c1DUXKhm8MJI5GPVJ8IpIrFxBsjA/Yyuy3J7Zu/ ZGDG8GnZo3Ysiilg/GJ75bufLueWnlQZfqyUKWQ5V+qP2HpvuKQtNIrO8sommNnUCJizOTYjD21bP Z5RXFTFdfyVRJ2Tq3SP8bhgRfZH9oa0dHTUOEw5RwgppvexPNvcN++XDxvhSCfW9MCgLHFNOeyyyi lZX9Q2tN4ATnUHdyqehbHl+/A89ZnEpbC5dRGManNN9tuqs0PtxNV23j+UdD0MhS+hUdgZvaRo1yv X5DLwoDqEZ9kve0nSZnu2ctNezGnFF+0nIlPvjl3Vj7xFv6CUrTNf6S0JcGfNeBYXLriPpyYBkwNk 6FzbT9lJ472MPfz4K50kbiOzPdOFO6s7+H1jljAZHbOz0luWUINKZ0yTMIB82cwo= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Sai Prakash Ranjan , Kees Cook , Arnd Bergmann , Emma Anholt , David Airlie , Sam Ravnborg , Sharat Masetty , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, Sean Paul , kernel test robot Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann When LLCC support is in a loadable module, the adreno support cannot be built-in: aarch64-linux-ld: drivers/gpu/drm/msm/adreno/a6xx_gpu.o: in function `a6xx_gpu_init': a6xx_gpu.c:(.text+0xe0): undefined reference to `llcc_slice_getd' a6xx_gpu.c:(.text+0xe0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `llcc_slice_getd' aarch64-linux-ld: a6xx_gpu.c:(.text+0xec): undefined reference to `llcc_slice_getd' a6xx_gpu.c:(.text+0xec): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `llcc_slice_getd' aarch64-linux-ld: drivers/gpu/drm/msm/adreno/a6xx_gpu.o: in function `a6xx_destroy': a6xx_gpu.c:(.text+0x274): undefined reference to `llcc_slice_putd' a6xx_gpu.c:(.text+0x274): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `llcc_slice_putd' aarch64-linux-ld: a6xx_gpu.c:(.text+0x27c): undefined reference to `llcc_slice_putd' Add a Kconfig dependency that disallows the broken configuration but allows all working ones. Fixes: 474dadb8b0d5 ("drm/msm/a6xx: Add support for using system cache(LLC)") Signed-off-by: Arnd Bergmann Reported-by: kernel test robot Reviewed-by: Sai Prakash Ranjan Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210103140407.3917405-1-arnd@kernel.org --- drivers/gpu/drm/msm/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.25.1 diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig index 10f693ea89d3..52536e7adb95 100644 --- a/drivers/gpu/drm/msm/Kconfig +++ b/drivers/gpu/drm/msm/Kconfig @@ -7,6 +7,8 @@ config DRM_MSM depends on IOMMU_SUPPORT depends on OF && COMMON_CLK depends on QCOM_OCMEM || QCOM_OCMEM=n + depends on QCOM_LLCC || QCOM_LLCC=n + depends on QCOM_COMMAND_DB || QCOM_COMMAND_DB=n select IOMMU_IO_PGTABLE select QCOM_MDT_LOADER if ARCH_QCOM select REGULATOR @@ -15,7 +17,6 @@ config DRM_MSM select SHMEM select TMPFS select QCOM_SCM if ARCH_QCOM - select QCOM_COMMAND_DB if ARCH_QCOM select WANT_DEV_COREDUMP select SND_SOC_HDMI_CODEC if SND_SOC select SYNC_FILE