From patchwork Tue Feb 14 01:09:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 56605 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2686826wrn; Mon, 13 Feb 2023 17:24:47 -0800 (PST) X-Google-Smtp-Source: AK7set8CNtW8MRm8NSjf5Wt5MytIJttCr/RCRnQ2VW2VK2QI3V0f1AmZqP6YHrUHnfuMQrldgnpp X-Received: by 2002:a17:906:9f13:b0:8b1:300f:1bdc with SMTP id fy19-20020a1709069f1300b008b1300f1bdcmr511813ejc.64.1676337887476; Mon, 13 Feb 2023 17:24:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676337887; cv=none; d=google.com; s=arc-20160816; b=Xu3g/53ItgSwkyfOveRvli4uZ40bQCyQKhqvubM9DWKsCKQLQVzyRMs6eIuQDzMVdr j6Hn4JjOhUAozCKzUPose14kyrlYBxZRYp3Vb2h1itIQGavPSqGLP9iF9PEdn8iX8K+T uwPrtuW69uRitxixks6rQuOn3sSCNGaLaVAreI/sNZfc0tvEXwdomNgGTVNTXnwDsaBI Ae4XqIXFeKgKKHHKmqFxQVIAZkXQ/YtwBiF6tChDv1xDikrqIeOzTbqBcMAjWm9QILxR pHrZ86BWmWzKWqrnvPNPXuovSwnY6jcvZbQ9nz2rzcQMaZUZBfcY+3C34JZPhVO8ZQS9 lIlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/eABX6egoR0ltWSchldSbx/9FFqW2AHIMhWCGphM4EY=; b=dvt/iB8wNBhoMIjMi/+vd6COHBvTtkhK42Dma/W7MqX5uj6HgNl9YVu4TIDtYflROl 6ScxBchiY9Eu0KK3ZU33fL871ZGBRuRqaELa1QJ1QIm/3a/1jHG7vWc2VQaHV44YKYIo IORubLJ2RmvaXdrUxBZRVEFNxMJgx/19q8mZuwtkO19rm0NCsa0S/MCK1QcOOm35nwjv oZHdW80uLUBSrGPj2onuoWwBn5R/HGLmXb7NhGRsvz34p2xG9pACfIMMc46/dOxLwpuf B78Kha6U8Pqzk6DuyCWVAT3tX0cn10rhJN2i/4GJrHILLQ5HSA0CrH4iA2Rm8dAnL4Yg 5m3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=2hzbhy8v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x8-20020aa7cd88000000b004a981a53b39si15033483edv.326.2023.02.13.17.24.23; Mon, 13 Feb 2023 17:24:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=2hzbhy8v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229581AbjBNBJs (ORCPT + 99 others); Mon, 13 Feb 2023 20:09:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229812AbjBNBJp (ORCPT ); Mon, 13 Feb 2023 20:09:45 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5662D2D7C; Mon, 13 Feb 2023 17:09:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=/eABX6egoR0ltWSchldSbx/9FFqW2AHIMhWCGphM4EY=; b=2hzbhy8v65THGe976hZPPjc08P oegSFNkNGtnSaT2ET0jQuZ3GspnlP1n22uio3LGfxKOuibZ5NeJJvdl70qrZ7M13DkrBNtbzemhE7 50GiaYhRG14WEmd7l7Er+7zySyJYfat4fhBygkIs3Pz2YIQImzAhDl9GBkE25PydIiF9DLy4wAYDk BN+f0L/CwUpz0FTSNJTGnw6nWOl8PajrW8XZvBApaBf7IzcsnNUnN3tDf+MICUUn5y+cQj4hwjIvd LZWBTkkxKXyuLR+N2e6qzPH0S9GfvGdq77rndxV9foCaT73RCP6jGQcE53G7opvOX7OmrlYhXwhi5 JiswBvag==; Received: from [2601:1c2:980:9ec0::df2f] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRjpH-00GyUj-4f; Tue, 14 Feb 2023 01:09:43 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , kernel test robot , Dengcheng Zhu , John Crispin , Thomas Bogendoerfer , linux-mips@vger.kernel.org Subject: [PATCH] MIPS: vpe-mt: provide a default 'physical_memsize' Date: Mon, 13 Feb 2023 17:09:42 -0800 Message-Id: <20230214010942.25143-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757767676826040994?= X-GMAIL-MSGID: =?utf-8?q?1757767676826040994?= When neither LANTIQ nor MIPS_MALTA is set, 'physical_memsize' is not declared. This causes the build to fail with: mips-linux-ld: arch/mips/kernel/vpe-mt.o: in function `vpe_run': arch/mips/kernel/vpe-mt.c:(.text.vpe_run+0x280): undefined reference to `physical_memsize' Fix this by declaring a 0-value physical_memsize with neither LANTIQ nor MIPS_MALTA is set, like LANTIQ does. Fixes: 1a2a6d7e8816 ("MIPS: APRP: Split VPE loader into separate files.") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Link: https://lore.kernel.org/all/202302030625.2g3E98sY-lkp@intel.com/ Cc: Dengcheng Zhu Cc: John Crispin Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org --- How has this build error not been detected for 10 years? arch/mips/kernel/vpe-mt.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff -- a/arch/mips/kernel/vpe-mt.c b/arch/mips/kernel/vpe-mt.c --- a/arch/mips/kernel/vpe-mt.c +++ b/arch/mips/kernel/vpe-mt.c @@ -22,6 +22,15 @@ static int major; /* The number of TCs and VPEs physically available on the core */ static int hw_tcs, hw_vpes; +#if !defined(CONFIG_MIPS_MALTA) && !defined(CONFIG_LANTIQ) +/* The 2 above provide their own 'physical_memsize' variable. */ +/* + * This is needed by the vpe-mt loader code, just set it to 0 and assume + * that the firmware hardcodes this value to something useful. + */ +unsigned long physical_memsize = 0L; +#endif + /* We are prepared so configure and start the VPE... */ int vpe_run(struct vpe *v) {