Date: Mon, 26 Jan 2015 21:41:54 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r277778 - in projects/clang360-import: contrib/llvm/lib/Target/AArch64 contrib/llvm/patches contrib/llvm/tools/clang/include/clang/Driver contrib/llvm/tools/clang/lib/Driver etc etc/def... Message-ID: <201501262141.t0QLfskE086249@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Mon Jan 26 21:41:54 2015 New Revision: 277778 URL: https://svnweb.freebsd.org/changeset/base/277778 Log: Merge ^/head r277719 through 277776. Added: projects/clang360-import/contrib/llvm/patches/patch-06-llvm-r226664-aarch64-x18.diff - copied unchanged from r277776, head/contrib/llvm/patches/patch-29-llvm-r226664-aarch64-x18.diff projects/clang360-import/contrib/llvm/patches/patch-07-clang-r227062-fixes-x18.diff - copied, changed from r277776, head/contrib/llvm/patches/patch-30-clang-r227062-fixes-x18.diff projects/clang360-import/sys/arm/arm/pmu.c - copied unchanged from r277776, head/sys/arm/arm/pmu.c projects/clang360-import/tools/build/options/WITHOUT_AUTOFS - copied unchanged from r277776, head/tools/build/options/WITHOUT_AUTOFS projects/clang360-import/tools/build/options/WITHOUT_BHYVE - copied unchanged from r277776, head/tools/build/options/WITHOUT_BHYVE projects/clang360-import/tools/build/options/WITHOUT_HAST - copied unchanged from r277776, head/tools/build/options/WITHOUT_HAST Deleted: projects/clang360-import/usr.sbin/pw/tests/pw_groupshow.sh projects/clang360-import/usr.sbin/pw/tests/pw_usershow.sh Modified: projects/clang360-import/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp projects/clang360-import/contrib/llvm/tools/clang/include/clang/Driver/Options.td projects/clang360-import/contrib/llvm/tools/clang/lib/Driver/Tools.cpp projects/clang360-import/etc/Makefile projects/clang360-import/etc/defaults/Makefile projects/clang360-import/etc/devd/Makefile projects/clang360-import/etc/pam.d/Makefile projects/clang360-import/etc/rc.d/Makefile projects/clang360-import/lib/Makefile projects/clang360-import/sbin/Makefile projects/clang360-import/share/examples/Makefile projects/clang360-import/share/man/man4/Makefile projects/clang360-import/share/man/man5/Makefile projects/clang360-import/share/man/man5/src.conf.5 projects/clang360-import/share/mk/src.opts.mk projects/clang360-import/sys/amd64/amd64/machdep.c projects/clang360-import/sys/arm/arm/mem.c projects/clang360-import/sys/arm/ti/ti_i2c.c projects/clang360-import/sys/boot/fdt/dts/arm/am335x.dtsi projects/clang360-import/sys/cam/scsi/scsi_da.c projects/clang360-import/sys/conf/kern.opts.mk projects/clang360-import/sys/dev/cxgbe/t4_main.c projects/clang360-import/sys/dev/cxgbe/tom/t4_ddp.c projects/clang360-import/sys/kern/kern_timeout.c projects/clang360-import/sys/kern/subr_sglist.c projects/clang360-import/sys/modules/Makefile projects/clang360-import/sys/modules/iscsi/Makefile projects/clang360-import/tools/build/mk/OptionalObsoleteFiles.inc projects/clang360-import/usr.sbin/Makefile projects/clang360-import/usr.sbin/Makefile.amd64 projects/clang360-import/usr.sbin/pw/pw_group.c projects/clang360-import/usr.sbin/pw/pw_user.c projects/clang360-import/usr.sbin/pw/tests/Makefile Directory Properties: projects/clang360-import/ (props changed) projects/clang360-import/contrib/llvm/ (props changed) projects/clang360-import/contrib/llvm/tools/clang/ (props changed) projects/clang360-import/etc/ (props changed) projects/clang360-import/sbin/ (props changed) projects/clang360-import/share/ (props changed) projects/clang360-import/share/man/man4/ (props changed) projects/clang360-import/sys/ (props changed) projects/clang360-import/sys/boot/ (props changed) projects/clang360-import/sys/conf/ (props changed) Modified: projects/clang360-import/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp ============================================================================== --- projects/clang360-import/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp Mon Jan 26 21:40:56 2015 (r277777) +++ projects/clang360-import/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp Mon Jan 26 21:41:54 2015 (r277778) @@ -33,6 +33,10 @@ using namespace llvm; #define GET_REGINFO_TARGET_DESC #include "AArch64GenRegisterInfo.inc" +static cl::opt<bool> +ReserveX18("aarch64-reserve-x18", cl::Hidden, + cl::desc("Reserve X18, making it unavailable as GPR")); + AArch64RegisterInfo::AArch64RegisterInfo(const AArch64InstrInfo *tii, const AArch64Subtarget *sti) : AArch64GenRegisterInfo(AArch64::LR), TII(tii), STI(sti) {} @@ -90,7 +94,7 @@ AArch64RegisterInfo::getReservedRegs(con Reserved.set(AArch64::W29); } - if (STI->isTargetDarwin()) { + if (STI->isTargetDarwin() || ReserveX18) { Reserved.set(AArch64::X18); // Platform register Reserved.set(AArch64::W18); } @@ -117,7 +121,7 @@ bool AArch64RegisterInfo::isReservedReg( return true; case AArch64::X18: case AArch64::W18: - return STI->isTargetDarwin(); + return STI->isTargetDarwin() || ReserveX18; case AArch64::FP: case AArch64::W29: return TFI->hasFP(MF) || STI->isTargetDarwin(); @@ -379,7 +383,7 @@ unsigned AArch64RegisterInfo::getRegPres case AArch64::GPR64commonRegClassID: return 32 - 1 // XZR/SP - (TFI->hasFP(MF) || STI->isTargetDarwin()) // FP - - STI->isTargetDarwin() // X18 reserved as platform register + - (STI->isTargetDarwin() || ReserveX18) // X18 reserved as platform register - hasBasePointer(MF); // X19 case AArch64::FPR8RegClassID: case AArch64::FPR16RegClassID: Copied: projects/clang360-import/contrib/llvm/patches/patch-06-llvm-r226664-aarch64-x18.diff (from r277776, head/contrib/llvm/patches/patch-29-llvm-r226664-aarch64-x18.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang360-import/contrib/llvm/patches/patch-06-llvm-r226664-aarch64-x18.diff Mon Jan 26 21:41:54 2015 (r277778, copy of r277776, head/contrib/llvm/patches/patch-29-llvm-r226664-aarch64-x18.diff) @@ -0,0 +1,83 @@ +Pull in r226664 from upstream llvm trunk (by Tim Northover): + + AArch64: add backend option to reserve x18 (platform register) + + AAPCS64 says that it's up to the platform to specify whether x18 is + reserved, and a first step on that way is to add a flag controlling + it. + + From: Andrew Turner <andrew@fubar.geek.nz> + +Introduced here: http://svnweb.freebsd.org/changeset/base/277774 + +Index: lib/Target/AArch64/AArch64RegisterInfo.cpp +=================================================================== +--- lib/Target/AArch64/AArch64RegisterInfo.cpp ++++ lib/Target/AArch64/AArch64RegisterInfo.cpp +@@ -33,6 +33,10 @@ using namespace llvm; + #define GET_REGINFO_TARGET_DESC + #include "AArch64GenRegisterInfo.inc" + ++static cl::opt<bool> ++ReserveX18("aarch64-reserve-x18", cl::Hidden, ++ cl::desc("Reserve X18, making it unavailable as GPR")); ++ + AArch64RegisterInfo::AArch64RegisterInfo(const AArch64InstrInfo *tii, + const AArch64Subtarget *sti) + : AArch64GenRegisterInfo(AArch64::LR), TII(tii), STI(sti) {} +@@ -90,7 +94,7 @@ AArch64RegisterInfo::getReservedRegs(const Machine + Reserved.set(AArch64::W29); + } + +- if (STI->isTargetDarwin()) { ++ if (STI->isTargetDarwin() || ReserveX18) { + Reserved.set(AArch64::X18); // Platform register + Reserved.set(AArch64::W18); + } +@@ -117,7 +121,7 @@ bool AArch64RegisterInfo::isReservedReg(const Mach + return true; + case AArch64::X18: + case AArch64::W18: +- return STI->isTargetDarwin(); ++ return STI->isTargetDarwin() || ReserveX18; + case AArch64::FP: + case AArch64::W29: + return TFI->hasFP(MF) || STI->isTargetDarwin(); +@@ -379,7 +383,7 @@ unsigned AArch64RegisterInfo::getRegPressureLimit( + case AArch64::GPR64commonRegClassID: + return 32 - 1 // XZR/SP + - (TFI->hasFP(MF) || STI->isTargetDarwin()) // FP +- - STI->isTargetDarwin() // X18 reserved as platform register ++ - (STI->isTargetDarwin() || ReserveX18) // X18 reserved as platform register + - hasBasePointer(MF); // X19 + case AArch64::FPR8RegClassID: + case AArch64::FPR16RegClassID: +Index: test/CodeGen/AArch64/arm64-platform-reg.ll +=================================================================== +--- test/CodeGen/AArch64/arm64-platform-reg.ll ++++ test/CodeGen/AArch64/arm64-platform-reg.ll +@@ -1,4 +1,5 @@ +-; RUN: llc -mtriple=arm64-apple-ios -o - %s | FileCheck %s --check-prefix=CHECK-DARWIN ++; RUN: llc -mtriple=arm64-apple-ios -o - %s | FileCheck %s --check-prefix=CHECK-RESERVE-X18 ++; RUN: llc -mtriple=arm64-freebsd-gnu -aarch64-reserve-x18 -o - %s | FileCheck %s --check-prefix=CHECK-RESERVE-X18 + ; RUN: llc -mtriple=arm64-linux-gnu -o - %s | FileCheck %s + + ; x18 is reserved as a platform register on Darwin but not on other +@@ -16,11 +17,11 @@ define void @keep_live() { + ; CHECK: ldr x18 + ; CHECK: str x18 + +-; CHECK-DARWIN-NOT: ldr fp +-; CHECK-DARWIN-NOT: ldr x18 +-; CHECK-DARWIN: Spill +-; CHECK-DARWIN-NOT: ldr fp +-; CHECK-DARWIN-NOT: ldr x18 +-; CHECK-DARWIN: ret ++; CHECK-RESERVE-X18-NOT: ldr fp ++; CHECK-RESERVE-X18-NOT: ldr x18 ++; CHECK-RESERVE-X18: Spill ++; CHECK-RESERVE-X18-NOT: ldr fp ++; CHECK-RESERVE-X18-NOT: ldr x18 ++; CHECK-RESERVE-X18: ret + ret void + } Copied and modified: projects/clang360-import/contrib/llvm/patches/patch-07-clang-r227062-fixes-x18.diff (from r277776, head/contrib/llvm/patches/patch-30-clang-r227062-fixes-x18.diff) ============================================================================== --- head/contrib/llvm/patches/patch-30-clang-r227062-fixes-x18.diff Mon Jan 26 21:24:04 2015 (r277776, copy source) +++ projects/clang360-import/contrib/llvm/patches/patch-07-clang-r227062-fixes-x18.diff Mon Jan 26 21:41:54 2015 (r277778) @@ -17,21 +17,20 @@ Index: tools/clang/include/clang/Driver/ =================================================================== --- tools/clang/include/clang/Driver/Options.td +++ tools/clang/include/clang/Driver/Options.td -@@ -1141,6 +1141,9 @@ def mno_long_calls : Flag<["-"], "mno-long-calls"> - def mgeneral_regs_only : Flag<["-"], "mgeneral-regs-only">, Group<m_aarch64_Features_Group>, - HelpText<"Generate code which only uses the general purpose registers (AArch64 only)">; - +@@ -1209,6 +1209,8 @@ def mfix_cortex_a53_835769 : Flag<["-"], "mfix-cor + def mno_fix_cortex_a53_835769 : Flag<["-"], "mno-fix-cortex-a53-835769">, + Group<m_aarch64_Features_Group>, + HelpText<"Don't workaround Cortex-A53 erratum 835769 (AArch64 only)">; +def ffixed_x18 : Flag<["-"], "ffixed-x18">, Group<m_aarch64_Features_Group>, + HelpText<"Reserve the x18 register (AArch64 only)">; -+ + def mvsx : Flag<["-"], "mvsx">, Group<m_ppc_Features_Group>; def mno_vsx : Flag<["-"], "mno-vsx">, Group<m_ppc_Features_Group>; - def mfprnd : Flag<["-"], "mfprnd">, Group<m_ppc_Features_Group>; Index: tools/clang/lib/Driver/Tools.cpp =================================================================== --- tools/clang/lib/Driver/Tools.cpp +++ tools/clang/lib/Driver/Tools.cpp -@@ -887,6 +887,11 @@ void Clang::AddAArch64TargetArgs(const ArgList &Ar +@@ -958,6 +958,11 @@ void Clang::AddAArch64TargetArgs(const ArgList &Ar if (A->getOption().matches(options::OPT_mno_global_merge)) CmdArgs.push_back("-mno-global-merge"); } Modified: projects/clang360-import/contrib/llvm/tools/clang/include/clang/Driver/Options.td ============================================================================== --- projects/clang360-import/contrib/llvm/tools/clang/include/clang/Driver/Options.td Mon Jan 26 21:40:56 2015 (r277777) +++ projects/clang360-import/contrib/llvm/tools/clang/include/clang/Driver/Options.td Mon Jan 26 21:41:54 2015 (r277778) @@ -1209,6 +1209,8 @@ def mfix_cortex_a53_835769 : Flag<["-"], def mno_fix_cortex_a53_835769 : Flag<["-"], "mno-fix-cortex-a53-835769">, Group<m_aarch64_Features_Group>, HelpText<"Don't workaround Cortex-A53 erratum 835769 (AArch64 only)">; +def ffixed_x18 : Flag<["-"], "ffixed-x18">, Group<m_aarch64_Features_Group>, + HelpText<"Reserve the x18 register (AArch64 only)">; def mvsx : Flag<["-"], "mvsx">, Group<m_ppc_Features_Group>; def mno_vsx : Flag<["-"], "mno-vsx">, Group<m_ppc_Features_Group>; Modified: projects/clang360-import/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- projects/clang360-import/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Mon Jan 26 21:40:56 2015 (r277777) +++ projects/clang360-import/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Mon Jan 26 21:41:54 2015 (r277778) @@ -958,6 +958,11 @@ void Clang::AddAArch64TargetArgs(const A if (A->getOption().matches(options::OPT_mno_global_merge)) CmdArgs.push_back("-mno-global-merge"); } + + if (Args.hasArg(options::OPT_ffixed_x18)) { + CmdArgs.push_back("-backend-option"); + CmdArgs.push_back("-aarch64-reserve-x18"); + } } // Get CPU and ABI names. They are not independent Modified: projects/clang360-import/etc/Makefile ============================================================================== --- projects/clang360-import/etc/Makefile Mon Jan 26 21:40:56 2015 (r277777) +++ projects/clang360-import/etc/Makefile Mon Jan 26 21:41:54 2015 (r277778) @@ -14,8 +14,7 @@ SUBDIR+=sendmail SUBDIR+=tests .endif -BIN1= auto_master \ - crontab \ +BIN1= crontab \ devd.conf \ devfs.conf \ ddb.conf \ @@ -90,6 +89,10 @@ BIN1+= amd.map BIN1+= apmd.conf .endif +.if ${MK_AUTOFS} != "no" +BIN1+= auto_master +.endif + .if ${MK_BSNMP} != "no" BIN1+= snmpd.config .endif @@ -229,7 +232,9 @@ distribution: echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \ ) | ${METALOG.add} .endif +.if ${MK_AUTOFS} != "no" ${_+_}cd ${.CURDIR}/autofs; ${MAKE} install +.endif .if ${MK_BLUETOOTH} != "no" ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif Modified: projects/clang360-import/etc/defaults/Makefile ============================================================================== --- projects/clang360-import/etc/defaults/Makefile Mon Jan 26 21:40:56 2015 (r277777) +++ projects/clang360-import/etc/defaults/Makefile Mon Jan 26 21:41:54 2015 (r277778) @@ -1,7 +1,13 @@ # $FreeBSD$ -FILES= bluetooth.device.conf devfs.rules periodic.conf rc.conf +.include <src.opts.mk> + +FILES= devfs.rules periodic.conf rc.conf NO_OBJ= FILESDIR= /etc/defaults +.if ${MK_BLUETOOTH} != "no" +FILES+= bluetooth.device.conf +.endif + .include <bsd.prog.mk> Modified: projects/clang360-import/etc/devd/Makefile ============================================================================== --- projects/clang360-import/etc/devd/Makefile Mon Jan 26 21:40:56 2015 (r277777) +++ projects/clang360-import/etc/devd/Makefile Mon Jan 26 21:41:54 2015 (r277778) @@ -2,12 +2,16 @@ .include <src.opts.mk> +FILES= + .if ${MACHINE} == "powerpc" FILES+= apple.conf .endif .if ${MACHINE} == "amd64" || ${MACHINE} == "i386" +.if ${MK_ACPI} != "no" FILES+= asus.conf +.endif .if ${MK_HYPERV} != "no" FILES+= hyperv.conf .endif Modified: projects/clang360-import/etc/pam.d/Makefile ============================================================================== --- projects/clang360-import/etc/pam.d/Makefile Mon Jan 26 21:40:56 2015 (r277777) +++ projects/clang360-import/etc/pam.d/Makefile Mon Jan 26 21:41:54 2015 (r277778) @@ -1,9 +1,10 @@ # $FreeBSD$ +.include <src.opts.mk> + NO_OBJ= FILES= README \ - atrun \ cron \ ftpd \ imap \ @@ -15,6 +16,10 @@ FILES= README \ telnetd \ xdm +.if ${MK_AT} != "no" +FILES+= atrun +.endif + FILESDIR= /etc/pam.d FILESMODE= 644 FILESMODE_README= 444 Modified: projects/clang360-import/etc/rc.d/Makefile ============================================================================== --- projects/clang360-import/etc/rc.d/Makefile Mon Jan 26 21:40:56 2015 (r277777) +++ projects/clang360-import/etc/rc.d/Makefile Mon Jan 26 21:41:54 2015 (r277778) @@ -11,18 +11,12 @@ FILES= DAEMON \ accounting \ addswap \ adjkerntz \ - amd \ - apm \ - apmd \ archdep \ atm1 \ atm2 \ atm3 \ auditd \ auditdistd \ - automount \ - automountd \ - autounmountd \ bgfsck \ ${_bluetooth} \ bootparams \ @@ -48,7 +42,6 @@ FILES= DAEMON \ gptboot \ growfs \ gssd \ - hastd \ ${_hcsecd} \ hostapd \ hostid \ @@ -61,10 +54,7 @@ FILES= DAEMON \ ipfw \ ipmon \ ipnat \ - ipropd_master \ - ipropd_slave \ ipsec \ - jail \ ${_kadmind} \ ${_kdc} \ ${_kfd} \ @@ -75,7 +65,6 @@ FILES= DAEMON \ local \ localpkg \ lockd \ - lpd \ mixer \ motd \ mountcritlocal \ @@ -107,7 +96,6 @@ FILES= DAEMON \ pflog \ pfsync \ powerd \ - power_profile \ ppp \ pppoed \ pwcheck \ @@ -159,6 +147,29 @@ FILES= DAEMON \ zfs \ zvol +.if ${MK_ACCT} != "no" +FILES+= accounting +.endif + +.if ${MK_ACPI} != "no" +FILES+= power_profile +.endif + +.if ${MK_AMD} != "no" +FILES+= amd +.endif + +.if ${MK_APM} != "no" +FILES+= apm +FILES+= apmd +.endif + +.if ${MK_AUTOFS} != "no" +FILES+= automount +FILES+= automountd +FILES+= autounmountd +.endif + .if ${MK_BLUETOOTH} != "no" _bluetooth= bluetooth _bthidd= bthidd @@ -178,16 +189,30 @@ _casperd= casperd FILES+= ccd .endif +.if ${MK_HAST} != "no" +FILES+= hastd +.endif + .if ${MK_ISCSI} != "no" FILES+= iscsictl FILES+= iscsid .endif +.if ${MK_JAIL} != "no" +FILES+= jail +.endif + +.if ${MK_LPR} != "no" +FILES+= lpd +.endif + .if ${MK_NS_CACHING} != "no" _nscd= nscd .endif .if ${MK_KERBEROS} != "no" +FILES+= ipropd_master +FILES+= ipropd_slave _kadmind= kadmind _kdc= kdc _kfd= kfd @@ -222,6 +247,11 @@ _unbound= local_unbound _utx= utx .endif +.if ${MK_WIRELESS} != "no" +FILES+= hostapd +FILES+= wpa_supplicant +.endif + FILESDIR= /etc/rc.d FILESMODE= ${BINMODE} Modified: projects/clang360-import/lib/Makefile ============================================================================== --- projects/clang360-import/lib/Makefile Mon Jan 26 21:40:56 2015 (r277777) +++ projects/clang360-import/lib/Makefile Mon Jan 26 21:41:54 2015 (r277778) @@ -258,8 +258,10 @@ _librtld_db= librtld_db .endif .if ${MACHINE_CPUARCH} == "amd64" +.if ${MK_BHYVE} != "no" _libvmmapi= libvmmapi .endif +.endif .if ${MACHINE_CPUARCH} == "mips" _libproc= libproc Modified: projects/clang360-import/sbin/Makefile ============================================================================== --- projects/clang360-import/sbin/Makefile Mon Jan 26 21:40:56 2015 (r277777) +++ projects/clang360-import/sbin/Makefile Mon Jan 26 21:41:54 2015 (r277778) @@ -30,8 +30,6 @@ SUBDIR=adjkerntz \ ggate \ growfs \ gvinum \ - hastctl \ - hastd \ ifconfig \ init \ kldconfig \ @@ -88,6 +86,11 @@ SUBDIR+= ccdconfig SUBDIR+= devd .endif +.if ${MK_HAST} != "no" +SUBDIR+= hastctl +SUBDIR+= hastd +.endif + .if ${MK_IPFILTER} != "no" SUBDIR+= ipf .endif @@ -97,6 +100,10 @@ SUBDIR+= ipfw SUBDIR+= natd .endif +.if ${MK_ISCSI} != "no" +SUBDIR+= iscontrol +.endif + .if ${MK_NAND} != "no" SUBDIR+= nandfs SUBDIR+= newfs_nandfs Modified: projects/clang360-import/share/examples/Makefile ============================================================================== --- projects/clang360-import/share/examples/Makefile Mon Jan 26 21:40:56 2015 (r277777) +++ projects/clang360-import/share/examples/Makefile Mon Jan 26 21:41:54 2015 (r277778) @@ -7,14 +7,12 @@ LDIRS= BSD_daemon \ FreeBSD_version \ IPv6 \ - bhyve \ bootforth \ csh \ diskless \ drivers \ etc \ find_interface \ - hast \ ibcs2 \ indent \ ipfw \ @@ -42,7 +40,6 @@ XFILES= BSD_daemon/FreeBSD.pfa \ FreeBSD_version/Makefile \ FreeBSD_version/README \ IPv6/USAGE \ - bhyve/vmrun.sh \ bootforth/README \ bootforth/boot.4th \ bootforth/frames.4th \ @@ -64,11 +61,6 @@ XFILES= BSD_daemon/FreeBSD.pfa \ find_interface/Makefile \ find_interface/README \ find_interface/find_interface.c \ - hast/ucarp.sh \ - hast/ucarp_down.sh \ - hast/ucarp_up.sh \ - hast/vip-down.sh \ - hast/vip-up.sh \ ibcs2/README \ ibcs2/hello.uu \ indent/indent.pro \ @@ -202,6 +194,22 @@ BINDIR= ${SHAREDIR}/examples NO_OBJ= +.if ${MK_HAST} != "no" +LDIRS+= hast +XFILES+= hast/ucarp.sh \ + hast/ucarp_down.sh \ + hast/ucarp_up.sh \ + hast/vip-down.sh \ + hast/vip-up.sh +.endif + +.if ${MACHINE_CPUARCH} == "amd64" +.if ${MK_BHYVE} != "no" +LDIRS+= bhyve +XFILES+= bhyve/vmrun.sh +.endif +.endif + # Define SHARED to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies''); (latter useful # in environments where it's not possible to keep /sys publicly readable) Modified: projects/clang360-import/share/man/man4/Makefile ============================================================================== --- projects/clang360-import/share/man/man4/Makefile Mon Jan 26 21:40:56 2015 (r277777) +++ projects/clang360-import/share/man/man4/Makefile Mon Jan 26 21:41:54 2015 (r277778) @@ -835,7 +835,6 @@ _xnb.4= xnb.4 .endif .if ${MACHINE_CPUARCH} == "amd64" -_bhyve.4= bhyve.4 _if_ntb.4= if_ntb.4 _ntb.4= ntb.4 _ntb_hw.4= ntb_hw.4 @@ -848,6 +847,10 @@ MLINKS+=qlxge.4 if_qlxge.4 MLINKS+=qlxgb.4 if_qlxgb.4 MLINKS+=qlxgbe.4 if_qlxgbe.4 MLINKS+=sfxge.4 if_sfxge.4 + +.if ${MK_BHYVE} != "no" +_bhyve.4= bhyve.4 +.endif .endif .if ${MACHINE_CPUARCH} == "mips" Modified: projects/clang360-import/share/man/man5/Makefile ============================================================================== --- projects/clang360-import/share/man/man5/Makefile Mon Jan 26 21:40:56 2015 (r277777) +++ projects/clang360-import/share/man/man5/Makefile Mon Jan 26 21:41:54 2015 (r277778) @@ -7,7 +7,6 @@ MAN= acct.5 \ ar.5 \ a.out.5 \ - autofs.5 \ bluetooth.device.conf.5 \ bluetooth.hosts.5 \ bluetooth.protocols.5 \ @@ -80,6 +79,10 @@ MLINKS+=quota.user.5 quota.group.5 MLINKS+=rc.conf.5 rc.conf.local.5 MLINKS+=resolver.5 resolv.conf.5 +.if ${MK_AUTOFS} != "no" +MAN+= autofs.5 +.endif + .if ${MK_FREEBSD_UPDATE} != "no" MAN+= freebsd-update.conf.5 .endif Modified: projects/clang360-import/share/man/man5/src.conf.5 ============================================================================== --- projects/clang360-import/share/man/man5/src.conf.5 Mon Jan 26 21:40:56 2015 (r277777) +++ projects/clang360-import/share/man/man5/src.conf.5 Mon Jan 26 21:41:54 2015 (r277778) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd January 24, 2015 +.Dd January 25, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -121,6 +121,18 @@ Set to not build audit support into syst .\" from FreeBSD: head/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 07:50:50Z ru Set to not build .Xr authpf 8 . +.It Va WITHOUT_AUTOFS +.\" from FreeBSD: head/tools/build/options/WITHOUT_AUTOFS 277728 2015-01-26 07:15:49Z ngie +Set to not build +.Xr autofs 4 +related programs, libraries, and kernel modules. +.It Va WITHOUT_BHYVE +.\" from FreeBSD: head/tools/build/options/WITHOUT_BHYVE 277727 2015-01-26 06:44:48Z ngie +Set to not build or install +.Xr bhyve 8 , +associated utilities, and examples. +.Pp +This option only affects amd64/amd64. .It Va WITHOUT_BINUTILS .\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS 266158 2014-05-15 16:51:45Z brooks Set to not build or install binutils (as, c++-filt, gconv, @@ -543,6 +555,11 @@ You should consider installing the textp .It Va WITHOUT_GSSAPI .\" from FreeBSD: head/tools/build/options/WITHOUT_GSSAPI 174548 2007-12-12 16:39:32Z ru Set to not build libgssapi. +.It Va WITHOUT_HAST +.\" from FreeBSD: head/tools/build/options/WITHOUT_HAST 277725 2015-01-26 06:27:07Z ngie +Set to not build +.Xr hastd 8 +and related utilities. .It Va WITH_HESIOD .\" from FreeBSD: head/tools/build/options/WITH_HESIOD 156932 2006-03-21 07:50:50Z ru Set to build Hesiod support. Modified: projects/clang360-import/share/mk/src.opts.mk ============================================================================== --- projects/clang360-import/share/mk/src.opts.mk Mon Jan 26 21:40:56 2015 (r277777) +++ projects/clang360-import/share/mk/src.opts.mk Mon Jan 26 21:41:54 2015 (r277778) @@ -52,6 +52,8 @@ __DEFAULT_YES_OPTIONS = \ ATM \ AUDIT \ AUTHPF \ + AUTOFS \ + BHYVE \ BINUTILS \ BINUTILS_BOOTSTRAP \ BLUETOOTH \ @@ -92,6 +94,7 @@ __DEFAULT_YES_OPTIONS = \ GPIO \ GPL_DTC \ GROFF \ + HAST \ HTML \ HYPERV \ ICONV \ Modified: projects/clang360-import/sys/amd64/amd64/machdep.c ============================================================================== --- projects/clang360-import/sys/amd64/amd64/machdep.c Mon Jan 26 21:40:56 2015 (r277777) +++ projects/clang360-import/sys/amd64/amd64/machdep.c Mon Jan 26 21:41:54 2015 (r277778) @@ -1355,8 +1355,10 @@ add_physmap_entry(uint64_t base, uint64_ /* * Find insertion point while checking for overlap. Start off by * assuming the new entry will be added to the end. + * + * NB: physmap_idx points to the next free slot. */ - insert_idx = physmap_idx + 2; + insert_idx = physmap_idx; for (i = 0; i <= physmap_idx; i += 2) { if (base < physmap[i + 1]) { if (base + length <= physmap[i]) { @@ -1394,7 +1396,7 @@ add_physmap_entry(uint64_t base, uint64_ * Move the last 'N' entries down to make room for the new * entry if needed. */ - for (i = physmap_idx; i > insert_idx; i -= 2) { + for (i = (physmap_idx - 2); i > insert_idx; i -= 2) { physmap[i] = physmap[i - 2]; physmap[i + 1] = physmap[i - 1]; } @@ -1580,23 +1582,27 @@ getmemsize(caddr_t kmdp, u_int64_t first int page_counter; bzero(physmap, sizeof(physmap)); - basemem = 0; physmap_idx = 0; init_ops.parse_memmap(kmdp, physmap, &physmap_idx); + physmap_idx -= 2; /* * Find the 'base memory' segment for SMP */ basemem = 0; for (i = 0; i <= physmap_idx; i += 2) { - if (physmap[i] == 0x00000000) { + if (physmap[i] <= 0xA0000) { basemem = physmap[i + 1] / 1024; break; } } - if (basemem == 0) - panic("BIOS smap did not include a basemem segment!"); + if (basemem == 0 || basemem > 640) { + if (bootverbose) + printf( + "Memory map doesn't contain a basemem segment, faking it"); + basemem = 640; + } /* * Make hole for "AP -> long mode" bootstrap code. The @@ -1604,8 +1610,12 @@ getmemsize(caddr_t kmdp, u_int64_t first * is configured to support APs and APs for the system start * in 32bit mode (e.g. SMP bare metal). */ - if (init_ops.mp_bootaddress) + if (init_ops.mp_bootaddress) { + if (physmap[1] >= 0x100000000) + panic( + "Basemem segment is not suitable for AP bootstrap code!"); physmap[1] = init_ops.mp_bootaddress(physmap[1] / 1024); + } /* * Maxmem isn't the "maximum memory", it's one larger than the @@ -1657,12 +1667,14 @@ getmemsize(caddr_t kmdp, u_int64_t first */ physmem_start = (vm_guest > VM_GUEST_NO ? 1 : 16) << PAGE_SHIFT; TUNABLE_ULONG_FETCH("hw.physmem.start", &physmem_start); - if (physmem_start < PAGE_SIZE) - physmap[0] = PAGE_SIZE; - else if (physmem_start >= physmap[1]) - physmap[0] = round_page(physmap[1] - PAGE_SIZE); - else - physmap[0] = round_page(physmem_start); + if (physmap[0] < physmem_start) { + if (physmem_start < PAGE_SIZE) + physmap[0] = PAGE_SIZE; + else if (physmem_start >= physmap[1]) + physmap[0] = round_page(physmap[1] - PAGE_SIZE); + else + physmap[0] = round_page(physmem_start); + } pa_indx = 0; da_indx = 1; phys_avail[pa_indx++] = physmap[0]; Modified: projects/clang360-import/sys/arm/arm/mem.c ============================================================================== --- projects/clang360-import/sys/arm/arm/mem.c Mon Jan 26 21:40:56 2015 (r277777) +++ projects/clang360-import/sys/arm/arm/mem.c Mon Jan 26 21:41:54 2015 (r277778) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include <sys/mutex.h> #include <sys/proc.h> #include <sys/signalvar.h> +#include <sys/sx.h> #include <sys/systm.h> #include <sys/uio.h> @@ -72,6 +73,9 @@ MALLOC_DEFINE(M_MEMDESC, "memdesc", "mem struct mem_range_softc mem_range_softc; +static struct sx tmppt_lock; +SX_SYSINIT(tmppt, &tmppt_lock, "mem4map"); + /* ARGSUSED */ int memrw(struct cdev *dev, struct uio *uio, int flags) @@ -107,6 +111,7 @@ memrw(struct cdev *dev, struct uio *uio, } if (!address_valid) return (EINVAL); + sx_xlock(&tmppt_lock); pmap_kenter((vm_offset_t)_tmppt, v); o = (int)uio->uio_offset & PAGE_MASK; c = (u_int)(PAGE_SIZE - ((int)iov->iov_base & PAGE_MASK)); @@ -114,6 +119,7 @@ memrw(struct cdev *dev, struct uio *uio, c = min(c, (u_int)iov->iov_len); error = uiomove((caddr_t)&_tmppt[o], (int)c, uio); pmap_qremove((vm_offset_t)_tmppt, 1); + sx_xunlock(&tmppt_lock); continue; } else if (dev2unit(dev) == CDEV_MINOR_KMEM) { Copied: projects/clang360-import/sys/arm/arm/pmu.c (from r277776, head/sys/arm/arm/pmu.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang360-import/sys/arm/arm/pmu.c Mon Jan 26 21:41:54 2015 (r277778, copy of r277776, head/sys/arm/arm/pmu.c) @@ -0,0 +1,157 @@ +/*- + * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com> + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Performance Monitoring Unit + */ + +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + +#include "opt_hwpmc_hooks.h" + +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/bus.h> +#include <sys/kernel.h> +#include <sys/module.h> +#include <sys/malloc.h> +#include <sys/rman.h> +#include <sys/timeet.h> +#include <sys/timetc.h> +#include <sys/pmc.h> +#include <sys/pmckern.h> + +#include <dev/fdt/fdt_common.h> +#include <dev/ofw/openfirm.h> +#include <dev/ofw/ofw_bus.h> +#include <dev/ofw/ofw_bus_subr.h> + +#include <machine/bus.h> +#include <machine/fdt.h> +#include <machine/cpu.h> +#include <machine/intr.h> + +struct pmu_softc { + struct resource *res[1]; + device_t dev; + void *ih; +}; + +static struct ofw_compat_data compat_data[] = { + {"arm,cortex-a17-pmu", 1}, + {"arm,cortex-a15-pmu", 1}, + {"arm,cortex-a12-pmu", 1}, + {"arm,cortex-a9-pmu", 1}, + {"arm,cortex-a8-pmu", 1}, + {"arm,cortex-a7-pmu", 1}, + {"arm,cortex-a5-pmu", 1}, + {"arm,arm11mpcore-pmu", 1}, + {"arm,arm1176-pmu", 1}, + {"arm,arm1136-pmu", 1}, + {"qcom,krait-pmu", 1}, + {NULL, 0} +}; + +static struct resource_spec pmu_spec[] = { + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { -1, 0 } +}; + +static int +pmu_intr(void *arg) +{ + struct trapframe *tf; + + tf = arg; + +#ifdef HWPMC_HOOKS + if (pmc_intr) + (*pmc_intr)(PCPU_GET(cpuid), tf); +#endif + + return (FILTER_HANDLED); +} + +static int +pmu_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { + device_set_desc(dev, "Performance Monitoring Unit"); + return (BUS_PROBE_DEFAULT); + } + + return (ENXIO); +} + +static int +pmu_attach(device_t dev) +{ + struct pmu_softc *sc; + int err; + + sc = device_get_softc(dev); + sc->dev = dev; + + if (bus_alloc_resources(dev, pmu_spec, sc->res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + /* Setup interrupt handler */ + err = bus_setup_intr(dev, sc->res[0], INTR_MPSAFE | INTR_TYPE_MISC, + pmu_intr, NULL, NULL, &sc->ih); + if (err) { + device_printf(dev, "Unable to setup interrupt handler.\n"); + return (ENXIO); + } + + return (0); +} + +static device_method_t pmu_methods[] = { + DEVMETHOD(device_probe, pmu_probe), + DEVMETHOD(device_attach, pmu_attach), + { 0, 0 } +}; + +static driver_t pmu_driver = { + "pmu", + pmu_methods, + sizeof(struct pmu_softc), +}; + +static devclass_t pmu_devclass; + +DRIVER_MODULE(pmu, simplebus, pmu_driver, pmu_devclass, 0, 0); Modified: projects/clang360-import/sys/arm/ti/ti_i2c.c ============================================================================== --- projects/clang360-import/sys/arm/ti/ti_i2c.c Mon Jan 26 21:40:56 2015 (r277777) +++ projects/clang360-import/sys/arm/ti/ti_i2c.c Mon Jan 26 21:41:54 2015 (r277778) @@ -95,6 +95,7 @@ struct ti_i2c_softc int sc_buffer_pos; int sc_error; int sc_fifo_trsh; + int sc_timeout; uint16_t sc_con_reg; uint16_t sc_rev; @@ -442,7 +443,7 @@ ti_i2c_transfer(device_t dev, struct iic ti_i2c_write_2(sc, I2C_REG_CON, reg); /* Wait for an event. */ - err = mtx_sleep(sc, &sc->sc_mtx, 0, "i2ciowait", hz); + err = mtx_sleep(sc, &sc->sc_mtx, 0, "i2ciowait", sc->sc_timeout); if (err == 0) err = sc->sc_error; @@ -761,12 +762,10 @@ ti_i2c_deactivate(device_t dev) static int ti_i2c_sysctl_clk(SYSCTL_HANDLER_ARGS) { - device_t dev; int clk, psc, sclh, scll; struct ti_i2c_softc *sc; - dev = (device_t)arg1; - sc = device_get_softc(dev); + sc = arg1; TI_I2C_LOCK(sc); /* Get the system prescaler value. */ @@ -783,6 +782,34 @@ ti_i2c_sysctl_clk(SYSCTL_HANDLER_ARGS) } static int +ti_i2c_sysctl_timeout(SYSCTL_HANDLER_ARGS) +{ + struct ti_i2c_softc *sc; + unsigned int val; + int err; + + sc = arg1; + + /* + * MTX_DEF lock can't be held while doing uimove in + * sysctl_handle_int + */ + TI_I2C_LOCK(sc); + val = sc->sc_timeout; + TI_I2C_UNLOCK(sc); + + err = sysctl_handle_int(oidp, &val, 0, req); + /* Write request? */ + if ((err == 0) && (req->newptr != NULL)) { + TI_I2C_LOCK(sc); + sc->sc_timeout = val; + TI_I2C_UNLOCK(sc); + } + + return (err); +} + +static int ti_i2c_probe(device_t dev) { @@ -858,12 +885,19 @@ ti_i2c_attach(device_t dev) /* Set the FIFO threshold to 5 for now. */ sc->sc_fifo_trsh = 5; + /* Set I2C bus timeout */ + sc->sc_timeout = 5*hz; + ctx = device_get_sysctl_ctx(dev); tree = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "i2c_clock", - CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_MPSAFE, dev, 0, + CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_MPSAFE, sc, 0, ti_i2c_sysctl_clk, "IU", "I2C bus clock"); + SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "i2c_timeout", + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_MPSAFE, sc, 0, + ti_i2c_sysctl_timeout, "IU", "I2C bus timeout (in ticks)"); + /* Activate the interrupt. */ err = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_MISC | INTR_MPSAFE, NULL, ti_i2c_intr, sc, &sc->sc_irq_h); Modified: projects/clang360-import/sys/boot/fdt/dts/arm/am335x.dtsi ============================================================================== --- projects/clang360-import/sys/boot/fdt/dts/arm/am335x.dtsi Mon Jan 26 21:40:56 2015 (r277777) +++ projects/clang360-import/sys/boot/fdt/dts/arm/am335x.dtsi Mon Jan 26 21:41:54 2015 (r277778) @@ -47,6 +47,11 @@ reg = < 0x48200000 0x1000 >; }; + pmu { + compatible = "arm,cortex-a8-pmu"; + interrupts = <3>; + }; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501262141.t0QLfskE086249>