Messages in this thread | | | Date | Thu, 18 Mar 2004 20:34:43 -0500 (EST) | From | Zwane Mwaikambo <> | Subject | Re: [PATCH] Introduce nodemask_t ADT [0/7] |
| |
On Thu, 18 Mar 2004, Jesse Barnes wrote:
> On Thursday 18 March 2004 4:58 pm, Zwane Mwaikambo wrote: > > > It probably shouldn't have anything to do with PCI directly either, > > > so .... ;-) My former thought was that you might just want the most > > > local memory for DMAing into. > > > > That knowledge should be in the dma api thing shouldn't it? But in it's > > current incarnation i don't see how that's possible. > > Couldn't we mostly hide it under the covers (though obviously not in > the intentionally remote case I mentioned earlier):
How about honouring DMA masks? Would this work with a 32bit DMA mask on a node with memory above the 4G mark. This is for the more impaired systems out there of course =)
> ===== arch/ia64/sn/io/machvec/pci_dma.c 1.28 vs edited ===== > --- 1.28/arch/ia64/sn/io/machvec/pci_dma.c Sun Mar 14 11:17:06 2004 > +++ edited/arch/ia64/sn/io/machvec/pci_dma.c Thu Mar 18 17:08:13 2004 > @@ -130,13 +130,11 @@ > device_sysdata = SN_DEVICE_SYSDATA(hwdev); > vhdl = device_sysdata->vhdl; > > - /* > - * Allocate the memory. > - * FIXME: We should be doing alloc_pages_node for the node closest > - * to the PCI device. > - */ > - if (!(cpuaddr = (void *)__get_free_pages(GFP_ATOMIC, get_order(size)))) > + cpuaddr = alloc_pages_node(pci_to_node(hwdev), GFP_ATOMIC, (get_order(size))); > + if (!cpuaddr) > return NULL; > + > + cpuaddr = page_to_virt(cpuaddr); > > memset(cpuaddr, 0x0, size); - 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/
| |