On Wed, 7 Mar 2007 11:01:55 -0800 "Miles Lane" <miles.lane@gmail.com> wrote:Yes, I ended up dropping another patch to fix that up and things got in a mess. Andy's patch should fix it up again From: Andy Whitcroft <apw@shadowen.org> Add an i386 implementation of alternative_io modelled on the x86_64 version. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> --- include/asm-i386/alternative.h | 17 +++++++++++++++++ include/asm-i386/tsc.h | 1 + 2 files changed, 18 insertions(+) diff -puN include/asm-i386/alternative.h~i386-alternative_io-implementation include/asm-i386/alternative.h --- a/include/asm-i386/alternative.h~i386-alternative_io-implementation +++ a/include/asm-i386/alternative.h @@ -100,6 +100,23 @@ static inline void alternatives_smp_swit "663:\n\t" newinstr "\n664:\n" /* replacement */\ ".previous" :: "i" (feature), ##input) +#define alternative_io(oldinstr, newinstr, feature, output, input...) \ + asm volatile ("661:\n\t" oldinstr "\n662:\n" \ + ".section .altinstructions,\"a\"\n" \ + " .align 4\n" \ + " .long 661b\n" /* label */ \ + " .long 663f\n" /* new instruction */ \ + " .long 0x00\n" \ + " .byte %c[feat]\n" /* feature bit */ \ + " .byte 0x00\n" \ + " .byte 662b-661b\n" /* sourcelen */ \ + " .byte 664f-663f\n" /* replacementlen */ \ + " .byte 0x00\n" \ + ".previous\n" \ + ".section .altinstr_replacement,\"ax\"\n" \ + "663:\n\t" newinstr "\n664:\n" /* replacement */\ + ".previous" : output : [feat] "i" (feature), ##input) + /* Like alternative_io, but supports 2 possible alternatives */ #define alternative_io_two(oldinstr, newinstr, feat, newinstr2, feat2,\ output, input...) \ diff -puN include/asm-i386/tsc.h~i386-alternative_io-implementation include/asm-i386/tsc.h --- a/include/asm-i386/tsc.h~i386-alternative_io-implementation +++ a/include/asm-i386/tsc.h @@ -6,6 +6,7 @@ #ifndef _ASM_i386_TSC_H #define _ASM_i386_TSC_H +#include <asm/alternative.h> #include <asm/processor.h> /* _ -
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Linus Torvalds | Linux 2.6.25-rc4 |
| Greg KH | Linux 2.6.25.10 |
git: | |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Ilpo Järvinen | Re: Strange Application bug, race in MSG_PEEK complaints (was: Bug#513695: fetchma... |
