From owner-svn-soc-all@FreeBSD.ORG Sun Sep 2 15:29:42 2012 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id E35B51065673 for ; Sun, 2 Sep 2012 15:29:39 +0000 (UTC) (envelope-from aleek@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Sun, 02 Sep 2012 15:29:39 +0000 Date: Sun, 02 Sep 2012 15:29:39 +0000 From: aleek@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20120902152939.E35B51065673@hub.freebsd.org> Cc: Subject: socsvn commit: r241179 - in soc2012/aleek/beaglexm-armv6/sys: arm/conf arm/ti boot/fdt/dts X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 15:29:42 -0000 Author: aleek Date: Sun Sep 2 15:29:37 2012 New Revision: 241179 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=241179 Log: Added reseting usb hub. It is done via DTS file - first, voltages are set to 0, which causes disabling voltage regulator, and then the same voltage regulators are set to proper volates which causes enabling regulators and setting them to proper values Modified: soc2012/aleek/beaglexm-armv6/sys/arm/conf/BEAGLEBOARD-XM soc2012/aleek/beaglexm-armv6/sys/arm/ti/ti_machdep.c soc2012/aleek/beaglexm-armv6/sys/boot/fdt/dts/beagleboardxm.dts Modified: soc2012/aleek/beaglexm-armv6/sys/arm/conf/BEAGLEBOARD-XM ============================================================================== --- soc2012/aleek/beaglexm-armv6/sys/arm/conf/BEAGLEBOARD-XM Sun Sep 2 14:56:04 2012 (r241178) +++ soc2012/aleek/beaglexm-armv6/sys/arm/conf/BEAGLEBOARD-XM Sun Sep 2 15:29:37 2012 (r241179) @@ -60,7 +60,7 @@ #options WITNESS #Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed #options DIAGNOSTIC -#options DEBUG +options DEBUG # MMC/SD/SDIO card slot support Modified: soc2012/aleek/beaglexm-armv6/sys/arm/ti/ti_machdep.c ============================================================================== --- soc2012/aleek/beaglexm-armv6/sys/arm/ti/ti_machdep.c Sun Sep 2 14:56:04 2012 (r241178) +++ soc2012/aleek/beaglexm-armv6/sys/arm/ti/ti_machdep.c Sun Sep 2 15:29:37 2012 (r241179) @@ -334,6 +334,7 @@ kmdp = preload_search_by_type("elf kernel"); if (kmdp != NULL) { boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int); + boothowto |= RB_SINGLE; kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *); dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t); lastaddr = MD_FETCH(kmdp, MODINFOMD_KERNEND, @@ -349,6 +350,7 @@ /* Fall back to hardcoded metadata. */ lastaddr = fake_preload_metadata(); } + boothowto |= RB_SINGLE; #if defined(FDT_DTB_STATIC) /* Modified: soc2012/aleek/beaglexm-armv6/sys/boot/fdt/dts/beagleboardxm.dts ============================================================================== --- soc2012/aleek/beaglexm-armv6/sys/boot/fdt/dts/beagleboardxm.dts Sun Sep 2 14:56:04 2012 (r241178) +++ soc2012/aleek/beaglexm-armv6/sys/boot/fdt/dts/beagleboardxm.dts Sun Sep 2 15:29:37 2012 (r241179) @@ -124,14 +124,13 @@ compatible = "ti,twl4030"; reg = < 0x48 >; voltage-regulators = - "vaux2", "0", + "vusb1v5", "0", + "vusb1v8", "0", + "vusb3v1", "0", "vusb1v5", "1500", "vusb1v8", "1800", "vusb3v1", "3100", - "vaux2", "1800", - "vusb1v5", "0", - "vusb1v8", "0", - "vusb3v1", "0"; + "vaux2", "1800"; }; }; @@ -193,7 +192,7 @@ mmchs-device-id = <1>; }; -/* + ehci@48064800 { compatible = "ti,ehci"; /* @@ -206,16 +205,16 @@ * * reset indicates (if non-zero) if port reset is required * gpio_pin - GPIO pin that is used to perform reset - * + */ phy-config = < 1 0 0 1 1 147 0 0 0>; - reg = < 0x48064800 0x400 /* EHCI * - 0x48064000 0x400 /* UHH * - 0x48062000 0x1000 /* TLL * >; + reg = < 0x48064800 0x400 /* EHCI */ + 0x48064000 0x400 /* UHH */ + 0x48062000 0x1000 /* TLL */ >; interrupts = < 77 >; interrupt-parent = <&AINTC>; - };*/ + }; }; chosen { From owner-svn-soc-all@FreeBSD.ORG Sun Sep 2 15:48:07 2012 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 476BE106566C for ; Sun, 2 Sep 2012 15:48:05 +0000 (UTC) (envelope-from aleek@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Sun, 02 Sep 2012 15:48:05 +0000 Date: Sun, 02 Sep 2012 15:48:05 +0000 From: aleek@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20120902154805.476BE106566C@hub.freebsd.org> Cc: Subject: socsvn commit: r241180 - in soc2012/aleek/beaglexm-armv6/sys/arm: arm include X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 15:48:07 -0000 Author: aleek Date: Sun Sep 2 15:48:04 2012 New Revision: 241180 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=241180 Log: applied gonzo-'s patch for external non-linefetch abort Modified: soc2012/aleek/beaglexm-armv6/sys/arm/arm/busdma_machdep-v6.c soc2012/aleek/beaglexm-armv6/sys/arm/include/atomic.h Modified: soc2012/aleek/beaglexm-armv6/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- soc2012/aleek/beaglexm-armv6/sys/arm/arm/busdma_machdep-v6.c Sun Sep 2 15:29:37 2012 (r241179) +++ soc2012/aleek/beaglexm-armv6/sys/arm/arm/busdma_machdep-v6.c Sun Sep 2 15:48:04 2012 (r241180) @@ -618,10 +618,6 @@ } dmat->map_count++; - if (flags & BUS_DMA_COHERENT) - pmap_change_attr((vm_offset_t)*vaddr, len, - BUS_DMA_NOCACHE); - CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->flags, 0); return (0); Modified: soc2012/aleek/beaglexm-armv6/sys/arm/include/atomic.h ============================================================================== --- soc2012/aleek/beaglexm-armv6/sys/arm/include/atomic.h Sun Sep 2 15:29:37 2012 (r241179) +++ soc2012/aleek/beaglexm-armv6/sys/arm/include/atomic.h Sun Sep 2 15:48:04 2012 (r241180) @@ -59,8 +59,8 @@ #endif /* XXX: Rethink for userland later as those won't be defined */ -//#if ARM_ARCH_6 || ARM_ARCH_7A -#if 0 +#if ARM_ARCH_6 || ARM_ARCH_7A +//#if 0 static __inline void __do_dmb(void) From owner-svn-soc-all@FreeBSD.ORG Wed Sep 5 18:09:21 2012 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 52F781065670 for ; Wed, 5 Sep 2012 18:09:19 +0000 (UTC) (envelope-from rudot@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Wed, 05 Sep 2012 18:09:19 +0000 Date: Wed, 05 Sep 2012 18:09:19 +0000 From: rudot@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20120905180919.52F781065670@hub.freebsd.org> Cc: Subject: socsvn commit: r241312 - soc2012/rudot/sys/kern X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 18:09:21 -0000 Author: rudot Date: Wed Sep 5 18:09:19 2012 New Revision: 241312 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=241312 Log: change RACCT_PCPU_IGNORE into sysctl Modified: soc2012/rudot/sys/kern/kern_racct.c Modified: soc2012/rudot/sys/kern/kern_racct.c ============================================================================== --- soc2012/rudot/sys/kern/kern_racct.c Wed Sep 5 17:13:08 2012 (r241311) +++ soc2012/rudot/sys/kern/kern_racct.c Wed Sep 5 18:09:19 2012 (r241312) @@ -53,6 +53,7 @@ #include #include #include +#include #include #include #include @@ -67,9 +68,13 @@ FEATURE(racct, "Resource Accounting"); /* - * Do not block processes that have their %cpu usage <= RACCT_PCTCPU_IGNORE + * Do not block processes that have their %cpu usage <= pcpu_threshold */ -#define RACCT_PCTCPU_IGNORE 1 +static int pcpu_threshold = 1; + +SYSCTL_NODE(_kern, OID_AUTO, racct, CTLFLAG_RW, 0, "Resource Accounting"); +SYSCTL_UINT(_kern_racct, OID_AUTO, pcpu_threshold, CTLFLAG_RW, &pcpu_threshold, + 0, "Processes with higher %cpu usage than this value can be throttled."); /* * How many seconds it takes to use the scheduler %cpu calculations. When a @@ -1005,7 +1010,9 @@ racct_proc_disable(struct proc *p) { struct thread *td; +#ifdef SMP int cpuid; +#endif PROC_LOCK_ASSERT(p, MA_OWNED); mtx_assert(&racct_lock, MA_OWNED); @@ -1015,7 +1022,7 @@ * low %cpu utilization to improve interactivity. */ if (((p->p_flag & (P_SYSTEM | P_KTHREAD)) != 0) || - (p->p_racct->r_resources[RACCT_PCTCPU] <= RACCT_PCTCPU_IGNORE)) + (p->p_racct->r_resources[RACCT_PCTCPU] <= pcpu_threshold)) return; p->p_racct->r_pflags |= R_PCPUEXCEEDED; From owner-svn-soc-all@FreeBSD.ORG Fri Sep 7 05:49:02 2012 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 7D0F3106566B for ; Fri, 7 Sep 2012 05:49:01 +0000 (UTC) (envelope-from rudot@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Fri, 07 Sep 2012 05:49:01 +0000 Date: Fri, 07 Sep 2012 05:49:01 +0000 From: rudot@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20120907054901.7D0F3106566B@hub.freebsd.org> Cc: Subject: socsvn commit: r241351 - soc2012/rudot/sys/kern X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Sep 2012 05:49:02 -0000 Author: rudot Date: Fri Sep 7 05:49:00 2012 New Revision: 241351 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=241351 Log: use RACCT_IN_MILLIONS for pcpu resource Modified: soc2012/rudot/sys/kern/kern_racct.c Modified: soc2012/rudot/sys/kern/kern_racct.c ============================================================================== --- soc2012/rudot/sys/kern/kern_racct.c Fri Sep 7 02:38:07 2012 (r241350) +++ soc2012/rudot/sys/kern/kern_racct.c Fri Sep 7 05:49:00 2012 (r241351) @@ -162,7 +162,8 @@ RACCT_RECLAIMABLE | RACCT_DENIABLE | RACCT_SLOPPY, [RACCT_WALLCLOCK] = RACCT_IN_MILLIONS, - [RACCT_PCTCPU] = RACCT_DECAYING | RACCT_DENIABLE }; + [RACCT_PCTCPU] = + RACCT_DECAYING | RACCT_DENIABLE | RACCT_IN_MILLIONS }; static const fixpt_t RACCT_DECAY_FACTOR = 0.3 * FSCALE; @@ -299,7 +300,7 @@ * of the ccpu variable. In ULE it is defined to be zero which saves us some * work. */ -static u_int +static uint64_t racct_getpcpu(struct proc *p, u_int pcpu) { u_int swtime; @@ -365,10 +366,11 @@ #ifdef SCHED_4BSD if (swtime <= CCPU_EXP_MAX) - return ((100 * p_pctcpu) / (FSCALE - ccpu_exp[swtime])); + return ((100 * (uint64_t)p_pctcpu * 1000000) / + (FSCALE - ccpu_exp[swtime])); #endif - return ((100 * p_pctcpu) / FSCALE); + return ((100 * (uint64_t)p_pctcpu * 1000000) / FSCALE); } static void @@ -498,8 +500,8 @@ * 100% cpu usage. So we set a boundary here to 100%. */ if ((resource == RACCT_PCTCPU) && - (racct->r_resources[RACCT_PCTCPU] > 100)) - racct->r_resources[RACCT_PCTCPU] = 100; + (racct->r_resources[RACCT_PCTCPU] > 100 * 1000000)) + racct->r_resources[RACCT_PCTCPU] = 100 * 1000000; } static int @@ -908,7 +910,7 @@ int i; uint64_t runtime; struct timeval wallclock; - u_int pct_estimate, pct; + uint64_t pct_estimate, pct; PROC_LOCK(p); /* @@ -923,7 +925,7 @@ #endif microuptime(&wallclock); timevalsub(&wallclock, &p->p_stats->p_start); - pct_estimate = (runtime * 100) / + pct_estimate = (1000000 * runtime * 100) / ((uint64_t)wallclock.tv_sec * 1000000 + wallclock.tv_usec); pct = racct_getpcpu(p, pct_estimate); @@ -1102,7 +1104,7 @@ struct proc *p; struct timeval wallclock; uint64_t runtime; - u_int pct, pct_estimate; + uint64_t pct, pct_estimate; int over_limits; for (;;) { @@ -1138,7 +1140,7 @@ runtime = p->p_prev_runtime; #endif p->p_prev_runtime = runtime; - pct_estimate = (runtime * 100) / + pct_estimate = (1000000 * runtime * 100) / ((uint64_t)wallclock.tv_sec * 1000000 + wallclock.tv_usec); pct = racct_getpcpu(p, pct_estimate);