arch/arm/tools/gen-mach-types

Source file repositories/reference/linux-study-clean/arch/arm/tools/gen-mach-types

File Facts

System
Linux kernel
Corpus path
arch/arm/tools/gen-mach-types
Extension
[no extension]
Size
2113 bytes
Lines
74
Domain
Architecture Layer
Bucket
arch/arm
Inferred role
Architecture Layer: arch/arm
Status
atlas-only

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

if (num[i] ~ /..*/) {
	      printf("#ifdef %s\n", config[i]);
	      printf("# ifdef machine_arch_type\n");
	      printf("#  undef machine_arch_type\n");
	      printf("#  define machine_arch_type\t__machine_arch_type\n");
	      printf("# else\n");
	      printf("#  define machine_arch_type\t%s\n", mach_type[i]);
	      printf("# endif\n");
	      printf("# define %s()\t(machine_arch_type == %s)\n", machine_is[i], mach_type[i]);
	      printf("#else\n");
	      printf("# define %s()\t(0)\n", machine_is[i]);
	      printf("#endif\n\n");
	    }

	  printf("/*\n * These have not yet been registered\n */\n");
	  for (i = 0; i < nr; i++)
	    if (num[i] !~ /..*/)
	      printf("/* #define %-30s <<not registered>> */\n", mach_type[i]);

	  for (i = 0; i < nr; i++)
	    if (num[i] !~ /..*/) {
	      printf("#define %s()\t(0)\n", machine_is[i]);
	    }

	  printf("\n#ifndef machine_arch_type\n");
	  printf("#define machine_arch_type\t__machine_arch_type\n");
	  printf("#endif\n\n");
	  printf("#endif\n");
	}

Annotation

Implementation Notes