Re: [RFC 08/10] powerpc: dart iommu suspend

Johannes Berg
2007-02-06T01:26:02Z

[-- Attachment #1.1: Type: text/plain, Size: 1069 bytes --]

On Mon, 2007-02-05 at 19:19 -0600, Olof Johansson wrote:
> On Mon, Feb 05, 2007 at 07:30:35PM +0100, Johannes Berg wrote:
> > This implements suspend and resume code for the dart iommu.
>
> It's a good start, but it would be even nicer to have more generic iommu
> suspend/resume hooks instead, and do the alloc/copy there. Add the hooks
> to ppc_md together with the rest of the iommu/tce ops.

Ok, I'll take a look. I think we should leave the alloc up to the code
and just have generic calls for what now is iommu_dart_{save,restore}, I
see no point in adding a callback for iommu_init_late_dart since any
other iommu can do it as a late_initcall as well.

> > + /* this 16MB area is left unmapped because of caching
> > + * considerations. that happens early so we can't mark
> > + * it there, do it now instead */
> > + for (i = 0; i < (1<<24); i+= PAGE_SIZE)
> > + SetPageNosave(virt_to_page((void*)((unsigned long)dart_tablebase + i)));
>
> Please do a local void * instead, makes for much less casting in the loop. :)

:)

johannes

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]