LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 3/3] Final removal of FASTCALL()/fastcall
@ 2008-02-11 18:38 Harvey Harrison
2008-02-11 21:17 ` Andrew Morton
0 siblings, 1 reply; 5+ messages in thread
From: Harvey Harrison @ 2008-02-11 18:38 UTC (permalink / raw)
To: Andrew Morton; +Cc: LKML
All users are gone, remove definitions and comments referring
to them.
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
drivers/char/drm/i830_dma.c | 2 +-
include/asm-mn10300/highmem.h | 4 ++--
include/asm-mn10300/linkage.h | 2 --
include/linux/irq.h | 1 -
include/linux/linkage.h | 5 -----
kernel/rcupdate.c | 2 +-
6 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/char/drm/i830_dma.c b/drivers/char/drm/i830_dma.c
index 379cbda..9df0810 100644
--- a/drivers/char/drm/i830_dma.c
+++ b/drivers/char/drm/i830_dma.c
@@ -36,7 +36,7 @@
#include "i830_drm.h"
#include "i830_drv.h"
#include <linux/interrupt.h> /* For task queue support */
-#include <linux/pagemap.h> /* For FASTCALL on unlock_page() */
+#include <linux/pagemap.h>
#include <linux/delay.h>
#include <asm/uaccess.h>
diff --git a/include/asm-mn10300/highmem.h b/include/asm-mn10300/highmem.h
index 383c0c4..5256854 100644
--- a/include/asm-mn10300/highmem.h
+++ b/include/asm-mn10300/highmem.h
@@ -42,8 +42,8 @@ extern void __init kmap_init(void);
#define PKMAP_NR(virt) ((virt - PKMAP_BASE) >> PAGE_SHIFT)
#define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))
-extern unsigned long __fastcall kmap_high(struct page *page);
-extern void __fastcall kunmap_high(struct page *page);
+extern unsigned long kmap_high(struct page *page);
+extern void kunmap_high(struct page *page);
static inline unsigned long kmap(struct page *page)
{
diff --git a/include/asm-mn10300/linkage.h b/include/asm-mn10300/linkage.h
index 29a32e4..dda3002 100644
--- a/include/asm-mn10300/linkage.h
+++ b/include/asm-mn10300/linkage.h
@@ -13,8 +13,6 @@
/* don't override anything */
#define asmlinkage
-#define FASTCALL(x) x
-#define fastcall
#define __ALIGN .align 4,0xcb
#define __ALIGN_STR ".align 4,0xcb"
diff --git a/include/linux/irq.h b/include/linux/irq.h
index bfd9efb..176e5e7 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -285,7 +285,6 @@ extern void handle_bad_irq(unsigned int irq, struct irq_desc *desc);
/*
* Monolithic do_IRQ implementation.
- * (is an explicit fastcall, because i386 4KSTACKS calls it from assembly)
*/
#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
extern unsigned int __do_IRQ(unsigned int irq);
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index 3faf599..0592936 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -73,9 +73,4 @@
#define ATTRIB_NORET __attribute__((noreturn))
#define NORET_AND noreturn,
-#ifndef FASTCALL
-#define FASTCALL(x) x
-#define fastcall
-#endif
-
#endif
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c
index 760dfc2..0810e78 100644
--- a/kernel/rcupdate.c
+++ b/kernel/rcupdate.c
@@ -56,7 +56,7 @@ static atomic_t rcu_barrier_cpu_count;
static DEFINE_MUTEX(rcu_barrier_mutex);
static struct completion rcu_barrier_completion;
-/* Because of FASTCALL declaration of complete, we use this wrapper */
+/* FASTCALL no longer exists, this wrapper may no longer be needed */
static void wakeme_after_rcu(struct rcu_head *head)
{
struct rcu_synchronize *rcu;
--
1.5.4.1219.g65b9
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] Final removal of FASTCALL()/fastcall
2008-02-11 18:38 [PATCH 3/3] Final removal of FASTCALL()/fastcall Harvey Harrison
@ 2008-02-11 21:17 ` Andrew Morton
2008-02-11 21:26 ` Harvey Harrison
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Andrew Morton @ 2008-02-11 21:17 UTC (permalink / raw)
To: Harvey Harrison; +Cc: linux-kernel, Paul E. McKenney
On Mon, 11 Feb 2008 10:38:42 -0800
Harvey Harrison <harvey.harrison@gmail.com> wrote:
> All users are gone, remove definitions and comments referring
> to them.
I'm still showing occurrences in:
./Documentation/RCU/NMI-RCU.txt
./Documentation/kprobes.txt
./Documentation/uml/UserModeLinux-HOWTO.txt
./kernel/rcupdate.c
The last one is interesting:
/* FASTCALL no longer exists, this wrapper may no longer be needed */
static void wakeme_after_rcu(struct rcu_head *head)
{
struct rcu_synchronize *rcu;
rcu = container_of(head, struct rcu_synchronize, head);
complete(&rcu->completion);
}
The comment is rather ungrammatical/meaningless. Perhaps it is trying
to tell us that we can remove this function now?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] Final removal of FASTCALL()/fastcall
2008-02-11 21:17 ` Andrew Morton
@ 2008-02-11 21:26 ` Harvey Harrison
2008-02-11 21:45 ` [PATCH 4/3] Documentation: Remove references to FASTCALL/fastcall Harvey Harrison
2008-02-12 1:49 ` [PATCH 3/3] Final removal of FASTCALL()/fastcall Paul E. McKenney
2 siblings, 0 replies; 5+ messages in thread
From: Harvey Harrison @ 2008-02-11 21:26 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, Paul E. McKenney
On Mon, 2008-02-11 at 13:17 -0800, Andrew Morton wrote:
> On Mon, 11 Feb 2008 10:38:42 -0800
> Harvey Harrison <harvey.harrison@gmail.com> wrote:
>
> > All users are gone, remove definitions and comments referring
> > to them.
>
> I'm still showing occurrences in:
>
> ./Documentation/RCU/NMI-RCU.txt
> ./Documentation/kprobes.txt
> ./Documentation/uml/UserModeLinux-HOWTO.txt
> ./kernel/rcupdate.c
>
> The last one is interesting:
>
> /* FASTCALL no longer exists, this wrapper may no longer be needed */
> static void wakeme_after_rcu(struct rcu_head *head)
> {
> struct rcu_synchronize *rcu;
>
> rcu = container_of(head, struct rcu_synchronize, head);
> complete(&rcu->completion);
> }
>
> The comment is rather ungrammatical/meaningless. Perhaps it is trying
> to tell us that we can remove this function now?
Sorry, I added that as a note in my patch to look into and ended up
forgetting about it.
The original comment that was there read:
/* Because of FASTCALL declaration of complete, we use this wrapper */
Sorry about that, I'll look into the last occurances and send you a
patch 4/3.
Harvey
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 4/3] Documentation: Remove references to FASTCALL/fastcall
2008-02-11 21:17 ` Andrew Morton
2008-02-11 21:26 ` Harvey Harrison
@ 2008-02-11 21:45 ` Harvey Harrison
2008-02-12 1:49 ` [PATCH 3/3] Final removal of FASTCALL()/fastcall Paul E. McKenney
2 siblings, 0 replies; 5+ messages in thread
From: Harvey Harrison @ 2008-02-11 21:45 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, Paul E. McKenney
An example function prototype and description of options that
modify how arguments are passed had references to fastcall.
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
Andrew, I don't have the knowledge to deal with the rcupdate.c
wrapper function, hopefully Paul will be able to have a look.
Also, the UML reference is to a config option UM_FASTCALL, not
the FASTCALL macro.
Documentation/RCU/NMI-RCU.txt | 2 +-
Documentation/kprobes.txt | 11 +++++------
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/Documentation/RCU/NMI-RCU.txt b/Documentation/RCU/NMI-RCU.txt
index d0634a5..c64158e 100644
--- a/Documentation/RCU/NMI-RCU.txt
+++ b/Documentation/RCU/NMI-RCU.txt
@@ -25,7 +25,7 @@ the NMI handler to take the default machine-specific action.
This nmi_callback variable is a global function pointer to the current
NMI handler.
- fastcall void do_nmi(struct pt_regs * regs, long error_code)
+ void do_nmi(struct pt_regs * regs, long error_code)
{
int cpu;
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt
index 30c1017..83f515c 100644
--- a/Documentation/kprobes.txt
+++ b/Documentation/kprobes.txt
@@ -92,9 +92,8 @@ handler has run. Up to MAX_STACK_SIZE bytes are copied -- e.g.,
64 bytes on i386.
Note that the probed function's args may be passed on the stack
-or in registers (e.g., for x86_64 or for an i386 fastcall function).
-The jprobe will work in either case, so long as the handler's
-prototype matches that of the probed function.
+or in registers. The jprobe will work in either case, so long as the
+handler's prototype matches that of the probed function.
1.3 Return Probes
@@ -270,9 +269,9 @@ Kprobes runs the handler whose address is jp->entry.
The handler should have the same arg list and return type as the probed
function; and just before it returns, it must call jprobe_return().
(The handler never actually returns, since jprobe_return() returns
-control to Kprobes.) If the probed function is declared asmlinkage,
-fastcall, or anything else that affects how args are passed, the
-handler's declaration must match.
+control to Kprobes.) If the probed function is declared asmlinkage
+or anything else that affects how args are passed, the handler's
+declaration must match.
register_jprobe() returns 0 on success, or a negative errno otherwise.
--
1.5.4.1219.g65b9
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] Final removal of FASTCALL()/fastcall
2008-02-11 21:17 ` Andrew Morton
2008-02-11 21:26 ` Harvey Harrison
2008-02-11 21:45 ` [PATCH 4/3] Documentation: Remove references to FASTCALL/fastcall Harvey Harrison
@ 2008-02-12 1:49 ` Paul E. McKenney
2 siblings, 0 replies; 5+ messages in thread
From: Paul E. McKenney @ 2008-02-12 1:49 UTC (permalink / raw)
To: Andrew Morton; +Cc: Harvey Harrison, linux-kernel
On Mon, Feb 11, 2008 at 01:17:38PM -0800, Andrew Morton wrote:
> On Mon, 11 Feb 2008 10:38:42 -0800
> Harvey Harrison <harvey.harrison@gmail.com> wrote:
>
> > All users are gone, remove definitions and comments referring
> > to them.
>
> I'm still showing occurrences in:
>
> ./Documentation/RCU/NMI-RCU.txt
> ./Documentation/kprobes.txt
> ./Documentation/uml/UserModeLinux-HOWTO.txt
> ./kernel/rcupdate.c
>
> The last one is interesting:
>
> /* FASTCALL no longer exists, this wrapper may no longer be needed */
> static void wakeme_after_rcu(struct rcu_head *head)
> {
> struct rcu_synchronize *rcu;
>
> rcu = container_of(head, struct rcu_synchronize, head);
> complete(&rcu->completion);
> }
>
> The comment is rather ungrammatical/meaningless. Perhaps it is trying
> to tell us that we can remove this function now?
Hmmm... A better comment might be something like "Awaken the
corresponding synchronize_rcu() instance now that a grace period has
completed". Given that the underlying RCU implementation provides
callbacks, synchronize_rcu() will need some sort of callback function.
So, the question is whether "complete()" can be that callback function.
As near as I can tell, the answer is "no", because the RCU callback
function always gets a pointer to a struct rcu_head, which would not
make much sense to the "complete()" function.
In short, I believe that wakeme_after_rcu() needs to stick around.
A better comment for wakeme_after_rcu() would be good, perhaps as shown below.
Thanx, Paul
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
rcupdate.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff -urpNa -X dontdiff linux-2.6.24/kernel/rcupdate.c linux-2.6.24-wakeme-comment/kernel/rcupdate.c
--- linux-2.6.24/kernel/rcupdate.c 2008-01-24 14:58:37.000000000 -0800
+++ linux-2.6.24-wakeme-comment/kernel/rcupdate.c 2008-02-11 17:47:11.000000000 -0800
@@ -601,7 +601,10 @@ struct rcu_synchronize {
struct completion completion;
};
-/* Because of FASTCALL declaration of complete, we use this wrapper */
+/*
+ * Awaken the corresponding synchronize_rcu() instance now that a
+ * grace period has elapsed.
+ */
static void wakeme_after_rcu(struct rcu_head *head)
{
struct rcu_synchronize *rcu;
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-02-12 1:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-11 18:38 [PATCH 3/3] Final removal of FASTCALL()/fastcall Harvey Harrison
2008-02-11 21:17 ` Andrew Morton
2008-02-11 21:26 ` Harvey Harrison
2008-02-11 21:45 ` [PATCH 4/3] Documentation: Remove references to FASTCALL/fastcall Harvey Harrison
2008-02-12 1:49 ` [PATCH 3/3] Final removal of FASTCALL()/fastcall Paul E. McKenney
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).