linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <linux-kernel@vger.kernel.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	<x86@kernel.org>
Subject: [PATCH] x86: setup_percpu: remove unnecessary include of module.h, add asm/desc.h
Date: Mon, 14 Nov 2016 14:04:43 -0500	[thread overview]
Message-ID: <20161114190443.10873-1-paul.gortmaker@windriver.com> (raw)

This was originally a part of commit 186f43608a5c:

    ("x86/kernel: Audit and remove any unnecessary uses of module.h")

...but without the asm/desc.h addition.  As such, Ingo reported a
build failure on i386 allnoconfig with SMP=y during his pre-merge
testing.   For expediency the chunk was just dropped at that time.

The failure was as follows:

arch/x86/kernel/setup_percpu.c: In function ‘setup_percpu_segment’:
arch/x86/kernel/setup_percpu.c:159:2: error: implicit declaration of function
‘pack_descriptor’ [-Werror=implicit-function-declaration]

arch/x86/kernel/setup_percpu.c:162:2: error: implicit declaration of function
‘write_gdt_entry’ [-Werror=implicit-function-declaration]

arch/x86/kernel/setup_percpu.c:162:18: error: implicit declaration of function
‘get_cpu_gdt_table’ [-Werror=implicit-function-declaration]

As pack_descriptor, write_gdt_entry and get_cpu_gdt_table all live in the
file arch/x86/include/asm/desc.h -- calling that header out explicitly
should fix things.

Reported-by: Ingo Molnar <mingo@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---

[build tested on -next with various configs ; hopefully all sane now.]

 arch/x86/kernel/setup_percpu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c
index 8ce03678166e..42c3290e7c79 100644
--- a/arch/x86/kernel/setup_percpu.c
+++ b/arch/x86/kernel/setup_percpu.c
@@ -1,7 +1,7 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/kernel.h>
-#include <linux/module.h>
+#include <linux/export.h>
 #include <linux/init.h>
 #include <linux/bootmem.h>
 #include <linux/percpu.h>
@@ -12,6 +12,7 @@
 #include <linux/pfn.h>
 #include <asm/sections.h>
 #include <asm/processor.h>
+#include <asm/desc.h>
 #include <asm/setup.h>
 #include <asm/mpspec.h>
 #include <asm/apicdef.h>
-- 
2.8.4

             reply	other threads:[~2016-11-14 19:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-14 19:04 Paul Gortmaker [this message]
2016-11-15 10:49 ` [tip:x86/headers] x86/percpu: Remove unnecessary include of module.h, add asm/desc.h tip-bot for Paul Gortmaker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161114190443.10873-1-paul.gortmaker@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).