1 // SPDX-License-Identifier: GPL-2.0
3 * linux/arch/alpha/kernel/gct.c
6 #include <linux/kernel.h>
7 #include <linux/types.h>
8 #include <linux/errno.h>
10 #include <asm/hwrpb.h>
14 gct6_find_nodes(gct6_node
*node
, gct6_search_struct
*search
)
16 gct6_search_struct
*wanted
;
19 /* First check the magic number. */
20 if (node
->magic
!= GCT_NODE_MAGIC
) {
21 printk(KERN_ERR
"GCT Node MAGIC incorrect - GCT invalid\n");
25 /* Check against the search struct. */
27 wanted
&& (wanted
->type
| wanted
->subtype
);
29 if (node
->type
!= wanted
->type
)
31 if (node
->subtype
!= wanted
->subtype
)
34 /* Found it -- call out. */
36 wanted
->callout(node
);
39 /* Now walk the tree, siblings first. */
41 status
|= gct6_find_nodes(GCT_NODE_PTR(node
->next
), search
);
43 /* Then the children. */
45 status
|= gct6_find_nodes(GCT_NODE_PTR(node
->child
), search
);