aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 19:28:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 19:28:19 -0400
commit158e0d3621683ee0cdfeeba56f0e5ddd97ae984f (patch)
treecc59e84001f0a496a681242a875ecad6463aa50e /arch
parent675c354a95d5375153b8bb80a0448cab916c7991 (diff)
parent72099304eeb316c4b00df3ae83efe4375729bd78 (diff)
Merge tag 'driver-core-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core and sysfs updates from Greg KH: "Here's the big driver core / sysfs update for 3.15-rc1. Lots of kernfs updates to make it useful for other subsystems, and a few other tiny driver core patches. All have been in linux-next for a while" * tag 'driver-core-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (42 commits) Revert "sysfs, driver-core: remove unused {sysfs|device}_schedule_callback_owner()" kernfs: cache atomic_write_len in kernfs_open_file numa: fix NULL pointer access and memory leak in unregister_one_node() Revert "driver core: synchronize device shutdown" kernfs: fix off by one error. kernfs: remove duplicate dir.c at the top dir x86: align x86 arch with generic CPU modalias handling cpu: add generic support for CPU feature based module autoloading sysfs: create bin_attributes under the requested group driver core: unexport static function create_syslog_header firmware: use power efficient workqueue for unloading and aborting fw load firmware: give a protection when map page failed firmware: google memconsole driver fixes firmware: fix google/gsmi duplicate efivars_sysfs_init() drivers/base: delete non-required instances of include <linux/init.h> kernfs: fix kernfs_node_from_dentry() ACPI / platform: drop redundant ACPI_HANDLE check kernfs: fix hash calculation in kernfs_rename_ns() kernfs: add CONFIG_KERNFS sysfs, kobject: add sysfs wrapper for kernfs_enable_ns() ...
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/include/asm/ccwgroup.h1
-rw-r--r--arch/s390/pci/pci_sysfs.c18
-rw-r--r--arch/x86/Kconfig4
-rw-r--r--arch/x86/include/asm/cpufeature.h7
-rw-r--r--arch/x86/kernel/cpu/match.c42
5 files changed, 17 insertions, 55 deletions
diff --git a/arch/s390/include/asm/ccwgroup.h b/arch/s390/include/asm/ccwgroup.h
index 23723ce5ca7a..6e670f88d125 100644
--- a/arch/s390/include/asm/ccwgroup.h
+++ b/arch/s390/include/asm/ccwgroup.h
@@ -23,6 +23,7 @@ struct ccwgroup_device {
23 unsigned int count; 23 unsigned int count;
24 struct device dev; 24 struct device dev;
25 struct ccw_device *cdev[0]; 25 struct ccw_device *cdev[0];
26 struct work_struct ungroup_work;
26}; 27};
27 28
28/** 29/**
diff --git a/arch/s390/pci/pci_sysfs.c b/arch/s390/pci/pci_sysfs.c
index cf8a12ff733b..ab4a91393005 100644
--- a/arch/s390/pci/pci_sysfs.c
+++ b/arch/s390/pci/pci_sysfs.c
@@ -48,29 +48,27 @@ static ssize_t show_pfgid(struct device *dev, struct device_attribute *attr,
48} 48}
49static DEVICE_ATTR(pfgid, S_IRUGO, show_pfgid, NULL); 49static DEVICE_ATTR(pfgid, S_IRUGO, show_pfgid, NULL);
50 50
51static void recover_callback(struct device *dev) 51static ssize_t store_recover(struct device *dev, struct device_attribute *attr,
52 const char *buf, size_t count)
52{ 53{
53 struct pci_dev *pdev = to_pci_dev(dev); 54 struct pci_dev *pdev = to_pci_dev(dev);
54 struct zpci_dev *zdev = get_zdev(pdev); 55 struct zpci_dev *zdev = get_zdev(pdev);
55 int ret; 56 int ret;
56 57
58 if (!device_remove_file_self(dev, attr))
59 return count;
60
57 pci_stop_and_remove_bus_device(pdev); 61 pci_stop_and_remove_bus_device(pdev);
58 ret = zpci_disable_device(zdev); 62 ret = zpci_disable_device(zdev);
59 if (ret) 63 if (ret)
60 return; 64 return ret;
61 65
62 ret = zpci_enable_device(zdev); 66 ret = zpci_enable_device(zdev);
63 if (ret) 67 if (ret)
64 return; 68 return ret;
65 69
66 pci_rescan_bus(zdev->bus); 70 pci_rescan_bus(zdev->bus);
67} 71 return count;
68
69static ssize_t store_recover(struct device *dev, struct device_attribute *attr,
70 const char *buf, size_t count)
71{
72 int rc = device_schedule_callback(dev, recover_callback);
73 return rc ? rc : count;
74} 72}
75static DEVICE_ATTR(recover, S_IWUSR, NULL, store_recover); 73static DEVICE_ATTR(recover, S_IWUSR, NULL, store_recover);
76 74
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 8453fe1342ea..26237934ac87 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -127,6 +127,7 @@ config X86
127 select HAVE_DEBUG_STACKOVERFLOW 127 select HAVE_DEBUG_STACKOVERFLOW
128 select HAVE_IRQ_EXIT_ON_IRQ_STACK if X86_64 128 select HAVE_IRQ_EXIT_ON_IRQ_STACK if X86_64
129 select HAVE_CC_STACKPROTECTOR 129 select HAVE_CC_STACKPROTECTOR
130 select GENERIC_CPU_AUTOPROBE
130 131
131config INSTRUCTION_DECODER 132config INSTRUCTION_DECODER
132 def_bool y 133 def_bool y
@@ -195,9 +196,6 @@ config ARCH_HAS_CPU_RELAX
195config ARCH_HAS_CACHE_LINE_SIZE 196config ARCH_HAS_CACHE_LINE_SIZE
196 def_bool y 197 def_bool y
197 198
198config ARCH_HAS_CPU_AUTOPROBE
199 def_bool y
200
201config HAVE_SETUP_PER_CPU_AREA 199config HAVE_SETUP_PER_CPU_AREA
202 def_bool y 200 def_bool y
203 201
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
index 63211ef5046a..e265ff95d16d 100644
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -546,6 +546,13 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit)
546#define static_cpu_has_bug(bit) static_cpu_has((bit)) 546#define static_cpu_has_bug(bit) static_cpu_has((bit))
547#define boot_cpu_has_bug(bit) cpu_has_bug(&boot_cpu_data, (bit)) 547#define boot_cpu_has_bug(bit) cpu_has_bug(&boot_cpu_data, (bit))
548 548
549#define MAX_CPU_FEATURES (NCAPINTS * 32)
550#define cpu_have_feature boot_cpu_has
551
552#define CPU_FEATURE_TYPEFMT "x86,ven%04Xfam%04Xmod%04X"
553#define CPU_FEATURE_TYPEVAL boot_cpu_data.x86_vendor, boot_cpu_data.x86, \
554 boot_cpu_data.x86_model
555
549#endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */ 556#endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */
550 557
551#endif /* _ASM_X86_CPUFEATURE_H */ 558#endif /* _ASM_X86_CPUFEATURE_H */
diff --git a/arch/x86/kernel/cpu/match.c b/arch/x86/kernel/cpu/match.c
index 36565373af87..afa9f0d487ea 100644
--- a/arch/x86/kernel/cpu/match.c
+++ b/arch/x86/kernel/cpu/match.c
@@ -47,45 +47,3 @@ const struct x86_cpu_id *x86_match_cpu(const struct x86_cpu_id *match)
47 return NULL; 47 return NULL;
48} 48}
49EXPORT_SYMBOL(x86_match_cpu); 49EXPORT_SYMBOL(x86_match_cpu);
50
51ssize_t arch_print_cpu_modalias(struct device *dev,
52 struct device_attribute *attr,
53 char *bufptr)
54{
55 int size = PAGE_SIZE;
56 int i, n;
57 char *buf = bufptr;
58
59 n = snprintf(buf, size, "x86cpu:vendor:%04X:family:%04X:"
60 "model:%04X:feature:",
61 boot_cpu_data.x86_vendor,
62 boot_cpu_data.x86,
63 boot_cpu_data.x86_model);
64 size -= n;
65 buf += n;
66 size -= 1;
67 for (i = 0; i < NCAPINTS*32; i++) {
68 if (boot_cpu_has(i)) {
69 n = snprintf(buf, size, ",%04X", i);
70 if (n >= size) {
71 WARN(1, "x86 features overflow page\n");
72 break;
73 }
74 size -= n;
75 buf += n;
76 }
77 }
78 *buf++ = '\n';
79 return buf - bufptr;
80}
81
82int arch_cpu_uevent(struct device *dev, struct kobj_uevent_env *env)
83{
84 char *buf = kzalloc(PAGE_SIZE, GFP_KERNEL);
85 if (buf) {
86 arch_print_cpu_modalias(NULL, NULL, buf);
87 add_uevent_var(env, "MODALIAS=%s", buf);
88 kfree(buf);
89 }
90 return 0;
91}