Lines Matching +full:x +full:- +full:rp
7 * Copyright (c) 2004-2008 Silicon Graphics, Inc. All Rights Reserved.
90 dev_dbg(xpc_part, "SAL returned with ret=%d, cookie=0x%016lx, " in xpc_get_rsvd_page_pa()
91 "address=0x%016lx, len=0x%016lx\n", ret, in xpc_get_rsvd_page_pa()
104 "len=0x%016lx\n", buf_len); in xpc_get_rsvd_page_pa()
122 dev_dbg(xpc_part, "reserved page at phys address 0x%016lx\n", rp_pa); in xpc_get_rsvd_page_pa()
135 struct xpc_rsvd_page *rp; in xpc_setup_rsvd_page() local
146 return -ESRCH; in xpc_setup_rsvd_page()
148 rp = (struct xpc_rsvd_page *)__va(xp_socket_pa(rp_pa)); in xpc_setup_rsvd_page()
150 if (rp->SAL_version < 3) { in xpc_setup_rsvd_page()
152 rp->SAL_partid &= 0xff; in xpc_setup_rsvd_page()
154 BUG_ON(rp->SAL_partid != xp_partition_id); in xpc_setup_rsvd_page()
156 if (rp->SAL_partid < 0 || rp->SAL_partid >= xp_max_npartitions) { in xpc_setup_rsvd_page()
158 "supported range (< 0 || >= %d)\n", rp->SAL_partid, in xpc_setup_rsvd_page()
160 return -EINVAL; in xpc_setup_rsvd_page()
163 rp->version = XPC_RP_VERSION; in xpc_setup_rsvd_page()
164 rp->max_npartitions = xp_max_npartitions; in xpc_setup_rsvd_page()
167 if (rp->SAL_version == 1) { in xpc_setup_rsvd_page()
169 rp->SAL_nasids_size = 128; in xpc_setup_rsvd_page()
171 xpc_nasid_mask_nbytes = rp->SAL_nasids_size; in xpc_setup_rsvd_page()
172 xpc_nasid_mask_nlongs = BITS_TO_LONGS(rp->SAL_nasids_size * in xpc_setup_rsvd_page()
176 xpc_part_nasids = XPC_RP_PART_NASIDS(rp); in xpc_setup_rsvd_page()
177 xpc_mach_nasids = XPC_RP_MACH_NASIDS(rp); in xpc_setup_rsvd_page()
179 ret = xpc_arch_ops.setup_rsvd_page(rp); in xpc_setup_rsvd_page()
189 if (new_ts_jiffies == 0 || new_ts_jiffies == rp->ts_jiffies) in xpc_setup_rsvd_page()
191 rp->ts_jiffies = new_ts_jiffies; in xpc_setup_rsvd_page()
193 xpc_rsvd_page = rp; in xpc_setup_rsvd_page()
201 xpc_rsvd_page->ts_jiffies = 0; in xpc_teardown_rsvd_page()
239 if (remote_rp->ts_jiffies == 0) in xpc_get_remote_rp()
242 if (XPC_VERSION_MAJOR(remote_rp->version) != in xpc_get_remote_rp()
248 if (remote_rp->SAL_partid < 0 || in xpc_get_remote_rp()
249 remote_rp->SAL_partid >= xp_max_npartitions || in xpc_get_remote_rp()
250 remote_rp->max_npartitions <= xp_partition_id) { in xpc_get_remote_rp()
254 if (remote_rp->SAL_partid == xp_partition_id) in xpc_get_remote_rp()
272 if (part->disengage_timeout) { in __xpc_partition_disengaged()
274 if (time_is_after_jiffies(part->disengage_timeout)) { in __xpc_partition_disengaged()
290 part->disengage_timeout = 0; in __xpc_partition_disengaged()
294 del_timer_sync(&part->disengage_timer); in __xpc_partition_disengaged()
296 DBUG_ON(part->act_state != XPC_P_AS_DEACTIVATING && in __xpc_partition_disengaged()
297 part->act_state != XPC_P_AS_INACTIVE); in __xpc_partition_disengaged()
298 if (part->act_state != XPC_P_AS_INACTIVE) in __xpc_partition_disengaged()
327 spin_lock_irqsave(&part->act_lock, irq_flags); in xpc_mark_partition_active()
328 if (part->act_state == XPC_P_AS_ACTIVATING) { in xpc_mark_partition_active()
329 part->act_state = XPC_P_AS_ACTIVE; in xpc_mark_partition_active()
332 DBUG_ON(part->reason == xpSuccess); in xpc_mark_partition_active()
333 ret = part->reason; in xpc_mark_partition_active()
335 spin_unlock_irqrestore(&part->act_lock, irq_flags); in xpc_mark_partition_active()
349 spin_lock_irqsave(&part->act_lock, irq_flags); in xpc_deactivate_partition()
351 if (part->act_state == XPC_P_AS_INACTIVE) { in xpc_deactivate_partition()
353 spin_unlock_irqrestore(&part->act_lock, irq_flags); in xpc_deactivate_partition()
360 if (part->act_state == XPC_P_AS_DEACTIVATING) { in xpc_deactivate_partition()
361 if ((part->reason == xpUnloading && reason != xpUnloading) || in xpc_deactivate_partition()
365 spin_unlock_irqrestore(&part->act_lock, irq_flags); in xpc_deactivate_partition()
369 part->act_state = XPC_P_AS_DEACTIVATING; in xpc_deactivate_partition()
372 spin_unlock_irqrestore(&part->act_lock, irq_flags); in xpc_deactivate_partition()
378 part->disengage_timeout = jiffies + (xpc_disengage_timelimit * HZ); in xpc_deactivate_partition()
379 part->disengage_timer.expires = part->disengage_timeout; in xpc_deactivate_partition()
380 add_timer(&part->disengage_timer); in xpc_deactivate_partition()
399 spin_lock_irqsave(&part->act_lock, irq_flags); in xpc_mark_partition_inactive()
400 part->act_state = XPC_P_AS_INACTIVE; in xpc_mark_partition_inactive()
401 spin_unlock_irqrestore(&part->act_lock, irq_flags); in xpc_mark_partition_inactive()
402 part->remote_rp_pa = 0; in xpc_mark_partition_inactive()
489 "not on Numa-Link network at reset\n", in xpc_discovery()
536 if (part->remote_rp_pa == 0) in xpc_initiate_partid_to_nasids()
541 part_nasid_pa = (unsigned long)XPC_RP_PART_NASIDS(part->remote_rp_pa); in xpc_initiate_partid_to_nasids()