> So with asmlinkage we request compiler to put args on stack.
What is advantage of this to start_kernel or in general to other
functions ?
See its about implementation ease and little of performance too. Assuming the default model of keeping arguments in registers is used. lets say arguments are assumed to be in registers R1, R2, R3, R4, R5, R6 and beyond that in stack. Since system call number is a transparent argument which is chopped off when calling the actual kernel handler and if R1 had the system call number, then you have to shift all register values and stack arguments too.So, isn't it simpler implementation with everything on stack?
On Fri, Jan 4, 2013 at 12:13 PM, Rahul Bedarkar <rpal143@xxxxxxxxx> wrote:
Thanks. So with asmlinkage we request compiler to put args on stack. What is advantage of this to start_kernel or in general to other functions ?Regards,RahulOn Thu, Jan 3, 2013 at 9:34 PM, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:the point is, parameters which is usually passed via stack, is passedOn Thu, Jan 3, 2013 at 7:40 PM, Rahul Bedarkar <rpal143@xxxxxxxxx> wrote:
> Hi,
>
> I was searching for asmlinkage and found that it is already explained at
> http://kernelnewbies.org/FAQ/asmlinkage
>
> But I didn't get this. Can someone tell me about it in brief ?
using different way.
A good example is system call.... they are passed using registers IIRC
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies