Re: [PATCH V2] score: add regset support

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

 



linux-arch-owner@xxxxxxxxxxxxxxx 写于 2009-07-10 20:49:44:

> struct pt_regs {
>        unsigned long pad0[6];
>        unsigned long orig_r4;
>        unsigned long orig_r7;
>        unsigned long regs[32];
> 
>        unsigned long cel;
>        unsigned long ceh;
> 
>        unsigned long sr0;      /* cnt */
>        unsigned long sr1;      /* lcr */
>        unsigned long sr2;      /* scr */
> 
>        unsigned long cp0_epc;
>        unsigned long cp0_ema;
>        unsigned long cp0_psr;
>        unsigned long cp0_ecr;
>        unsigned long cp0_condition;
> 
>        long is_syscall;
> };
> 
> to
> 
> struct pt_regs {
>        unsigned long regs[32];
> 
>        unsigned long cel;
>        unsigned long ceh;
> 
>        unsigned long sr0;      /* cnt */
>        unsigned long sr1;      /* lcr */
>        unsigned long sr2;      /* scr */
> 
>        unsigned long cp0_epc;
>        unsigned long cp0_ema;
>        unsigned long cp0_psr;
>        unsigned long cp0_ecr;
>        unsigned long cp0_condition;
> #ifdef __KERNEL__
>        unsigned long orig_r4;
>        unsigned long orig_r7;
>        long is_syscall;
>        unsigned long pad0[3];
> #else
>        unsigned long pad0[6];
> #endif
> };
> 

unsigned long pad0[6];

was place at the start of pt_regs use 
to hold the arguments from userland.
caller(exception handler) not need to
change stack pointer.

unsigned long orig_r4;
unsigned long orig_r7;
move to end of the pt_regs haven't 
problem.

Thanks,
Liqin

?韬{.n?????%??檩??w?{.n???{饼??Ф?塄}?财??j:+v??????2??璀??摺?囤??z夸z罐?+?????w棹f


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux