Re: [PATCH 06/36] m68k: modify user space access functions to support ColdFire CPUs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 25, 2011 at 09:18,  <gerg@xxxxxxxxxxxx> wrote:
From: Greg Ungerer <gerg@xxxxxxxxxxx>

Modify the user space access functions to support the ColdFire V4e cores
running with MMU enabled.

The ColdFire processors do not support the "moves" instruction used by
the traditional 680x0 processors for moving data into and out of another
address space. They only support the notion of a single address space,
and you use the usual "move" instruction to access that.

I am interrested in what others think if this approach. It is a little
ugly, but it does mean that the same code is used, not a complete
duplicate that is almost the same except for the "moves" instructions.
It does also mean in this form that it is an either/or compile. It
can't support both ColdFire and 680x0 in the same binary as it is.

Signed-off-by: Greg Ungerer <gerg@xxxxxxxxxxx>

+#ifdef CONFIG_COLDFIRE
+/*
+ * The ColdFire processors do not support the moves instruction used by
+ * the traditional 680x0 processors for moving data into and out of
+ * another address space. They only support the notion of a single address
+ * space, and you use the usual move instruction to access that.
+ *
+ * All the user space access functions are otherwise the same on ColdFire
+ * as the other 680x0 processors. So lets keep the code simple and just
+ * define in what we need to use.
+ */
+#define        MOVES   "move"
+#else
+#define        MOVES   "moves"
+#endif /* CONFIG_COLDFIRE */

I did the same thing originally when trying to get uClinux running on
MMU-less Amigas, so it's fine for me.

If I'm not mistaken, this will also make it easier to merge uaccess.h again in
the long run, as the version with "move" should work on all MMU-less
platforms, right?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux