Rolf Neugebauer, le Thu 19 Feb 2009 18:04:41 +0000, a écrit :
> + *
> + * Permission is hereby granted, free of charge, to any person
> obtaining a copy
The lines of the patch got wrapped.
> + /* create a list of MFNs to map */
> + mfns = xmalloc_array(unsigned long, num_pages);
> + for ( i = 0; i < num_pages; i++, mfn++ )
> + {
> + if ( mfn_is_ram(mfn) )
> + {
> + printk("ioremap: mfn 0x%ulx is RAM\n", mfn);
> + goto mfn_invalid;
> + }
> +
> + mfns[i] = mfn;
> + }
> + va = (unsigned long)map_frames_ex(mfns, num_pages, 1, 0, 1,
> + DOMID_IO, 0, prot);
Instead of allocating an array, why not using the incr parameter of
map_frames_ex?
> +/* Maybe these should be defined in the respective arch_mm.h */
> +#if defined(__i386__) || defined(__x86_64__)
> +#define IO_PROT (L1_PROT)
> +#define IO_PROT_NOCACHE (L1_PROT | _PAGE_PCD)
> +#elif defined(__ia64__)
> +/* XXX IA64 needs to define these as appropriate. */
> +#define IO_PROT 0
> +#define IO_PROT_NOCACHE 0
> +#else
> +#error "Unsupported architecture"
> +#endif
Shouldn't these go to include/<arch>/arch_mm.h?
Samuel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|