Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 226751 Details for
Bug 299031
[cpuidle] kernel freeze
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
AMD c1e detection fix
c1e.patch (text/plain), 5.00 KB, created by
Thomas Gleixner
on 2007-10-14 21:06:55 UTC
(
hide
)
Description:
AMD c1e detection fix
Filename:
MIME Type:
Creator:
Thomas Gleixner
Created:
2007-10-14 21:06:55 UTC
Size:
5.00 KB
patch
obsolete
>Index: linux-2.6.23/include/linux/clockchips.h >=================================================================== >--- linux-2.6.23.orig/include/linux/clockchips.h 2007-10-14 22:48:53.000000000 +0200 >+++ linux-2.6.23/include/linux/clockchips.h 2007-10-14 22:48:57.000000000 +0200 >@@ -31,6 +31,7 @@ enum clock_event_nofitiers { > CLOCK_EVT_NOTIFY_ADD, > CLOCK_EVT_NOTIFY_BROADCAST_ON, > CLOCK_EVT_NOTIFY_BROADCAST_OFF, >+ CLOCK_EVT_NOTIFY_BROADCAST_FORCE, > CLOCK_EVT_NOTIFY_BROADCAST_ENTER, > CLOCK_EVT_NOTIFY_BROADCAST_EXIT, > CLOCK_EVT_NOTIFY_SUSPEND, >Index: linux-2.6.23/kernel/time/tick-broadcast.c >=================================================================== >--- linux-2.6.23.orig/kernel/time/tick-broadcast.c 2007-10-14 22:48:56.000000000 +0200 >+++ linux-2.6.23/kernel/time/tick-broadcast.c 2007-10-14 22:48:57.000000000 +0200 >@@ -217,26 +217,43 @@ static void tick_do_broadcast_on_off(voi > bc = tick_broadcast_device.evtdev; > > /* >- * Is the device in broadcast mode forever or is it not >- * affected by the powerstate ? >+ * Is the device not affected by the powerstate ? > */ >- if (!dev || !tick_device_is_functional(dev) || >- !(dev->features & CLOCK_EVT_FEAT_C3STOP)) >+ if (!dev || !(dev->features & CLOCK_EVT_FEAT_C3STOP)) > goto out; > >- if (*reason == CLOCK_EVT_NOTIFY_BROADCAST_ON) { >+ /* >+ * Defect device ? >+ */ >+ if (!tick_device_is_functional(dev)) { >+ /* >+ * AMD C1E wreckage fixup: >+ * >+ * Device was registered functional in the first >+ * place. Now the secondary CPU detected the C1E >+ * misfeature and notifies us to fix it up >+ */ >+ if (*reason != CLOCK_EVT_NOTIFY_BROADCAST_FORCE) >+ goto out; >+ } >+ >+ switch (*reason) { >+ case CLOCK_EVT_NOTIFY_BROADCAST_ON: >+ case CLOCK_EVT_NOTIFY_BROADCAST_FORCE: > if (!cpu_isset(cpu, tick_broadcast_mask)) { > cpu_set(cpu, tick_broadcast_mask); > if (td->mode == TICKDEV_MODE_PERIODIC) > clockevents_set_mode(dev, > CLOCK_EVT_MODE_SHUTDOWN); > } >- } else { >+ break; >+ case CLOCK_EVT_NOTIFY_BROADCAST_OFF: > if (cpu_isset(cpu, tick_broadcast_mask)) { > cpu_clear(cpu, tick_broadcast_mask); > if (td->mode == TICKDEV_MODE_PERIODIC) > tick_setup_periodic(dev, 0); > } >+ break; > } > > if (cpus_empty(tick_broadcast_mask)) >Index: linux-2.6.23/kernel/time/tick-common.c >=================================================================== >--- linux-2.6.23.orig/kernel/time/tick-common.c 2007-10-14 22:48:56.000000000 +0200 >+++ linux-2.6.23/kernel/time/tick-common.c 2007-10-14 22:48:57.000000000 +0200 >@@ -345,6 +345,7 @@ static int tick_notify(struct notifier_b > > case CLOCK_EVT_NOTIFY_BROADCAST_ON: > case CLOCK_EVT_NOTIFY_BROADCAST_OFF: >+ case CLOCK_EVT_NOTIFY_BROADCAST_FORCE: > tick_broadcast_on_off(reason, dev); > break; > >Index: linux-2.6.23/arch/x86_64/kernel/smpboot.c >=================================================================== >--- linux-2.6.23.orig/arch/x86_64/kernel/smpboot.c 2007-10-14 22:48:55.000000000 +0200 >+++ linux-2.6.23/arch/x86_64/kernel/smpboot.c 2007-10-14 22:48:57.000000000 +0200 >@@ -335,11 +335,6 @@ void __cpuinit start_secondary(void) > */ > check_tsc_sync_target(); > >- Dprintk("cpu %d: setting up apic clock\n", smp_processor_id()); >- setup_secondary_APIC_clock(); >- >- Dprintk("cpu %d: enabling apic timer\n", smp_processor_id()); >- > if (nmi_watchdog == NMI_IO_APIC) { > disable_8259A_irq(0); > enable_NMI_through_LVT0(NULL); >@@ -365,6 +360,7 @@ void __cpuinit start_secondary(void) > > /* Setup the per cpu irq handling data structures */ > __setup_vector_irq(smp_processor_id()); >+ > /* > * Allow the master to continue. > */ >@@ -374,6 +370,8 @@ void __cpuinit start_secondary(void) > > unlock_ipi_call_lock(); > >+ setup_secondary_APIC_clock(); >+ > cpu_idle(); > } > >Index: linux-2.6.23/arch/x86_64/kernel/apic.c >=================================================================== >--- linux-2.6.23.orig/arch/x86_64/kernel/apic.c 2007-10-14 22:48:56.000000000 +0200 >+++ linux-2.6.23/arch/x86_64/kernel/apic.c 2007-10-14 22:48:57.000000000 +0200 >@@ -958,8 +958,34 @@ void __init setup_boot_APIC_clock (void) > setup_APIC_timer(); > } > >+/* >+ * AMD C1E enabled CPUs have a real nasty problem: Some BIOSes set the >+ * C1E flag only in the secondary CPU, so when we detect the wreckage >+ * we already have enabled the boot CPU local apic timer. Check, if >+ * disable_apic_timer is set and the DUMMY flag is cleared. If yes, >+ * set the DUMMY flag again and force the broadcast mode in the >+ * clockevents layer. >+ */ >+void __cpuinit check_boot_apic_timer_broadcast(void) >+{ >+ struct clock_event_device *levt = &per_cpu(lapic_events, boot_cpu_id); >+ >+ if (!disable_apic_timer || >+ (lapic_clockevent.features & CLOCK_EVT_FEAT_DUMMY)) >+ return; >+ >+ printk(KERN_INFO "AMD C1E detected late. Force timer broadcast.\n"); >+ lapic_clockevent.features |= CLOCK_EVT_FEAT_DUMMY; >+ levt->features |= CLOCK_EVT_FEAT_DUMMY; >+ >+ local_irq_enable(); >+ clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_FORCE, &boot_cpu_id); >+ local_irq_disable(); >+} >+ > void __cpuinit setup_secondary_APIC_clock(void) > { >+ check_boot_apic_timer_broadcast(); > setup_APIC_timer(); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 299031
:
208991
| 226751 |
227881