lkml.org 
[lkml]   [2006]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 19/35] subarch support for control register accesses
* Zachary Amsden (zach@vmware.com) wrote:
> Chris Wright wrote:
> >+#define read_cr4_safe() ({ \
> >+ unsigned int __dummy; \
> >+ /* This could fault if %cr4 does not exist */ \
> >+ __asm__("1: movl %%cr4, %0 \n" \
> >+ "2: \n" \
> >+ ".section __ex_table,\"a\" \n" \
> >+ ".long 1b,2b \n" \
> >+ ".previous \n" \
> >+ : "=r" (__dummy): "0" (0)); \
> >+ __dummy; \
> >+})
>
> I think you'll find trap and emulate quite sufficient for this one.

Heh ;-)

> >+#define stts() write_cr0(8 | read_cr0())
> >
>
> Nit: You shouldn't need to redefine stts() in the subarch.

Yes, you're right, better to keep things consolidated.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-22 22:48    [W:0.075 / U:53.400 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site