aboutsummaryrefslogtreecommitdiffstats
diff options
-rw-r--r--ce.patch105
-rw-r--r--driver-core/driver-core-add-bus_sort_breadthfirst-function.patch4
-rw-r--r--series5
-rw-r--r--staging-add-taint_crap-for-all-drivers-staging-code.patch232
-rw-r--r--version2
5 files changed, 236 insertions, 112 deletions
diff --git a/ce.patch b/ce.patch
deleted file mode 100644
index 9b3538d51c219e..00000000000000
--- a/ce.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-commit 63c301eabc7324e7587425305c256995dac8fa11
-Author: Thomas Gleixner <tglx@linutronix.de>
-Date: Tue Sep 16 11:32:50 2008 -0700
-
- clockevents: make device shutdown robust
-
- The device shut down does not cleanup the next_event variable of the
- clock event device. So when the device is reactivated the possible
- stale next_event value can prevent the device to be reprogrammed as it
- claims to wait on a event already.
-
- This is the root cause of the resurfacing suspend/resume problem,
- where systems need key press to come back to life.
-
- Fix this by setting next_event to KTIME_MAX when the device is shut
- down. Use a separate function for shutdown which takes care of that
- and only keep the direct set mode call in the broadcast code, where we
- can not touch the next_event value.
-
- Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-
----
- kernel/time/clockevents.c | 12 +++++++++++-
- kernel/time/tick-broadcast.c | 9 ++++-----
- kernel/time/tick-internal.h | 2 ++
- 3 files changed, 17 insertions(+), 6 deletions(-)
-
---- a/kernel/time/clockevents.c
-+++ b/kernel/time/clockevents.c
-@@ -72,6 +72,16 @@ void clockevents_set_mode(struct clock_e
- }
-
- /**
-+ * clockevents_shutdown - shutdown the device and clear next_event
-+ * @dev: device to shutdown
-+ */
-+void clockevents_shutdown(struct clock_event_device *dev)
-+{
-+ clockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN);
-+ dev->next_event.tv64 = KTIME_MAX;
-+}
-+
-+/**
- * clockevents_program_event - Reprogram the clock event device.
- * @expires: absolute expiry time (monotonic clock)
- *
-@@ -206,7 +216,7 @@ void clockevents_exchange_device(struct
-
- if (new) {
- BUG_ON(new->mode != CLOCK_EVT_MODE_UNUSED);
-- clockevents_set_mode(new, CLOCK_EVT_MODE_SHUTDOWN);
-+ clockevents_shutdown(new);
- }
- local_irq_restore(flags);
- }
---- a/kernel/time/tick-broadcast.c
-+++ b/kernel/time/tick-broadcast.c
-@@ -236,8 +236,7 @@ static void tick_do_broadcast_on_off(voi
- 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);
-+ clockevents_shutdown(dev);
- }
- if (*reason == CLOCK_EVT_NOTIFY_BROADCAST_FORCE)
- tick_broadcast_force = 1;
-@@ -254,7 +253,7 @@ static void tick_do_broadcast_on_off(voi
-
- if (cpus_empty(tick_broadcast_mask)) {
- if (!bc_stopped)
-- clockevents_set_mode(bc, CLOCK_EVT_MODE_SHUTDOWN);
-+ clockevents_shutdown(bc);
- } else if (bc_stopped) {
- if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC)
- tick_broadcast_start_periodic(bc);
-@@ -306,7 +305,7 @@ void tick_shutdown_broadcast(unsigned in
-
- if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC) {
- if (bc && cpus_empty(tick_broadcast_mask))
-- clockevents_set_mode(bc, CLOCK_EVT_MODE_SHUTDOWN);
-+ clockevents_shutdown(bc);
- }
-
- spin_unlock_irqrestore(&tick_broadcast_lock, flags);
-@@ -321,7 +320,7 @@ void tick_suspend_broadcast(void)
-
- bc = tick_broadcast_device.evtdev;
- if (bc)
-- clockevents_set_mode(bc, CLOCK_EVT_MODE_SHUTDOWN);
-+ clockevents_shutdown(bc);
-
- spin_unlock_irqrestore(&tick_broadcast_lock, flags);
- }
---- a/kernel/time/tick-internal.h
-+++ b/kernel/time/tick-internal.h
-@@ -10,6 +10,8 @@ extern int tick_do_timer_cpu __read_most
- extern void tick_setup_periodic(struct clock_event_device *dev, int broadcast);
- extern void tick_handle_periodic(struct clock_event_device *dev);
-
-+extern void clockevents_shutdown(struct clock_event_device *dev);
-+
- /*
- * NO_HZ / high resolution timer shared code
- */
diff --git a/driver-core/driver-core-add-bus_sort_breadthfirst-function.patch b/driver-core/driver-core-add-bus_sort_breadthfirst-function.patch
index 42b95202e26733..8da4fbcfe943e6 100644
--- a/driver-core/driver-core-add-bus_sort_breadthfirst-function.patch
+++ b/driver-core/driver-core-add-bus_sort_breadthfirst-function.patch
@@ -80,7 +80,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
bus_kset = kset_create_and_add("bus", &bus_uevent_ops, NULL);
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
-@@ -1225,8 +1225,11 @@ EXPORT_SYMBOL(pci_scan_bridge);
+@@ -1237,8 +1237,11 @@ EXPORT_SYMBOL(pci_scan_bridge);
EXPORT_SYMBOL_GPL(pci_scan_child_bus);
#endif
@@ -93,7 +93,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (pci_domain_nr(a->bus) < pci_domain_nr(b->bus)) return -1;
else if (pci_domain_nr(a->bus) > pci_domain_nr(b->bus)) return 1;
-@@ -1239,50 +1242,7 @@ static int __init pci_sort_bf_cmp(const
+@@ -1251,50 +1254,7 @@ static int __init pci_sort_bf_cmp(const
return 0;
}
diff --git a/series b/series
index 9a9062bda1257d..52bb55d9d88516 100644
--- a/series
+++ b/series
@@ -210,8 +210,5 @@ usb/usb-gotemp.patch
#f.patch
-ce.patch
-
-
-
+staging-add-taint_crap-for-all-drivers-staging-code.patch
diff --git a/staging-add-taint_crap-for-all-drivers-staging-code.patch b/staging-add-taint_crap-for-all-drivers-staging-code.patch
new file mode 100644
index 00000000000000..da86f00fae7a51
--- /dev/null
+++ b/staging-add-taint_crap-for-all-drivers-staging-code.patch
@@ -0,0 +1,232 @@
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Subject: Staging: add TAINT_CRAP for all drivers/staging code
+
+We need to add a flag for all code that is in the drivers/staging/
+directory to prevent all other kernel developers from worrying about
+issues here, and to notify users that the drivers might not be as good
+as they are normally used to.
+
+Based on code from Andreas Gruenbacher and Jeff Mahoney to provide a
+TAINT flag for the support level of a kernel module in the Novell
+enterprise kernel release.
+
+
+
+Cc: Andreas Gruenbacher <agruen@suse.de>
+Cc: Jeff Mahoney <jeffm@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+
+ Documentation/sysctl/kernel.txt | 1
+ include/linux/kernel.h | 1
+ kernel/module.c | 9 +++++
+ kernel/panic.c | 6 ++-
+ scripts/Makefile.modpost | 4 +-
+ scripts/mod/modpost.c | 65 +++++++++++++++++++++++++++++++++++++++-
+ 6 files changed, 82 insertions(+), 4 deletions(-)
+
+--- a/Documentation/sysctl/kernel.txt
++++ b/Documentation/sysctl/kernel.txt
+@@ -368,4 +368,5 @@ can be ORed together:
+ 2 - A module was force loaded by insmod -f.
+ Set by modutils >= 2.4.9 and module-init-tools.
+ 4 - Unsafe SMP processors: SMP with CPUs not designed for SMP.
++ 64 - A module from drivers/staging was loaded.
+
+--- a/include/linux/kernel.h
++++ b/include/linux/kernel.h
+@@ -261,6 +261,7 @@ extern enum system_states {
+ #define TAINT_DIE (1<<7)
+ #define TAINT_OVERRIDDEN_ACPI_TABLE (1<<8)
+ #define TAINT_WARN (1<<9)
++#define TAINT_CRAP (1<<10)
+
+ extern void dump_stack(void) __cold;
+
+--- a/kernel/module.c
++++ b/kernel/module.c
+@@ -1834,6 +1834,7 @@ static noinline struct module *load_modu
+ Elf_Ehdr *hdr;
+ Elf_Shdr *sechdrs;
+ char *secstrings, *args, *modmagic, *strtab = NULL;
++ char *staging;
+ unsigned int i;
+ unsigned int symindex = 0;
+ unsigned int strindex = 0;
+@@ -1989,6 +1990,14 @@ static noinline struct module *load_modu
+ goto free_hdr;
+ }
+
++ staging = get_modinfo(sechdrs, infoindex, "staging");
++ if (staging) {
++ add_taint_module(mod, TAINT_CRAP);
++ printk(KERN_WARNING "%s: module is from the staging directory,"
++ " the quality is unknown, you have been warned.\n",
++ mod->name);
++ }
++
+ /* Now copy in args */
+ args = strndup_user(uargs, ~0UL >> 1);
+ if (IS_ERR(args)) {
+--- a/kernel/panic.c
++++ b/kernel/panic.c
+@@ -155,6 +155,7 @@ EXPORT_SYMBOL(panic);
+ * 'U' - Userspace-defined naughtiness.
+ * 'A' - ACPI table overridden.
+ * 'W' - Taint on warning.
++ * 'C' - modules from drivers/staging are loaded.
+ *
+ * The string is overwritten by the next call to print_taint().
+ */
+@@ -163,7 +164,7 @@ const char *print_tainted(void)
+ {
+ static char buf[20];
+ if (tainted) {
+- snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c%c%c%c%c%c%c",
++ snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c%c%c%c%c%c%c%c",
+ tainted & TAINT_PROPRIETARY_MODULE ? 'P' : 'G',
+ tainted & TAINT_FORCED_MODULE ? 'F' : ' ',
+ tainted & TAINT_UNSAFE_SMP ? 'S' : ' ',
+@@ -173,7 +174,8 @@ const char *print_tainted(void)
+ tainted & TAINT_USER ? 'U' : ' ',
+ tainted & TAINT_DIE ? 'D' : ' ',
+ tainted & TAINT_OVERRIDDEN_ACPI_TABLE ? 'A' : ' ',
+- tainted & TAINT_WARN ? 'W' : ' ');
++ tainted & TAINT_WARN ? 'W' : ' ',
++ tainted & TAINT_CRAP ? 'C' : ' ');
+ }
+ else
+ snprintf(buf, sizeof(buf), "Not tainted");
+--- a/scripts/Makefile.modpost
++++ b/scripts/Makefile.modpost
+@@ -88,7 +88,9 @@ modpost = scripts/mod/modpost
+ $(if $(CONFIG_MARKERS),-K $(kernelmarkersfile)) \
+ $(if $(CONFIG_MARKERS),-M $(markersfile)) \
+ $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) \
+- $(if $(cross_build),-c)
++ $(if $(cross_build),-c) \
++ -N $(firstword $(wildcard $(dir $(MODVERDIR))/Module.supported \
++ $(objtree)/Module.supported /dev/null))
+
+ quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules
+ cmd_modpost = $(modpost) -s
+--- a/scripts/mod/modpost.c
++++ b/scripts/mod/modpost.c
+@@ -1545,6 +1545,48 @@ static void get_markers(struct elf_info
+ }
+ }
+
++void *supported_file;
++unsigned long supported_size;
++
++const char *supported(struct module *mod)
++{
++ unsigned long pos = 0;
++ char *line;
++
++ /* In a first shot, do a simple linear scan. */
++ while ((line = get_next_line(&pos, supported_file,
++ supported_size))) {
++ const char *basename, *how = "yes";
++ char *l = line;
++
++ /* optional type-of-support flag */
++ for (l = line; *l != '\0'; l++) {
++ if (*l == ' ' || *l == '\t') {
++ *l = '\0';
++ how = l + 1;
++ break;
++ }
++ }
++
++ /* skip directory components */
++ if ((l = strrchr(line, '/')))
++ line = l + 1;
++ /* strip .ko extension */
++ l = line + strlen(line);
++ if (l - line > 3 && !strcmp(l-3, ".ko"))
++ *(l-3) = '\0';
++
++ /* skip directory components */
++ if ((basename = strrchr(mod->name, '/')))
++ basename++;
++ else
++ basename = mod->name;
++ if (!strcmp(basename, line))
++ return how;
++ }
++ return NULL;
++}
++
+ static void read_symbols(char *modname)
+ {
+ const char *symname;
+@@ -1726,6 +1768,13 @@ static void add_header(struct buffer *b,
+ buf_printf(b, "};\n");
+ }
+
++void add_supported_flag(struct buffer *b, struct module *mod)
++{
++ const char *how = supported(mod);
++ if (how)
++ buf_printf(b, "\nMODULE_INFO(supported, \"%s\");\n", how);
++}
++
+ /**
+ * Record CRCs for unresolved symbols
+ **/
+@@ -1866,6 +1915,13 @@ static void write_if_changed(struct buff
+ fclose(file);
+ }
+
++void read_supported(const char *fname)
++{
++ supported_file = grab_file(fname, &supported_size);
++ if (!supported_file)
++ ; /* ignore error */
++}
++
+ /* parse Module.symvers file. line format:
+ * 0x12345678<tab>symbol<tab>module[[<tab>export]<tab>something]
+ **/
+@@ -2048,12 +2104,13 @@ int main(int argc, char **argv)
+ char *dump_write = NULL;
+ char *markers_read = NULL;
+ char *markers_write = NULL;
++ const char *supported = NULL;
+ int opt;
+ int err;
+ struct ext_sym_list *extsym_iter;
+ struct ext_sym_list *extsym_start = NULL;
+
+- while ((opt = getopt(argc, argv, "i:I:e:cmsSo:awM:K:")) != -1) {
++ while ((opt = getopt(argc, argv, "i:I:e:cmsSo:awM:K:N:")) != -1) {
+ switch (opt) {
+ case 'i':
+ kernel_read = optarg;
+@@ -2097,11 +2154,16 @@ int main(int argc, char **argv)
+ case 'K':
+ markers_read = optarg;
+ break;
++ case 'N':
++ supported = optarg;
++ break;
+ default:
+ exit(1);
+ }
+ }
+
++ if (supported)
++ read_supported(supported);
+ if (kernel_read)
+ read_dump(kernel_read, 1);
+ if (module_read)
+@@ -2133,6 +2195,7 @@ int main(int argc, char **argv)
+ buf.pos = 0;
+
+ add_header(&buf, mod);
++ add_supported_flag(&buf, mod);
+ err |= add_versions(&buf, mod);
+ add_depends(&buf, mod, modules);
+ add_moddevtable(&buf, mod);
diff --git a/version b/version
index c4b2c1f0881cb2..3f0463f87b0796 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-2.6.27-rc6
+2.6.27-rc7