Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jul 2016 17:31:29 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r302853 - in head/sys/arm64: arm64 include
Message-ID:  <201607141731.u6EHVTZD011393@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Thu Jul 14 17:31:29 2016
New Revision: 302853
URL: https://svnweb.freebsd.org/changeset/base/302853

Log:
  Finish removing the non-INTRNG support from sys/arm64.
  
  Obtained from:	ABT Systems Ltd
  MFC after:	1 month
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/arm64/arm64/autoconf.c
  head/sys/arm64/arm64/mp_machdep.c
  head/sys/arm64/arm64/nexus.c
  head/sys/arm64/include/intr.h

Modified: head/sys/arm64/arm64/autoconf.c
==============================================================================
--- head/sys/arm64/arm64/autoconf.c	Thu Jul 14 17:23:49 2016	(r302852)
+++ head/sys/arm64/arm64/autoconf.c	Thu Jul 14 17:31:29 2016	(r302853)
@@ -81,12 +81,8 @@ static void
 configure_final(void *dummy)
 {
 
-#ifdef INTRNG
 	/* Enable interrupt reception on this CPU */
 	intr_enable();
-#else
-	arm_enable_intr();
-#endif
 	cninit_finish(); 
 
 	if (bootverbose)

Modified: head/sys/arm64/arm64/mp_machdep.c
==============================================================================
--- head/sys/arm64/arm64/mp_machdep.c	Thu Jul 14 17:23:49 2016	(r302852)
+++ head/sys/arm64/arm64/mp_machdep.c	Thu Jul 14 17:31:29 2016	(r302853)
@@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$");
 
 #include <dev/psci/psci.h>
 
-#ifdef INTRNG
 #include "pic_if.h"
 
 typedef void intr_ipi_send_t(void *, cpuset_t, u_int);
@@ -86,7 +85,6 @@ static struct intr_ipi ipi_sources[INTR_
 static struct intr_ipi *intr_ipi_lookup(u_int);
 static void intr_pic_ipi_setup(u_int, const char *, intr_ipi_handler_t *,
     void *);
-#endif /* INTRNG */
 
 boolean_t ofw_cpu_reg(phandle_t node, u_int, cell_t *);
 
@@ -214,18 +212,12 @@ release_aps(void *dummy __unused)
 {
 	int cpu, i;
 
-#ifdef INTRNG
 	intr_pic_ipi_setup(IPI_AST, "ast", ipi_ast, NULL);
 	intr_pic_ipi_setup(IPI_PREEMPT, "preempt", ipi_preempt, NULL);
 	intr_pic_ipi_setup(IPI_RENDEZVOUS, "rendezvous", ipi_rendezvous, NULL);
 	intr_pic_ipi_setup(IPI_STOP, "stop", ipi_stop, NULL);
 	intr_pic_ipi_setup(IPI_STOP_HARD, "stop hard", ipi_stop, NULL);
 	intr_pic_ipi_setup(IPI_HARDCLOCK, "hardclock", ipi_hardclock, NULL);
-#else
-	/* Setup the IPI handler */
-	for (i = 0; i < INTR_IPI_COUNT; i++)
-		arm_setup_ipihandler(ipi_handler, i);
-#endif
 
 	atomic_store_rel_int(&aps_ready, 1);
 	/* Wake up the other CPUs */
@@ -253,9 +245,6 @@ void
 init_secondary(uint64_t cpu)
 {
 	struct pcpu *pcpup;
-#ifndef INTRNG
-	int i;
-#endif
 
 	pcpup = &__pcpu[cpu];
 	/*
@@ -282,15 +271,7 @@ init_secondary(uint64_t cpu)
 	 */
 	identify_cpu();
 
-#ifdef INTRNG
 	intr_pic_init_secondary();
-#else
-	/* Configure the interrupt controller */
-	arm_init_secondary();
-
-	for (i = 0; i < INTR_IPI_COUNT; i++)
-		arm_unmask_ipi(i);
-#endif
 
 	/* Start per-CPU event timers. */
 	cpu_initclocks_ap();
@@ -322,7 +303,6 @@ init_secondary(uint64_t cpu)
 	/* NOTREACHED */
 }
 
-#ifdef INTRNG
 /*
  *  Send IPI thru interrupt controller.
  */
@@ -378,7 +358,6 @@ intr_ipi_send(cpuset_t cpus, u_int ipi)
 
 	ii->ii_send(ii->ii_send_arg, cpus, ipi);
 }
-#endif
 
 static void
 ipi_ast(void *dummy __unused)
@@ -432,44 +411,6 @@ ipi_stop(void *dummy __unused)
 	CTR0(KTR_SMP, "IPI_STOP (restart)");
 }
 
-#ifndef INTRNG
-static int
-ipi_handler(void *arg)
-{
-	u_int cpu, ipi;
-
-	arg = (void *)((uintptr_t)arg & ~(1 << 16));
-	KASSERT((uintptr_t)arg < INTR_IPI_COUNT,
-	    ("Invalid IPI %ju", (uintptr_t)arg));
-
-	cpu = PCPU_GET(cpuid);
-	ipi = (uintptr_t)arg;
-
-	switch(ipi) {
-	case IPI_AST:
-		ipi_ast(NULL);
-		break;
-	case IPI_PREEMPT:
-		ipi_preempt(NULL);
-		break;
-	case IPI_RENDEZVOUS:
-		ipi_rendezvous(NULL);
-		break;
-	case IPI_STOP:
-	case IPI_STOP_HARD:
-		ipi_stop(NULL);
-		break;
-	case IPI_HARDCLOCK:
-		ipi_hardclock(NULL);
-		break;
-	default:
-		panic("Unknown IPI %#0x on cpu %d", ipi, curcpu);
-	}
-
-	return (FILTER_HANDLED);
-}
-#endif
-
 struct cpu_group *
 cpu_topo(void)
 {
@@ -624,7 +565,6 @@ cpu_mp_setmaxid(void)
 	mp_maxid = 0;
 }
 
-#ifdef INTRNG
 /*
  *  Lookup IPI source.
  */
@@ -768,4 +708,3 @@ ipi_selected(cpuset_t cpus, u_int ipi)
 	CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi);
 	intr_ipi_send(cpus, ipi);
 }
-#endif /* INTRNG */

Modified: head/sys/arm64/arm64/nexus.c
==============================================================================
--- head/sys/arm64/arm64/nexus.c	Thu Jul 14 17:23:49 2016	(r302852)
+++ head/sys/arm64/arm64/nexus.c	Thu Jul 14 17:31:29 2016	(r302853)
@@ -271,13 +271,9 @@ nexus_config_intr(device_t dev, int irq,
     enum intr_polarity pol)
 {
 
-#ifdef INTRNG
 	/* TODO: This is wrong, it's needed for ACPI */
 	device_printf(dev, "bus_config_intr is obsolete and not supported!\n");
 	return (EOPNOTSUPP);
-#else
-	return (intr_irq_config(irq, trig, pol));
-#endif
 }
 
 static int
@@ -294,12 +290,7 @@ nexus_setup_intr(device_t dev, device_t 
 	if (error)
 		return (error);
 
-#ifdef INTRNG
 	error = intr_setup_irq(child, res, filt, intr, arg, flags, cookiep);
-#else
-	error = arm_setup_intr(device_get_nameunit(child), filt, intr,
-	    arg, rman_get_start(res), flags, cookiep);
-#endif
 
 	return (error);
 }
@@ -308,11 +299,7 @@ static int
 nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih)
 {
 
-#ifdef INTRNG
 	return (intr_teardown_irq(child, r, ih));
-#else
-	return (intr_irq_remove_handler(child, rman_get_start(r), ih));
-#endif
 }
 
 #ifdef SMP
@@ -320,11 +307,7 @@ static int
 nexus_bind_intr(device_t dev, device_t child, struct resource *irq, int cpu)
 {
 
-#ifdef INTRNG
 	return (intr_bind_irq(child, irq, cpu));
-#else
-	return (intr_irq_bind(rman_get_start(irq), cpu));
-#endif
 }
 #endif
 
@@ -447,22 +430,8 @@ static int
 nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, int icells,
     pcell_t *intr)
 {
-#ifdef INTRNG
-	return (INTR_IRQ_INVALID);
-#else
-	int irq;
-
-	if (icells == 3) {
-		irq = intr[1];
-		if (intr[0] == 0)
-			irq += 32; /* SPI */
-		else
-			irq += 16; /* PPI */
-	} else
-		irq = intr[0];
 
-	return (irq);
-#endif
+	return (INTR_IRQ_INVALID);
 }
 #endif
 

Modified: head/sys/arm64/include/intr.h
==============================================================================
--- head/sys/arm64/include/intr.h	Thu Jul 14 17:23:49 2016	(r302852)
+++ head/sys/arm64/include/intr.h	Thu Jul 14 17:31:29 2016	(r302853)
@@ -29,8 +29,6 @@
 #ifndef _MACHINE_INTR_H_
 #define	_MACHINE_INTR_H_
 
-#ifdef INTRNG
-
 #ifdef FDT
 #include <dev/ofw/openfirm.h>
 #endif
@@ -50,33 +48,4 @@ arm_irq_memory_barrier(uintptr_t irq)
 void intr_ipi_dispatch(u_int, struct trapframe *);
 #endif
 
-#else
-int	intr_irq_config(u_int, enum intr_trigger, enum intr_polarity);
-void	intr_irq_handler(struct trapframe *);
-int	intr_irq_remove_handler(device_t, u_int, void *);
-
-void	arm_dispatch_intr(u_int, struct trapframe *);
-int	arm_enable_intr(void);
-void	arm_mask_irq(u_int);
-void	arm_register_root_pic(device_t, u_int);
-void	arm_register_msi_pic(device_t);
-int	arm_alloc_msi(device_t, device_t, int, int, int *);
-int	arm_release_msi(device_t, device_t, int, int *);
-int	arm_alloc_msix(device_t, device_t, int *);
-int	arm_release_msix(device_t, device_t, int);
-int	arm_map_msi(device_t, device_t, int, uint64_t *, uint32_t *);
-int	arm_map_msix(device_t, device_t, int, uint64_t *, uint32_t *);
-int	arm_setup_intr(const char *, driver_filter_t *, driver_intr_t,
-				void *, u_int, enum intr_type, void **);
-void	arm_unmask_irq(u_int);
-
-#ifdef SMP
-int	intr_irq_bind(u_int, int);
-
-void	arm_init_secondary(void);
-void	arm_setup_ipihandler(driver_filter_t *, u_int);
-void	arm_unmask_ipi(u_int);
-#endif
-#endif
-
 #endif	/* _MACHINE_INTR_H */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607141731.u6EHVTZD011393>