gang               25 arch/powerpc/platforms/cell/spufs/context.c struct spu_context *alloc_spu_context(struct spu_gang *gang)
gang               52 arch/powerpc/platforms/cell/spufs/context.c 	if (gang)
gang               53 arch/powerpc/platforms/cell/spufs/context.c 		spu_gang_add_ctx(gang, ctx);
gang               78 arch/powerpc/platforms/cell/spufs/context.c 	if (ctx->gang)
gang               79 arch/powerpc/platforms/cell/spufs/context.c 		spu_gang_remove_ctx(ctx->gang, ctx);
gang               17 arch/powerpc/platforms/cell/spufs/gang.c 	struct spu_gang *gang;
gang               19 arch/powerpc/platforms/cell/spufs/gang.c 	gang = kzalloc(sizeof *gang, GFP_KERNEL);
gang               20 arch/powerpc/platforms/cell/spufs/gang.c 	if (!gang)
gang               23 arch/powerpc/platforms/cell/spufs/gang.c 	kref_init(&gang->kref);
gang               24 arch/powerpc/platforms/cell/spufs/gang.c 	mutex_init(&gang->mutex);
gang               25 arch/powerpc/platforms/cell/spufs/gang.c 	mutex_init(&gang->aff_mutex);
gang               26 arch/powerpc/platforms/cell/spufs/gang.c 	INIT_LIST_HEAD(&gang->list);
gang               27 arch/powerpc/platforms/cell/spufs/gang.c 	INIT_LIST_HEAD(&gang->aff_list_head);
gang               30 arch/powerpc/platforms/cell/spufs/gang.c 	return gang;
gang               35 arch/powerpc/platforms/cell/spufs/gang.c 	struct spu_gang *gang;
gang               36 arch/powerpc/platforms/cell/spufs/gang.c 	gang = container_of(kref, struct spu_gang, kref);
gang               37 arch/powerpc/platforms/cell/spufs/gang.c 	WARN_ON(gang->contexts || !list_empty(&gang->list));
gang               38 arch/powerpc/platforms/cell/spufs/gang.c 	kfree(gang);
gang               41 arch/powerpc/platforms/cell/spufs/gang.c struct spu_gang *get_spu_gang(struct spu_gang *gang)
gang               43 arch/powerpc/platforms/cell/spufs/gang.c 	kref_get(&gang->kref);
gang               44 arch/powerpc/platforms/cell/spufs/gang.c 	return gang;
gang               47 arch/powerpc/platforms/cell/spufs/gang.c int put_spu_gang(struct spu_gang *gang)
gang               49 arch/powerpc/platforms/cell/spufs/gang.c 	return kref_put(&gang->kref, &destroy_spu_gang);
gang               52 arch/powerpc/platforms/cell/spufs/gang.c void spu_gang_add_ctx(struct spu_gang *gang, struct spu_context *ctx)
gang               54 arch/powerpc/platforms/cell/spufs/gang.c 	mutex_lock(&gang->mutex);
gang               55 arch/powerpc/platforms/cell/spufs/gang.c 	ctx->gang = get_spu_gang(gang);
gang               56 arch/powerpc/platforms/cell/spufs/gang.c 	list_add(&ctx->gang_list, &gang->list);
gang               57 arch/powerpc/platforms/cell/spufs/gang.c 	gang->contexts++;
gang               58 arch/powerpc/platforms/cell/spufs/gang.c 	mutex_unlock(&gang->mutex);
gang               61 arch/powerpc/platforms/cell/spufs/gang.c void spu_gang_remove_ctx(struct spu_gang *gang, struct spu_context *ctx)
gang               63 arch/powerpc/platforms/cell/spufs/gang.c 	mutex_lock(&gang->mutex);
gang               64 arch/powerpc/platforms/cell/spufs/gang.c 	WARN_ON(ctx->gang != gang);
gang               67 arch/powerpc/platforms/cell/spufs/gang.c 		gang->aff_flags &= ~AFF_OFFSETS_SET;
gang               70 arch/powerpc/platforms/cell/spufs/gang.c 	gang->contexts--;
gang               71 arch/powerpc/platforms/cell/spufs/gang.c 	mutex_unlock(&gang->mutex);
gang               73 arch/powerpc/platforms/cell/spufs/gang.c 	put_spu_gang(gang);
gang              302 arch/powerpc/platforms/cell/spufs/inode.c spufs_assert_affinity(unsigned int flags, struct spu_gang *gang,
gang              319 arch/powerpc/platforms/cell/spufs/inode.c 	    gang->aff_ref_ctx &&
gang              320 arch/powerpc/platforms/cell/spufs/inode.c 	    gang->aff_ref_ctx->flags & SPU_CREATE_AFFINITY_MEM)
gang              323 arch/powerpc/platforms/cell/spufs/inode.c 	if (gang->aff_flags & AFF_MERGED)
gang              335 arch/powerpc/platforms/cell/spufs/inode.c 		    !list_is_last(&neighbor->aff_list, &gang->aff_list_head) &&
gang              342 arch/powerpc/platforms/cell/spufs/inode.c 		if (gang != neighbor->gang) {
gang              348 arch/powerpc/platforms/cell/spufs/inode.c 		list_for_each_entry(tmp, &gang->aff_list_head, aff_list)
gang              377 arch/powerpc/platforms/cell/spufs/inode.c 		ctx->gang->aff_ref_ctx = ctx;
gang              382 arch/powerpc/platforms/cell/spufs/inode.c 				&ctx->gang->aff_list_head);
gang              386 arch/powerpc/platforms/cell/spufs/inode.c 		if (list_is_last(&neighbor->aff_list, &ctx->gang->aff_list_head)
gang              398 arch/powerpc/platforms/cell/spufs/inode.c 		if (!ctx->gang->aff_ref_ctx)
gang              399 arch/powerpc/platforms/cell/spufs/inode.c 			ctx->gang->aff_ref_ctx = ctx;
gang              410 arch/powerpc/platforms/cell/spufs/inode.c 	struct spu_gang *gang;
gang              425 arch/powerpc/platforms/cell/spufs/inode.c 	gang = NULL;
gang              429 arch/powerpc/platforms/cell/spufs/inode.c 		gang = SPUFS_I(inode)->i_gang;
gang              430 arch/powerpc/platforms/cell/spufs/inode.c 		if (!gang)
gang              432 arch/powerpc/platforms/cell/spufs/inode.c 		mutex_lock(&gang->aff_mutex);
gang              433 arch/powerpc/platforms/cell/spufs/inode.c 		neighbor = spufs_assert_affinity(flags, gang, aff_filp);
gang              457 arch/powerpc/platforms/cell/spufs/inode.c 		mutex_unlock(&gang->aff_mutex);
gang              466 arch/powerpc/platforms/cell/spufs/inode.c 	struct spu_gang *gang;
gang              478 arch/powerpc/platforms/cell/spufs/inode.c 	gang = alloc_spu_gang();
gang              480 arch/powerpc/platforms/cell/spufs/inode.c 	SPUFS_I(inode)->i_gang = gang;
gang              481 arch/powerpc/platforms/cell/spufs/inode.c 	if (!gang) {
gang              258 arch/powerpc/platforms/cell/spufs/sched.c static void aff_merge_remaining_ctxs(struct spu_gang *gang)
gang              262 arch/powerpc/platforms/cell/spufs/sched.c 	list_for_each_entry(ctx, &gang->aff_list_head, aff_list) {
gang              264 arch/powerpc/platforms/cell/spufs/sched.c 			list_add(&ctx->aff_list, &gang->aff_list_head);
gang              266 arch/powerpc/platforms/cell/spufs/sched.c 	gang->aff_flags |= AFF_MERGED;
gang              269 arch/powerpc/platforms/cell/spufs/sched.c static void aff_set_offsets(struct spu_gang *gang)
gang              275 arch/powerpc/platforms/cell/spufs/sched.c 	list_for_each_entry_reverse(ctx, &gang->aff_ref_ctx->aff_list,
gang              277 arch/powerpc/platforms/cell/spufs/sched.c 		if (&ctx->aff_list == &gang->aff_list_head)
gang              283 arch/powerpc/platforms/cell/spufs/sched.c 	list_for_each_entry(ctx, gang->aff_ref_ctx->aff_list.prev, aff_list) {
gang              284 arch/powerpc/platforms/cell/spufs/sched.c 		if (&ctx->aff_list == &gang->aff_list_head)
gang              289 arch/powerpc/platforms/cell/spufs/sched.c 	gang->aff_flags |= AFF_OFFSETS_SET;
gang              322 arch/powerpc/platforms/cell/spufs/sched.c 			if (spu->ctx && spu->ctx->gang && !spu->ctx->aff_offset
gang              323 arch/powerpc/platforms/cell/spufs/sched.c 					&& spu->ctx->gang->aff_ref_spu)
gang              324 arch/powerpc/platforms/cell/spufs/sched.c 				available_spus -= spu->ctx->gang->contexts;
gang              327 arch/powerpc/platforms/cell/spufs/sched.c 		if (available_spus < ctx->gang->contexts) {
gang              344 arch/powerpc/platforms/cell/spufs/sched.c static void aff_set_ref_point_location(struct spu_gang *gang)
gang              350 arch/powerpc/platforms/cell/spufs/sched.c 	mem_aff = gang->aff_ref_ctx->flags & SPU_CREATE_AFFINITY_MEM;
gang              354 arch/powerpc/platforms/cell/spufs/sched.c 	list_for_each_entry(tmp, &gang->aff_list_head, aff_list)
gang              357 arch/powerpc/platforms/cell/spufs/sched.c 	list_for_each_entry_reverse(ctx, &gang->aff_ref_ctx->aff_list,
gang              359 arch/powerpc/platforms/cell/spufs/sched.c 		if (&ctx->aff_list == &gang->aff_list_head)
gang              364 arch/powerpc/platforms/cell/spufs/sched.c 	gang->aff_ref_spu = aff_ref_location(gang->aff_ref_ctx, mem_aff, gs,
gang              400 arch/powerpc/platforms/cell/spufs/sched.c 	struct spu_gang *gang = ctx->gang;
gang              405 arch/powerpc/platforms/cell/spufs/sched.c 	if (atomic_read(&ctx->gang->aff_sched_count) == 0)
gang              406 arch/powerpc/platforms/cell/spufs/sched.c 		ctx->gang->aff_ref_spu = NULL;
gang              408 arch/powerpc/platforms/cell/spufs/sched.c 	if (!gang->aff_ref_spu) {
gang              409 arch/powerpc/platforms/cell/spufs/sched.c 		if (!(gang->aff_flags & AFF_MERGED))
gang              410 arch/powerpc/platforms/cell/spufs/sched.c 			aff_merge_remaining_ctxs(gang);
gang              411 arch/powerpc/platforms/cell/spufs/sched.c 		if (!(gang->aff_flags & AFF_OFFSETS_SET))
gang              412 arch/powerpc/platforms/cell/spufs/sched.c 			aff_set_offsets(gang);
gang              413 arch/powerpc/platforms/cell/spufs/sched.c 		aff_set_ref_point_location(gang);
gang              416 arch/powerpc/platforms/cell/spufs/sched.c 	return gang->aff_ref_spu != NULL;
gang              435 arch/powerpc/platforms/cell/spufs/sched.c 	if (ctx->gang)
gang              441 arch/powerpc/platforms/cell/spufs/sched.c 		atomic_dec_if_positive(&ctx->gang->aff_sched_count);
gang              566 arch/powerpc/platforms/cell/spufs/sched.c 	if (ctx->gang) {
gang              567 arch/powerpc/platforms/cell/spufs/sched.c 		mutex_lock(&ctx->gang->aff_mutex);
gang              569 arch/powerpc/platforms/cell/spufs/sched.c 			aff_ref_spu = ctx->gang->aff_ref_spu;
gang              570 arch/powerpc/platforms/cell/spufs/sched.c 			atomic_inc(&ctx->gang->aff_sched_count);
gang              571 arch/powerpc/platforms/cell/spufs/sched.c 			mutex_unlock(&ctx->gang->aff_mutex);
gang              580 arch/powerpc/platforms/cell/spufs/sched.c 			atomic_dec(&ctx->gang->aff_sched_count);
gang              583 arch/powerpc/platforms/cell/spufs/sched.c 		mutex_unlock(&ctx->gang->aff_mutex);
gang              100 arch/powerpc/platforms/cell/spufs/spufs.h 	struct spu_gang *gang;
gang              245 arch/powerpc/platforms/cell/spufs/spufs.h struct spu_gang *get_spu_gang(struct spu_gang *gang);
gang              246 arch/powerpc/platforms/cell/spufs/spufs.h int put_spu_gang(struct spu_gang *gang);
gang              247 arch/powerpc/platforms/cell/spufs/spufs.h void spu_gang_remove_ctx(struct spu_gang *gang, struct spu_context *ctx);
gang              248 arch/powerpc/platforms/cell/spufs/spufs.h void spu_gang_add_ctx(struct spu_gang *gang, struct spu_context *ctx);
gang              269 arch/powerpc/platforms/cell/spufs/spufs.h struct spu_context * alloc_spu_context(struct spu_gang *gang);
gang              198 drivers/perf/qcom_l3_pmu.c 	u32 gang;
gang              201 drivers/perf/qcom_l3_pmu.c 	gang = readl_relaxed(l3pmu->regs + L3_M_BC_GANG);
gang              202 drivers/perf/qcom_l3_pmu.c 	gang |= GANG_EN(idx + 1);
gang              203 drivers/perf/qcom_l3_pmu.c 	writel_relaxed(gang, l3pmu->regs + L3_M_BC_GANG);
gang              229 drivers/perf/qcom_l3_pmu.c 	u32 gang = readl_relaxed(l3pmu->regs + L3_M_BC_GANG);
gang              236 drivers/perf/qcom_l3_pmu.c 	writel_relaxed(gang & ~GANG_EN(idx + 1), l3pmu->regs + L3_M_BC_GANG);
gang             2036 fs/btrfs/disk-io.c 	struct btrfs_root *gang[8];
gang             2040 fs/btrfs/disk-io.c 		gang[0] = list_entry(fs_info->dead_roots.next,
gang             2042 fs/btrfs/disk-io.c 		list_del(&gang[0]->root_list);
gang             2044 fs/btrfs/disk-io.c 		if (test_bit(BTRFS_ROOT_IN_RADIX, &gang[0]->state)) {
gang             2045 fs/btrfs/disk-io.c 			btrfs_drop_and_free_fs_root(fs_info, gang[0]);
gang             2047 fs/btrfs/disk-io.c 			free_extent_buffer(gang[0]->node);
gang             2048 fs/btrfs/disk-io.c 			free_extent_buffer(gang[0]->commit_root);
gang             2049 fs/btrfs/disk-io.c 			btrfs_put_fs_root(gang[0]);
gang             2055 fs/btrfs/disk-io.c 					     (void **)gang, 0,
gang             2056 fs/btrfs/disk-io.c 					     ARRAY_SIZE(gang));
gang             2060 fs/btrfs/disk-io.c 			btrfs_drop_and_free_fs_root(fs_info, gang[i]);
gang             3908 fs/btrfs/disk-io.c 	struct btrfs_root *gang[8];
gang             3917 fs/btrfs/disk-io.c 					     (void **)gang, root_objectid,
gang             3918 fs/btrfs/disk-io.c 					     ARRAY_SIZE(gang));
gang             3923 fs/btrfs/disk-io.c 		root_objectid = gang[ret - 1]->root_key.objectid + 1;
gang             3927 fs/btrfs/disk-io.c 			if (btrfs_root_refs(&gang[i]->root_item) == 0) {
gang             3928 fs/btrfs/disk-io.c 				gang[i] = NULL;
gang             3932 fs/btrfs/disk-io.c 			gang[i] = btrfs_grab_fs_root(gang[i]);
gang             3937 fs/btrfs/disk-io.c 			if (!gang[i])
gang             3939 fs/btrfs/disk-io.c 			root_objectid = gang[i]->root_key.objectid;
gang             3940 fs/btrfs/disk-io.c 			err = btrfs_orphan_cleanup(gang[i]);
gang             3943 fs/btrfs/disk-io.c 			btrfs_put_fs_root(gang[i]);
gang             3950 fs/btrfs/disk-io.c 		if (gang[i])
gang             3951 fs/btrfs/disk-io.c 			btrfs_put_fs_root(gang[i]);
gang             1223 fs/btrfs/transaction.c 	struct btrfs_root *gang[8];
gang             1231 fs/btrfs/transaction.c 						 (void **)gang, 0,
gang             1232 fs/btrfs/transaction.c 						 ARRAY_SIZE(gang),
gang             1237 fs/btrfs/transaction.c 			struct btrfs_root *root = gang[i];