Re: [PATCH] i386: fix suspend/resume with dynamically allocated irq stacks

Bill Irwin
2007-05-03T02:31:15Z

On Wed, May 02, 2007 at 06:56:09PM -0700, Jeremy Fitzhardinge wrote:
>> +static void __cpuinit __free_irqstack(int cpu, void *stk)
>> +{
>> + int i;
>> +
>> + if (!cpu)
>> + return;
>> +
>> + unmap_vm_area(per_cpu(irqstack_area, cpu));
>> +
>> + for (i = 0; i < THREAD_SIZE/PAGE_SIZE; ++i)
>> + __free_page(per_cpu(irqstack_pages, cpu)[i]);
>> +}

On Wed, May 02, 2007 at 07:25:34PM -0700, Bill Irwin wrote:
[...]

Not sure if cpu 0 can ever be offlined, but it is remapped and so on.
So its virtual mapping should be undone if it can be offlined, but we
probably shouldn't attempt to free its underlying bootmem allocation.

-- wli