Re: [Regression] d96ac6f2: time: Revert ALWAYS_USE_PERSISTENT_CLOCK compile time optimizaitons

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/31/2013 04:42 PM, Jens Taprogge wrote:
On Fri, May 31, 2013 at 02:14:47PM -0700, John Stultz wrote:
On 05/31/2013 05:06 AM, Jens Taprogge wrote:
So, in the case of the reverted v3.9.4 with CONFIG_CPU_FREQ_STAT=y,
CONFIG_X86_VERBOSE_BOOTUP makes a difference.  To update the little
table from above:

With d96ac6f2 reverted:

   CONFIG_CPU_FREQ_STAT=n works
   CONFIG_CPU_FREQ_STAT=y and CONFIG_X86_VERBOSE_BOOTUP=y does not work
   CONFIG_CPU_FREQ_STAT=y and CONFIG_X86_VERBOSE_BOOTUP=n works
Ok. None of this is yet making any sense to me. (And I worry
enumerating all the mix and match of configs that work or don't only
blurs the issues).

Few base questions:
1) What distro is this on?
arch linux

2) What gcc version are you using?
gcc (GCC) 4.8.0 20130502 (prerelease)

(Sorry, I'm not very familiar with arch) Are you able to also install a 4.7 gcc in parallel to try to build with?

If so, you might want to try that. Your results are just weird enough I want to just be sure we're not chasing compiler caused ghosts.

3) Apply persistent-clock-exists-true.patch, does it boot or hang?

4) Apply has-persistent-clock-true.patch (on top of
persistent-clock-exists-true.patch), does it boot or hang?
Either patch alone or both combined boot.  From quick testin they seem
to follow the same pattern as the reverted version.

Hrmm.. That's strange too. I was guessing the first patch wouldn't boot, but maybe that's a helpful clue.

Attached is another patch that just provides debug info.

If you'd apply it (jdb.patch) against v3.9.4 with no other modifications, to verify that still doesn't boot.

Then apply just persistent-clock-exists-true.patch, which should boot, and send me the output of:
    $ dmesg | grep JDB


Thanks so much again for all the testing and help hunting this down! Sorry for the trouble!
-john


diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c
index 2e8f3d3..61b9aff 100644
--- a/arch/x86/kernel/rtc.c
+++ b/arch/x86/kernel/rtc.c
@@ -152,6 +152,7 @@ unsigned long mach_get_cmos_time(void)
 	} else
 		year += CMOS_YEARS_OFFS;
 
+	printk("JDB: mach_get_cmos_time: %ld\n", mktime(year, mon, day, hour, min, sec));
 	return mktime(year, mon, day, hour, min, sec);
 }
 
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index e4a86a6..8b7d1b0 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -385,6 +385,8 @@ unsigned long efi_get_time(void)
 	efi_time_t eft;
 	efi_time_cap_t cap;
 
+	printk("JDB: efi_get_time called?\n");
+
 	status = efi.get_time(&eft, &cap);
 	if (status != EFI_SUCCESS)
 		pr_err("Oops: efitime: can't read time!\n");
@@ -749,7 +751,7 @@ static int __init efi_runtime_init(void)
 	 */
 	efi.get_time = phys_efi_get_time;
 	early_iounmap(runtime, sizeof(efi_runtime_services_t));
-
+	printk("JDB: efi_runtime_init() done\n");
 	return 0;
 }
 
@@ -854,6 +856,7 @@ void __init efi_init(void)
 	set_bit(EFI_MEMMAP, &x86_efi_facility);
 
 #ifdef CONFIG_X86_32
+	printk("JDB: setting wallclock to efi_get_time\n");
 	if (efi_is_native()) {
 		x86_platform.get_wallclock = efi_get_time;
 		x86_platform.set_wallclock = efi_set_rtc_mmss;
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c
index 9b742d3..b23f8f3 100644
--- a/drivers/rtc/class.c
+++ b/drivers/rtc/class.c
@@ -53,6 +53,8 @@ static int rtc_suspend(struct device *dev, pm_message_t mesg)
 	struct rtc_time		tm;
 	struct timespec		delta, delta_delta;
 
+	printk("JDB: rtc_suspend called?\n");
+
 	if (has_persistent_clock())
 		return 0;
 
@@ -94,6 +96,8 @@ static int rtc_resume(struct device *dev)
 	struct timespec		new_system, new_rtc;
 	struct timespec		sleep_time;
 
+	printk("JDB: rtc_resume called?\n");
+
 	if (has_persistent_clock())
 		return 0;
 
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 9a0bc98..095e608 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -677,6 +677,8 @@ void __init timekeeping_init(void)
 
 	read_persistent_clock(&now);
 
+	printk("JDB: timekeeping_init: Persistent clock time: %ld:%ld\n", now.tv_sec, now.tv_nsec);
+
 	if (!timespec_valid_strict(&now)) {
 		pr_warn("WARNING: Persistent clock returned invalid value!\n"
 			"         Check your CMOS/BIOS settings.\n");
@@ -757,6 +759,8 @@ void timekeeping_inject_sleeptime(struct timespec *delta)
 	struct timekeeper *tk = &timekeeper;
 	unsigned long flags;
 
+	printk("JDB: timekeeping_inject_sleeptime called?\n");
+
 	/*
 	 * Make sure we don't set the clock twice, as timekeeping_resume()
 	 * already did it

[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]