linux/arch/ia64/kernel/machvec.c
<<
>>
Prefs
   1// SPDX-License-Identifier: GPL-2.0
   2#include <linux/module.h>
   3#include <linux/dma-mapping.h>
   4#include <asm/machvec.h>
   5
   6#ifdef CONFIG_IA64_GENERIC
   7
   8#include <linux/kernel.h>
   9#include <linux/string.h>
  10
  11#include <asm/page.h>
  12
  13struct ia64_machine_vector ia64_mv = {
  14        .mmiowb = ___ia64_mmiowb
  15};
  16EXPORT_SYMBOL(ia64_mv);
  17
  18static struct ia64_machine_vector * __init
  19lookup_machvec (const char *name)
  20{
  21        extern struct ia64_machine_vector machvec_start[];
  22        extern struct ia64_machine_vector machvec_end[];
  23        struct ia64_machine_vector *mv;
  24
  25        for (mv = machvec_start; mv < machvec_end; ++mv)
  26                if (strcmp (mv->name, name) == 0)
  27                        return mv;
  28
  29        return 0;
  30}
  31
  32void __init
  33machvec_init (const char *name)
  34{
  35        struct ia64_machine_vector *mv;
  36
  37        if (!name)
  38                name = acpi_get_sysname();
  39        mv = lookup_machvec(name);
  40        if (!mv)
  41                panic("generic kernel failed to find machine vector for"
  42                      " platform %s!", name);
  43
  44        ia64_mv = *mv;
  45        printk(KERN_INFO "booting generic kernel on platform %s\n", name);
  46}
  47
  48void __init
  49machvec_init_from_cmdline(const char *cmdline)
  50{
  51        char str[64];
  52        const char *start;
  53        char *end;
  54
  55        if (! (start = strstr(cmdline, "machvec=")) )
  56                return machvec_init(NULL);
  57
  58        strlcpy(str, start + strlen("machvec="), sizeof(str));
  59        if ( (end = strchr(str, ' ')) )
  60                *end = '\0';
  61
  62        return machvec_init(str);
  63}
  64
  65#endif /* CONFIG_IA64_GENERIC */
  66
  67void
  68machvec_setup (char **arg)
  69{
  70}
  71EXPORT_SYMBOL(machvec_setup);
  72
  73void
  74machvec_timer_interrupt (int irq, void *dev_id)
  75{
  76}
  77EXPORT_SYMBOL(machvec_timer_interrupt);
  78