diff options
Diffstat (limited to 'arch/tile/kernel')
-rw-r--r-- | arch/tile/kernel/irq.c | 16 | ||||
-rw-r--r-- | arch/tile/kernel/pci-dma.c | 1 | ||||
-rw-r--r-- | arch/tile/kernel/pci.c | 1 | ||||
-rw-r--r-- | arch/tile/kernel/process.c | 6 | ||||
-rw-r--r-- | arch/tile/kernel/sysfs.c | 62 |
5 files changed, 45 insertions, 41 deletions
diff --git a/arch/tile/kernel/irq.c b/arch/tile/kernel/irq.c index aa0134db2dd6..02e628065012 100644 --- a/arch/tile/kernel/irq.c +++ b/arch/tile/kernel/irq.c | |||
@@ -152,14 +152,13 @@ void tile_dev_intr(struct pt_regs *regs, int intnum) | |||
152 | * Remove an irq from the disabled mask. If we're in an interrupt | 152 | * Remove an irq from the disabled mask. If we're in an interrupt |
153 | * context, defer enabling the HW interrupt until we leave. | 153 | * context, defer enabling the HW interrupt until we leave. |
154 | */ | 154 | */ |
155 | void enable_percpu_irq(unsigned int irq) | 155 | static void tile_irq_chip_enable(struct irq_data *d) |
156 | { | 156 | { |
157 | get_cpu_var(irq_disable_mask) &= ~(1UL << irq); | 157 | get_cpu_var(irq_disable_mask) &= ~(1UL << d->irq); |
158 | if (__get_cpu_var(irq_depth) == 0) | 158 | if (__get_cpu_var(irq_depth) == 0) |
159 | unmask_irqs(1UL << irq); | 159 | unmask_irqs(1UL << d->irq); |
160 | put_cpu_var(irq_disable_mask); | 160 | put_cpu_var(irq_disable_mask); |
161 | } | 161 | } |
162 | EXPORT_SYMBOL(enable_percpu_irq); | ||
163 | 162 | ||
164 | /* | 163 | /* |
165 | * Add an irq to the disabled mask. We disable the HW interrupt | 164 | * Add an irq to the disabled mask. We disable the HW interrupt |
@@ -167,13 +166,12 @@ EXPORT_SYMBOL(enable_percpu_irq); | |||
167 | * in an interrupt context, the return path is careful to avoid | 166 | * in an interrupt context, the return path is careful to avoid |
168 | * unmasking a newly disabled interrupt. | 167 | * unmasking a newly disabled interrupt. |
169 | */ | 168 | */ |
170 | void disable_percpu_irq(unsigned int irq) | 169 | static void tile_irq_chip_disable(struct irq_data *d) |
171 | { | 170 | { |
172 | get_cpu_var(irq_disable_mask) |= (1UL << irq); | 171 | get_cpu_var(irq_disable_mask) |= (1UL << d->irq); |
173 | mask_irqs(1UL << irq); | 172 | mask_irqs(1UL << d->irq); |
174 | put_cpu_var(irq_disable_mask); | 173 | put_cpu_var(irq_disable_mask); |
175 | } | 174 | } |
176 | EXPORT_SYMBOL(disable_percpu_irq); | ||
177 | 175 | ||
178 | /* Mask an interrupt. */ | 176 | /* Mask an interrupt. */ |
179 | static void tile_irq_chip_mask(struct irq_data *d) | 177 | static void tile_irq_chip_mask(struct irq_data *d) |
@@ -209,6 +207,8 @@ static void tile_irq_chip_eoi(struct irq_data *d) | |||
209 | 207 | ||
210 | static struct irq_chip tile_irq_chip = { | 208 | static struct irq_chip tile_irq_chip = { |
211 | .name = "tile_irq_chip", | 209 | .name = "tile_irq_chip", |
210 | .irq_enable = tile_irq_chip_enable, | ||
211 | .irq_disable = tile_irq_chip_disable, | ||
212 | .irq_ack = tile_irq_chip_ack, | 212 | .irq_ack = tile_irq_chip_ack, |
213 | .irq_eoi = tile_irq_chip_eoi, | 213 | .irq_eoi = tile_irq_chip_eoi, |
214 | .irq_mask = tile_irq_chip_mask, | 214 | .irq_mask = tile_irq_chip_mask, |
diff --git a/arch/tile/kernel/pci-dma.c b/arch/tile/kernel/pci-dma.c index 658f2ce426a4..b3ed19f8779c 100644 --- a/arch/tile/kernel/pci-dma.c +++ b/arch/tile/kernel/pci-dma.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/dma-mapping.h> | 16 | #include <linux/dma-mapping.h> |
17 | #include <linux/vmalloc.h> | 17 | #include <linux/vmalloc.h> |
18 | #include <linux/export.h> | ||
18 | #include <asm/tlbflush.h> | 19 | #include <asm/tlbflush.h> |
19 | #include <asm/homecache.h> | 20 | #include <asm/homecache.h> |
20 | 21 | ||
diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c index 2a8014cb1ff5..9d610d3fb11e 100644 --- a/arch/tile/kernel/pci.c +++ b/arch/tile/kernel/pci.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/irq.h> | 24 | #include <linux/irq.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/uaccess.h> | 26 | #include <linux/uaccess.h> |
27 | #include <linux/export.h> | ||
27 | 28 | ||
28 | #include <asm/processor.h> | 29 | #include <asm/processor.h> |
29 | #include <asm/sections.h> | 30 | #include <asm/sections.h> |
diff --git a/arch/tile/kernel/process.c b/arch/tile/kernel/process.c index 9c45d8bbdf57..4c1ac6e5347a 100644 --- a/arch/tile/kernel/process.c +++ b/arch/tile/kernel/process.c | |||
@@ -85,7 +85,8 @@ void cpu_idle(void) | |||
85 | 85 | ||
86 | /* endless idle loop with no priority at all */ | 86 | /* endless idle loop with no priority at all */ |
87 | while (1) { | 87 | while (1) { |
88 | tick_nohz_stop_sched_tick(1); | 88 | tick_nohz_idle_enter(); |
89 | rcu_idle_enter(); | ||
89 | while (!need_resched()) { | 90 | while (!need_resched()) { |
90 | if (cpu_is_offline(cpu)) | 91 | if (cpu_is_offline(cpu)) |
91 | BUG(); /* no HOTPLUG_CPU */ | 92 | BUG(); /* no HOTPLUG_CPU */ |
@@ -105,7 +106,8 @@ void cpu_idle(void) | |||
105 | local_irq_enable(); | 106 | local_irq_enable(); |
106 | current_thread_info()->status |= TS_POLLING; | 107 | current_thread_info()->status |= TS_POLLING; |
107 | } | 108 | } |
108 | tick_nohz_restart_sched_tick(); | 109 | rcu_idle_exit(); |
110 | tick_nohz_idle_exit(); | ||
109 | preempt_enable_no_resched(); | 111 | preempt_enable_no_resched(); |
110 | schedule(); | 112 | schedule(); |
111 | preempt_disable(); | 113 | preempt_disable(); |
diff --git a/arch/tile/kernel/sysfs.c b/arch/tile/kernel/sysfs.c index b671a86f4515..f862b005eb73 100644 --- a/arch/tile/kernel/sysfs.c +++ b/arch/tile/kernel/sysfs.c | |||
@@ -14,10 +14,11 @@ | |||
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> |
21 | #include <linux/stat.h> | ||
21 | #include <hv/hypervisor.h> | 22 | #include <hv/hypervisor.h> |
22 | 23 | ||
23 | /* Return a string queried from the hypervisor, truncated to page size. */ | 24 | /* Return a string queried from the hypervisor, truncated to page size. */ |
@@ -31,55 +32,55 @@ static ssize_t get_hv_confstr(char *page, int query) | |||
31 | return n; | 32 | return n; |
32 | } | 33 | } |
33 | 34 | ||
34 | static ssize_t chip_width_show(struct sysdev_class *dev, | 35 | static ssize_t chip_width_show(struct device *dev, |
35 | struct sysdev_class_attribute *attr, | 36 | struct device_attribute *attr, |
36 | char *page) | 37 | char *page) |
37 | { | 38 | { |
38 | return sprintf(page, "%u\n", smp_width); | 39 | return sprintf(page, "%u\n", smp_width); |
39 | } | 40 | } |
40 | static SYSDEV_CLASS_ATTR(chip_width, 0444, chip_width_show, NULL); | 41 | static DEVICE_ATTR(chip_width, 0444, chip_width_show, NULL); |
41 | 42 | ||
42 | static ssize_t chip_height_show(struct sysdev_class *dev, | 43 | static ssize_t chip_height_show(struct device *dev, |
43 | struct sysdev_class_attribute *attr, | 44 | struct device_attribute *attr, |
44 | char *page) | 45 | char *page) |
45 | { | 46 | { |
46 | return sprintf(page, "%u\n", smp_height); | 47 | return sprintf(page, "%u\n", smp_height); |
47 | } | 48 | } |
48 | static SYSDEV_CLASS_ATTR(chip_height, 0444, chip_height_show, NULL); | 49 | static DEVICE_ATTR(chip_height, 0444, chip_height_show, NULL); |
49 | 50 | ||
50 | static ssize_t chip_serial_show(struct sysdev_class *dev, | 51 | static ssize_t chip_serial_show(struct device *dev, |
51 | struct sysdev_class_attribute *attr, | 52 | struct device_attribute *attr, |
52 | char *page) | 53 | char *page) |
53 | { | 54 | { |
54 | return get_hv_confstr(page, HV_CONFSTR_CHIP_SERIAL_NUM); | 55 | return get_hv_confstr(page, HV_CONFSTR_CHIP_SERIAL_NUM); |
55 | } | 56 | } |
56 | static SYSDEV_CLASS_ATTR(chip_serial, 0444, chip_serial_show, NULL); | 57 | static DEVICE_ATTR(chip_serial, 0444, chip_serial_show, NULL); |
57 | 58 | ||
58 | static ssize_t chip_revision_show(struct sysdev_class *dev, | 59 | static ssize_t chip_revision_show(struct device *dev, |
59 | struct sysdev_class_attribute *attr, | 60 | struct device_attribute *attr, |
60 | char *page) | 61 | char *page) |
61 | { | 62 | { |
62 | return get_hv_confstr(page, HV_CONFSTR_CHIP_REV); | 63 | return get_hv_confstr(page, HV_CONFSTR_CHIP_REV); |
63 | } | 64 | } |
64 | static SYSDEV_CLASS_ATTR(chip_revision, 0444, chip_revision_show, NULL); | 65 | static DEVICE_ATTR(chip_revision, 0444, chip_revision_show, NULL); |
65 | 66 | ||
66 | 67 | ||
67 | static ssize_t type_show(struct sysdev_class *dev, | 68 | static ssize_t type_show(struct device *dev, |
68 | struct sysdev_class_attribute *attr, | 69 | struct device_attribute *attr, |
69 | char *page) | 70 | char *page) |
70 | { | 71 | { |
71 | return sprintf(page, "tilera\n"); | 72 | return sprintf(page, "tilera\n"); |
72 | } | 73 | } |
73 | static SYSDEV_CLASS_ATTR(type, 0444, type_show, NULL); | 74 | static DEVICE_ATTR(type, 0444, type_show, NULL); |
74 | 75 | ||
75 | #define HV_CONF_ATTR(name, conf) \ | 76 | #define HV_CONF_ATTR(name, conf) \ |
76 | static ssize_t name ## _show(struct sysdev_class *dev, \ | 77 | static ssize_t name ## _show(struct device *dev, \ |
77 | struct sysdev_class_attribute *attr, \ | 78 | struct device_attribute *attr, \ |
78 | char *page) \ | 79 | char *page) \ |
79 | { \ | 80 | { \ |
80 | return get_hv_confstr(page, conf); \ | 81 | return get_hv_confstr(page, conf); \ |
81 | } \ | 82 | } \ |
82 | static SYSDEV_CLASS_ATTR(name, 0444, name ## _show, NULL); | 83 | static DEVICE_ATTR(name, 0444, name ## _show, NULL); |
83 | 84 | ||
84 | HV_CONF_ATTR(version, HV_CONFSTR_HV_SW_VER) | 85 | HV_CONF_ATTR(version, HV_CONFSTR_HV_SW_VER) |
85 | HV_CONF_ATTR(config_version, HV_CONFSTR_HV_CONFIG_VER) | 86 | HV_CONF_ATTR(config_version, HV_CONFSTR_HV_CONFIG_VER) |
@@ -95,15 +96,15 @@ HV_CONF_ATTR(mezz_description, HV_CONFSTR_MEZZ_DESC) | |||
95 | HV_CONF_ATTR(switch_control, HV_CONFSTR_SWITCH_CONTROL) | 96 | HV_CONF_ATTR(switch_control, HV_CONFSTR_SWITCH_CONTROL) |
96 | 97 | ||
97 | static struct attribute *board_attrs[] = { | 98 | static struct attribute *board_attrs[] = { |
98 | &attr_board_part.attr, | 99 | &dev_attr_board_part.attr, |
99 | &attr_board_serial.attr, | 100 | &dev_attr_board_serial.attr, |
100 | &attr_board_revision.attr, | 101 | &dev_attr_board_revision.attr, |
101 | &attr_board_description.attr, | 102 | &dev_attr_board_description.attr, |
102 | &attr_mezz_part.attr, | 103 | &dev_attr_mezz_part.attr, |
103 | &attr_mezz_serial.attr, | 104 | &dev_attr_mezz_serial.attr, |
104 | &attr_mezz_revision.attr, | 105 | &dev_attr_mezz_revision.attr, |
105 | &attr_mezz_description.attr, | 106 | &dev_attr_mezz_description.attr, |
106 | &attr_switch_control.attr, | 107 | &dev_attr_switch_control.attr, |
107 | NULL | 108 | NULL |
108 | }; | 109 | }; |
109 | 110 | ||
@@ -150,12 +151,11 @@ hvconfig_bin_read(struct file *filp, struct kobject *kobj, | |||
150 | 151 | ||
151 | static int __init create_sysfs_entries(void) | 152 | static int __init create_sysfs_entries(void) |
152 | { | 153 | { |
153 | struct sysdev_class *cls = &cpu_sysdev_class; | ||
154 | int err = 0; | 154 | int err = 0; |
155 | 155 | ||
156 | #define create_cpu_attr(name) \ | 156 | #define create_cpu_attr(name) \ |
157 | if (!err) \ | 157 | if (!err) \ |
158 | err = sysfs_create_file(&cls->kset.kobj, &attr_##name.attr); | 158 | err = device_create_file(cpu_subsys.dev_root, &dev_attr_##name); |
159 | create_cpu_attr(chip_width); | 159 | create_cpu_attr(chip_width); |
160 | create_cpu_attr(chip_height); | 160 | create_cpu_attr(chip_height); |
161 | create_cpu_attr(chip_serial); | 161 | create_cpu_attr(chip_serial); |
@@ -163,7 +163,7 @@ static int __init create_sysfs_entries(void) | |||
163 | 163 | ||
164 | #define create_hv_attr(name) \ | 164 | #define create_hv_attr(name) \ |
165 | if (!err) \ | 165 | if (!err) \ |
166 | err = sysfs_create_file(hypervisor_kobj, &attr_##name.attr); | 166 | err = sysfs_create_file(hypervisor_kobj, &dev_attr_##name); |
167 | create_hv_attr(type); | 167 | create_hv_attr(type); |
168 | create_hv_attr(version); | 168 | create_hv_attr(version); |
169 | create_hv_attr(config_version); | 169 | create_hv_attr(config_version); |