Received: by 10.192.165.156 with SMTP id m28csp2274903imm; Thu, 12 Apr 2018 11:28:18 -0700 (PDT) X-Google-Smtp-Source: AIpwx49CmceFW79Jvdt2MkMn13f86FCjYY0ry0UrQLbdBTi5RKlgmO2KCJpnH+RuyTxtYrhHRFXo X-Received: by 10.101.87.138 with SMTP id b10mr1490366pgr.241.1523557698262; Thu, 12 Apr 2018 11:28:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523557698; cv=none; d=google.com; s=arc-20160816; b=U8PAzsLPbTxdfOahDVDIBd6HTLckHqLSNoLT0+p4F4t/lkNsBeoje+P6XcgQ0/m7me eRzpyD2wS+0pIgtzdpg77uFEVN8QQuibYGCUQhzez004XoXTIlL1kq9C4PRoal/QGk5a O9Lx3DGkcZtwTvBPdtG8ovfelOjNePMqt1DlFhuDOdDNUMY4K1CWrsvG5slBjO6xDVTu 3VmnmDbhl42FQ3184UixO5v5973oZjhJ+hVEkTh7azlEIlQ5xp2ISyt2YbFXtlLQHQGF kFqSJj0nevkKqAIVOKjBdaeFn3sSHKXKktqj6lcqnwpYuA2lypxX+StPuocr+OlEVbzM QgEA== 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 :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:dmarc-filter:arc-authentication-results; bh=QLT+TzPirrt3ZPMStlsZVLuqkz74di0q36pOTvA6+HQ=; b=c51vT3xpHZUhWQnvVksQnIDnSVEkJAwx9cPyvITRQKkn04EBJQN0hJFV/ZlmjCmN7F TNTqhUb8csPctzBZodC/XaAh2kUPKSF73HkpPvL9/U1vyHACnJeeclghEuYZIdbHmgWt 5gYR4yPkgGNkoIj+qI5G5Kwo6SkQpOIwLs+GPwK2whtxMQE3QPT4dAnIv9rELcKLRhXG tRkNPgYp+gSaNiZupXDWMMvWUM515zZABJnxfwcXFNzTGX9+gm8CtdKqSG+UkJ5gU1rW uL+LH+C1/U4Z3qpWXUeGKoB+wrm2VPVbKlo22gbPN47yYuhY80kwpxOjVoNm6WSrcvrT WPJA== 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 76si2533844pge.732.2018.04.12.11.28.04; Thu, 12 Apr 2018 11:28:18 -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 S1753238AbeDLSXr (ORCPT + 99 others); Thu, 12 Apr 2018 14:23:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:39810 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752763AbeDLSXp (ORCPT ); Thu, 12 Apr 2018 14:23:45 -0400 Received: from localhost (unknown [69.71.5.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 963D0217A6; Thu, 12 Apr 2018 18:23:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 963D0217A6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=helgaas@kernel.org Subject: [PATCH v1 2/2] kexec: Remove "weak" from arch_kexec_walk_mem() declaration From: Bjorn Helgaas To: Eric Biederman Cc: Thiago Jung Bauermann , Dave Young , Michael Ellerman , kexec@lists.infradead.org, linux-kernel@vger.kernel.org Date: Thu, 12 Apr 2018 13:23:43 -0500 Message-ID: <152355742351.36693.10357998251441779301.stgit@bhelgaas-glaptop.roam.corp.google.com> In-Reply-To: <152355706051.36693.9856090891621551967.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <152355706051.36693.9856090891621551967.stgit@bhelgaas-glaptop.roam.corp.google.com> User-Agent: StGit/0.18 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bjorn Helgaas Weak header file declarations are error-prone because they make every definition weak, and the linker chooses one based on link order (see 10629d711ed7 ("PCI: Remove __weak annotation from pcibios_get_phb_of_node decl")). kernel/kexec_file.c contains a weak definition of arch_kexec_walk_mem() and arch/powerpc/kernel/machine_kexec_file_64.c contains a definition intended to be non-weak. But the annotation in the header file makes *both* definitions weak, so it's unclear which one will be used. Remove the "weak" attribute from the declaration so we always prefer a non-weak definition over the weak one. Fixes: 60fe3910bb02 ("kexec_file: Allow arch-specific memory walking for kexec_add_buffer") Signed-off-by: Bjorn Helgaas CC: stable@vger.kernel.org # v4.10+ --- include/linux/kexec.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 8bf0ff90885c..e7db550c5fb6 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h @@ -159,8 +159,8 @@ struct kexec_buf { bool top_down; }; -int __weak arch_kexec_walk_mem(struct kexec_buf *kbuf, - int (*func)(struct resource *, void *)); +int arch_kexec_walk_mem(struct kexec_buf *kbuf, + int (*func)(struct resource *, void *)); extern int kexec_add_buffer(struct kexec_buf *kbuf); int kexec_locate_mem_hole(struct kexec_buf *kbuf); #endif /* CONFIG_KEXEC_FILE */