diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-05 14:39:25 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-05 14:39:25 -0500 |
commit | c11eef21aa119a41fa210b9693f2346997885bcf (patch) | |
tree | b2d874f4b3f8a65029bc184a2db6b999b8e4d1c1 | |
parent | 221d46841b931d0e6b11e6251e482f2afe3974dd (diff) | |
parent | d2cb0e6ecbe0ef93ab36631cd17ec6cf92b69c5a (diff) |
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
[S390] tod clock: announce clocksource as perfect
[S390] Rename "idle_time" attribute to "idle_time_us".
[S390] Fix priority mistakes in drivers/s390/cio/cmf.c
[S390] Fix memory detection.
[S390] Fix compile on !CONFIG_SMP.
[S390] device_schedule_callback() for dcssblk.
[S390] Fix smsgiucv init on no iucv machines
[S390] cio: use INIT_WORK to initialize struct work.
-rw-r--r-- | arch/s390/kernel/early.c | 4 | ||||
-rw-r--r-- | arch/s390/kernel/process.c | 8 | ||||
-rw-r--r-- | arch/s390/kernel/smp.c | 6 | ||||
-rw-r--r-- | arch/s390/kernel/time.c | 2 | ||||
-rw-r--r-- | drivers/s390/block/dcssblk.c | 9 | ||||
-rw-r--r-- | drivers/s390/cio/cmf.c | 4 | ||||
-rw-r--r-- | drivers/s390/cio/device.c | 2 | ||||
-rw-r--r-- | drivers/s390/net/smsgiucv.c | 4 |
8 files changed, 27 insertions, 12 deletions
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index e6289ee74ecd..8bf4ae1150be 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c | |||
@@ -200,11 +200,13 @@ static noinline __init void find_memory_chunks(unsigned long memsize) | |||
200 | cc = __tprot(addr); | 200 | cc = __tprot(addr); |
201 | while (cc == old_cc) { | 201 | while (cc == old_cc) { |
202 | addr += CHUNK_INCR; | 202 | addr += CHUNK_INCR; |
203 | cc = __tprot(addr); | 203 | if (addr >= memsize) |
204 | break; | ||
204 | #ifndef CONFIG_64BIT | 205 | #ifndef CONFIG_64BIT |
205 | if (addr == ADDR2G) | 206 | if (addr == ADDR2G) |
206 | break; | 207 | break; |
207 | #endif | 208 | #endif |
209 | cc = __tprot(addr); | ||
208 | } | 210 | } |
209 | 211 | ||
210 | if (old_addr != addr && | 212 | if (old_addr != addr && |
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 96492cf2d491..29f7884b4ffa 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -92,6 +92,7 @@ EXPORT_SYMBOL(unregister_idle_notifier); | |||
92 | 92 | ||
93 | void do_monitor_call(struct pt_regs *regs, long interruption_code) | 93 | void do_monitor_call(struct pt_regs *regs, long interruption_code) |
94 | { | 94 | { |
95 | #ifdef CONFIG_SMP | ||
95 | struct s390_idle_data *idle; | 96 | struct s390_idle_data *idle; |
96 | 97 | ||
97 | idle = &__get_cpu_var(s390_idle); | 98 | idle = &__get_cpu_var(s390_idle); |
@@ -99,7 +100,7 @@ void do_monitor_call(struct pt_regs *regs, long interruption_code) | |||
99 | idle->idle_time += get_clock() - idle->idle_enter; | 100 | idle->idle_time += get_clock() - idle->idle_enter; |
100 | idle->in_idle = 0; | 101 | idle->in_idle = 0; |
101 | spin_unlock(&idle->lock); | 102 | spin_unlock(&idle->lock); |
102 | 103 | #endif | |
103 | /* disable monitor call class 0 */ | 104 | /* disable monitor call class 0 */ |
104 | __ctl_clear_bit(8, 15); | 105 | __ctl_clear_bit(8, 15); |
105 | 106 | ||
@@ -114,7 +115,9 @@ extern void s390_handle_mcck(void); | |||
114 | static void default_idle(void) | 115 | static void default_idle(void) |
115 | { | 116 | { |
116 | int cpu, rc; | 117 | int cpu, rc; |
118 | #ifdef CONFIG_SMP | ||
117 | struct s390_idle_data *idle; | 119 | struct s390_idle_data *idle; |
120 | #endif | ||
118 | 121 | ||
119 | /* CPU is going idle. */ | 122 | /* CPU is going idle. */ |
120 | cpu = smp_processor_id(); | 123 | cpu = smp_processor_id(); |
@@ -151,13 +154,14 @@ static void default_idle(void) | |||
151 | s390_handle_mcck(); | 154 | s390_handle_mcck(); |
152 | return; | 155 | return; |
153 | } | 156 | } |
154 | 157 | #ifdef CONFIG_SMP | |
155 | idle = &__get_cpu_var(s390_idle); | 158 | idle = &__get_cpu_var(s390_idle); |
156 | spin_lock(&idle->lock); | 159 | spin_lock(&idle->lock); |
157 | idle->idle_count++; | 160 | idle->idle_count++; |
158 | idle->in_idle = 1; | 161 | idle->in_idle = 1; |
159 | idle->idle_enter = get_clock(); | 162 | idle->idle_enter = get_clock(); |
160 | spin_unlock(&idle->lock); | 163 | spin_unlock(&idle->lock); |
164 | #endif | ||
161 | trace_hardirqs_on(); | 165 | trace_hardirqs_on(); |
162 | /* Wait for external, I/O or machine check interrupt. */ | 166 | /* Wait for external, I/O or machine check interrupt. */ |
163 | __load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT | | 167 | __load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT | |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 1d97fe1c0e53..b05ae8584258 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -788,14 +788,14 @@ static ssize_t show_idle_time(struct sys_device *dev, char *buf) | |||
788 | } | 788 | } |
789 | new_time = idle->idle_time; | 789 | new_time = idle->idle_time; |
790 | spin_unlock_irq(&idle->lock); | 790 | spin_unlock_irq(&idle->lock); |
791 | return sprintf(buf, "%llu us\n", new_time >> 12); | 791 | return sprintf(buf, "%llu\n", new_time >> 12); |
792 | } | 792 | } |
793 | static SYSDEV_ATTR(idle_time, 0444, show_idle_time, NULL); | 793 | static SYSDEV_ATTR(idle_time_us, 0444, show_idle_time, NULL); |
794 | 794 | ||
795 | static struct attribute *cpu_attrs[] = { | 795 | static struct attribute *cpu_attrs[] = { |
796 | &attr_capability.attr, | 796 | &attr_capability.attr, |
797 | &attr_idle_count.attr, | 797 | &attr_idle_count.attr, |
798 | &attr_idle_time.attr, | 798 | &attr_idle_time_us.attr, |
799 | NULL, | 799 | NULL, |
800 | }; | 800 | }; |
801 | 801 | ||
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 48dae49bc1ec..a963fe81359e 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -307,7 +307,7 @@ static cycle_t read_tod_clock(void) | |||
307 | 307 | ||
308 | static struct clocksource clocksource_tod = { | 308 | static struct clocksource clocksource_tod = { |
309 | .name = "tod", | 309 | .name = "tod", |
310 | .rating = 100, | 310 | .rating = 400, |
311 | .read = read_tod_clock, | 311 | .read = read_tod_clock, |
312 | .mask = -1ULL, | 312 | .mask = -1ULL, |
313 | .mult = 1000, | 313 | .mult = 1000, |
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index 859f870552e3..5e083d1f57e7 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c | |||
@@ -193,6 +193,12 @@ dcssblk_segment_warn(int rc, char* seg_name) | |||
193 | } | 193 | } |
194 | } | 194 | } |
195 | 195 | ||
196 | static void dcssblk_unregister_callback(struct device *dev) | ||
197 | { | ||
198 | device_unregister(dev); | ||
199 | put_device(dev); | ||
200 | } | ||
201 | |||
196 | /* | 202 | /* |
197 | * device attribute for switching shared/nonshared (exclusive) | 203 | * device attribute for switching shared/nonshared (exclusive) |
198 | * operation (show + store) | 204 | * operation (show + store) |
@@ -276,8 +282,7 @@ removeseg: | |||
276 | blk_cleanup_queue(dev_info->dcssblk_queue); | 282 | blk_cleanup_queue(dev_info->dcssblk_queue); |
277 | dev_info->gd->queue = NULL; | 283 | dev_info->gd->queue = NULL; |
278 | put_disk(dev_info->gd); | 284 | put_disk(dev_info->gd); |
279 | device_unregister(dev); | 285 | rc = device_schedule_callback(dev, dcssblk_unregister_callback); |
280 | put_device(dev); | ||
281 | out: | 286 | out: |
282 | up_write(&dcssblk_devices_sem); | 287 | up_write(&dcssblk_devices_sem); |
283 | return rc; | 288 | return rc; |
diff --git a/drivers/s390/cio/cmf.c b/drivers/s390/cio/cmf.c index 725b0dd14269..f4c132ab39ed 100644 --- a/drivers/s390/cio/cmf.c +++ b/drivers/s390/cio/cmf.c | |||
@@ -343,10 +343,10 @@ static int cmf_copy_block(struct ccw_device *cdev) | |||
343 | 343 | ||
344 | if (sch->schib.scsw.fctl & SCSW_FCTL_START_FUNC) { | 344 | if (sch->schib.scsw.fctl & SCSW_FCTL_START_FUNC) { |
345 | /* Don't copy if a start function is in progress. */ | 345 | /* Don't copy if a start function is in progress. */ |
346 | if ((!sch->schib.scsw.actl & SCSW_ACTL_SUSPENDED) && | 346 | if ((!(sch->schib.scsw.actl & SCSW_ACTL_SUSPENDED)) && |
347 | (sch->schib.scsw.actl & | 347 | (sch->schib.scsw.actl & |
348 | (SCSW_ACTL_DEVACT | SCSW_ACTL_SCHACT)) && | 348 | (SCSW_ACTL_DEVACT | SCSW_ACTL_SCHACT)) && |
349 | (!sch->schib.scsw.stctl & SCSW_STCTL_SEC_STATUS)) | 349 | (!(sch->schib.scsw.stctl & SCSW_STCTL_SEC_STATUS))) |
350 | return -EBUSY; | 350 | return -EBUSY; |
351 | } | 351 | } |
352 | cmb_data = cdev->private->cmb; | 352 | cmb_data = cdev->private->cmb; |
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 7ee57f084a89..74f6b539974a 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -738,7 +738,7 @@ static int io_subchannel_initialize_dev(struct subchannel *sch, | |||
738 | atomic_set(&cdev->private->onoff, 0); | 738 | atomic_set(&cdev->private->onoff, 0); |
739 | cdev->dev.parent = &sch->dev; | 739 | cdev->dev.parent = &sch->dev; |
740 | cdev->dev.release = ccw_device_release; | 740 | cdev->dev.release = ccw_device_release; |
741 | INIT_LIST_HEAD(&cdev->private->kick_work.entry); | 741 | INIT_WORK(&cdev->private->kick_work, NULL); |
742 | cdev->dev.groups = ccwdev_attr_groups; | 742 | cdev->dev.groups = ccwdev_attr_groups; |
743 | /* Do first half of device_register. */ | 743 | /* Do first half of device_register. */ |
744 | device_initialize(&cdev->dev); | 744 | device_initialize(&cdev->dev); |
diff --git a/drivers/s390/net/smsgiucv.c b/drivers/s390/net/smsgiucv.c index 3ccca5871fdf..47bb47b48581 100644 --- a/drivers/s390/net/smsgiucv.c +++ b/drivers/s390/net/smsgiucv.c | |||
@@ -148,6 +148,10 @@ static int __init smsg_init(void) | |||
148 | { | 148 | { |
149 | int rc; | 149 | int rc; |
150 | 150 | ||
151 | if (!MACHINE_IS_VM) { | ||
152 | rc = -EPROTONOSUPPORT; | ||
153 | goto out; | ||
154 | } | ||
151 | rc = driver_register(&smsg_driver); | 155 | rc = driver_register(&smsg_driver); |
152 | if (rc != 0) | 156 | if (rc != 0) |
153 | goto out; | 157 | goto out; |