From: Glauber Costa <gcosta@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, glommer@gmail.com, mingo@elte.hu,
tglx@linutronix.de, Glauber Costa <gcosta@redhat.com>
Subject: [PATCH 1/1] export native versions of machine_ops functions
Date: Wed, 5 Mar 2008 14:44:00 -0300 [thread overview]
Message-ID: <1204739040-18422-1-git-send-email-gcosta@redhat.com> (raw)
People overriding machine_ops provided functions may want to
call the native version after its pre-processing. It already
happens for the smp_ops functions, so I don't see a reason
for avoiding it here.
Signed-off-by: Glauber Costa <gcosta@redhat.com>
---
arch/x86/kernel/reboot.c | 10 +++++-----
include/asm-x86/reboot.h | 5 +++++
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 7fd6ac4..8b577f1 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -326,7 +326,7 @@ static inline void kb_wait(void)
}
}
-static void native_machine_emergency_restart(void)
+void native_machine_emergency_restart(void)
{
int i;
@@ -376,7 +376,7 @@ #endif
}
}
-static void native_machine_shutdown(void)
+void native_machine_shutdown(void)
{
/* Stop the cpus and apics */
#ifdef CONFIG_SMP
@@ -420,7 +420,7 @@ #ifdef CONFIG_X86_64
#endif
}
-static void native_machine_restart(char *__unused)
+void native_machine_restart(char *__unused)
{
printk("machine restart\n");
@@ -429,11 +429,11 @@ static void native_machine_restart(char
machine_emergency_restart();
}
-static void native_machine_halt(void)
+void native_machine_halt(void)
{
}
-static void native_machine_power_off(void)
+void native_machine_power_off(void)
{
if (pm_power_off) {
if (!reboot_force)
diff --git a/include/asm-x86/reboot.h b/include/asm-x86/reboot.h
index e9e3ffc..fb1bdf1 100644
--- a/include/asm-x86/reboot.h
+++ b/include/asm-x86/reboot.h
@@ -16,5 +16,10 @@ struct machine_ops
extern struct machine_ops machine_ops;
void machine_real_restart(unsigned char *code, int length);
+void native_machine_emergency_restart(void);
+void native_machine_shutdown(void);
+void native_machine_restart(char *__unused);
+void native_machine_halt(void);
+void native_machine_power_off(void);
#endif /* _ASM_REBOOT_H */
--
1.4.2
next reply other threads:[~2008-03-05 17:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-05 17:44 Glauber Costa [this message]
2008-03-06 10:55 ` Ingo Molnar
2008-03-06 11:49 ` Glauber Costa
2008-03-06 12:13 ` Ingo Molnar
2008-03-06 12:15 ` Avi Kivity
2008-03-06 12:28 ` Ingo Molnar
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=1204739040-18422-1-git-send-email-gcosta@redhat.com \
--to=gcosta@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=glommer@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®