From patchwork Tue Jan 15 00:47:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jason A. Donenfeld" X-Patchwork-Id: 155596 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp4297538jaa; Mon, 14 Jan 2019 16:54:41 -0800 (PST) X-Google-Smtp-Source: ALg8bN7jmQR0Q4ranDP8qXpn9OMu7+j/wICSKgA4coovkkBQD2riko6GN2FpWtKgkp61Xua3nLNv X-Received: by 2002:a62:cf02:: with SMTP id b2mr1238296pfg.183.1547513681093; Mon, 14 Jan 2019 16:54:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547513681; cv=none; d=google.com; s=arc-20160816; b=tkwx/N+4j3MGC644C0vKjWaXVhOFRkB9N0G8r6wkhgRxYHmOtIxWlWRxMHVHOTGDAB 42GaskYNxZwEwfhAMZRzCfutHeQ8YsBpzI30hudGRwFWt39Mn/K/DdF7COEeLN88BoeO 55eY4VnZT5PthTqJSZyKLvq+QKRbdLgS0HQFIEIGNFPq0bWMHK/WLzm/gcvKkQOkYgDw UOEKqCet5lp+Pvsaw5lqQUrt11NT+1gVLPD/xI8KaJxwzqIFkobxkQSXEfHQk/9YN6V/ Z4AzthSPR4hIhZRfkrNGHeZVbvcH0cTwwIZbJAcFUFFoBzmW4qMzPF47tJT+TvgYGfz8 /hnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=marclQlrDgEwXZafowFPQAXGY7Hy9D0oJYHtevUyn6w=; b=L5etnXJejO9pXbp98E1N09OYYcF+ievXFPeqWByqhre9LhHWkkl0eyzoYk+RDMXwSZ 0YRxLxLrx4M3vWRvLX/uVdh5Rf2jM4E+SN8jmiu/ksbCWTsS8Tnkz2XB9KPWlsFFUgHV cn3K8k9mEm8bC4q6mhCcTUw4O+OkBqtTUXaTQHgvkWLlOLsJMlroweAjt7oY2ms95Umy HnsGNkw2DiolQSVhikE8O3RLmc+Adr+oLgaEXI+WmsKxDFU0wCfdTRQmz/C07ejJHAhV xcLrrKeR4LPXX5Npr/1u9sK3EELC0XYLRX2kIyYPHGUix5O3FO8I7vC0QRr9uFIduCly nYWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=AWbsrqSC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g32si1771629pgg.400.2019.01.14.16.54.40; Mon, 14 Jan 2019 16:54:41 -0800 (PST) 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; dkim=pass header.i=@zx2c4.com header.s=mail header.b=AWbsrqSC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727705AbfAOAyk (ORCPT + 31 others); Mon, 14 Jan 2019 19:54:40 -0500 Received: from frisell.zx2c4.com ([192.95.5.64]:46383 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727455AbfAOAyj (ORCPT ); Mon, 14 Jan 2019 19:54:39 -0500 X-Greylist: delayed 399 seconds by postgrey-1.27 at vger.kernel.org; Mon, 14 Jan 2019 19:54:38 EST Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 09d0ecfe; Tue, 15 Jan 2019 00:34:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=from:to:cc :subject:date:message-id:mime-version:content-transfer-encoding; s=mail; bh=672UyKEKNu6gN3BZ012tnuPoaAQ=; b=AWbsrqSCvzOY7MG+3xOi md7pIUY6hB1/IqC42IAqe3ZNlc8sd4Cmc4/B2Lef9bbxCxcYd+1O1YkZ47HWY12A JckiVlccXUGofm35pt77WA6GJOYiohKGyrebfioVF8IOcaUSyKm0F5Ntjfn0Fj+T EbRxLjjzpBallNOsMcTGKSyC6+fhe/FBgGpO/aZZHDFzunWRvjExLcf2/wcI5bc/ AF31t9tknfqXXJfA983ptNX5uFHagE+fNi+0FJerYhnfs1MJJTfBw0dgw9ECdEeO XGZyGRNemGP7XTI0+q9PaZBWOeymNfZ4XaCjTYwTO6FB1iQF5KJKHAPKzD66UIdw 9Q== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id e163c3bc (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Tue, 15 Jan 2019 00:34:44 +0000 (UTC) From: "Jason A. Donenfeld" To: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, aik@ozlabs.ru, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Cc: "Jason A. Donenfeld" Subject: [PATCH] powerpc: PCI does not require PowerNV Date: Mon, 14 Jan 2019 16:47:45 -0800 Message-Id: <20190115004745.9996-1-Jason@zx2c4.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 0e759bd75285 moved around the declaration of pnv_npu2_init, but did not conditionalize it inside of the PCI pSeries driver. This meant that CONFIG_PCI && CONFIG_PPC_PSERIES && !CONFIG_PPC_POWERNV resulted in: powerpc64le-pc-linux-gnu-ld: arch/powerpc/platforms/pseries/pci.o: in function `pSeries_final_fixup': pci.c:(.init.text+0x1b0): undefined reference to `pnv_npu2_init' This commit therefore wraps that line in an ifdef, so that PCI works without PowerNV. Signed-off-by: Jason A. Donenfeld Fixes: 0e759bd75285 ("powerpc/powernv/npu: Move OPAL calls away from context manipulation") Cc: Alexey Kardashevskiy Cc: Michael Ellerman --- arch/powerpc/platforms/pseries/pci.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.1 Reviewed-by: Alexey Kardashevskiy diff --git a/arch/powerpc/platforms/pseries/pci.c b/arch/powerpc/platforms/pseries/pci.c index 7725825d887d..37a77e57893e 100644 --- a/arch/powerpc/platforms/pseries/pci.c +++ b/arch/powerpc/platforms/pseries/pci.c @@ -264,7 +264,9 @@ void __init pSeries_final_fixup(void) if (!of_device_is_compatible(nvdn->parent, "ibm,power9-npu")) continue; +#ifdef CONFIG_PPC_POWERNV WARN_ON_ONCE(pnv_npu2_init(hose)); +#endif break; } }