300-MIPS-add-MIPS_MACHINE_NONAME-macro.patch 620 B

123456789101112131415161718192021
  1. --- a/arch/mips/include/asm/mips_machine.h
  2. +++ b/arch/mips/include/asm/mips_machine.h
  3. @@ -36,6 +36,18 @@ static struct mips_machine machine_##_ty
  4. .mach_setup = _setup, \
  5. };
  6. +#define MIPS_MACHINE_NONAME(_type, _id, _setup) \
  7. +static const char machine_id_##_type[] __initconst \
  8. + __aligned(1) = _id; \
  9. +static struct mips_machine machine_##_type \
  10. + __used __section(.mips.machines.init) = \
  11. +{ \
  12. + .mach_type = _type, \
  13. + .mach_id = machine_id_##_type, \
  14. + .mach_name = NULL, \
  15. + .mach_setup = _setup, \
  16. +};
  17. +
  18. extern long __mips_machines_start;
  19. extern long __mips_machines_end;