Commit c11eef21 authored by Linus Torvalds's avatar Linus Torvalds

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.
parents 221d4684 d2cb0e6e
...@@ -200,11 +200,13 @@ static noinline __init void find_memory_chunks(unsigned long memsize) ...@@ -200,11 +200,13 @@ static noinline __init void find_memory_chunks(unsigned long memsize)
cc = __tprot(addr); cc = __tprot(addr);
while (cc == old_cc) { while (cc == old_cc) {
addr += CHUNK_INCR; addr += CHUNK_INCR;
cc = __tprot(addr); if (addr >= memsize)
break;
#ifndef CONFIG_64BIT #ifndef CONFIG_64BIT
if (addr == ADDR2G) if (addr == ADDR2G)
break; break;
#endif #endif
cc = __tprot(addr);
} }
if (old_addr != addr && if (old_addr != addr &&
......
...@@ -92,6 +92,7 @@ EXPORT_SYMBOL(unregister_idle_notifier); ...@@ -92,6 +92,7 @@ EXPORT_SYMBOL(unregister_idle_notifier);
void do_monitor_call(struct pt_regs *regs, long interruption_code) void do_monitor_call(struct pt_regs *regs, long interruption_code)
{ {
#ifdef CONFIG_SMP
struct s390_idle_data *idle; struct s390_idle_data *idle;
idle = &__get_cpu_var(s390_idle); idle = &__get_cpu_var(s390_idle);
...@@ -99,7 +100,7 @@ void do_monitor_call(struct pt_regs *regs, long interruption_code) ...@@ -99,7 +100,7 @@ void do_monitor_call(struct pt_regs *regs, long interruption_code)
idle->idle_time += get_clock() - idle->idle_enter; idle->idle_time += get_clock() - idle->idle_enter;
idle->in_idle = 0; idle->in_idle = 0;
spin_unlock(&idle->lock); spin_unlock(&idle->lock);
#endif
/* disable monitor call class 0 */ /* disable monitor call class 0 */
__ctl_clear_bit(8, 15); __ctl_clear_bit(8, 15);
...@@ -114,7 +115,9 @@ extern void s390_handle_mcck(void); ...@@ -114,7 +115,9 @@ extern void s390_handle_mcck(void);
static void default_idle(void) static void default_idle(void)
{ {
int cpu, rc; int cpu, rc;
#ifdef CONFIG_SMP
struct s390_idle_data *idle; struct s390_idle_data *idle;
#endif
/* CPU is going idle. */ /* CPU is going idle. */
cpu = smp_processor_id(); cpu = smp_processor_id();
...@@ -151,13 +154,14 @@ static void default_idle(void) ...@@ -151,13 +154,14 @@ static void default_idle(void)
s390_handle_mcck(); s390_handle_mcck();
return; return;
} }
#ifdef CONFIG_SMP
idle = &__get_cpu_var(s390_idle); idle = &__get_cpu_var(s390_idle);
spin_lock(&idle->lock); spin_lock(&idle->lock);
idle->idle_count++; idle->idle_count++;
idle->in_idle = 1; idle->in_idle = 1;
idle->idle_enter = get_clock(); idle->idle_enter = get_clock();
spin_unlock(&idle->lock); spin_unlock(&idle->lock);
#endif
trace_hardirqs_on(); trace_hardirqs_on();
/* Wait for external, I/O or machine check interrupt. */ /* Wait for external, I/O or machine check interrupt. */
__load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT | __load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT |
......
...@@ -788,14 +788,14 @@ static ssize_t show_idle_time(struct sys_device *dev, char *buf) ...@@ -788,14 +788,14 @@ static ssize_t show_idle_time(struct sys_device *dev, char *buf)
} }
new_time = idle->idle_time; new_time = idle->idle_time;
spin_unlock_irq(&idle->lock); spin_unlock_irq(&idle->lock);
return sprintf(buf, "%llu us\n", new_time >> 12); return sprintf(buf, "%llu\n", new_time >> 12);
} }
static SYSDEV_ATTR(idle_time, 0444, show_idle_time, NULL); static SYSDEV_ATTR(idle_time_us, 0444, show_idle_time, NULL);
static struct attribute *cpu_attrs[] = { static struct attribute *cpu_attrs[] = {
&attr_capability.attr, &attr_capability.attr,
&attr_idle_count.attr, &attr_idle_count.attr,
&attr_idle_time.attr, &attr_idle_time_us.attr,
NULL, NULL,
}; };
......
...@@ -307,7 +307,7 @@ static cycle_t read_tod_clock(void) ...@@ -307,7 +307,7 @@ static cycle_t read_tod_clock(void)
static struct clocksource clocksource_tod = { static struct clocksource clocksource_tod = {
.name = "tod", .name = "tod",
.rating = 100, .rating = 400,
.read = read_tod_clock, .read = read_tod_clock,
.mask = -1ULL, .mask = -1ULL,
.mult = 1000, .mult = 1000,
......
...@@ -193,6 +193,12 @@ dcssblk_segment_warn(int rc, char* seg_name) ...@@ -193,6 +193,12 @@ dcssblk_segment_warn(int rc, char* seg_name)
} }
} }
static void dcssblk_unregister_callback(struct device *dev)
{
device_unregister(dev);
put_device(dev);
}
/* /*
* device attribute for switching shared/nonshared (exclusive) * device attribute for switching shared/nonshared (exclusive)
* operation (show + store) * operation (show + store)
...@@ -276,8 +282,7 @@ removeseg: ...@@ -276,8 +282,7 @@ removeseg:
blk_cleanup_queue(dev_info->dcssblk_queue); blk_cleanup_queue(dev_info->dcssblk_queue);
dev_info->gd->queue = NULL; dev_info->gd->queue = NULL;
put_disk(dev_info->gd); put_disk(dev_info->gd);
device_unregister(dev); rc = device_schedule_callback(dev, dcssblk_unregister_callback);
put_device(dev);
out: out:
up_write(&dcssblk_devices_sem); up_write(&dcssblk_devices_sem);
return rc; return rc;
......
...@@ -343,10 +343,10 @@ static int cmf_copy_block(struct ccw_device *cdev) ...@@ -343,10 +343,10 @@ static int cmf_copy_block(struct ccw_device *cdev)
if (sch->schib.scsw.fctl & SCSW_FCTL_START_FUNC) { if (sch->schib.scsw.fctl & SCSW_FCTL_START_FUNC) {
/* Don't copy if a start function is in progress. */ /* Don't copy if a start function is in progress. */
if ((!sch->schib.scsw.actl & SCSW_ACTL_SUSPENDED) && if ((!(sch->schib.scsw.actl & SCSW_ACTL_SUSPENDED)) &&
(sch->schib.scsw.actl & (sch->schib.scsw.actl &
(SCSW_ACTL_DEVACT | SCSW_ACTL_SCHACT)) && (SCSW_ACTL_DEVACT | SCSW_ACTL_SCHACT)) &&
(!sch->schib.scsw.stctl & SCSW_STCTL_SEC_STATUS)) (!(sch->schib.scsw.stctl & SCSW_STCTL_SEC_STATUS)))
return -EBUSY; return -EBUSY;
} }
cmb_data = cdev->private->cmb; cmb_data = cdev->private->cmb;
......
...@@ -738,7 +738,7 @@ static int io_subchannel_initialize_dev(struct subchannel *sch, ...@@ -738,7 +738,7 @@ static int io_subchannel_initialize_dev(struct subchannel *sch,
atomic_set(&cdev->private->onoff, 0); atomic_set(&cdev->private->onoff, 0);
cdev->dev.parent = &sch->dev; cdev->dev.parent = &sch->dev;
cdev->dev.release = ccw_device_release; cdev->dev.release = ccw_device_release;
INIT_LIST_HEAD(&cdev->private->kick_work.entry); INIT_WORK(&cdev->private->kick_work, NULL);
cdev->dev.groups = ccwdev_attr_groups; cdev->dev.groups = ccwdev_attr_groups;
/* Do first half of device_register. */ /* Do first half of device_register. */
device_initialize(&cdev->dev); device_initialize(&cdev->dev);
......
...@@ -148,6 +148,10 @@ static int __init smsg_init(void) ...@@ -148,6 +148,10 @@ static int __init smsg_init(void)
{ {
int rc; int rc;
if (!MACHINE_IS_VM) {
rc = -EPROTONOSUPPORT;
goto out;
}
rc = driver_register(&smsg_driver); rc = driver_register(&smsg_driver);
if (rc != 0) if (rc != 0)
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment