diff options
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r-- | arch/sparc64/kernel/irq.c | 12 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci.c | 1 | ||||
-rw-r--r-- | arch/sparc64/kernel/smp.c | 27 |
3 files changed, 12 insertions, 28 deletions
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index e60d283f60bc..6b6165d36fd8 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c | |||
@@ -329,6 +329,10 @@ static void sun4v_irq_enable(unsigned int virt_irq) | |||
329 | if (err != HV_EOK) | 329 | if (err != HV_EOK) |
330 | printk("sun4v_intr_settarget(%x,%lu): err(%d)\n", | 330 | printk("sun4v_intr_settarget(%x,%lu): err(%d)\n", |
331 | ino, cpuid, err); | 331 | ino, cpuid, err); |
332 | err = sun4v_intr_setstate(ino, HV_INTR_STATE_IDLE); | ||
333 | if (err != HV_EOK) | ||
334 | printk("sun4v_intr_setstate(%x): " | ||
335 | "err(%d)\n", ino, err); | ||
332 | err = sun4v_intr_setenabled(ino, HV_INTR_ENABLED); | 336 | err = sun4v_intr_setenabled(ino, HV_INTR_ENABLED); |
333 | if (err != HV_EOK) | 337 | if (err != HV_EOK) |
334 | printk("sun4v_intr_setenabled(%x): err(%d)\n", | 338 | printk("sun4v_intr_setenabled(%x): err(%d)\n", |
@@ -400,6 +404,12 @@ static void sun4v_virq_enable(unsigned int virt_irq) | |||
400 | "err(%d)\n", | 404 | "err(%d)\n", |
401 | dev_handle, dev_ino, cpuid, err); | 405 | dev_handle, dev_ino, cpuid, err); |
402 | err = sun4v_vintr_set_state(dev_handle, dev_ino, | 406 | err = sun4v_vintr_set_state(dev_handle, dev_ino, |
407 | HV_INTR_STATE_IDLE); | ||
408 | if (err != HV_EOK) | ||
409 | printk("sun4v_vintr_set_state(%lx,%lx," | ||
410 | "HV_INTR_STATE_IDLE): err(%d)\n", | ||
411 | dev_handle, dev_ino, err); | ||
412 | err = sun4v_vintr_set_valid(dev_handle, dev_ino, | ||
403 | HV_INTR_ENABLED); | 413 | HV_INTR_ENABLED); |
404 | if (err != HV_EOK) | 414 | if (err != HV_EOK) |
405 | printk("sun4v_vintr_set_state(%lx,%lx," | 415 | printk("sun4v_vintr_set_state(%lx,%lx," |
@@ -420,7 +430,7 @@ static void sun4v_virq_disable(unsigned int virt_irq) | |||
420 | dev_handle = ino & IMAP_IGN; | 430 | dev_handle = ino & IMAP_IGN; |
421 | dev_ino = ino & IMAP_INO; | 431 | dev_ino = ino & IMAP_INO; |
422 | 432 | ||
423 | err = sun4v_vintr_set_state(dev_handle, dev_ino, | 433 | err = sun4v_vintr_set_valid(dev_handle, dev_ino, |
424 | HV_INTR_DISABLED); | 434 | HV_INTR_DISABLED); |
425 | if (err != HV_EOK) | 435 | if (err != HV_EOK) |
426 | printk("sun4v_vintr_set_state(%lx,%lx," | 436 | printk("sun4v_vintr_set_state(%lx,%lx," |
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index 81f4a5ea05f7..55ad1b899bb8 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c | |||
@@ -448,6 +448,7 @@ struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, | |||
448 | */ | 448 | */ |
449 | pci_read_config_dword(dev, PCI_CLASS_REVISION, &class); | 449 | pci_read_config_dword(dev, PCI_CLASS_REVISION, &class); |
450 | dev->class = class >> 8; | 450 | dev->class = class >> 8; |
451 | dev->revision = class & 0xff; | ||
451 | 452 | ||
452 | sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), | 453 | sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), |
453 | dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); | 454 | dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); |
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 4dcd7d0b60f2..40e40f968d61 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -1163,32 +1163,6 @@ int setup_profiling_timer(unsigned int multiplier) | |||
1163 | return -EINVAL; | 1163 | return -EINVAL; |
1164 | } | 1164 | } |
1165 | 1165 | ||
1166 | static void __init smp_tune_scheduling(void) | ||
1167 | { | ||
1168 | unsigned int smallest = ~0U; | ||
1169 | int i; | ||
1170 | |||
1171 | for (i = 0; i < NR_CPUS; i++) { | ||
1172 | unsigned int val = cpu_data(i).ecache_size; | ||
1173 | |||
1174 | if (val && val < smallest) | ||
1175 | smallest = val; | ||
1176 | } | ||
1177 | |||
1178 | /* Any value less than 256K is nonsense. */ | ||
1179 | if (smallest < (256U * 1024U)) | ||
1180 | smallest = 256 * 1024; | ||
1181 | |||
1182 | max_cache_size = smallest; | ||
1183 | |||
1184 | if (smallest < 1U * 1024U * 1024U) | ||
1185 | printk(KERN_INFO "Using max_cache_size of %uKB\n", | ||
1186 | smallest / 1024U); | ||
1187 | else | ||
1188 | printk(KERN_INFO "Using max_cache_size of %uMB\n", | ||
1189 | smallest / 1024U / 1024U); | ||
1190 | } | ||
1191 | |||
1192 | /* Constrain the number of cpus to max_cpus. */ | 1166 | /* Constrain the number of cpus to max_cpus. */ |
1193 | void __init smp_prepare_cpus(unsigned int max_cpus) | 1167 | void __init smp_prepare_cpus(unsigned int max_cpus) |
1194 | { | 1168 | { |
@@ -1206,7 +1180,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
1206 | } | 1180 | } |
1207 | 1181 | ||
1208 | cpu_data(boot_cpu_id).udelay_val = loops_per_jiffy; | 1182 | cpu_data(boot_cpu_id).udelay_val = loops_per_jiffy; |
1209 | smp_tune_scheduling(); | ||
1210 | } | 1183 | } |
1211 | 1184 | ||
1212 | void __devinit smp_prepare_boot_cpu(void) | 1185 | void __devinit smp_prepare_boot_cpu(void) |