]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[IA64] fix call of smp_processor_id() by XPC while
authorDean Nelson <dcn@sgi.com>
Wed, 13 Jul 2005 12:45:00 +0000 (05:45 -0700)
committerTony Luck <tony.luck@intel.com>
Wed, 13 Jul 2005 18:52:45 +0000 (11:52 -0700)
XPC calls smp_processor_id() twice from xpc_setup_infrastructure() with
preemption enabled, which gets flagged if 'DEBUG_PREEMPT=y'. This patch
replaces the two calls to smp_processor_id() by a single call to
raw_smp_processor_id() since any CPU within the partition will do.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/sn/kernel/xpc_channel.c

index 6d02dac8056f99bc72d08553be8d2e28a4128211..94698bea7be045e7f2aec0430bb7a2e046907a66 100644 (file)
@@ -72,7 +72,7 @@ xpc_initialize_channels(struct xpc_partition *part, partid_t partid)
 enum xpc_retval
 xpc_setup_infrastructure(struct xpc_partition *part)
 {
-       int ret;
+       int ret, cpuid;
        struct timer_list *timer;
        partid_t partid = XPC_PARTID(part);
 
@@ -223,9 +223,9 @@ xpc_setup_infrastructure(struct xpc_partition *part)
        xpc_vars_part[partid].openclose_args_pa =
                                        __pa(part->local_openclose_args);
        xpc_vars_part[partid].IPI_amo_pa = __pa(part->local_IPI_amo_va);
-       xpc_vars_part[partid].IPI_nasid = cpuid_to_nasid(smp_processor_id());
-       xpc_vars_part[partid].IPI_phys_cpuid =
-                                       cpu_physical_id(smp_processor_id());
+       cpuid = raw_smp_processor_id(); /* any CPU in this partition will do */
+       xpc_vars_part[partid].IPI_nasid = cpuid_to_nasid(cpuid);
+       xpc_vars_part[partid].IPI_phys_cpuid = cpu_physical_id(cpuid);
        xpc_vars_part[partid].nchannels = part->nchannels;
        xpc_vars_part[partid].magic = XPC_VP_MAGIC1;