From: Brian Gerst <bgerst@didntduck.org>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: [PATCH] Small asm cleanups
Date: Sun, 25 Nov 2001 08:32:25 -0500 [thread overview]
Message-ID: <3C00F2E9.13488AAB@didntduck.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 104 bytes --]
Changes two asm's to use appropriate macros, and relaxes constraints on
another.
--
Brian Gerst
[-- Attachment #2: diff-asm2 --]
[-- Type: text/plain, Size: 1607 bytes --]
diff -urN linux-2.5.1-pre1/arch/i386/kernel/traps.c linux/arch/i386/kernel/traps.c
--- linux-2.5.1-pre1/arch/i386/kernel/traps.c Sun Sep 30 15:26:08 2001
+++ linux/arch/i386/kernel/traps.c Sun Nov 25 01:02:08 2001
@@ -697,7 +697,7 @@
*/
asmlinkage void math_state_restore(struct pt_regs regs)
{
- __asm__ __volatile__("clts"); /* Allow maths ops (or we recurse) */
+ clts(); /* Allow maths ops (or we recurse) */
if (current->used_math) {
restore_fpu(current);
diff -urN linux-2.5.1-pre1/arch/i386/mm/init.c linux/arch/i386/mm/init.c
--- linux-2.5.1-pre1/arch/i386/mm/init.c Sun Nov 11 13:09:32 2001
+++ linux/arch/i386/mm/init.c Sun Nov 25 01:02:08 2001
@@ -333,7 +333,7 @@
{
pagetable_init();
- __asm__( "movl %%ecx,%%cr3\n" ::"c"(__pa(swapper_pg_dir)));
+ __asm__( "movl %0,%%cr3\n" ::"r"(__pa(swapper_pg_dir)));
#if CONFIG_X86_PAE
/*
diff -urN linux-2.5.1-pre1/drivers/net/hamradio/baycom_epp.c linux/drivers/net/hamradio/baycom_epp.c
--- linux-2.5.1-pre1/drivers/net/hamradio/baycom_epp.c Mon Sep 10 12:04:53 2001
+++ linux/drivers/net/hamradio/baycom_epp.c Sun Nov 25 01:02:08 2001
@@ -807,10 +807,11 @@
/* --------------------------------------------------------------------- */
#ifdef __i386__
+#include <asm/msr.h>
#define GETTICK(x) \
({ \
if (cpu_has_tsc) \
- __asm__ __volatile__("rdtsc" : "=a" (x) : : "dx");\
+ rdtscl(x); \
})
#else /* __i386__ */
#define GETTICK(x)
reply other threads:[~2001-11-25 13:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3C00F2E9.13488AAB@didntduck.org \
--to=bgerst@didntduck.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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