Re: [PATCH] x86, efi: Don't recursively acquire rtc_lock

From: Jan Beulich
Date: Wed Aug 10 2011 - 10:54:36 EST

>>> On 10.08.11 at 15:12, Jan Beulich wrote:
> >>> On 10.08.11 at 11:51, Ingo Molnar <mingo@xxxxxxx> wrote:
> > * Jan Beulich <JBeulich@xxxxxxxxxx> wrote:
> >> But then again I don't seem to be able to boot 3.0.1 with both
> >> patches applied on my only EFI box, so there must be something else
> >> that broke, and hence maybe I really did test it (on 3.0-rc7) and
> >> it worked then. Debugging...
> >
> > Ok, once you figure it out we can merge all fixes upstream ASAP.
> So this is a combination of two recent events: In my patch set, I
> recently removed efi.c's X86_32 conditional around setting
> x86_platform.[gs]et_wallclock. Without that removal, the deadlock
> wouldn't occur (because mach_get_cmos_time() would get called
> instead) on 64-bits, which is the only thing I run.
> With that conditional removed, Matthew's NX consolidation patch
> gets into the way: For the physical call path it is simply wrong
> (correct only for the phys_efi_set_virtual_address_map() call, as
> there the memory map got virtual addresses assigned already) -
> it switches from early_runtime_code_mapping_set_exec()'s using
> of md->phys_addr to efi_set_executable() using md->virt_addr.
> But the latter isn't set at that point yet. And it's unclear to me why
> this works on 32-bit.

Worse - even the original code would not have worked afaict. Calling
set_memory_{,n}x() this early cannot work without a small adjustment
to the CPA logic, as all of the flushing functions have
BUG_ON(irqs_disabled()) at their beginning.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at