Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2801526imm; Thu, 18 Oct 2018 23:13:33 -0700 (PDT) X-Google-Smtp-Source: ACcGV60o4w0vebVgYFGJijs68Uef/dTw0VILj7iWCKPQOXYg5PQavzQzvhqFzZUBU/pvGv4YYtOl X-Received: by 2002:a62:d75e:: with SMTP id v30-v6mr1131027pfl.90.1539929613577; Thu, 18 Oct 2018 23:13:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539929613; cv=none; d=google.com; s=arc-20160816; b=Wm0D+uozjSLgOvq2maK2OVze6qUsXdBaCVs+olNQLeKZHTdt+oiPdd3PlfHBxDqRtw VA/PlH+Mh6DqXqPU2MlQZEnVM8JqIOT6A/Eelc2p12iIBH6lKlGzxn4K/8/NMLTTfb9O AzkpDdoUg9ZV7qbmbrjHJbr5ZsUglRhVTbjIn6J/Y74kzdBDOiwWJFczabNgwdVeBTYF X9t99KljRB50cQK6L48yKaKl9oNld5sVbZtTt3ne+gtQ4CdWnSpbMGXh44eGr1W5ypRY 7dg1V1CCT/dOFdaew0/mYrCdwuWxUWUaWBBSDq1QpDTTSZBUvf/iJT//3kI1RJiNcalv AgKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:message-id; bh=wgFxoUx5dGI7XTiCeI/Ck9yM7fBPBZnBArNLaU8+xKs=; b=qg4j22a/xFmrjEsV5eyqr5BcXMxoXERn6oFZ1YAMrcozS4AVWBPPGVXt1o7HXIiQ4K iW0Tvq3VxyREG5TUgg4ttORBKO7rQy1pK659NMkOxVNUBf/XXGwrSVhPG1L1OBG/MNqj uGomrOmpaLJ2yzqEJ3c58pU0UMQiiqxzfJ4HUzMKGq1IXjNvf0wdIChnMPqQynq+5t91 xmrNMxDmyNTLw+aAaGwhfTusfIIJfxO9alDyRdC+et2b2i6p8eIMqr0Ebmyy0swfiwVW wc4t7QwIwX1nqY3FNu4lTIgivwwzAhENzPmu4IjKqd7qIj4bizDBmA2stTv1FudixOto GMOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 4-v6si23860586pfe.142.2018.10.18.23.13.15; Thu, 18 Oct 2018 23:13:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726698AbeJSOR2 (ORCPT + 99 others); Fri, 19 Oct 2018 10:17:28 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:34165 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726340AbeJSOR2 (ORCPT ); Fri, 19 Oct 2018 10:17:28 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 42bwZB0N8jz9ttFY; Fri, 19 Oct 2018 08:12:50 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id MgkHkqVWEb15; Fri, 19 Oct 2018 08:12:49 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 42bwZ96fhgz9ttFV; Fri, 19 Oct 2018 08:12:49 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 16FD18B775; Fri, 19 Oct 2018 08:12:51 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id o4AlIAIUhAbc; Fri, 19 Oct 2018 08:12:51 +0200 (CEST) Received: from pc13168vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id F0DEB8B75B; Fri, 19 Oct 2018 08:12:50 +0200 (CEST) Received: by pc13168vm.idsi0.si.c-s.fr (Postfix, from userid 0) id B7E116F482; Fri, 19 Oct 2018 06:12:50 +0000 (UTC) Message-Id: From: Christophe Leroy Subject: [PATCH] powerpc/msi: Fix compile error on mpc83xx To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , radu.rendec@gmail.com Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Fri, 19 Oct 2018 06:12:50 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org mpic_get_primary_version() is not defined when not using MPIC. The compile error log like: arch/powerpc/sysdev/built-in.o: In function `fsl_of_msi_probe': fsl_msi.c:(.text+0x150c): undefined reference to `fsl_mpic_primary_get_version' Signed-off-by: Jia Hongtao Signed-off-by: Scott Wood Reported-by: Radu Rendec Fixes: 807d38b73b6 ("powerpc/mpic: Add get_version API both for internal and external use") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/mpic.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/powerpc/include/asm/mpic.h b/arch/powerpc/include/asm/mpic.h index fad8ddd697ac..0abf2e7fd222 100644 --- a/arch/powerpc/include/asm/mpic.h +++ b/arch/powerpc/include/asm/mpic.h @@ -393,7 +393,14 @@ extern struct bus_type mpic_subsys; #define MPIC_REGSET_TSI108 MPIC_REGSET(1) /* Tsi108/109 PIC */ /* Get the version of primary MPIC */ +#ifdef CONFIG_MPIC extern u32 fsl_mpic_primary_get_version(void); +#else +static inline u32 fsl_mpic_primary_get_version(void) +{ + return 0; +} +#endif /* Allocate the controller structure and setup the linux irq descs * for the range if interrupts passed in. No HW initialization is -- 2.13.3