Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175913
b: refs/heads/master
c: 877105c
h: refs/heads/master
i:
  175911: 4e8e459
v: v3
  • Loading branch information
Tejun Heo committed Oct 29, 2009
1 parent ce02669 commit fc627e4
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6b7487fc6517736a6e32ccc0f8b46109c1b998ec
refs/heads/master: 877105cc49f6e6ad32e3d63a214e8f537c0339ef
6 changes: 3 additions & 3 deletions trunk/arch/ia64/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,16 @@ struct cpuinfo_ia64 {
#endif
};

DECLARE_PER_CPU(struct cpuinfo_ia64, cpu_info);
DECLARE_PER_CPU(struct cpuinfo_ia64, ia64_cpu_info);

/*
* The "local" data variable. It refers to the per-CPU data of the currently executing
* CPU, much like "current" points to the per-task data of the currently executing task.
* Do not use the address of local_cpu_data, since it will be different from
* cpu_data(smp_processor_id())!
*/
#define local_cpu_data (&__ia64_per_cpu_var(cpu_info))
#define cpu_data(cpu) (&per_cpu(cpu_info, cpu))
#define local_cpu_data (&__ia64_per_cpu_var(ia64_cpu_info))
#define cpu_data(cpu) (&per_cpu(ia64_cpu_info, cpu))

extern void print_cpu_info (struct cpuinfo_ia64 *);

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/ia64/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ END(ia64_delay_loop)
* intermediate precision so that we can produce a full 64-bit result.
*/
GLOBAL_ENTRY(ia64_native_sched_clock)
addl r8=THIS_CPU(cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET,r0
addl r8=THIS_CPU(ia64_cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET,r0
mov.m r9=ar.itc // fetch cycle-counter (35 cyc)
;;
ldf8 f8=[r8]
Expand All @@ -1077,7 +1077,7 @@ sched_clock = ia64_native_sched_clock
#ifdef CONFIG_VIRT_CPU_ACCOUNTING
GLOBAL_ENTRY(cycle_to_cputime)
alloc r16=ar.pfs,1,0,0,0
addl r8=THIS_CPU(cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET,r0
addl r8=THIS_CPU(ia64_cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET,r0
;;
ldf8 f8=[r8]
;;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/ia64/kernel/ia64_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ EXPORT_SYMBOL(max_low_pfn); /* defined by bootmem.c, but not exported by generic
#endif

#include <asm/processor.h>
EXPORT_SYMBOL(per_cpu__cpu_info);
EXPORT_SYMBOL(per_cpu__ia64_cpu_info);
#ifdef CONFIG_SMP
EXPORT_SYMBOL(per_cpu__local_per_cpu_offset);
#endif
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/ia64/kernel/mca_asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
ia64_do_tlb_purge:
#define O(member) IA64_CPUINFO_##member##_OFFSET

GET_THIS_PADDR(r2, cpu_info) // load phys addr of cpu_info into r2
GET_THIS_PADDR(r2, ia64_cpu_info) // load phys addr of cpu_info into r2
;;
addl r17=O(PTCE_STRIDE),r2
addl r2=O(PTCE_BASE),r2
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/ia64/kernel/relocate_kernel.S
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ GLOBAL_ENTRY(relocate_new_kernel)

// purge all TC entries
#define O(member) IA64_CPUINFO_##member##_OFFSET
GET_THIS_PADDR(r2, cpu_info) // load phys addr of cpu_info into r2
GET_THIS_PADDR(r2, ia64_cpu_info) // load phys addr of cpu_info into r2
;;
addl r17=O(PTCE_STRIDE),r2
addl r2=O(PTCE_BASE),r2
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/ia64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ unsigned long __per_cpu_offset[NR_CPUS];
EXPORT_SYMBOL(__per_cpu_offset);
#endif

DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info);
DEFINE_PER_CPU(struct cpuinfo_ia64, ia64_cpu_info);
DEFINE_PER_CPU(unsigned long, local_per_cpu_offset);
unsigned long ia64_cycles_per_usec;
struct ia64_boot_param *ia64_boot_param;
Expand Down Expand Up @@ -967,7 +967,7 @@ cpu_init (void)
* depends on the data returned by identify_cpu(). We break the dependency by
* accessing cpu_data() through the canonical per-CPU address.
*/
cpu_info = cpu_data + ((char *) &__ia64_per_cpu_var(cpu_info) - __per_cpu_start);
cpu_info = cpu_data + ((char *) &__ia64_per_cpu_var(ia64_cpu_info) - __per_cpu_start);
identify_cpu(cpu_info);

#ifdef CONFIG_MCKINLEY
Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/ia64/mm/discontig.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,15 +450,16 @@ static void __init initialize_pernode_data(void)
/* Set the node_data pointer for each per-cpu struct */
for_each_possible_early_cpu(cpu) {
node = node_cpuid[cpu].nid;
per_cpu(cpu_info, cpu).node_data = mem_data[node].node_data;
per_cpu(ia64_cpu_info, cpu).node_data =
mem_data[node].node_data;
}
#else
{
struct cpuinfo_ia64 *cpu0_cpu_info;
cpu = 0;
node = node_cpuid[cpu].nid;
cpu0_cpu_info = (struct cpuinfo_ia64 *)(__phys_per_cpu_start +
((char *)&per_cpu__cpu_info - __per_cpu_start));
((char *)&per_cpu__ia64_cpu_info - __per_cpu_start));
cpu0_cpu_info->node_data = mem_data[node].node_data;
}
#endif /* CONFIG_SMP */
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/ia64/sn/kernel/sn2/sn2_smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,13 +496,13 @@ static int sn2_ptc_seq_show(struct seq_file *file, void *data)
seq_printf(file, "cpu %d %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld\n", cpu, stat->ptc_l,
stat->change_rid, stat->shub_ptc_flushes, stat->nodes_flushed,
stat->deadlocks,
1000 * stat->lock_itc_clocks / per_cpu(cpu_info, cpu).cyc_per_usec,
1000 * stat->shub_itc_clocks / per_cpu(cpu_info, cpu).cyc_per_usec,
1000 * stat->shub_itc_clocks_max / per_cpu(cpu_info, cpu).cyc_per_usec,
1000 * stat->lock_itc_clocks / per_cpu(ia64_cpu_info, cpu).cyc_per_usec,
1000 * stat->shub_itc_clocks / per_cpu(ia64_cpu_info, cpu).cyc_per_usec,
1000 * stat->shub_itc_clocks_max / per_cpu(ia64_cpu_info, cpu).cyc_per_usec,
stat->shub_ptc_flushes_not_my_mm,
stat->deadlocks2,
stat->shub_ipi_flushes,
1000 * stat->shub_ipi_flushes_itc_clocks / per_cpu(cpu_info, cpu).cyc_per_usec);
1000 * stat->shub_ipi_flushes_itc_clocks / per_cpu(ia64_cpu_info, cpu).cyc_per_usec);
}
return 0;
}
Expand Down

0 comments on commit fc627e4

Please sign in to comment.