Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2a57afa authored by Andrew Banman's avatar Andrew Banman Committed by Ingo Molnar
Browse files

x86/platform/uv/BAU: Clean up pq_init()



The payload queue first MMR requires the physical memory address and hub
GNODE of where the payload queue resides in memory, but the associated
variables are named as if the PNODE were used. Rename gnode-related
variables and clarify the definitions of the payload queue head, last, and
tail pointers.

Signed-off-by: default avatarAndrew Banman <abanman@sgi.com>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarMike Travis <travis@sgi.com>
Acked-by: default avatarDimitri Sivanich <sivanich@sgi.com>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: akpm@linux-foundation.org
Cc: rja@sgi.com
Link: http://lkml.kernel.org/r/1474474161-265604-4-git-send-email-abanman@sgi.com


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent efa59ab3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@
#define UV_NET_ENDPOINT_INTD		(is_uv1_hub() ?			\
			UV1_NET_ENDPOINT_INTD : UV2_NET_ENDPOINT_INTD)
#define UV_DESC_PSHIFT			49
#define UV_PAYLOADQ_PNODE_SHIFT		49
#define UV_PAYLOADQ_GNODE_SHIFT		49
#define UV_PTC_BASENAME			"sgi_uv/ptc_statistics"
#define UV_BAU_BASENAME			"sgi_uv/bau_tunables"
#define UV_BAU_TUNABLES_DIR		"sgi_uv"
+8 −11
Original line number Diff line number Diff line
@@ -1790,10 +1790,7 @@ static void pq_init(int node, int pnode)
	size_t plsize;
	char *cp;
	void *vp;
	unsigned long pn;
	unsigned long first;
	unsigned long pn_first;
	unsigned long last;
	unsigned long gnode, first, last, tail;
	struct bau_pq_entry *pqp;
	struct bau_control *bcp;

@@ -1814,16 +1811,16 @@ static void pq_init(int node, int pnode)
		bcp->bau_msg_head	= pqp;
		bcp->queue_last		= pqp + (DEST_Q_SIZE - 1);
	}
	/*
	 * need the gnode of where the memory was really allocated
	 */
	pn = uv_gpa_to_gnode(uv_gpa(pqp));

	first = uv_physnodeaddr(pqp);
	pn_first = ((unsigned long)pn << UV_PAYLOADQ_PNODE_SHIFT) | first;
	last = uv_physnodeaddr(pqp + (DEST_Q_SIZE - 1));
	write_mmr_payload_first(pnode, pn_first);
	write_mmr_payload_tail(pnode, first);
	tail = first;
	gnode = uv_gpa_to_gnode(uv_gpa(pqp));
	first = (gnode << UV_PAYLOADQ_GNODE_SHIFT) | tail;

	write_mmr_payload_first(pnode, first);
	write_mmr_payload_last(pnode, last);
	write_mmr_payload_tail(pnode, tail);
	write_gmmr_sw_ack(pnode, 0xffffUL);

	/* in effect, all msg_type's are set to MSG_NOOP */