hc
2024-05-10 748e4f3d702def1a4bff191e0cf93b6a05340f01
kernel/arch/sparc/kernel/time_64.c
....@@ -53,8 +53,6 @@
5353
5454 DEFINE_SPINLOCK(rtc_lock);
5555
56
-unsigned int __read_mostly vdso_fix_stick;
57
-
5856 #ifdef CONFIG_SMP
5957 unsigned long profile_pc(struct pt_regs *regs)
6058 {
....@@ -447,8 +445,8 @@
447445 {
448446 struct resource *r;
449447
450
- printk(KERN_INFO "%s: RTC regs at 0x%llx\n",
451
- op->dev.of_node->full_name, op->resource[0].start);
448
+ printk(KERN_INFO "%pOF: RTC regs at 0x%llx\n",
449
+ op->dev.of_node, op->resource[0].start);
452450
453451 /* The CMOS RTC driver only accepts IORESOURCE_IO, so cons
454452 * up a fake resource so that the probe works for all cases.
....@@ -503,8 +501,8 @@
503501 static int bq4802_probe(struct platform_device *op)
504502 {
505503
506
- printk(KERN_INFO "%s: BQ4802 regs at 0x%llx\n",
507
- op->dev.of_node->full_name, op->resource[0].start);
504
+ printk(KERN_INFO "%pOF: BQ4802 regs at 0x%llx\n",
505
+ op->dev.of_node, op->resource[0].start);
508506
509507 rtc_bq4802_device.resource = &op->resource[0];
510508 return platform_device_register(&rtc_bq4802_device);
....@@ -563,12 +561,12 @@
563561 /* On an Enterprise system there can be multiple mostek clocks.
564562 * We should only match the one that is on the central FHC bus.
565563 */
566
- if (!strcmp(dp->parent->name, "fhc") &&
567
- strcmp(dp->parent->parent->name, "central") != 0)
564
+ if (of_node_name_eq(dp->parent, "fhc") &&
565
+ !of_node_name_eq(dp->parent->parent, "central"))
568566 return -ENODEV;
569567
570
- printk(KERN_INFO "%s: Mostek regs at 0x%llx\n",
571
- dp->full_name, op->resource[0].start);
568
+ printk(KERN_INFO "%pOF: Mostek regs at 0x%llx\n",
569
+ dp, op->resource[0].start);
572570
573571 m48t59_rtc.resource = &op->resource[0];
574572 return platform_device_register(&m48t59_rtc);
....@@ -655,19 +653,23 @@
655653 void *data)
656654 {
657655 struct cpufreq_freqs *freq = data;
658
- unsigned int cpu = freq->cpu;
659
- struct freq_table *ft = &per_cpu(sparc64_freq_table, cpu);
656
+ unsigned int cpu;
657
+ struct freq_table *ft;
660658
661
- if (!ft->ref_freq) {
662
- ft->ref_freq = freq->old;
663
- ft->clock_tick_ref = cpu_data(cpu).clock_tick;
664
- }
665
- if ((val == CPUFREQ_PRECHANGE && freq->old < freq->new) ||
666
- (val == CPUFREQ_POSTCHANGE && freq->old > freq->new)) {
667
- cpu_data(cpu).clock_tick =
668
- cpufreq_scale(ft->clock_tick_ref,
669
- ft->ref_freq,
670
- freq->new);
659
+ for_each_cpu(cpu, freq->policy->cpus) {
660
+ ft = &per_cpu(sparc64_freq_table, cpu);
661
+
662
+ if (!ft->ref_freq) {
663
+ ft->ref_freq = freq->old;
664
+ ft->clock_tick_ref = cpu_data(cpu).clock_tick;
665
+ }
666
+
667
+ if ((val == CPUFREQ_PRECHANGE && freq->old < freq->new) ||
668
+ (val == CPUFREQ_POSTCHANGE && freq->old > freq->new)) {
669
+ cpu_data(cpu).clock_tick =
670
+ cpufreq_scale(ft->clock_tick_ref, ft->ref_freq,
671
+ freq->new);
672
+ }
671673 }
672674
673675 return 0;
....@@ -838,7 +840,6 @@
838840 } else {
839841 init_tick_ops(&tick_operations);
840842 clocksource_tick.archdata.vclock_mode = VCLOCK_TICK;
841
- vdso_fix_stick = 1;
842843 }
843844 } else {
844845 init_tick_ops(&stick_operations);