xics.c (98e0ffaefb0f241cda3a72395d3be04192ae0d47) xics.c (33495e5daf2760bcf739eb642d83c09706e64adc)
1/*-
2 * Copyright 2011 Nathan Whitehorn
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 252 unchanged lines hidden (view full) ---

261static void
262xicp_enable(device_t dev, u_int irq, u_int vector)
263{
264 struct xicp_softc *sc;
265 cell_t status, cpu;
266
267 sc = device_get_softc(dev);
268
1/*-
2 * Copyright 2011 Nathan Whitehorn
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 252 unchanged lines hidden (view full) ---

261static void
262xicp_enable(device_t dev, u_int irq, u_int vector)
263{
264 struct xicp_softc *sc;
265 cell_t status, cpu;
266
267 sc = device_get_softc(dev);
268
269 KASSERT(sc->nintvecs + 1 < sizeof(sc->intvecs)/sizeof(sc->intvecs[0]),
270 ("Too many XICP interrupts"));
269 KASSERT(sc->nintvecs + 1 < nitems(sc->intvecs),
270 ("Too many XICP interrupts"));
271
272 mtx_lock(&sc->sc_mtx);
273 sc->intvecs[sc->nintvecs].irq = irq;
274 sc->intvecs[sc->nintvecs].vector = vector;
275 mb();
276 sc->nintvecs++;
277 mtx_unlock(&sc->sc_mtx);
278

--- 54 unchanged lines hidden ---
271
272 mtx_lock(&sc->sc_mtx);
273 sc->intvecs[sc->nintvecs].irq = irq;
274 sc->intvecs[sc->nintvecs].vector = vector;
275 mb();
276 sc->nintvecs++;
277 mtx_unlock(&sc->sc_mtx);
278

--- 54 unchanged lines hidden ---