[parisc-linux] a todo entry

Matthew Wilcox willy@debian.org
Fri, 5 Oct 2001 14:32:21 +0100


On Fri, Oct 05, 2001 at 03:03:25AM -0600, John Marvin wrote:
>     1) Set sr2 to 0 when the argument to set_fs is KERNEL_DS, and KERNEL_DS
>     must be defined as 0 (it is currently). Set sr2 to sr3 when the
>     argument is any non-zero value. get_fs can then return the value of
>     sr2.
> 
>     2) Set sr2 to 0 when the argument to set_fs is KERNEL_DS. Set sr2
>     to sr3 when the argument is USER_DS. get_fs should return KERNEL_DS
>     if sr2 is 0. get_fs should return USER_DS otherwise. I prefer this.

I was thinking along the lines of:

#define KERNEL_DS 0
#define USER_DS mfsp(3)
#define get_ds() (KERNEL_DS)
#define get_fs() mfsp(2)
#define set_fs(x) mtsp(x, 3)

except that the first argument to mtsp needs to be a register, not a
value, but that's solvable, I think.

-- 
Revolutions do not require corporate support.