[PATCH] pSeries - read irqs dynamically

Milton Miller miltonm at bga.com
Sat Jun 18 12:38:12 EST 2005


Surely the model won't be changing.  How about leaving the s7a check
to occur once at boot?

milton

>
> -static int s7a_workaround;
> -
>  extern struct mpic *pSeries_mpic;
>
>  static int config_access_valid(struct device_node *dn, int where)
> @@ -227,6 +225,39 @@ static void python_countermeasures(struc
>         iounmap(chip_regs);
>  }
>
> +static int is_model_s7a(void)
> +{
> +       struct device_node *root;
> +       char *model;
> +       int rc = 0;
> +
> +       root = of_find_node_by_path("/");
> +       if (root) {
> +               model = get_property(root, "model", NULL);
> +               if (model && !strcmp(model, "IBM,7013-S7A"))
> +                        rc = 1;
> +               of_node_put(root);
> +       }
> +
> +       return rc;
> +}
> +




More information about the Linuxppc64-dev mailing list