diff --git a/debian/changelog b/debian/changelog index 681007bc9..cde5fbbea 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,8 @@ linux-2.6 (3.2.1-1~experimental.1) UNRELEASED; urgency=low * [ia64] Add accept4() syscall (Closes: #647825) * [x86] staging: Enable STAGING_MEDIA, which various drivers now depend on (Closes: #654800) + * [um,m68k] Register a generic CPU device (fixes regression introduced by + the fix for #649216) [ Bastian Blank ] * [amd64] crypt: Enable some amd64 only ciphers. diff --git a/debian/patches/bugfix/all/cpu-Do-not-return-errors-from-cpu_dev_init-which-wil.patch b/debian/patches/bugfix/all/cpu-Do-not-return-errors-from-cpu_dev_init-which-wil.patch new file mode 100644 index 000000000..dae191c0e --- /dev/null +++ b/debian/patches/bugfix/all/cpu-Do-not-return-errors-from-cpu_dev_init-which-wil.patch @@ -0,0 +1,63 @@ +From: Ben Hutchings +Date: Tue, 10 Jan 2012 02:59:49 +0000 +Subject: [PATCH 1/2] cpu: Do not return errors from cpu_dev_init() which will + be ignored + +commit 024f78462c3da710642a54939888a92e28704653 upstream. + +cpu_dev_init() is only called from driver_init(), which does not check +its return value. Therefore make cpu_dev_init() return void. + +We must register the CPU subsystem, so panic if this fails. + +If sched_create_sysfs_power_savings_entries() fails, the damage is +contained, so ignore this (as before). + +Signed-off-by: Ben Hutchings +Signed-off-by: Linus Torvalds +[bwh: Backport to 3.2] +--- +--- a/drivers/base/base.h ++++ b/drivers/base/base.h +@@ -95,7 +95,7 @@ extern int hypervisor_init(void); + #endif + extern int platform_bus_init(void); + extern int system_bus_init(void); +-extern int cpu_dev_init(void); ++extern void cpu_dev_init(void); + + extern int bus_add_device(struct device *dev); + extern void bus_probe_device(struct device *dev); +--- a/drivers/base/cpu.c ++++ b/drivers/base/cpu.c +@@ -2,6 +2,7 @@ + * drivers/base/cpu.c - basic CPU class support + */ + ++#include + #include + #include + #include +@@ -247,17 +248,14 @@ bool cpu_is_hotpluggable(unsigned cpu) + } + EXPORT_SYMBOL_GPL(get_cpu_sysdev); + +-int __init cpu_dev_init(void) ++void __init cpu_dev_init(void) + { +- int err; +- +- err = sysdev_class_register(&cpu_sysdev_class); ++ if (sysdev_class_register(&cpu_sysdev_class)) ++ panic("Failed to register CPU subsystem"); ++ + #if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT) +- if (!err) +- err = sched_create_sysfs_power_savings_entries(&cpu_sysdev_class); ++ sched_create_sysfs_power_savings_entries(&cpu_sysdev_class); + #endif +- +- return err; + } + + static struct sysdev_class_attribute *cpu_sysdev_class_attrs[] = { diff --git a/debian/patches/bugfix/all/cpu-Register-a-generic-CPU-device-on-architectures-t.patch b/debian/patches/bugfix/all/cpu-Register-a-generic-CPU-device-on-architectures-t.patch new file mode 100644 index 000000000..e5dc739b4 --- /dev/null +++ b/debian/patches/bugfix/all/cpu-Register-a-generic-CPU-device-on-architectures-t.patch @@ -0,0 +1,152 @@ +From: Ben Hutchings +Date: Tue, 10 Jan 2012 03:04:32 +0000 +Subject: [PATCH 2/2] cpu: Register a generic CPU device on architectures that + currently do not + +commit 9f13a1fd452f11c18004ba2422a6384b424ec8a9 upstream. + +frv, h8300, m68k, microblaze, openrisc, score, um and xtensa currently +do not register a CPU device. Add the config option GENERIC_CPU_DEVICES +which causes a generic CPU device to be registered for each present CPU, +and make all these architectures select it. + +Richard Weinberger covered UML and suggested using +per_cpu. + +Signed-off-by: Ben Hutchings +Signed-off-by: Linus Torvalds +[bwh: Backport to 3.2] +--- +--- a/arch/frv/Kconfig ++++ b/arch/frv/Kconfig +@@ -8,6 +8,7 @@ config FRV + select HAVE_GENERIC_HARDIRQS + select GENERIC_IRQ_SHOW + select ARCH_HAVE_NMI_SAFE_CMPXCHG ++ select GENERIC_CPU_DEVICES + + config ZONE_DMA + bool +--- a/arch/h8300/Kconfig ++++ b/arch/h8300/Kconfig +@@ -4,6 +4,7 @@ config H8300 + select HAVE_IDE + select HAVE_GENERIC_HARDIRQS + select GENERIC_IRQ_SHOW ++ select GENERIC_CPU_DEVICES + + config SYMBOL_PREFIX + string +--- a/arch/m68k/Kconfig ++++ b/arch/m68k/Kconfig +@@ -6,6 +6,7 @@ config M68K + select HAVE_GENERIC_HARDIRQS + select GENERIC_IRQ_SHOW + select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS ++ select GENERIC_CPU_DEVICES + + config RWSEM_GENERIC_SPINLOCK + bool +--- a/arch/microblaze/Kconfig ++++ b/arch/microblaze/Kconfig +@@ -17,6 +17,7 @@ config MICROBLAZE + select HAVE_GENERIC_HARDIRQS + select GENERIC_IRQ_PROBE + select GENERIC_IRQ_SHOW ++ select GENERIC_CPU_DEVICES + + config SWAP + def_bool n +--- a/arch/openrisc/Kconfig ++++ b/arch/openrisc/Kconfig +@@ -15,6 +15,7 @@ config OPENRISC + select GENERIC_IRQ_PROBE + select GENERIC_IRQ_SHOW + select GENERIC_IOMAP ++ select GENERIC_CPU_DEVICES + + config MMU + def_bool y +--- a/arch/score/Kconfig ++++ b/arch/score/Kconfig +@@ -4,6 +4,7 @@ config SCORE + def_bool y + select HAVE_GENERIC_HARDIRQS + select GENERIC_IRQ_SHOW ++ select GENERIC_CPU_DEVICES + + choice + prompt "System type" +--- a/arch/um/Kconfig.common ++++ b/arch/um/Kconfig.common +@@ -8,6 +8,7 @@ config UML + default y + select HAVE_GENERIC_HARDIRQS + select GENERIC_IRQ_SHOW ++ select GENERIC_CPU_DEVICES + + config MMU + bool +--- a/arch/xtensa/Kconfig ++++ b/arch/xtensa/Kconfig +@@ -9,6 +9,7 @@ config XTENSA + select HAVE_IDE + select HAVE_GENERIC_HARDIRQS + select GENERIC_IRQ_SHOW ++ select GENERIC_CPU_DEVICES + help + Xtensa processors are 32-bit RISC machines designed by Tensilica + primarily for embedded systems. These processors are both +--- a/drivers/base/Kconfig ++++ b/drivers/base/Kconfig +@@ -172,6 +172,10 @@ config SYS_HYPERVISOR + bool + default n + ++config GENERIC_CPU_DEVICES ++ bool ++ default n ++ + source "drivers/base/regmap/Kconfig" + + config DMA_SHARED_BUFFER +--- a/drivers/base/cpu.c ++++ b/drivers/base/cpu.c +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + + #include "base.h" + +@@ -248,11 +249,29 @@ bool cpu_is_hotpluggable(unsigned cpu) + } + EXPORT_SYMBOL_GPL(get_cpu_sysdev); + ++#ifdef CONFIG_GENERIC_CPU_DEVICES ++static DEFINE_PER_CPU(struct cpu, cpu_devices); ++#endif ++ ++static void __init cpu_dev_register_generic(void) ++{ ++#ifdef CONFIG_GENERIC_CPU_DEVICES ++ int i; ++ ++ for_each_possible_cpu(i) { ++ if (register_cpu(&per_cpu(cpu_devices, i), i)) ++ panic("Failed to register CPU device"); ++ } ++#endif ++} ++ + void __init cpu_dev_init(void) + { + if (sysdev_class_register(&cpu_sysdev_class)) + panic("Failed to register CPU subsystem"); + ++ cpu_dev_register_generic(); ++ + #if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT) + sched_create_sysfs_power_savings_entries(&cpu_sysdev_class); + #endif diff --git a/debian/patches/series/base b/debian/patches/series/base index 4f8a29d9b..2e7093356 100644 --- a/debian/patches/series/base +++ b/debian/patches/series/base @@ -55,6 +55,8 @@ + bugfix/all/0005-media-staging-lirc_serial-Do-not-assume-error-codes-.patch + features/all/topology-Provide-CPU-topology-in-sysfs-in-SMP-configura.patch ++ bugfix/all/cpu-Do-not-return-errors-from-cpu_dev_init-which-wil.patch ++ bugfix/all/cpu-Register-a-generic-CPU-device-on-architectures-t.patch + debian/x86-memtest-WARN-if-bad-RAM-found.patch + debian/ARM-Remove-use-of-possibly-undefined-BUILD_BUG_ON-in.patch + bugfix/arm/ARM-ixp4xx-gpiolib-support.patch