new function to turn an APIC pin# into an INT mask.
added missing APIC_IO define. Submitted by: "John S. Dyson" <toor@dyson.iquest.net>
This commit is contained in:
parent
29eb228ebb
commit
462e62c9a0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=25419
@ -22,7 +22,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mp_machdep.c,v 1.5 1997/04/29 22:12:32 fsmp Exp $
|
||||
* $Id: mp_machdep.c,v 1.6 1997/05/01 19:27:58 fsmp Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
@ -886,6 +886,28 @@ get_isa_apic_irq(int isaIRQ)
|
||||
#undef SRCBUSIRQ
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
int
|
||||
get_isa_apic_mask(int isaMASK)
|
||||
{
|
||||
int apicpin, isairq;
|
||||
|
||||
isairq = ffs(isaMASK);
|
||||
if (isairq == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
apicpin = get_isa_apic_irq(isairq - 1);
|
||||
if (apicpin == -1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (1 << apicpin);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* determine which APIC pin an EISA INT is attached to.
|
||||
*/
|
||||
@ -1441,8 +1463,10 @@ start_ap(int logical_cpu, u_int boot_addr)
|
||||
void
|
||||
smp_invltlb(void)
|
||||
{
|
||||
#if defined(APIC_IO)
|
||||
if (smp_active && invltlb_ok)
|
||||
all_but_self_ipi(ICU_OFFSET + XINVLTLB_OFFSET);
|
||||
#endif /* APIC_IO */
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -22,7 +22,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mp_machdep.c,v 1.5 1997/04/29 22:12:32 fsmp Exp $
|
||||
* $Id: mp_machdep.c,v 1.6 1997/05/01 19:27:58 fsmp Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
@ -886,6 +886,28 @@ get_isa_apic_irq(int isaIRQ)
|
||||
#undef SRCBUSIRQ
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
int
|
||||
get_isa_apic_mask(int isaMASK)
|
||||
{
|
||||
int apicpin, isairq;
|
||||
|
||||
isairq = ffs(isaMASK);
|
||||
if (isairq == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
apicpin = get_isa_apic_irq(isairq - 1);
|
||||
if (apicpin == -1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (1 << apicpin);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* determine which APIC pin an EISA INT is attached to.
|
||||
*/
|
||||
@ -1441,8 +1463,10 @@ start_ap(int logical_cpu, u_int boot_addr)
|
||||
void
|
||||
smp_invltlb(void)
|
||||
{
|
||||
#if defined(APIC_IO)
|
||||
if (smp_active && invltlb_ok)
|
||||
all_but_self_ipi(ICU_OFFSET + XINVLTLB_OFFSET);
|
||||
#endif /* APIC_IO */
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -22,7 +22,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mp_machdep.c,v 1.5 1997/04/29 22:12:32 fsmp Exp $
|
||||
* $Id: mp_machdep.c,v 1.6 1997/05/01 19:27:58 fsmp Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
@ -886,6 +886,28 @@ get_isa_apic_irq(int isaIRQ)
|
||||
#undef SRCBUSIRQ
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
int
|
||||
get_isa_apic_mask(int isaMASK)
|
||||
{
|
||||
int apicpin, isairq;
|
||||
|
||||
isairq = ffs(isaMASK);
|
||||
if (isairq == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
apicpin = get_isa_apic_irq(isairq - 1);
|
||||
if (apicpin == -1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (1 << apicpin);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* determine which APIC pin an EISA INT is attached to.
|
||||
*/
|
||||
@ -1441,8 +1463,10 @@ start_ap(int logical_cpu, u_int boot_addr)
|
||||
void
|
||||
smp_invltlb(void)
|
||||
{
|
||||
#if defined(APIC_IO)
|
||||
if (smp_active && invltlb_ok)
|
||||
all_but_self_ipi(ICU_OFFSET + XINVLTLB_OFFSET);
|
||||
#endif /* APIC_IO */
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -22,7 +22,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mp_machdep.c,v 1.5 1997/04/29 22:12:32 fsmp Exp $
|
||||
* $Id: mp_machdep.c,v 1.6 1997/05/01 19:27:58 fsmp Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
@ -886,6 +886,28 @@ get_isa_apic_irq(int isaIRQ)
|
||||
#undef SRCBUSIRQ
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
int
|
||||
get_isa_apic_mask(int isaMASK)
|
||||
{
|
||||
int apicpin, isairq;
|
||||
|
||||
isairq = ffs(isaMASK);
|
||||
if (isairq == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
apicpin = get_isa_apic_irq(isairq - 1);
|
||||
if (apicpin == -1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (1 << apicpin);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* determine which APIC pin an EISA INT is attached to.
|
||||
*/
|
||||
@ -1441,8 +1463,10 @@ start_ap(int logical_cpu, u_int boot_addr)
|
||||
void
|
||||
smp_invltlb(void)
|
||||
{
|
||||
#if defined(APIC_IO)
|
||||
if (smp_active && invltlb_ok)
|
||||
all_but_self_ipi(ICU_OFFSET + XINVLTLB_OFFSET);
|
||||
#endif /* APIC_IO */
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -22,7 +22,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mp_machdep.c,v 1.5 1997/04/29 22:12:32 fsmp Exp $
|
||||
* $Id: mp_machdep.c,v 1.6 1997/05/01 19:27:58 fsmp Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
@ -886,6 +886,28 @@ get_isa_apic_irq(int isaIRQ)
|
||||
#undef SRCBUSIRQ
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
int
|
||||
get_isa_apic_mask(int isaMASK)
|
||||
{
|
||||
int apicpin, isairq;
|
||||
|
||||
isairq = ffs(isaMASK);
|
||||
if (isairq == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
apicpin = get_isa_apic_irq(isairq - 1);
|
||||
if (apicpin == -1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (1 << apicpin);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* determine which APIC pin an EISA INT is attached to.
|
||||
*/
|
||||
@ -1441,8 +1463,10 @@ start_ap(int logical_cpu, u_int boot_addr)
|
||||
void
|
||||
smp_invltlb(void)
|
||||
{
|
||||
#if defined(APIC_IO)
|
||||
if (smp_active && invltlb_ok)
|
||||
all_but_self_ipi(ICU_OFFSET + XINVLTLB_OFFSET);
|
||||
#endif /* APIC_IO */
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -22,7 +22,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mp_machdep.c,v 1.5 1997/04/29 22:12:32 fsmp Exp $
|
||||
* $Id: mp_machdep.c,v 1.6 1997/05/01 19:27:58 fsmp Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
@ -886,6 +886,28 @@ get_isa_apic_irq(int isaIRQ)
|
||||
#undef SRCBUSIRQ
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
int
|
||||
get_isa_apic_mask(int isaMASK)
|
||||
{
|
||||
int apicpin, isairq;
|
||||
|
||||
isairq = ffs(isaMASK);
|
||||
if (isairq == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
apicpin = get_isa_apic_irq(isairq - 1);
|
||||
if (apicpin == -1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (1 << apicpin);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* determine which APIC pin an EISA INT is attached to.
|
||||
*/
|
||||
@ -1441,8 +1463,10 @@ start_ap(int logical_cpu, u_int boot_addr)
|
||||
void
|
||||
smp_invltlb(void)
|
||||
{
|
||||
#if defined(APIC_IO)
|
||||
if (smp_active && invltlb_ok)
|
||||
all_but_self_ipi(ICU_OFFSET + XINVLTLB_OFFSET);
|
||||
#endif /* APIC_IO */
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -22,7 +22,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mp_machdep.c,v 1.5 1997/04/29 22:12:32 fsmp Exp $
|
||||
* $Id: mp_machdep.c,v 1.6 1997/05/01 19:27:58 fsmp Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
@ -886,6 +886,28 @@ get_isa_apic_irq(int isaIRQ)
|
||||
#undef SRCBUSIRQ
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
int
|
||||
get_isa_apic_mask(int isaMASK)
|
||||
{
|
||||
int apicpin, isairq;
|
||||
|
||||
isairq = ffs(isaMASK);
|
||||
if (isairq == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
apicpin = get_isa_apic_irq(isairq - 1);
|
||||
if (apicpin == -1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (1 << apicpin);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* determine which APIC pin an EISA INT is attached to.
|
||||
*/
|
||||
@ -1441,8 +1463,10 @@ start_ap(int logical_cpu, u_int boot_addr)
|
||||
void
|
||||
smp_invltlb(void)
|
||||
{
|
||||
#if defined(APIC_IO)
|
||||
if (smp_active && invltlb_ok)
|
||||
all_but_self_ipi(ICU_OFFSET + XINVLTLB_OFFSET);
|
||||
#endif /* APIC_IO */
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user