From patchwork Thu Jul 22 04:41:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 12393001 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AAE1BC63793 for ; Thu, 22 Jul 2021 04:42:09 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 630CC610D2 for ; Thu, 22 Jul 2021 04:42:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 630CC610D2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9AA086EE68; Thu, 22 Jul 2021 04:42:08 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id DFD2D6EE68 for ; Thu, 22 Jul 2021 04:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626928926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Np6AqHl19Qnq+fc5f537Pv3JR0dA3FodDzznrUqUHhY=; b=AETymSwU/A9Wosm23AShYUoKIRKtQFiE+yze67kslCX3ofFtvaqeZc+fi7u8D4iFcuIRDZ 6H+AwKZgEnSftZzMeyNkQkpALvBgESmwWqwCq6R3mz2yJKCJZvOzSWurooFGnu0mJsGayT /Q62aYtXA7CYOA//i9CtvByhbiQb4bI= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-590-PLlt1aWpNYGOgXsxfzAlhQ-1; Thu, 22 Jul 2021 00:42:05 -0400 X-MC-Unique: PLlt1aWpNYGOgXsxfzAlhQ-1 Received: by mail-wr1-f71.google.com with SMTP id 32-20020adf82a30000b029013b21c75294so1932506wrc.14 for ; Wed, 21 Jul 2021 21:42:04 -0700 (PDT) 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:mime-version :content-transfer-encoding; bh=Np6AqHl19Qnq+fc5f537Pv3JR0dA3FodDzznrUqUHhY=; b=sk7obuHBt5l/aCS7YG1migXkl5dzLNC+GPw7jyOOXakSahuixABAE6H0VRhietF8nu LSR4uo2UiCM+FD2oAEJk2GLw7S5RmCNTg35gW6xHPxgktx/GNqKZ6GtCNrpp9bggY6Ox tZsx0VTbrPxFIAMN6gdF2Nl6Fb/NohNWTMmR69CJk269UK7L5Gh8TJSrkXGZUGp4SHzV FeESLhjpZMjgV3+yrkYOCtQ443Ys1n/n2Ah8xSjknIT505AEnBdOhpVdd6Bj9Ycqt4dO AECJZPkdASAJHL1Vbt7Cz+UljchJ/l9XpyuX6Jp0B/OUosk6pv00OHeoynbPmRGi+pOO YCQg== X-Gm-Message-State: AOAM531mXk1qrLliJ7uO3GEDx0iUDX8/inGGEQvsy8/6j52EYcMzZGQU XLINtQR8cYR1QIDllfpoJEjh8OdzJS+79mNB4pbr10dnD0gwQdTpOQF7QNOGc1SmwGdO4CuoZPP 88IUcZ6s4ncx8P8R5aIBAAmbetEKH X-Received: by 2002:a7b:ca43:: with SMTP id m3mr40451636wml.74.1626928924069; Wed, 21 Jul 2021 21:42:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUBIHXzIjYaGO626+bK+iEh/ZLJSTjEs8WPcf4a0Ua/24DBKA4+HNNFqg4Xi4bHPzxIz4asg== X-Received: by 2002:a7b:ca43:: with SMTP id m3mr40451618wml.74.1626928923871; Wed, 21 Jul 2021 21:42:03 -0700 (PDT) Received: from minerva.home ([92.176.231.106]) by smtp.gmail.com with ESMTPSA id e6sm33694588wrg.18.2021.07.21.21.42.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 21:42:02 -0700 (PDT) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Subject: [PATCH] drivers/firmware: fix sysfb depends to prevent build failures Date: Thu, 22 Jul 2021 06:41:55 +0200 Message-Id: <20210722044155.864600-1-javierm@redhat.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=javierm@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: Nicolas Saenz Julienne , kernel test robot , Krzysztof Kozlowski , Greg Kroah-Hartman , Javier Martinez Canillas , dri-devel , Dinh Nguyen , Peter Robinson , Thomas Zimmermann , Borislav Petkov , He Ying Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The Generic System Framebuffers support is built when the COMPILE_TEST option is enabled. But this wrongly assumes that all the architectures declare a struct screen_info. This is true for most architectures, but at least the following do not: arc, m68k, microblaze, openrisc, parisc and s390. By attempting to make this compile testeable on all architectures, it leads to linking errors as reported by the kernel test robot for parisc: All errors (new ones prefixed by >>): hppa-linux-ld: drivers/firmware/sysfb.o: in function `sysfb_init': (.init.text+0x24): undefined reference to `screen_info' >> hppa-linux-ld: (.init.text+0x28): undefined reference to `screen_info' To prevent these errors only allow sysfb to be built on systems that are going to need it, which are x86 BIOS and EFI. The EFI Kconfig symbol is used instead of (ARM || ARM64 || RISC) because some of these architectures only declare a struct screen_info if EFI is enabled. And also, because the sysfb code is only used for EFI on these architectures. For !EFI the "simple-framebuffer" device is registered by OF when parsing the Device Tree Blob (if a DT node for this is defined). Reported-by: kernel test robot Signed-off-by: Javier Martinez Canillas Reviewed-by: Linus Walleij --- drivers/firmware/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig index af6719cc576..897f5f25c64 100644 --- a/drivers/firmware/Kconfig +++ b/drivers/firmware/Kconfig @@ -254,7 +254,7 @@ config QCOM_SCM_DOWNLOAD_MODE_DEFAULT config SYSFB bool default y - depends on X86 || ARM || ARM64 || RISCV || COMPILE_TEST + depends on X86 || EFI config SYSFB_SIMPLEFB bool "Mark VGA/VBE/EFI FB as generic system framebuffer"