Messages in this thread | | | Subject | Re: [PATCH 2.6.12-rc6] char: Add Dell Systems Management Base driver | From | Andi Kleen <> | Date | Thu, 16 Jun 2005 19:59:29 +0200 |
| |
Doug Warzecha <Douglas_Warzecha@dell.com> writes:
> +static void *tvm_alloc_suitable(unsigned long size, unsigned long phys_max) > +{ > + void *ptr; > + unsigned int flags = GFP_KERNEL; > + > + while ((ptr = kmalloc(size, flags)) != NULL) { > + if ((virt_to_phys(ptr) + size - 1) <= phys_max) > + break; > + > + kfree(ptr); > + ptr = NULL; > + > + if (flags & GFP_DMA) > + break; > + flags |= GFP_DMA; > + } > + return ptr;
Umm - what's that?
Please drop that immediately. 2.6.13 will hopefully have GFP_DMA32 on x86-64 that will make it fully obsolete.
And even before that you can use pci_alloc_consistent() - that will do the right now and later.
... haven't read on.
But there seems to be a use of register_ioctl32_conversion. That needs to be replaced with ->compat_ioctl, since the former will soon go.
-Andi - 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/
| |