diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-21 16:12:59 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-21 16:12:59 -0700 |
| commit | fb11ee97781d73efbfaf91bf8c2dad33eb91d536 (patch) | |
| tree | 9adfdf99cab19d28bc9d04d903460ad562ebf0dc | |
| parent | c55a0e9aa06eee7ffdbf83261162f1dc7cdaab7e (diff) | |
| download | patches-fb11ee97781d73efbfaf91bf8c2dad33eb91d536.tar.gz | |
sysdev fixes
| -rw-r--r-- | driver-core/sysdev-pass-the-attribute-to-the-low-level-sysdev-show-store-function.patch | 103 |
1 files changed, 88 insertions, 15 deletions
diff --git a/driver-core/sysdev-pass-the-attribute-to-the-low-level-sysdev-show-store-function.patch b/driver-core/sysdev-pass-the-attribute-to-the-low-level-sysdev-show-store-function.patch index 6cd356ac9e6368..7d42552f78d3bd 100644 --- a/driver-core/sysdev-pass-the-attribute-to-the-low-level-sysdev-show-store-function.patch +++ b/driver-core/sysdev-pass-the-attribute-to-the-low-level-sysdev-show-store-function.patch @@ -36,7 +36,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> arch/s390/kernel/smp.c | 36 ++++++++++++++++-------- arch/s390/kernel/time.c | 35 ++++++++++++++++------- arch/sh/drivers/dma/dma-sysfs.c | 15 +++++++--- - arch/sparc64/kernel/sysfs.c | 3 +- + arch/sparc64/kernel/sysfs.c | 16 +++++++--- arch/x86/kernel/cpu/mcheck/mce_64.c | 14 ++++++--- arch/x86/kernel/cpu/mcheck/therm_throt.c | 1 arch/x86/kernel/microcode.c | 10 ++++-- @@ -44,13 +44,14 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> drivers/base/memory.c | 12 +++++--- drivers/base/node.c | 15 ++++++---- drivers/base/sys.c | 4 +- - drivers/base/topology.c | 15 ++++++---- + drivers/base/topology.c | 17 ++++++++--- drivers/cpuidle/sysfs.c | 10 ++++-- drivers/xen/balloon.c | 1 include/linux/sysdev.h | 5 ++- kernel/rtmutex-tester.c | 7 ++-- + kernel/sched.c | 8 ++++- kernel/time/clocksource.c | 8 ++++- - 23 files changed, 222 insertions(+), 106 deletions(-) + 24 files changed, 239 insertions(+), 112 deletions(-) --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c @@ -190,7 +191,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> #define show(name) \ static ssize_t \ -show_##name(struct sys_device *dev, char *buf) \ -+show_##name(struct sys_device *dev, struct sysdev_attribute *attr, \ ++show_##name(struct sys_device *dev, struct sysdev_attribute *attr, \ + char *buf) \ { \ u32 cpu=dev->id; \ @@ -555,7 +556,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> static ssize_t etr_online_store(struct sys_device *dev, - const char *buf, size_t count) + struct sysdev_attribute *attr, -+ const char *buf, size_t count) ++ const char *buf, size_t count) { unsigned int value; @@ -726,6 +727,44 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> { \ struct hv_mmu_statistics *p = &per_cpu(mmu_stats, dev->id); \ return sprintf(buf, "%lu\n", p->NAME); \ +@@ -135,13 +136,16 @@ static unsigned long write_mmustat_enabl + return sun4v_mmustat_conf(ra, &orig_ra); + } + +-static ssize_t show_mmustat_enable(struct sys_device *s, char *buf) ++static ssize_t show_mmustat_enable(struct sys_device *s, ++ struct sysdev_attribute *attr, char *buf) + { + unsigned long val = run_on_cpu(s->id, read_mmustat_enable, 0); + return sprintf(buf, "%lx\n", val); + } + +-static ssize_t store_mmustat_enable(struct sys_device *s, const char *buf, size_t count) ++static ssize_t store_mmustat_enable(struct sys_device *s, ++ struct sysdev_attribute *attr, const char *buf, ++ size_t count) + { + unsigned long val, err; + int ret = sscanf(buf, "%ld", &val); +@@ -179,14 +183,16 @@ static void unregister_mmu_stats(struct + #endif + + #define SHOW_CPUDATA_ULONG_NAME(NAME, MEMBER) \ +-static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ ++static ssize_t show_##NAME(struct sys_device *dev, \ ++ struct sysdev_attribute *attr, char *buf) \ + { \ + cpuinfo_sparc *c = &cpu_data(dev->id); \ + return sprintf(buf, "%lu\n", c->MEMBER); \ + } + + #define SHOW_CPUDATA_UINT_NAME(NAME, MEMBER) \ +-static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ ++static ssize_t show_##NAME(struct sys_device *dev, \ ++ struct sysdev_attribute *attr, char *buf) \ + { \ + cpuinfo_sparc *c = &cpu_data(dev->id); \ + return sprintf(buf, "%u\n", c->MEMBER); \ --- a/arch/x86/kernel/cpu/mcheck/mce_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_64.c @@ -762,10 +762,14 @@ DEFINE_PER_CPU(struct sys_device, device @@ -733,7 +772,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* Why are there no generic functions for this? */ #define ACCESSOR(name, var, start) \ - static ssize_t show_ ## name(struct sys_device *s, char *buf) { \ -+ static ssize_t show_ ## name(struct sys_device *s, \ ++ static ssize_t show_ ## name(struct sys_device *s, \ + struct sysdev_attribute *attr, \ + char *buf) { \ return sprintf(buf, "%lx\n", (unsigned long)var); \ @@ -741,7 +780,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - static ssize_t set_ ## name(struct sys_device *s,const char *buf,size_t siz) { \ + static ssize_t set_ ## name(struct sys_device *s, \ + struct sysdev_attribute *attr, \ -+ const char *buf,size_t siz) { \ ++ const char *buf, size_t siz) { \ char *end; \ unsigned long new = simple_strtoul(buf, &end, 0); \ if (end == buf) return -EINVAL; \ @@ -955,12 +994,12 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> #define define_id_show_func(name) \ -static ssize_t show_##name(struct sys_device *dev, char *buf) \ -+static ssize_t show_##name(struct sys_device *dev, \ ++static ssize_t show_##name(struct sys_device *dev, \ + struct sysdev_attribute *attr, char *buf) \ { \ unsigned int cpu = dev->id; \ return sprintf(buf, "%d\n", topology_##name(cpu)); \ -@@ -59,14 +60,16 @@ static ssize_t show_cpumap(int type, cpu +@@ -59,14 +60,17 @@ static ssize_t show_cpumap(int type, cpu #ifdef arch_provides_topology_pointers #define define_siblings_show_map(name) \ @@ -974,12 +1013,13 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> #define define_siblings_show_list(name) \ -static ssize_t show_##name##_list(struct sys_device *dev, char *buf) \ -+static ssize_t show_##name##_list(struct sys_device *dev, \ -+ struct sysdev_attribute *attr, char *buf) \ ++static ssize_t show_##name##_list(struct sys_device *dev, \ ++ struct sysdev_attribute *attr, \ ++ char *buf) \ { \ unsigned int cpu = dev->id; \ return show_cpumap(1, &(topology_##name(cpu)), buf); \ -@@ -74,7 +77,8 @@ static ssize_t show_##name##_list(struct +@@ -74,7 +78,8 @@ static ssize_t show_##name##_list(struct #else #define define_siblings_show_map(name) \ @@ -989,13 +1029,14 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> { \ unsigned int cpu = dev->id; \ cpumask_t mask = topology_##name(cpu); \ -@@ -82,7 +86,8 @@ static ssize_t show_##name(struct sys_de +@@ -82,7 +87,9 @@ static ssize_t show_##name(struct sys_de } #define define_siblings_show_list(name) \ -static ssize_t show_##name##_list(struct sys_device *dev, char *buf) \ -+static ssize_t show_##name##_list(struct sys_device *dev, \ -+ struct sysdev_attribute *attr, char *buf) \ ++static ssize_t show_##name##_list(struct sys_device *dev, \ ++ struct sysdev_attribute *attr, \ ++ char *buf) \ { \ unsigned int cpu = dev->id; \ cpumask_t mask = topology_##name(cpu); \ @@ -1086,6 +1127,38 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> { struct test_thread_data *td; struct task_struct *tsk; +--- a/kernel/sched.c ++++ b/kernel/sched.c +@@ -7737,11 +7737,13 @@ static ssize_t sched_power_savings_store + } + + #ifdef CONFIG_SCHED_MC +-static ssize_t sched_mc_power_savings_show(struct sys_device *dev, char *page) ++static ssize_t sched_mc_power_savings_show(struct sys_device *dev, ++ struct sysdev_attribute *attr, char *page) + { + return sprintf(page, "%u\n", sched_mc_power_savings); + } + static ssize_t sched_mc_power_savings_store(struct sys_device *dev, ++ struct sysdev_attribute *attr, + const char *buf, size_t count) + { + return sched_power_savings_store(buf, count, 0); +@@ -7751,11 +7753,13 @@ static SYSDEV_ATTR(sched_mc_power_saving + #endif + + #ifdef CONFIG_SCHED_SMT +-static ssize_t sched_smt_power_savings_show(struct sys_device *dev, char *page) ++static ssize_t sched_smt_power_savings_show(struct sys_device *dev, ++ struct sysdev_attribute *attr, char *page) + { + return sprintf(page, "%u\n", sched_smt_power_savings); + } + static ssize_t sched_smt_power_savings_store(struct sys_device *dev, ++ struct sysdev_attribute *attr, + const char *buf, size_t count) + { + return sched_power_savings_store(buf, count, 1); --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -376,7 +376,8 @@ void clocksource_unregister(struct clock |
