Commit 7b911d96 authored by Zwane Mwaikambo's avatar Zwane Mwaikambo Committed by Linus Torvalds

[PATCH] Allow multiple inputs in alternative_input

I had to use the following patch to allow multiple arguments to be passed
down to the asm stub for alternative_input whilst writing alternatives for
mwait code, it seems like a simple enough fix.
Signed-off-by: default avatarZwane Mwaikambo <zwane@linuxpower.ca>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b29bc670
......@@ -321,7 +321,7 @@ struct alt_instr {
* If you use variable sized constraints like "m" or "g" in the
* replacement maake sure to pad to the worst case length.
*/
#define alternative_input(oldinstr, newinstr, feature, input) \
#define alternative_input(oldinstr, newinstr, feature, input...) \
asm volatile ("661:\n\t" oldinstr "\n662:\n" \
".section .altinstructions,\"a\"\n" \
" .align 4\n" \
......@@ -333,7 +333,7 @@ struct alt_instr {
".previous\n" \
".section .altinstr_replacement,\"ax\"\n" \
"663:\n\t" newinstr "\n664:\n" /* replacement */ \
".previous" :: "i" (feature), input)
".previous" :: "i" (feature), ##input)
/*
* Force strict CPU ordering.
......
......@@ -123,7 +123,7 @@ struct alt_instr {
* If you use variable sized constraints like "m" or "g" in the
* replacement maake sure to pad to the worst case length.
*/
#define alternative_input(oldinstr, newinstr, feature, input) \
#define alternative_input(oldinstr, newinstr, feature, input...) \
asm volatile ("661:\n\t" oldinstr "\n662:\n" \
".section .altinstructions,\"a\"\n" \
" .align 8\n" \
......@@ -135,7 +135,7 @@ struct alt_instr {
".previous\n" \
".section .altinstr_replacement,\"ax\"\n" \
"663:\n\t" newinstr "\n664:\n" /* replacement */ \
".previous" :: "i" (feature), input)
".previous" :: "i" (feature), ##input)
/*
* Clear and set 'TS' bit respectively
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment