svn commit: r276035 - in projects/arm_intrng: sys/arm/arm sys/arm/at91 sys/arm/include sys/arm/ti sys/boot/fdt/dts/arm sys/boot/uboot/common sys/dev/beri/virtio usr.sbin/bsdinstall/scripts
Andrew Turner
andrew at FreeBSD.org
Sun Dec 21 21:56:02 UTC 2014
Author: andrew
Date: Sun Dec 21 21:55:58 2014
New Revision: 276035
URL: https://svnweb.freebsd.org/changeset/base/276035
Log:
Merge to r276034
Modified:
projects/arm_intrng/sys/arm/arm/db_trace.c
projects/arm_intrng/sys/arm/arm/gic.c
projects/arm_intrng/sys/arm/arm/intr.c
projects/arm_intrng/sys/arm/arm/nexus.c
projects/arm_intrng/sys/arm/at91/at91_machdep.c
projects/arm_intrng/sys/arm/include/intr.h
projects/arm_intrng/sys/arm/ti/ti_wdt.c
projects/arm_intrng/sys/boot/fdt/dts/arm/pandaboard.dts
projects/arm_intrng/sys/boot/uboot/common/main.c
projects/arm_intrng/sys/dev/beri/virtio/virtio.c
projects/arm_intrng/usr.sbin/bsdinstall/scripts/zfsboot
Directory Properties:
projects/arm_intrng/ (props changed)
projects/arm_intrng/sys/ (props changed)
projects/arm_intrng/sys/boot/ (props changed)
Modified: projects/arm_intrng/sys/arm/arm/db_trace.c
==============================================================================
--- projects/arm_intrng/sys/arm/arm/db_trace.c Sun Dec 21 21:47:57 2014 (r276034)
+++ projects/arm_intrng/sys/arm/arm/db_trace.c Sun Dec 21 21:55:58 2014 (r276035)
@@ -345,9 +345,16 @@ db_unwind_tab(struct unwind_state *state
/*
* The program counter was not updated, load it from the link register.
*/
- if (state->registers[PC] == 0)
+ if (state->registers[PC] == 0) {
state->registers[PC] = state->registers[LR];
+ /*
+ * If the program counter changed, flag it in the update mask.
+ */
+ if (state->start_pc != state->registers[PC])
+ state->update_mask |= 1 << PC;
+ }
+
return 0;
}
Modified: projects/arm_intrng/sys/arm/arm/gic.c
==============================================================================
--- projects/arm_intrng/sys/arm/arm/gic.c Sun Dec 21 21:47:57 2014 (r276034)
+++ projects/arm_intrng/sys/arm/arm/gic.c Sun Dec 21 21:55:58 2014 (r276035)
@@ -361,6 +361,7 @@ arm_gic_config(device_t dev, int irq, en
enum intr_polarity pol)
{
struct arm_gic_softc *sc = device_get_softc(dev);
+ device_t dev = sc->gic_dev;
uint32_t reg;
uint32_t mask;
@@ -506,4 +507,3 @@ EARLY_DRIVER_MODULE(gic, simplebus, arm_
BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE);
EARLY_DRIVER_MODULE(gic, ofwbus, arm_gic_driver, arm_gic_devclass, 0, 0,
BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE);
-
Modified: projects/arm_intrng/sys/arm/arm/intr.c
==============================================================================
--- projects/arm_intrng/sys/arm/arm/intr.c Sun Dec 21 21:47:57 2014 (r276034)
+++ projects/arm_intrng/sys/arm/arm/intr.c Sun Dec 21 21:55:58 2014 (r276035)
@@ -36,8 +36,11 @@
* Soft interrupt and other generic interrupt functions.
*/
+#include "opt_platform.h"
+
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/syslog.h>
@@ -47,10 +50,16 @@ __FBSDID("$FreeBSD$");
#include <sys/bus.h>
#include <sys/interrupt.h>
#include <sys/conf.h>
+
#include <machine/atomic.h>
#include <machine/intr.h>
#include <machine/cpu.h>
+#ifdef FDT
+#include <dev/fdt/fdt_common.h>
+#include <machine/fdt.h>
+#endif
+
#define INTRNAME_LEN (MAXCOMLEN + 1)
typedef void (*mask_fn)(void *);
@@ -89,6 +98,36 @@ intr_init(void *unused)
SYSINIT(intr_init, SI_SUB_INTR, SI_ORDER_FIRST, intr_init, NULL);
+#ifdef FDT
+int
+arm_fdt_map_irq(phandle_t iparent, pcell_t *intr, int icells)
+{
+ fdt_pic_decode_t intr_decode;
+ phandle_t intr_parent;
+ int i, rv, interrupt, trig, pol;
+
+ intr_parent = OF_node_from_xref(iparent);
+ for (i = 0; i < icells; i++)
+ intr[i] = cpu_to_fdt32(intr[i]);
+
+ for (i = 0; fdt_pic_table[i] != NULL; i++) {
+ intr_decode = fdt_pic_table[i];
+ rv = intr_decode(intr_parent, intr, &interrupt, &trig, &pol);
+
+ if (rv == 0) {
+ /* This was recognized as our PIC and decoded. */
+ interrupt = FDT_MAP_IRQ(intr_parent, interrupt);
+ return (interrupt);
+ }
+ }
+
+ /* Not in table, so guess */
+ interrupt = FDT_MAP_IRQ(intr_parent, fdt32_to_cpu(intr[0]));
+
+ return (interrupt);
+}
+#endif
+
const char *
arm_describe_irq(int irq)
{
Modified: projects/arm_intrng/sys/arm/arm/nexus.c
==============================================================================
--- projects/arm_intrng/sys/arm/arm/nexus.c Sun Dec 21 21:47:57 2014 (r276034)
+++ projects/arm_intrng/sys/arm/arm/nexus.c Sun Dec 21 21:55:58 2014 (r276035)
@@ -39,6 +39,8 @@
* and I/O memory address space.
*/
+#include "opt_platform.h"
+
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -60,10 +62,7 @@ __FBSDID("$FreeBSD$");
#include <machine/resource.h>
#include <machine/intr.h>
-#include "opt_platform.h"
-
#ifdef FDT
-#include <dev/fdt/fdt_common.h>
#include <machine/fdt.h>
#include "ofw_bus_if.h"
#endif
Modified: projects/arm_intrng/sys/arm/at91/at91_machdep.c
==============================================================================
--- projects/arm_intrng/sys/arm/at91/at91_machdep.c Sun Dec 21 21:47:57 2014 (r276034)
+++ projects/arm_intrng/sys/arm/at91/at91_machdep.c Sun Dec 21 21:55:58 2014 (r276035)
@@ -117,8 +117,6 @@ extern struct bus_space at91_bs_tag;
struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
-extern uint32_t at91_master_clock;
-
/* Static device mappings. */
const struct arm_devmap_entry at91_devmap[] = {
/*
Modified: projects/arm_intrng/sys/arm/include/intr.h
==============================================================================
--- projects/arm_intrng/sys/arm/include/intr.h Sun Dec 21 21:47:57 2014 (r276034)
+++ projects/arm_intrng/sys/arm/include/intr.h Sun Dec 21 21:55:58 2014 (r276035)
@@ -57,7 +57,6 @@
/* Interrupt controller features used in arm_register_pic(): */
#define PIC_FEATURE_IPI 0x1
-int arm_fdt_map_irq(phandle_t ic, pcell_t *cells, int ncells);
void arm_register_pic(device_t dev, int features);
void arm_unregister_pic(device_t dev);
void arm_dispatch_irq(device_t dev, struct trapframe *tf, int irq);
@@ -124,4 +123,8 @@ void arm_irq_memory_barrier(uintptr_t);
int gic_decode_fdt(uint32_t iparentnode, uint32_t *intrcells, int *interrupt,
int *trig, int *pol);
+#ifdef FDT
+int arm_fdt_map_irq(phandle_t, pcell_t *, int);
+#endif
+
#endif /* _MACHINE_INTR_H */
Modified: projects/arm_intrng/sys/arm/ti/ti_wdt.c
==============================================================================
--- projects/arm_intrng/sys/arm/ti/ti_wdt.c Sun Dec 21 21:47:57 2014 (r276034)
+++ projects/arm_intrng/sys/arm/ti/ti_wdt.c Sun Dec 21 21:55:58 2014 (r276035)
@@ -95,7 +95,7 @@ static devclass_t ti_wdt_devclass;
DRIVER_MODULE(ti_wdt, simplebus, ti_wdt_driver, ti_wdt_devclass, 0, 0);
-static volatile __inline uint32_t
+static __inline uint32_t
ti_wdt_reg_read(struct ti_wdt_softc *sc, uint32_t reg)
{
Modified: projects/arm_intrng/sys/boot/fdt/dts/arm/pandaboard.dts
==============================================================================
--- projects/arm_intrng/sys/boot/fdt/dts/arm/pandaboard.dts Sun Dec 21 21:47:57 2014 (r276034)
+++ projects/arm_intrng/sys/boot/fdt/dts/arm/pandaboard.dts Sun Dec 21 21:55:58 2014 (r276035)
@@ -58,7 +58,6 @@
interrupt-controller;
#address-cells = <0>;
#interrupt-cells = <1>;
- interrupts = < 0 >;
reg = < 0x48241000 0x1000 >, /* Distributor Registers */
< 0x48240100 0x0100 >; /* CPU Interface Registers */
};
Modified: projects/arm_intrng/sys/boot/uboot/common/main.c
==============================================================================
--- projects/arm_intrng/sys/boot/uboot/common/main.c Sun Dec 21 21:47:57 2014 (r276034)
+++ projects/arm_intrng/sys/boot/uboot/common/main.c Sun Dec 21 21:55:58 2014 (r276035)
@@ -212,10 +212,11 @@ get_load_device(int *type, int *unit, in
p = get_device_type(devstr, type);
- /*
- * Empty device string, or unknown device name, or a bare, known
- * device name.
- */
+ /* Ignore optional spaces after the device name. */
+ while (*p == ' ')
+ p++;
+
+ /* Unknown device name, or a known name without unit number. */
if ((*type == -1) || (*p == '\0')) {
return;
}
Modified: projects/arm_intrng/sys/dev/beri/virtio/virtio.c
==============================================================================
--- projects/arm_intrng/sys/dev/beri/virtio/virtio.c Sun Dec 21 21:47:57 2014 (r276034)
+++ projects/arm_intrng/sys/dev/beri/virtio/virtio.c Sun Dec 21 21:55:58 2014 (r276035)
@@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
+#include <sys/cdefs.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/malloc.h>
@@ -156,7 +157,7 @@ vq_getchain(uint32_t offs, struct vqueue
break;
next = be16toh(vp->next);
}
- paddr_unmap((void *)vindir, be32toh(vdir->len));
+ paddr_unmap(__DEVOLATILE(void *, vindir), be32toh(vdir->len));
}
if ((be16toh(vdir->flags) & VRING_DESC_F_NEXT) == 0)
Modified: projects/arm_intrng/usr.sbin/bsdinstall/scripts/zfsboot
==============================================================================
--- projects/arm_intrng/usr.sbin/bsdinstall/scripts/zfsboot Sun Dec 21 21:47:57 2014 (r276034)
+++ projects/arm_intrng/usr.sbin/bsdinstall/scripts/zfsboot Sun Dec 21 21:55:58 2014 (r276035)
@@ -65,9 +65,9 @@ f_include $BSDCFG_SHARE/variable.subr
: ${ZFSBOOT_VDEV_TYPE:=stripe}
#
-# Should we use gnop(8) to configure a transparent mapping to 4K sectors?
+# Should we use sysctl(8) vfs.zfs.min_auto_ashift=12 to force 4K sectors?
#
-: ${ZFSBOOT_GNOP_4K_FORCE_ALIGN:=1}
+: ${ZFSBOOT_FORCE_4K_SECTORS:=1}
#
# Should we use geli(8) to encrypt the drives?
@@ -185,8 +185,6 @@ ECHO_APPEND='echo "%s" >> "%s"'
GELI_ATTACH='geli attach -j - -k "%s" "%s"'
GELI_DETACH_F='geli detach -f "%s"'
GELI_PASSWORD_INIT='geli init -b -B "%s" -e %s -J - -K "%s" -l 256 -s 4096 "%s"'
-GNOP_CREATE='gnop create -S 4096 "%s"'
-GNOP_DESTROY='gnop destroy "%s"'
GPART_ADD='gpart add -t %s "%s"'
GPART_ADD_INDEX='gpart add -i %s -t %s "%s"'
GPART_ADD_INDEX_WITH_SIZE='gpart add -i %s -t %s -s %s "%s"'
@@ -205,6 +203,7 @@ PRINTF_CONF="printf '%s=\"%%s\"\\\n' %s
PRINTF_FSTAB='printf "$FSTAB_FMT" "%s" "%s" "%s" "%s" "%s" "%s" >> "%s"'
SHELL_TRUNCATE=':> "%s"'
SWAP_GMIRROR_LABEL='gmirror label swap %s'
+SYSCTL_ZFS_MIN_ASHIFT_12='sysctl vfs.zfs.min_auto_ashift=12'
UMOUNT='umount "%s"'
ZFS_CREATE_WITH_OPTIONS='zfs create %s "%s"'
ZFS_SET='zfs set "%s" "%s"'
@@ -236,7 +235,7 @@ msg_encrypt_disks="Encrypt Disks?"
msg_encrypt_disks_help="Use geli(8) to encrypt all data partitions"
msg_error="Error"
msg_force_4k_sectors="Force 4K Sectors?"
-msg_force_4k_sectors_help="Use gnop(8) to configure forced 4K sector alignment"
+msg_force_4k_sectors_help="Use sysctl(8) vfs.zfs.min_auto_ashift=12 to force 4K sectors"
msg_freebsd_installer="FreeBSD Installer"
msg_geli_password="Enter a strong passphrase, used to protect your encryption keys. You will be required to enter this passphrase each time the system is booted"
msg_geli_setup="Initializing encryption on selected disks,\n this will take several seconds per disk"
@@ -315,7 +314,7 @@ dialog_menu_main()
local usegeli="$msg_no"
local swapgeli="$msg_no"
local swapmirror="$msg_no"
- [ "$ZFSBOOT_GNOP_4K_FORCE_ALIGN" ] && force4k="$msg_yes"
+ [ "$ZFSBOOT_FORCE_4K_SECTORS" ] && force4k="$msg_yes"
[ "$ZFSBOOT_GELI_ENCRYPTION" ] && usegeli="$msg_yes"
[ "$ZFSBOOT_SWAP_ENCRYPTION" ] && swapgeli="$msg_yes"
[ "$ZFSBOOT_SWAP_MIRROR" ] && swapmirror="$msg_yes"
@@ -1062,36 +1061,22 @@ zfs_create_boot()
# Prepare the disks and build pool device list(s)
#
f_dprintf "$funcname: Preparing disk partitions for ZFS pool..."
- [ "$ZFSBOOT_GNOP_4K_FORCE_ALIGN" ] &&
- f_dprintf "$funcname: With 4k alignment using gnop(8)..."
+
+ # Force 4K sectors using vfs.zfs.min_auto_ashift=12
+ if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then
+ f_dprintf "$funcname: With 4K sectors..."
+ f_eval_catch $funcname sysctl "$SYSCTL_ZFS_MIN_ASHIFT_12" \
+ || return $FAILURE
+ fi
local n=0
for disk in $disks; do
zfs_create_diskpart $disk $n || return $FAILURE
# Now $bootpart, $targetpart, and $swappart are set (suffix
# for $disk)
-
- # Forced 4k alignment support using Geom NOP (see gnop(8))
- if [ "$ZFSBOOT_GNOP_4K_FORCE_ALIGN" ]; then
- if [ "$ZFSBOOT_BOOT_POOL" ]; then
- boot_vdevs="$boot_vdevs $disk$bootpart.nop"
- f_eval_catch $funcname gnop "$GNOP_CREATE" \
- $disk$bootpart || return $FAILURE
- fi
- # Don't gnop encrypted partition
- if [ "$ZFSBOOT_GELI_ENCRYPTION" ]; then
- zroot_vdevs="$zroot_vdevs $disk$targetpart.eli"
- else
- zroot_vdevs="$zroot_vdevs $disk$targetpart.nop"
- f_eval_catch $funcname gnop "$GNOP_CREATE" \
- $disk$targetpart ||
- return $FAILURE
- fi
- else
- if [ "$ZFSBOOT_BOOT_POOL" ]; then
- boot_vdevs="$boot_vdevs $disk$bootpart"
- fi
- zroot_vdevs="$zroot_vdevs $disk$targetpart"
+ if [ "$ZFSBOOT_BOOT_POOL" ]; then
+ boot_vdevs="$boot_vdevs $disk$bootpart"
fi
+ zroot_vdevs="$zroot_vdevs $disk$targetpart"
n=$(( $n + 1 ))
done # disks
@@ -1266,18 +1251,6 @@ zfs_create_boot()
"$bootpool_name" || return $FAILURE
fi
- # Destroy the gnop devices (if enabled)
- for disk in ${ZFSBOOT_GNOP_4K_FORCE_ALIGN:+$disks}; do
- if [ "$ZFSBOOT_BOOT_POOL" ]; then
- f_eval_catch -d $funcname gnop "$GNOP_DESTROY" \
- $disk$bootpart.nop
- fi
- if [ ! "$ZFSBOOT_GELI_ENCRYPTION" ]; then
- f_eval_catch -d $funcname gnop "$GNOP_DESTROY" \
- $disk$targetpart.nop
- fi
- done
-
# MBR boot loader touch-up
if [ "$ZFSBOOT_PARTITION_SCHEME" = "MBR" ]; then
f_dprintf "$funcname: Updating MBR boot loader on disks..."
@@ -1544,10 +1517,10 @@ while :; do
;;
?" $msg_force_4k_sectors")
# Toggle the variable referenced both by the menu and later
- if [ "$ZFSBOOT_GNOP_4K_FORCE_ALIGN" ]; then
- ZFSBOOT_GNOP_4K_FORCE_ALIGN=
+ if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then
+ ZFSBOOT_FORCE_4K_SECTORS=
else
- ZFSBOOT_GNOP_4K_FORCE_ALIGN=1
+ ZFSBOOT_FORCE_4K_SECTORS=1
fi
;;
?" $msg_encrypt_disks")
@@ -1555,7 +1528,7 @@ while :; do
if [ "$ZFSBOOT_GELI_ENCRYPTION" ]; then
ZFSBOOT_GELI_ENCRYPTION=
else
- ZFSBOOT_GNOP_4K_FORCE_ALIGN=1
+ ZFSBOOT_FORCE_4K_SECTORS=1
ZFSBOOT_GELI_ENCRYPTION=1
fi
;;
More information about the svn-src-projects
mailing list