diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-13 10:00:22 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-13 10:00:22 -0500 |
commit | 4de3a8e101150feaefa1139611a50ff37467f33e (patch) | |
tree | daada742542518b02d7db7c5d32e715eaa5f166d /arch/tile/kernel | |
parent | 294064f58953f9964e5945424b09c51800330a83 (diff) | |
parent | 099469502f62fbe0d7e4f0b83a2f22538367f734 (diff) |
Merge branch 'master' into fixes
Diffstat (limited to 'arch/tile/kernel')
-rw-r--r-- | arch/tile/kernel/machine_kexec.c | 6 | ||||
-rw-r--r-- | arch/tile/kernel/pci.c | 26 | ||||
-rw-r--r-- | arch/tile/kernel/sysfs.c | 61 |
3 files changed, 38 insertions, 55 deletions
diff --git a/arch/tile/kernel/machine_kexec.c b/arch/tile/kernel/machine_kexec.c index e00d7179989..6255f2eab11 100644 --- a/arch/tile/kernel/machine_kexec.c +++ b/arch/tile/kernel/machine_kexec.c | |||
@@ -248,11 +248,11 @@ static void setup_quasi_va_is_pa(void) | |||
248 | } | 248 | } |
249 | 249 | ||
250 | 250 | ||
251 | NORET_TYPE void machine_kexec(struct kimage *image) | 251 | void machine_kexec(struct kimage *image) |
252 | { | 252 | { |
253 | void *reboot_code_buffer; | 253 | void *reboot_code_buffer; |
254 | NORET_TYPE void (*rnk)(unsigned long, void *, unsigned long) | 254 | void (*rnk)(unsigned long, void *, unsigned long) |
255 | ATTRIB_NORET; | 255 | __noreturn; |
256 | 256 | ||
257 | /* Mask all interrupts before starting to reboot. */ | 257 | /* Mask all interrupts before starting to reboot. */ |
258 | interrupt_mask_set_mask(~0ULL); | 258 | interrupt_mask_set_mask(~0ULL); |
diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c index 9d610d3fb11..a1bb59eecc1 100644 --- a/arch/tile/kernel/pci.c +++ b/arch/tile/kernel/pci.c | |||
@@ -395,6 +395,11 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) | |||
395 | /* Nothing needs to be done. */ | 395 | /* Nothing needs to be done. */ |
396 | } | 396 | } |
397 | 397 | ||
398 | void pcibios_set_master(struct pci_dev *dev) | ||
399 | { | ||
400 | /* No special bus mastering setup handling. */ | ||
401 | } | ||
402 | |||
398 | /* | 403 | /* |
399 | * This can be called from the generic PCI layer, but doesn't need to | 404 | * This can be called from the generic PCI layer, but doesn't need to |
400 | * do anything. | 405 | * do anything. |
@@ -466,27 +471,6 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) | |||
466 | return 0; | 471 | return 0; |
467 | } | 472 | } |
468 | 473 | ||
469 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) | ||
470 | { | ||
471 | unsigned long start = pci_resource_start(dev, bar); | ||
472 | unsigned long len = pci_resource_len(dev, bar); | ||
473 | unsigned long flags = pci_resource_flags(dev, bar); | ||
474 | |||
475 | if (!len) | ||
476 | return NULL; | ||
477 | if (max && len > max) | ||
478 | len = max; | ||
479 | |||
480 | if (!(flags & IORESOURCE_MEM)) { | ||
481 | pr_info("PCI: Trying to map invalid resource %#lx\n", flags); | ||
482 | start = 0; | ||
483 | } | ||
484 | |||
485 | return (void __iomem *)start; | ||
486 | } | ||
487 | EXPORT_SYMBOL(pci_iomap); | ||
488 | |||
489 | |||
490 | /**************************************************************** | 474 | /**************************************************************** |
491 | * | 475 | * |
492 | * Tile PCI config space read/write routines | 476 | * Tile PCI config space read/write routines |
diff --git a/arch/tile/kernel/sysfs.c b/arch/tile/kernel/sysfs.c index 60290826809..f862b005eb7 100644 --- a/arch/tile/kernel/sysfs.c +++ b/arch/tile/kernel/sysfs.c | |||
@@ -14,7 +14,7 @@ | |||
14 | * /sys entry support. | 14 | * /sys entry support. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/sysdev.h> | 17 | #include <linux/device.h> |
18 | #include <linux/cpu.h> | 18 | #include <linux/cpu.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/smp.h> | 20 | #include <linux/smp.h> |
@@ -32,55 +32,55 @@ static ssize_t get_hv_confstr(char *page, int query) | |||
32 | return n; | 32 | return n; |
33 | } | 33 | } |
34 | 34 | ||
35 | static ssize_t chip_width_show(struct sysdev_class *dev, | 35 | static ssize_t chip_width_show(struct device *dev, |
36 | struct sysdev_class_attribute *attr, | 36 | struct device_attribute *attr, |
37 | char *page) | 37 | char *page) |
38 | { | 38 | { |
39 | return sprintf(page, "%u\n", smp_width); | 39 | return sprintf(page, "%u\n", smp_width); |
40 | } | 40 | } |
41 | static SYSDEV_CLASS_ATTR(chip_width, 0444, chip_width_show, NULL); | 41 | static DEVICE_ATTR(chip_width, 0444, chip_width_show, NULL); |
42 | 42 | ||
43 | static ssize_t chip_height_show(struct sysdev_class *dev, | 43 | static ssize_t chip_height_show(struct device *dev, |
44 | struct sysdev_class_attribute *attr, | 44 | struct device_attribute *attr, |
45 | char *page) | 45 | char *page) |
46 | { | 46 | { |
47 | return sprintf(page, "%u\n", smp_height); | 47 | return sprintf(page, "%u\n", smp_height); |
48 | } | 48 | } |
49 | static SYSDEV_CLASS_ATTR(chip_height, 0444, chip_height_show, NULL); | 49 | static DEVICE_ATTR(chip_height, 0444, chip_height_show, NULL); |
50 | 50 | ||
51 | static ssize_t chip_serial_show(struct sysdev_class *dev, | 51 | static ssize_t chip_serial_show(struct device *dev, |
52 | struct sysdev_class_attribute *attr, | 52 | struct device_attribute *attr, |
53 | char *page) | 53 | char *page) |
54 | { | 54 | { |
55 | return get_hv_confstr(page, HV_CONFSTR_CHIP_SERIAL_NUM); | 55 | return get_hv_confstr(page, HV_CONFSTR_CHIP_SERIAL_NUM); |
56 | } | 56 | } |
57 | static SYSDEV_CLASS_ATTR(chip_serial, 0444, chip_serial_show, NULL); | 57 | static DEVICE_ATTR(chip_serial, 0444, chip_serial_show, NULL); |
58 | 58 | ||
59 | static ssize_t chip_revision_show(struct sysdev_class *dev, | 59 | static ssize_t chip_revision_show(struct device *dev, |
60 | struct sysdev_class_attribute *attr, | 60 | struct device_attribute *attr, |
61 | char *page) | 61 | char *page) |
62 | { | 62 | { |
63 | return get_hv_confstr(page, HV_CONFSTR_CHIP_REV); | 63 | return get_hv_confstr(page, HV_CONFSTR_CHIP_REV); |
64 | } | 64 | } |
65 | static SYSDEV_CLASS_ATTR(chip_revision, 0444, chip_revision_show, NULL); | 65 | static DEVICE_ATTR(chip_revision, 0444, chip_revision_show, NULL); |
66 | 66 | ||
67 | 67 | ||
68 | static ssize_t type_show(struct sysdev_class *dev, | 68 | static ssize_t type_show(struct device *dev, |
69 | struct sysdev_class_attribute *attr, | 69 | struct device_attribute *attr, |
70 | char *page) | 70 | char *page) |
71 | { | 71 | { |
72 | return sprintf(page, "tilera\n"); | 72 | return sprintf(page, "tilera\n"); |
73 | } | 73 | } |
74 | static SYSDEV_CLASS_ATTR(type, 0444, type_show, NULL); | 74 | static DEVICE_ATTR(type, 0444, type_show, NULL); |
75 | 75 | ||
76 | #define HV_CONF_ATTR(name, conf) \ | 76 | #define HV_CONF_ATTR(name, conf) \ |
77 | static ssize_t name ## _show(struct sysdev_class *dev, \ | 77 | static ssize_t name ## _show(struct device *dev, \ |
78 | struct sysdev_class_attribute *attr, \ | 78 | struct device_attribute *attr, \ |
79 | char *page) \ | 79 | char *page) \ |
80 | { \ | 80 | { \ |
81 | return get_hv_confstr(page, conf); \ | 81 | return get_hv_confstr(page, conf); \ |
82 | } \ | 82 | } \ |
83 | static SYSDEV_CLASS_ATTR(name, 0444, name ## _show, NULL); | 83 | static DEVICE_ATTR(name, 0444, name ## _show, NULL); |
84 | 84 | ||
85 | HV_CONF_ATTR(version, HV_CONFSTR_HV_SW_VER) | 85 | HV_CONF_ATTR(version, HV_CONFSTR_HV_SW_VER) |
86 | HV_CONF_ATTR(config_version, HV_CONFSTR_HV_CONFIG_VER) | 86 | HV_CONF_ATTR(config_version, HV_CONFSTR_HV_CONFIG_VER) |
@@ -96,15 +96,15 @@ HV_CONF_ATTR(mezz_description, HV_CONFSTR_MEZZ_DESC) | |||
96 | HV_CONF_ATTR(switch_control, HV_CONFSTR_SWITCH_CONTROL) | 96 | HV_CONF_ATTR(switch_control, HV_CONFSTR_SWITCH_CONTROL) |
97 | 97 | ||
98 | static struct attribute *board_attrs[] = { | 98 | static struct attribute *board_attrs[] = { |
99 | &attr_board_part.attr, | 99 | &dev_attr_board_part.attr, |
100 | &attr_board_serial.attr, | 100 | &dev_attr_board_serial.attr, |
101 | &attr_board_revision.attr, | 101 | &dev_attr_board_revision.attr, |
102 | &attr_board_description.attr, | 102 | &dev_attr_board_description.attr, |
103 | &attr_mezz_part.attr, | 103 | &dev_attr_mezz_part.attr, |
104 | &attr_mezz_serial.attr, | 104 | &dev_attr_mezz_serial.attr, |
105 | &attr_mezz_revision.attr, | 105 | &dev_attr_mezz_revision.attr, |
106 | &attr_mezz_description.attr, | 106 | &dev_attr_mezz_description.attr, |
107 | &attr_switch_control.attr, | 107 | &dev_attr_switch_control.attr, |
108 | NULL | 108 | NULL |
109 | }; | 109 | }; |
110 | 110 | ||
@@ -151,12 +151,11 @@ hvconfig_bin_read(struct file *filp, struct kobject *kobj, | |||
151 | 151 | ||
152 | static int __init create_sysfs_entries(void) | 152 | static int __init create_sysfs_entries(void) |
153 | { | 153 | { |
154 | struct sysdev_class *cls = &cpu_sysdev_class; | ||
155 | int err = 0; | 154 | int err = 0; |
156 | 155 | ||
157 | #define create_cpu_attr(name) \ | 156 | #define create_cpu_attr(name) \ |
158 | if (!err) \ | 157 | if (!err) \ |
159 | err = sysfs_create_file(&cls->kset.kobj, &attr_##name.attr); | 158 | err = device_create_file(cpu_subsys.dev_root, &dev_attr_##name); |
160 | create_cpu_attr(chip_width); | 159 | create_cpu_attr(chip_width); |
161 | create_cpu_attr(chip_height); | 160 | create_cpu_attr(chip_height); |
162 | create_cpu_attr(chip_serial); | 161 | create_cpu_attr(chip_serial); |
@@ -164,7 +163,7 @@ static int __init create_sysfs_entries(void) | |||
164 | 163 | ||
165 | #define create_hv_attr(name) \ | 164 | #define create_hv_attr(name) \ |
166 | if (!err) \ | 165 | if (!err) \ |
167 | err = sysfs_create_file(hypervisor_kobj, &attr_##name.attr); | 166 | err = sysfs_create_file(hypervisor_kobj, &dev_attr_##name); |
168 | create_hv_attr(type); | 167 | create_hv_attr(type); |
169 | create_hv_attr(version); | 168 | create_hv_attr(version); |
170 | create_hv_attr(config_version); | 169 | create_hv_attr(config_version); |