[RFC PATCH 5/5] CELL bogus_console port to hvc_console backend driver

Eric V Van hensbergen ericvanhensbergen at us.ibm.com
Tue Dec 6 01:45:24 EST 2005


rsa at us.ltcfwd.linux.ibm.com wrote on 12/04/2005 03:13:12 PM:

> This patch adds the hvc_fss.c driver file.
>
> Signed-off-by: Ryan S. Arnold <rsa at us.ibm.com>
> diff -uNr linux-2.6.14-rc5/drivers/char/hvc_fss.c linux-2.6.14-rc5-
> cbe-fss/drivers/char/hvc_fss.c
> --- linux-2.6.14-rc5/drivers/char/hvc_fss.c   1969-12-31 19:00:00.
> 000000000 -0500
> +++ linux-2.6.14-rc5-cbe-fss/drivers/char/hvc_fss.c   2005-12-02 17:
> 54:19.243249984 -0500
> @@ -0,0 +1,148 @@
  ...
> +
> +static inline int callthru0(int command)
> +{
> +   register int c asm ("r3") = command;
> +
> +   asm volatile (".long 0x000EAEB0" : "=r" (c): "r" (c));
> +   return((c));
> +}
> +
> +static inline int callthru3(int command, unsigned long arg1,
> unsigned long arg2, unsigned long arg3)
> +{
> +   register int c asm ("r3") = command;
> +   register unsigned long a1 asm ("r4") = arg1;
> +   register unsigned long a2 asm ("r5") = arg2;
> +   register unsigned long a3 asm ("r6") = arg3;
> +
> +   asm volatile (".long 0x000EAEB0" : "=r" (c): "r" (c), "r" (a1),
> "r" (a2), "r" (a3));
> +   return((c));
> +}
> +

Its a relatively small knit-pick, but the callthru functions should
probably
be kept in a common include.  My patch-set has
include/asm-powerpc/systemsim.h
which includes these definitions.  That way we don't have to define the
callthru's for every driver which might use them (such as BogusNet or
BogusDisk).

           -eric




More information about the Linuxppc64-dev mailing list