svn commit: r232852 - head/sys/sys

2012-03-12 Thread Alexander Motin
Author: mav
Date: Mon Mar 12 07:02:16 2012
New Revision: 232852
URL: http://svn.freebsd.org/changeset/base/232852

Log:
  Tune cpuset macros to optimize cases when CPU_SETSIZE fits into single
  machine word. For example, it turns CPU_SET() into expected shift and OR,
  removing two extra shifts and additional index on memory access.
  
  Generated code checked for kernel (optimized) and user-level (unoptimized)
  cases with GCC and CLANG.
  
  Reviewed by:  attilio
  MFC after:2 weeks

Modified:
  head/sys/sys/cpuset.h

Modified: head/sys/sys/cpuset.h
==
--- head/sys/sys/cpuset.h   Mon Mar 12 05:28:02 2012(r232851)
+++ head/sys/sys/cpuset.h   Mon Mar 12 07:02:16 2012(r232852)
@@ -36,11 +36,18 @@
 
 #defineCPUSETBUFSIZ((2 + sizeof(long) * 2) * _NCPUWORDS)
 
-#define__cpuset_mask(n)((long)1 << ((n) % _NCPUBITS))
-#defineCPU_CLR(n, p)   ((p)->__bits[(n)/_NCPUBITS] &= 
~__cpuset_mask(n))
+/*
+ * Macros addressing word and bit within it, tuned to make compiler
+ * optimize cases when CPU_SETSIZE fits into single machine word.
+ */
+#define__cpuset_mask(n)\
+   ((long)1 << ((_NCPUWORDS == 1) ? (__size_t)(n) : ((n) % _NCPUBITS)))
+#define__cpuset_word(n)((_NCPUWORDS == 1) ? 0 : ((n) / 
_NCPUBITS))
+
+#defineCPU_CLR(n, p)   ((p)->__bits[__cpuset_word(n)] &= 
~__cpuset_mask(n))
 #defineCPU_COPY(f, t)  (void)(*(t) = *(f))
-#defineCPU_ISSET(n, p) (((p)->__bits[(n)/_NCPUBITS] & 
__cpuset_mask(n)) != 0)
-#defineCPU_SET(n, p)   ((p)->__bits[(n)/_NCPUBITS] |= __cpuset_mask(n))
+#defineCPU_ISSET(n, p) (((p)->__bits[__cpuset_word(n)] & 
__cpuset_mask(n)) != 0)
+#defineCPU_SET(n, p)   ((p)->__bits[__cpuset_word(n)] |= 
__cpuset_mask(n))
 #defineCPU_ZERO(p) do {\
__size_t __i;   \
for (__i = 0; __i < _NCPUWORDS; __i++)  \
@@ -55,7 +62,7 @@
 
 #defineCPU_SETOF(n, p) do {\
CPU_ZERO(p);\
-   ((p)->__bits[(n)/_NCPUBITS] = __cpuset_mask(n));\
+   ((p)->__bits[__cpuset_word(n)] = __cpuset_mask(n)); \
 } while (0)
 
 /* Is p empty. */
@@ -126,10 +133,10 @@
 } while (0)
 
 #defineCPU_CLR_ATOMIC(n, p)
\
-   atomic_clear_long(&(p)->__bits[(n)/_NCPUBITS], __cpuset_mask(n))
+   atomic_clear_long(&(p)->__bits[__cpuset_word(n)], __cpuset_mask(n))
 
 #defineCPU_SET_ATOMIC(n, p)
\
-   atomic_set_long(&(p)->__bits[(n)/_NCPUBITS], __cpuset_mask(n))
+   atomic_set_long(&(p)->__bits[__cpuset_word(n)], __cpuset_mask(n))
 
 /* Convenience functions catering special cases. */ 
 #defineCPU_OR_ATOMIC(d, s) do {\
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232853 - in head/sys/mips: adm5120 alchemy atheros idt include malta nlm rmi rt305x sentry5 sibyte

2012-03-12 Thread Juli Mallett
Author: jmallett
Date: Mon Mar 12 07:34:15 2012
New Revision: 232853
URL: http://svn.freebsd.org/changeset/base/232853

Log:
  Remove platform APIs which are not used by any code and which had only stub
  implementations or no implementation on all platforms.
  
  Some of these functions might be good ideas, but their semantics were unclear
  given the lack of implementation, and an unlucky porter could be fooled into
  trying to implement them or, worse, being baffled when something like
  platform_trap_enter() failed to be called.

Modified:
  head/sys/mips/adm5120/adm5120_machdep.c
  head/sys/mips/alchemy/alchemy_machdep.c
  head/sys/mips/atheros/ar71xx_machdep.c
  head/sys/mips/idt/idt_machdep.c
  head/sys/mips/include/hwfunc.h
  head/sys/mips/include/md_var.h
  head/sys/mips/include/trap.h
  head/sys/mips/malta/malta_machdep.c
  head/sys/mips/nlm/xlp_machdep.c
  head/sys/mips/rmi/xlr_machdep.c
  head/sys/mips/rt305x/rt305x_machdep.c
  head/sys/mips/sentry5/s5_machdep.c
  head/sys/mips/sibyte/sb_machdep.c

Modified: head/sys/mips/adm5120/adm5120_machdep.c
==
--- head/sys/mips/adm5120/adm5120_machdep.c Mon Mar 12 07:02:16 2012
(r232852)
+++ head/sys/mips/adm5120/adm5120_machdep.c Mon Mar 12 07:34:15 2012
(r232853)
@@ -116,19 +116,6 @@ mips_init(void)
 }
 
 void
-platform_halt(void)
-{
-
-}
-
-
-void
-platform_identify(void)
-{
-
-}
-
-void
 platform_reset(void)
 {
 
@@ -137,18 +124,6 @@ platform_reset(void)
 }
 
 void
-platform_trap_enter(void)
-{
-
-}
-
-void
-platform_trap_exit(void)
-{
-
-}
-
-void
 platform_start(__register_t a0 __unused, __register_t a1 __unused, 
 __register_t a2 __unused, __register_t a3 __unused)
 {

Modified: head/sys/mips/alchemy/alchemy_machdep.c
==
--- head/sys/mips/alchemy/alchemy_machdep.c Mon Mar 12 07:02:16 2012
(r232852)
+++ head/sys/mips/alchemy/alchemy_machdep.c Mon Mar 12 07:34:15 2012
(r232853)
@@ -117,19 +117,6 @@ mips_init(void)
 }
 
 void
-platform_halt(void)
-{
-
-}
-
-
-void
-platform_identify(void)
-{
-
-}
-
-void
 platform_reset(void)
 {
 
@@ -138,18 +125,6 @@ platform_reset(void)
 }
 
 void
-platform_trap_enter(void)
-{
-
-}
-
-void
-platform_trap_exit(void)
-{
-
-}
-
-void
 platform_start(__register_t a0 __unused, __register_t a1 __unused, 
 __register_t a2 __unused, __register_t a3 __unused)
 {

Modified: head/sys/mips/atheros/ar71xx_machdep.c
==
--- head/sys/mips/atheros/ar71xx_machdep.c  Mon Mar 12 07:02:16 2012
(r232852)
+++ head/sys/mips/atheros/ar71xx_machdep.c  Mon Mar 12 07:34:15 2012
(r232853)
@@ -106,18 +106,6 @@ platform_cpu_init()
 }
 
 void
-platform_halt(void)
-{
-
-}
-
-void
-platform_identify(void)
-{
-
-}
-
-void
 platform_reset(void)
 {
ar71xx_device_stop(RST_RESET_FULL_CHIP);
@@ -126,18 +114,6 @@ platform_reset(void)
;
 }
 
-void
-platform_trap_enter(void)
-{
-
-}
-
-void
-platform_trap_exit(void)
-{
-
-}
-
 /*
  * Obtain the MAC address via the Redboot environment.
  */

Modified: head/sys/mips/idt/idt_machdep.c
==
--- head/sys/mips/idt/idt_machdep.c Mon Mar 12 07:02:16 2012
(r232852)
+++ head/sys/mips/idt/idt_machdep.c Mon Mar 12 07:34:15 2012
(r232853)
@@ -82,19 +82,6 @@ platform_cpu_init()
 }
 
 void
-platform_halt(void)
-{
-
-}
-
-
-void
-platform_identify(void)
-{
-
-}
-
-void
 platform_reset(void)
 {
volatile unsigned int * p = (void *)0xb8008000;
@@ -111,18 +98,6 @@ platform_reset(void)
 }
 
 void
-platform_trap_enter(void)
-{
-
-}
-
-void
-platform_trap_exit(void)
-{
-
-}
-
-void
 platform_start(__register_t a0, __register_t a1,
 __register_t a2 __unused, __register_t a3 __unused)
 {

Modified: head/sys/mips/include/hwfunc.h
==
--- head/sys/mips/include/hwfunc.h  Mon Mar 12 07:02:16 2012
(r232852)
+++ head/sys/mips/include/hwfunc.h  Mon Mar 12 07:34:15 2012
(r232853)
@@ -30,14 +30,11 @@
 
 #include 
 
-struct trapframe;
 struct timecounter;
+
 /*
- * Hooks downward into hardware functionality.
+ * Hooks downward into platform functionality.
  */
-
-void platform_halt(void);
-void platform_intr(struct trapframe *);
 void platform_reset(void);
 void platform_start(__register_t, __register_t,  __register_t, __register_t);
 
@@ -48,7 +45,6 @@ unsigned platform_get_timecount(struct t
 
 /* For hardware specific CPU initialization */
 void platform_cpu_init(void);
-void platform_secondary_init(void);
 
 #ifdef SMP
 
@@ -100,6 +96,6 @@ extern void platform_cpu_mask(cpuset_t *
  */
 struct cpu_group *platform_smp_topo(void);
 
-
 #endif /* SMP */
+
 #endif /* !_MACHINE_HWFUNC_H_ */

Modified: head/sys/mi

svn commit: r232854 - in head/sys/dev: advansys amr an arcmsr asr buslogic bxe ciss cxgb dpt hifn hptiop hptmv ida if_ndis iir ips mfi mlx mly twe tws

2012-03-12 Thread Scott Long
Author: scottl
Date: Mon Mar 12 08:03:51 2012
New Revision: 232854
URL: http://svn.freebsd.org/changeset/base/232854

Log:
  Convert a number of drivers to obtaining their parent DMA tag from their
  PCI device attachment.

Modified:
  head/sys/dev/advansys/adv_pci.c
  head/sys/dev/advansys/adw_pci.c
  head/sys/dev/amr/amr_pci.c
  head/sys/dev/an/if_an_pci.c
  head/sys/dev/arcmsr/arcmsr.c
  head/sys/dev/asr/asr.c
  head/sys/dev/buslogic/bt_pci.c
  head/sys/dev/bxe/if_bxe.c
  head/sys/dev/ciss/ciss.c
  head/sys/dev/cxgb/cxgb_sge.c
  head/sys/dev/dpt/dpt_pci.c
  head/sys/dev/hifn/hifn7751.c
  head/sys/dev/hptiop/hptiop.c
  head/sys/dev/hptmv/entry.c
  head/sys/dev/ida/ida_pci.c
  head/sys/dev/if_ndis/if_ndis_pci.c
  head/sys/dev/iir/iir_pci.c
  head/sys/dev/ips/ips_pci.c
  head/sys/dev/mfi/mfi_pci.c
  head/sys/dev/mlx/mlx_pci.c
  head/sys/dev/mly/mly.c
  head/sys/dev/twe/twe_freebsd.c
  head/sys/dev/tws/tws.c

Modified: head/sys/dev/advansys/adv_pci.c
==
--- head/sys/dev/advansys/adv_pci.c Mon Mar 12 07:34:15 2012
(r232853)
+++ head/sys/dev/advansys/adv_pci.c Mon Mar 12 08:03:51 2012
(r232854)
@@ -189,7 +189,7 @@ adv_pci_attach(device_t dev)
/* Allocate a dmatag for our transfer DMA maps */
/* XXX Should be a child of the PCI bus dma tag */
error = bus_dma_tag_create(
-   /* parent   */ NULL,
+   /* parent   */ bus_get_dma_tag(dev),
/* alignment*/ 1,
/* boundary */ 0,
/* lowaddr  */ ADV_PCI_MAX_DMA_ADDR,

Modified: head/sys/dev/advansys/adw_pci.c
==
--- head/sys/dev/advansys/adw_pci.c Mon Mar 12 07:34:15 2012
(r232853)
+++ head/sys/dev/advansys/adw_pci.c Mon Mar 12 08:03:51 2012
(r232854)
@@ -260,7 +260,7 @@ adw_pci_attach(device_t dev)
/* Allocate a dmatag for our transfer DMA maps */
/* XXX Should be a child of the PCI bus dma tag */
error = bus_dma_tag_create(
-   /* parent   */ NULL,
+   /* parent   */ bus_get_dma_tag(dev),
/* alignment*/ 1,
/* boundary */ 0,
/* lowaddr  */ ADW_PCI_MAX_DMA_ADDR,

Modified: head/sys/dev/amr/amr_pci.c
==
--- head/sys/dev/amr/amr_pci.c  Mon Mar 12 07:34:15 2012(r232853)
+++ head/sys/dev/amr/amr_pci.c  Mon Mar 12 08:03:51 2012(r232854)
@@ -275,7 +275,7 @@ amr_pci_attach(device_t dev)
 /*
  * Allocate the parent bus DMA tag appropriate for PCI.
  */
-if (bus_dma_tag_create(NULL,   /* parent */
+if (bus_dma_tag_create(bus_get_dma_tag(dev),   /* PCI parent */
   1, 0,/* alignment,boundary */
   AMR_IS_SG64(sc) ?
   BUS_SPACE_MAXADDR :

Modified: head/sys/dev/an/if_an_pci.c
==
--- head/sys/dev/an/if_an_pci.c Mon Mar 12 07:34:15 2012(r232853)
+++ head/sys/dev/an/if_an_pci.c Mon Mar 12 08:03:51 2012(r232854)
@@ -195,7 +195,7 @@ an_attach_pci(dev)
}
 
/* Allocate DMA region */
-   error = bus_dma_tag_create(NULL,/* parent */
+   error = bus_dma_tag_create(bus_get_dma_tag(dev),/* parent */
   1, 0,/* alignment, bounds */
   BUS_SPACE_MAXADDR_32BIT, /* lowaddr */
   BUS_SPACE_MAXADDR,   /* highaddr */

Modified: head/sys/dev/arcmsr/arcmsr.c
==
--- head/sys/dev/arcmsr/arcmsr.cMon Mar 12 07:34:15 2012
(r232853)
+++ head/sys/dev/arcmsr/arcmsr.cMon Mar 12 08:03:51 2012
(r232854)
@@ -3486,7 +3486,7 @@ static u_int32_t arcmsr_initialize(devic
return ENOMEM;
}
}
-   if(bus_dma_tag_create(  /*parent*/  NULL,
+   if(bus_dma_tag_create(  /*PCI parent*/  bus_get_dma_tag(dev),
/*alignemnt*/   1,
/*boundary*/0,
/*lowaddr*/ 
BUS_SPACE_MAXADDR,

Modified: head/sys/dev/asr/asr.c
==
--- head/sys/dev/asr/asr.c  Mon Mar 12 07:34:15 2012(r232853)
+++ head/sys/dev/asr/asr.c  Mon Mar 12 08:03:51 2012(r232854)
@@ -2328,7 +2328,7 @@ asr_alloc_dma(Asr_softc_t *

svn commit: r232855 - in head/sys/mips: include mips

2012-03-12 Thread Juli Mallett
Author: jmallett
Date: Mon Mar 12 08:13:04 2012
New Revision: 232855
URL: http://svn.freebsd.org/changeset/base/232855

Log:
  Remove more unused code and declarations, and add dire warnings to the 64-bit
  atomic ops used by 32-bit kernels.

Modified:
  head/sys/mips/include/cache.h
  head/sys/mips/include/cpufunc.h
  head/sys/mips/include/frame.h
  head/sys/mips/include/md_var.h
  head/sys/mips/include/pmap.h
  head/sys/mips/include/proc.h
  head/sys/mips/mips/machdep.c
  head/sys/mips/mips/support.S
  head/sys/mips/mips/vm_machdep.c

Modified: head/sys/mips/include/cache.h
==
--- head/sys/mips/include/cache.h   Mon Mar 12 08:03:51 2012
(r232854)
+++ head/sys/mips/include/cache.h   Mon Mar 12 08:13:04 2012
(r232855)
@@ -217,7 +217,6 @@ do {
\
 struct mips_cpuinfo;
 
 voidmips_config_cache(struct mips_cpuinfo *);
-voidmips_dcache_compute_align(void);
 
 #include 
 #endif /* _MACHINE_CACHE_H_ */

Modified: head/sys/mips/include/cpufunc.h
==
--- head/sys/mips/include/cpufunc.h Mon Mar 12 08:03:51 2012
(r232854)
+++ head/sys/mips/include/cpufunc.h Mon Mar 12 08:13:04 2012
(r232855)
@@ -468,6 +468,5 @@ void insl(uint32_t *, uint32_t *,int);
 void outsb(uint8_t *, const uint8_t *,int);
 void outsw(uint16_t *, const uint16_t *,int);
 void outsl(uint32_t *, const uint32_t *,int);
-u_int loadandclear(volatile u_int *addr);
 
 #endif /* !_MACHINE_CPUFUNC_H_ */

Modified: head/sys/mips/include/frame.h
==
--- head/sys/mips/include/frame.h   Mon Mar 12 08:03:51 2012
(r232854)
+++ head/sys/mips/include/frame.h   Mon Mar 12 08:13:04 2012
(r232855)
@@ -124,10 +124,4 @@ struct trapframe {
 register_t   fdummy;
 };
 
-/* REVISIT */
-struct frame *get_current_fp(void);
-#defineget_next_fp(fp) (0)
-#defineget_return_ptr(fp)  (0)
-void   get_stack_trace(u_int32_t depth, u_int32_t *trace);
-
 #endif /* !_MACHINE_FRAME_H_ */

Modified: head/sys/mips/include/md_var.h
==
--- head/sys/mips/include/md_var.h  Mon Mar 12 08:03:51 2012
(r232854)
+++ head/sys/mips/include/md_var.h  Mon Mar 12 08:13:04 2012
(r232855)
@@ -54,12 +54,9 @@ extern vm_offset_t kernel_kseg0_end;
 
 void   MipsSaveCurFPState(struct thread *);
 void   fork_trampoline(void);
-void   cpu_swapin(struct proc *);
 uintptr_t MipsEmulateBranch(struct trapframe *, uintptr_t, int, uintptr_t);
 void MipsSwitchFPState(struct thread *, struct trapframe *);
-u_long kvtop(void *addr);
 intis_cacheable_mem(vm_paddr_t addr);
-void   mips_generic_reset(void);
 void   mips_wait(void);
 
 #defineMIPS_DEBUG   0

Modified: head/sys/mips/include/pmap.h
==
--- head/sys/mips/include/pmap.hMon Mar 12 08:03:51 2012
(r232854)
+++ head/sys/mips/include/pmap.hMon Mar 12 08:13:04 2012
(r232855)
@@ -163,7 +163,6 @@ void pmap_kenter_attr(vm_offset_t va, vm
 void pmap_kremove(vm_offset_t va);
 void *pmap_kenter_temporary(vm_paddr_t pa, int i);
 void pmap_kenter_temporary_free(vm_paddr_t pa);
-int pmap_compute_pages_to_dump(void);
 void pmap_flush_pvcache(vm_page_t m);
 int pmap_emulate_modified(pmap_t pmap, vm_offset_t va);
 void pmap_grow_direct_page_cache(void);

Modified: head/sys/mips/include/proc.h
==
--- head/sys/mips/include/proc.hMon Mar 12 08:03:51 2012
(r232854)
+++ head/sys/mips/include/proc.hMon Mar 12 08:13:04 2012
(r232855)
@@ -80,11 +80,6 @@ struct mdproc {
 };
 
 #ifdef _KERNEL
-struct thread;
-
-void   mips_cpu_switch(struct thread *, struct thread *, struct mtx *);
-void   mips_cpu_throw(struct thread *, struct thread *);
-
 struct syscall_args {
u_int code;
struct sysent *callp;

Modified: head/sys/mips/mips/machdep.c
==
--- head/sys/mips/mips/machdep.cMon Mar 12 08:03:51 2012
(r232854)
+++ head/sys/mips/mips/machdep.cMon Mar 12 08:13:04 2012
(r232855)
@@ -397,17 +397,6 @@ mips_postboot_fixup(void)
 #endif
 }
 
-/*
- * Many SoCs have a means to reset the core itself.  Others do not, or
- * the method is unknown to us.  For those cases, we jump to the mips
- * reset vector and hope for the best.  This works well in practice.
- */
-void
-mips_generic_reset()
-{
-   ((void(*)(void))MIPS_RESET_EXC_VEC)();
-}
-
 #ifdef SMP
 void
 mips_pcpu_tlb_init(struct pcpu *pcpu)

Modified: head/sys/mips/mips/support.S
==

Re: svn commit: r232844 - head/contrib/ntp/ntpd

2012-03-12 Thread Andrey Zonov

On 12.03.2012 5:06, Ed Maste wrote:

Author: emaste
Date: Mon Mar 12 01:06:29 2012
New Revision: 232844
URL: http://svn.freebsd.org/changeset/base/232844

Log:
   Remove extraneous log message

   When ntp switched between PLL and FLL mode it produced a log message
   "kernel time sync status change %04x".  This issue is reported in ntp
   bug 452[1] which claims that this behaviour is normal and the log
   message isn't necessary.  I'm not sure exactly when it was removed, but
   it's gone in the latest ntp release (4.2.6p5).

   [1] http://bugs.ntp.org/show_bug.cgi?id=452



Thanks!

Maybe you can also fix this issue: 
https://bugzilla.redhat.com/show_bug.cgi?id=246297


I've got these messages on 9.0-STABLE every 5 minutes.

Mar 12 13:47:10 XXX ntpd[2825]: bind() fd 29, family AF_INET6, port 123, 
scope 0, addr 2a02:X:X:X::X:9f09, mcast=0 flags=0x11 fails: Can't assign 
requested address
Mar 12 13:47:10 XXX ntpd[2825]: unable to create socket on igb0 (1780) 
for 2a02:X:X:X::X:9f09#123

[zont@ws34-005 ~]$ ifconfig
igb0: flags=8843 metric 0 mtu 8950

options=500bb
ether 00:25:90:37:8b:cc
inet6 fe80::225:90ff:fe37:8bcc%igb0 prefixlen 64 tentative 
scopeid 0x1

inet X.X.X.X netmask 0xfc00 broadcast X.X.X.X
inet6 2a02:X:X:X::X:9f09 prefixlen 64 tentative
nd6 options=29
media: Ethernet autoselect (1000baseT )
status: active


--
Andrey Zonov
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r232832 - in head/lib/csu: . amd64 arm common i386-elf mips powerpc powerpc64 sparc64

2012-03-12 Thread Konstantin Belousov
On Sun, Mar 11, 2012 at 08:04:10PM +, Konstantin Belousov wrote:
> Author: kib
> Date: Sun Mar 11 20:04:09 2012
> New Revision: 232832
> URL: http://svn.freebsd.org/changeset/base/232832
> 
> Log:
>   Stop calling _init/_fini methods from crt1 for dynamic binaries.  Do
>   call preinit, init and fini arrays methods from crt1 for static binaries.
>   
>   Mark new crt1 with FreeBSD-specific ELF note.
>   
>   Move some common crt1 code into new MI file ignore_init.c, to reduce
>   duplication.  Also, conservatively adjust nearby sources for style.
>   
>   Reviewed by:kan
>   Tested by:  andrew (arm), flo (sparc64)
>   MFC after:  3 weeks
I failed to mention it in the commit message that ia64 still uses old crt1
and does not mark binaries with a new note.  I do not know ia64 assembler
and cannot rewrite crt1.S myself.


pgpUFvyMpaMnm.pgp
Description: PGP signature


svn commit: r232856 - head/libexec/rtld-elf

2012-03-12 Thread Konstantin Belousov
Author: kib
Date: Mon Mar 12 10:36:03 2012
New Revision: 232856
URL: http://svn.freebsd.org/changeset/base/232856

Log:
  When iterating over the dso program headers, the object is not initialized
  yet, and object segments are not yet mapped.  Only parse the notes that
  appear in the first page of the dso (as it should be anyway), and use
  the preloaded page content.
  
  Reported and tested by:   stass
  MFC after:20 days

Modified:
  head/libexec/rtld-elf/map_object.c

Modified: head/libexec/rtld-elf/map_object.c
==
--- head/libexec/rtld-elf/map_object.c  Mon Mar 12 08:13:04 2012
(r232855)
+++ head/libexec/rtld-elf/map_object.c  Mon Mar 12 10:36:03 2012
(r232856)
@@ -149,7 +149,10 @@ map_object(int fd, const char *path, con
break;
 
case PT_NOTE:
-   note_start = (Elf_Addr)obj->relocbase + phdr->p_offset;
+   if (phdr->p_offset > PAGE_SIZE ||
+ phdr->p_offset + phdr->p_filesz > PAGE_SIZE)
+   break;
+   note_start = (Elf_Addr)(char *)hdr + phdr->p_offset;
note_end = note_start + phdr->p_filesz;
digest_notes(obj, note_start, note_end);
break;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232857 - head/libexec/rtld-elf

2012-03-12 Thread Dimitry Andric
Author: dim
Date: Mon Mar 12 11:04:48 2012
New Revision: 232857
URL: http://svn.freebsd.org/changeset/base/232857

Log:
  Fix the following warning/error with clang:
  
  libexec/rtld-elf/rtld.c:1898:22: error: comparison between pointer and 
integer ('Elf_Addr *' (aka 'unsigned int *') and 'Elf_Addr' (aka 'unsigned 
int')) [-Werror]
  if (preinit_addr == (Elf_Addr)NULL)
   ^  ~~
  libexec/rtld-elf/rtld.c:2039:16: error: comparison between pointer and 
integer ('Elf_Addr *' (aka 'unsigned int *') and 'Elf_Addr' (aka 'unsigned 
int')) [-Werror]
  if (init_addr != (Elf_Addr)NULL) {
  ~ ^  ~~
  
  Reviewed by:  kib

Modified:
  head/libexec/rtld-elf/rtld.c

Modified: head/libexec/rtld-elf/rtld.c
==
--- head/libexec/rtld-elf/rtld.cMon Mar 12 10:36:03 2012
(r232856)
+++ head/libexec/rtld-elf/rtld.cMon Mar 12 11:04:48 2012
(r232857)
@@ -1895,7 +1895,7 @@ preinit_main(void)
 int index;
 
 preinit_addr = (Elf_Addr *)obj_main->preinit_array;
-if (preinit_addr == (Elf_Addr)NULL)
+if (preinit_addr == (Elf_Addr *)NULL)
return;
 
 for (index = 0; index < obj_main->preinit_array_num; index++) {
@@ -2036,7 +2036,7 @@ objlist_call_init(Objlist *list, RtldLoc
call_initfini_pointer(elm->obj, elm->obj->init);
}
init_addr = (Elf_Addr *)elm->obj->init_array;
-   if (init_addr != (Elf_Addr)NULL) {
+   if (init_addr != (Elf_Addr *)NULL) {
for (index = 0; index < elm->obj->init_array_num; index++) {
if (init_addr[index] != 0 && init_addr[index] != 1) {
dbg("calling init function for %s at %p", elm->obj->path,
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r232857 - head/libexec/rtld-elf

2012-03-12 Thread Stefan Farfeleder
On Mon, Mar 12, 2012 at 11:04:48AM +, Dimitry Andric wrote:
> Modified: head/libexec/rtld-elf/rtld.c
> ==
> --- head/libexec/rtld-elf/rtld.c  Mon Mar 12 10:36:03 2012
> (r232856)
> +++ head/libexec/rtld-elf/rtld.c  Mon Mar 12 11:04:48 2012
> (r232857)
> @@ -1895,7 +1895,7 @@ preinit_main(void)
>  int index;
>  
>  preinit_addr = (Elf_Addr *)obj_main->preinit_array;
> -if (preinit_addr == (Elf_Addr)NULL)
> +if (preinit_addr == (Elf_Addr *)NULL)
>   return;
>  
>  for (index = 0; index < obj_main->preinit_array_num; index++) {
> @@ -2036,7 +2036,7 @@ objlist_call_init(Objlist *list, RtldLoc
>   call_initfini_pointer(elm->obj, elm->obj->init);
>   }
>   init_addr = (Elf_Addr *)elm->obj->init_array;
> - if (init_addr != (Elf_Addr)NULL) {
> + if (init_addr != (Elf_Addr *)NULL) {
>   for (index = 0; index < elm->obj->init_array_num; index++) {
>   if (init_addr[index] != 0 && init_addr[index] != 1) {
>   dbg("calling init function for %s at %p", elm->obj->path,
> 

Why don't you simply remove the unnecessary casts?
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232858 - head/sbin/growfs

2012-03-12 Thread Dimitry Andric
Author: dim
Date: Mon Mar 12 11:15:44 2012
New Revision: 232858
URL: http://svn.freebsd.org/changeset/base/232858

Log:
  After r232548, clang complains about the apparent '=-' operator (a
  left-over from ancient C times, and a frequent typo) in growfs.c:
  
  sbin/growfs/growfs.c:1550:8: error: use of unary operator that may be 
intended as compound assignment (-=) [-Werror]
  blkno =- 1;
^~
  
  Use 'blkno = -1' instead, to silence the error.

Modified:
  head/sbin/growfs/growfs.c

Modified: head/sbin/growfs/growfs.c
==
--- head/sbin/growfs/growfs.c   Mon Mar 12 11:04:48 2012(r232857)
+++ head/sbin/growfs/growfs.c   Mon Mar 12 11:15:44 2012(r232858)
@@ -1547,7 +1547,7 @@ alloc(void)
 * block here which we have to relocate a couple of seconds later again
 * again, and we are not prepared to to this anyway.
 */
-   blkno =- 1;
+   blkno = -1;
dlower = cgsblock(&sblock, acg.cg_cgx) - cgbase(&sblock, acg.cg_cgx);
dupper = cgdmin(&sblock, acg.cg_cgx) - cgbase(&sblock, acg.cg_cgx);
dmax = cgbase(&sblock, acg.cg_cgx) + sblock.fs_fpg;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232859 - head/libexec/rtld-elf

2012-03-12 Thread Dimitry Andric
Author: dim
Date: Mon Mar 12 11:22:23 2012
New Revision: 232859
URL: http://svn.freebsd.org/changeset/base/232859

Log:
  Amend r232857, now dropping the casts entirely, as they were not
  necessary at all.
  
  Submitted by: stefanf

Modified:
  head/libexec/rtld-elf/rtld.c

Modified: head/libexec/rtld-elf/rtld.c
==
--- head/libexec/rtld-elf/rtld.cMon Mar 12 11:15:44 2012
(r232858)
+++ head/libexec/rtld-elf/rtld.cMon Mar 12 11:22:23 2012
(r232859)
@@ -1895,7 +1895,7 @@ preinit_main(void)
 int index;
 
 preinit_addr = (Elf_Addr *)obj_main->preinit_array;
-if (preinit_addr == (Elf_Addr *)NULL)
+if (preinit_addr == NULL)
return;
 
 for (index = 0; index < obj_main->preinit_array_num; index++) {
@@ -2036,7 +2036,7 @@ objlist_call_init(Objlist *list, RtldLoc
call_initfini_pointer(elm->obj, elm->obj->init);
}
init_addr = (Elf_Addr *)elm->obj->init_array;
-   if (init_addr != (Elf_Addr *)NULL) {
+   if (init_addr != NULL) {
for (index = 0; index < elm->obj->init_array_num; index++) {
if (init_addr[index] != 0 && init_addr[index] != 1) {
dbg("calling init function for %s at %p", elm->obj->path,
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r232844 - head/contrib/ntp/ntpd

2012-03-12 Thread Bjoern A. Zeeb

On 12. Mar 2012, at 10:02 , Andrey Zonov wrote:

> On 12.03.2012 5:06, Ed Maste wrote:
>> Author: emaste
>> Date: Mon Mar 12 01:06:29 2012
>> New Revision: 232844
>> URL: http://svn.freebsd.org/changeset/base/232844
>> 
>> Log:
>>   Remove extraneous log message
>> 
>>   When ntp switched between PLL and FLL mode it produced a log message
>>   "kernel time sync status change %04x".  This issue is reported in ntp
>>   bug 452[1] which claims that this behaviour is normal and the log
>>   message isn't necessary.  I'm not sure exactly when it was removed, but
>>   it's gone in the latest ntp release (4.2.6p5).
>> 
>>   [1] http://bugs.ntp.org/show_bug.cgi?id=452
>> 
> 
> Thanks!
> 
> Maybe you can also fix this issue: 
> https://bugzilla.redhat.com/show_bug.cgi?id=246297

That's a bugzilla bug ID. that's the wrong OS.


> 
> I've got these messages on 9.0-STABLE every 5 minutes.
> 
> Mar 12 13:47:10 XXX ntpd[2825]: bind() fd 29, family AF_INET6, port 123, 
> scope 0, addr 2a02:X:X:X::X:9f09, mcast=0 flags=0x11 fails: Can't assign 
> requested address
> Mar 12 13:47:10 XXX ntpd[2825]: unable to create socket on igb0 (1780) for 
> 2a02:X:X:X::X:9f09#123

And it's really right about this.  The real bug about this has been fixed 
before.  You are running the fix version.


> [zont@ws34-005 ~]$ ifconfig
> igb0: flags=8843 metric 0 mtu 8950
> options=500bb
>ether 00:25:90:37:8b:cc
>inet6 fe80::225:90ff:fe37:8bcc%igb0 prefixlen 64 tentative scopeid 0x1
>inet X.X.X.X netmask 0xfc00 broadcast X.X.X.X
>inet6 2a02:X:X:X::X:9f09 prefixlen 64 tentative
>nd6 options=29

You are not doing IPv6 here, fix your rc.conf probably as told on boot to get 
rid of the ifdisabled.


>media: Ethernet autoselect (1000baseT )
>status: active
> 
> 
> -- 
> Andrey Zonov

-- 
Bjoern A. Zeeb You have to have visions!
   It does not matter how good you are. It matters what good you do!

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232860 - head/sys/kern

2012-03-12 Thread Peter Holm
Author: pho
Date: Mon Mar 12 11:56:57 2012
New Revision: 232860
URL: http://svn.freebsd.org/changeset/base/232860

Log:
  Allways call fdrop().

Modified:
  head/sys/kern/sys_capability.c

Modified: head/sys/kern/sys_capability.c
==
--- head/sys/kern/sys_capability.c  Mon Mar 12 11:22:23 2012
(r232859)
+++ head/sys/kern/sys_capability.c  Mon Mar 12 11:56:57 2012
(r232860)
@@ -261,16 +261,14 @@ sys_cap_new(struct thread *td, struct ca
return (error);
AUDIT_ARG_FILE(td->td_proc, fp);
error = kern_capwrap(td, fp, rights, &capfd);
-   if (error)
-   return (error);
-
/*
 * Release our reference to the file (kern_capwrap has held a reference
 * for the filedesc array).
 */
fdrop(fp, td);
-   td->td_retval[0] = capfd;
-   return (0);
+   if (error == 0)
+   td->td_retval[0] = capfd;
+   return (error);
 }
 
 /*
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r232744 - in head/sys: conf i386/i386 i386/include

2012-03-12 Thread TAKAHASHI Yoshihiro
In article <201203091942.q29jgmj1022...@svn.freebsd.org>
John Baldwin  writes:

> Author: jhb
> Date: Fri Mar  9 19:42:48 2012
> New Revision: 232744
> URL: http://svn.freebsd.org/changeset/base/232744
> 
> Log:
>   Allow a native i386 kernel to be built with 'nodevice atpic'.  Just as on
>   amd64, if 'device isa' is present quiesce the 8259A's during boot and
>   resume from suspend.

This change broke a kernel without the SMP and atpic.  The attached
patch fixes the problem and includes changes for pc98.

Please review it.

---
TAKAHASHI Yoshihiro 
Index: conf/files.pc98
===
RCS file: /home/ncvs/src/sys/conf/files.pc98,v
retrieving revision 1.399
diff -u -r1.399 files.pc98
--- conf/files.pc98	9 Mar 2012 20:43:29 -	1.399
+++ conf/files.pc98	10 Mar 2012 12:47:46 -
@@ -226,7 +226,7 @@
 pc98/cbus/nmi.c			standard
 pc98/cbus/olpt.c		optional olpt
 pc98/cbus/pckbd.c		optional pckbd
-pc98/cbus/pcrtc.c		optional atpic
+pc98/cbus/pcrtc.c		standard
 pc98/cbus/pmc.c			optional pmc
 pc98/cbus/scgdcrndr.c		optional sc gdc
 pc98/cbus/scterm-sck.c		optional sc
Index: i386/i386/machdep.c
===
RCS file: /home/ncvs/src/sys/i386/i386/machdep.c,v
retrieving revision 1.742
diff -u -r1.742 machdep.c
--- i386/i386/machdep.c	9 Mar 2012 19:42:48 -	1.742
+++ i386/i386/machdep.c	10 Mar 2012 15:51:40 -
@@ -41,6 +41,7 @@
 __FBSDID("$FreeBSD: src/sys/i386/i386/machdep.c,v 1.742 2012/03/09 19:42:48 jhb Exp $");
 
 #include "opt_atalk.h"
+#include "opt_apic.h"
 #include "opt_atpic.h"
 #include "opt_compat.h"
 #include "opt_cpu.h"
@@ -136,6 +137,10 @@
 #include 
 #endif
 
+#ifdef DEV_APIC
+#include 
+#endif
+
 #ifdef DEV_ISA
 #include 
 #endif
Index: pc98/pc98/machdep.c
===
RCS file: /home/ncvs/src/sys/pc98/pc98/machdep.c,v
retrieving revision 1.452
diff -u -r1.452 machdep.c
--- pc98/pc98/machdep.c	21 Jan 2012 17:45:27 -	1.452
+++ pc98/pc98/machdep.c	10 Mar 2012 15:51:55 -
@@ -41,6 +41,8 @@
 __FBSDID("$FreeBSD: src/sys/pc98/pc98/machdep.c,v 1.452 2012/01/21 17:45:27 kib Exp $");
 
 #include "opt_atalk.h"
+#include "opt_apic.h"
+#include "opt_atpic.h"
 #include "opt_compat.h"
 #include "opt_cpu.h"
 #include "opt_ddb.h"
@@ -132,6 +134,10 @@
 #include 
 #endif
 
+#ifdef DEV_APIC
+#include 
+#endif
+
 #ifdef DEV_ISA
 #include 
 #endif
@@ -2296,7 +2302,21 @@
 		printf("WARNING: loader(8) metadata is missing!\n");
 
 #ifdef DEV_ISA
+#ifdef DEV_ATPIC
 	atpic_startup();
+#else
+	/* Reset and mask the atpics and leave them shut down. */
+	atpic_reset();
+
+	/*
+	 * Point the ICU spurious interrupt vectors at the APIC spurious
+	 * interrupt handler.
+	 */
+	setidt(IDT_IO_INTS + 7, IDTVEC(spuriousint), SDT_SYS386IGT, SEL_KPL,
+	GSEL(GCODE_SEL, SEL_KPL));
+	setidt(IDT_IO_INTS + 15, IDTVEC(spuriousint), SDT_SYS386IGT, SEL_KPL,
+	GSEL(GCODE_SEL, SEL_KPL));
+#endif
 #endif
 
 #ifdef DDB
Index: x86/isa/atpic.c
===
RCS file: /home/ncvs/src/sys/x86/isa/atpic.c,v
retrieving revision 1.1
diff -u -r1.1 atpic.c
--- x86/isa/atpic.c	25 Feb 2010 14:13:39 -	1.1
+++ x86/isa/atpic.c	10 Mar 2012 12:48:03 -
@@ -72,48 +72,6 @@
 #define	MASTER	0
 #define	SLAVE	1
 
-/*
- * PC-98 machines wire the slave 8259A to pin 7 on the master PIC, and
- * PC-AT machines wire the slave PIC to pin 2 on the master PIC.
- */
-#ifdef PC98
-#define	ICU_SLAVEID	7
-#else
-#define	ICU_SLAVEID	2
-#endif
-
-/*
- * Determine the base master and slave modes not including auto EOI support.
- * All machines that FreeBSD supports use 8086 mode.
- */
-#ifdef PC98
-/*
- * PC-98 machines do not support auto EOI on the second PIC.  Also, it
- * seems that PC-98 machine PICs use buffered mode, and the master PIC
- * uses special fully nested mode.
- */
-#define	BASE_MASTER_MODE	(ICW4_SFNM | ICW4_BUF | ICW4_MS | ICW4_8086)
-#define	BASE_SLAVE_MODE		(ICW4_BUF | ICW4_8086)
-#else
-#define	BASE_MASTER_MODE	ICW4_8086
-#define	BASE_SLAVE_MODE		ICW4_8086
-#endif
-
-/* Enable automatic EOI if requested. */
-#ifdef AUTO_EOI_1
-#define	MASTER_MODE		(BASE_MASTER_MODE | ICW4_AEOI)
-#else
-#define	MASTER_MODE		BASE_MASTER_MODE
-#endif
-#ifdef AUTO_EOI_2
-#define	SLAVE_MODE		(BASE_SLAVE_MODE | ICW4_AEOI)
-#else
-#define	SLAVE_MODE		BASE_SLAVE_MODE
-#endif
-
-#define	IRQ_MASK(irq)		(1 << (irq))
-#define	IMEN_MASK(ai)		(IRQ_MASK((ai)->at_irq))
-
 #define	NUM_ISA_IRQS		16
 
 static void	atpic_init(void *dummy);
Index: x86/isa/icu.h
===
RCS file: /home/ncvs/src/sys/x86/isa/icu.h,v
retrieving revision 1.1
diff -u -r1.1 icu.h
--- x86/isa/icu.h	25 Feb 2010 14:13:39 -	1.1
+++ x86/isa/icu.h	10 Mar 2012 12:48:12 -
@@ -47,6 +47,48 @@
 #define	ICU_IMR_OFFSET	1
 #endif
 
+/*
+ * PC-98 machines wire the slave 8259A to pin 7 on the master PIC, and
+ * PC-AT machines w

svn commit: r232861 - head/libexec/rtld-elf

2012-03-12 Thread Konstantin Belousov
Author: kib
Date: Mon Mar 12 12:15:47 2012
New Revision: 232861
URL: http://svn.freebsd.org/changeset/base/232861

Log:
  Rtld on diet part 1:
  
  Provide rtld-private implementations of __stack_chk_guard,
  __stack_chk_fail() and __chk_fail() symbols, to be used by functions
  linked from libc_pic.a.  This avoids use of libc stack_protector.c,
  which pulls in syslog(3) and stdio as dependency.
  
  Also, do initialize rtld-private copy __stack_chk_guard, previously
  libc-provided one was not initialized, since we do not call rtld
  object _init() methods.
  
  Reviewed by:  kan
  MFC after:3 weeks

Modified:
  head/libexec/rtld-elf/rtld.c

Modified: head/libexec/rtld-elf/rtld.c
==
--- head/libexec/rtld-elf/rtld.cMon Mar 12 11:56:57 2012
(r232860)
+++ head/libexec/rtld-elf/rtld.cMon Mar 12 12:15:47 2012
(r232861)
@@ -196,6 +196,8 @@ extern Elf_Dyn _DYNAMIC;
 
 int osreldate, pagesize;
 
+long __stack_chk_guard[8] = {0, 0, 0, 0, 0, 0, 0, 0};
+
 static int stack_prot = PROT_READ | PROT_WRITE | RTLD_DEFAULT_STACK_EXEC;
 static int max_stack_flags;
 
@@ -311,6 +313,8 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
 Obj_Entry **preload_tail;
 Objlist initlist;
 RtldLockState lockstate;
+int mib[2];
+size_t len;
 
 /*
  * On entry, the dynamic linker itself has not been relocated yet.
@@ -346,6 +350,26 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
 main_argc = argc;
 main_argv = argv;
 
+if (aux_info[AT_CANARY]->a_un.a_ptr != NULL) {
+   i = aux_info[AT_CANARYLEN]->a_un.a_val;
+   if (i > sizeof(__stack_chk_guard))
+   i = sizeof(__stack_chk_guard);
+   memcpy(__stack_chk_guard, aux_info[AT_CANARY]->a_un.a_ptr, i);
+} else {
+   mib[0] = CTL_KERN;
+   mib[1] = KERN_ARND;
+
+   len = sizeof(__stack_chk_guard);
+   if (sysctl(mib, 2, __stack_chk_guard, &len, NULL, 0) == -1 ||
+   len != sizeof(__stack_chk_guard)) {
+   /* If sysctl was unsuccessful, use the "terminator canary". */
+   ((unsigned char *)(void *)__stack_chk_guard)[0] = 0;
+   ((unsigned char *)(void *)__stack_chk_guard)[1] = 0;
+   ((unsigned char *)(void *)__stack_chk_guard)[2] = '\n';
+   ((unsigned char *)(void *)__stack_chk_guard)[3] = 255;
+   }
+}
+
 trust = !issetugid();
 
 ld_bind_now = getenv(LD_ "BIND_NOW");
@@ -4313,3 +4337,19 @@ void
 __pthread_cxa_finalize(struct dl_phdr_info *a)
 {
 }
+
+void
+__stack_chk_fail(void)
+{
+
+   _rtld_error("stack overflow detected; terminated");
+   die();
+}
+
+void
+__chk_fail(void)
+{
+
+   _rtld_error("buffer overflow detected; terminated");
+   die();
+}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232862 - head/libexec/rtld-elf

2012-03-12 Thread Konstantin Belousov
Author: kib
Date: Mon Mar 12 12:16:08 2012
New Revision: 232862
URL: http://svn.freebsd.org/changeset/base/232862

Log:
  Rtld on diet part 2:
  
  Do not use stdio for libmap.conf read.  Directly map the file and
  parse lines from the mappings.
  
  Reviewed by:  kan
  MFC after:3 weeks

Modified:
  head/libexec/rtld-elf/libmap.c

Modified: head/libexec/rtld-elf/libmap.c
==
--- head/libexec/rtld-elf/libmap.c  Mon Mar 12 12:15:47 2012
(r232861)
+++ head/libexec/rtld-elf/libmap.c  Mon Mar 12 12:16:08 2012
(r232862)
@@ -2,11 +2,14 @@
  * $FreeBSD$
  */
 
-#include 
-#include 
-#include 
-#include 
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 #include "debug.h"
 #include "rtld.h"
@@ -25,7 +28,6 @@ TAILQ_HEAD(lm_list, lm);
 struct lm {
char *f;
char *t;
-
TAILQ_ENTRY(lm) lm_link;
 };
 
@@ -37,17 +39,15 @@ struct lmp {
TAILQ_ENTRY(lmp) lmp_link;
 };
 
-static int lm_count;
+static int lm_count;
 
-static voidlmc_parse   (FILE *);
-static voidlm_add  (const char *, const char *, const char 
*);
-static voidlm_free (struct lm_list *);
-static char *  lml_find(struct lm_list *, const char *);
-static struct lm_list *lmp_find(const char *);
-static struct lm_list *lmp_init(char *);
-static const char * quickbasename  (const char *);
-static int readstrfn   (void * cookie, char *buf, int len);
-static int closestrfn  (void * cookie);
+static void lmc_parse(char *, size_t);
+static void lm_add(const char *, const char *, const char *);
+static void lm_free(struct lm_list *);
+static char *lml_find(struct lm_list *, const char *);
+static struct lm_list *lmp_find(const char *);
+static struct lm_list *lmp_init(char *);
+static const char *quickbasename(const char *);
 
 #defineiseol(c)(((c) == '#') || ((c) == '\0') || \
 ((c) == '\n') || ((c) == '\r'))
@@ -59,56 +59,88 @@ static int  closestrfn  (void * cookie);
 #definertld_isspace(c) ((c) == ' ' || (c) == '\t')
 
 int
-lm_init (char *libmap_override)
+lm_init(char *libmap_override)
 {
-   FILE*fp;
-
-   dbg("%s(\"%s\")", __func__, libmap_override);
+   struct stat st;
+   char *lm_map, *p;
+   int fd;
 
+   dbg("lm_init(\"%s\")", libmap_override);
TAILQ_INIT(&lmp_head);
 
-   fp = fopen(_PATH_LIBMAP_CONF, "r");
-   if (fp) {
-   lmc_parse(fp);
-   fclose(fp);
+   fd = open(_PATH_LIBMAP_CONF, O_RDONLY);
+   if (fd == -1) {
+   dbg("lm_init: open(\"%s\") failed, %s", _PATH_LIBMAP_CONF,
+   strerror(errno));
+   goto override;
+   }
+   if (fstat(fd, &st) == -1) {
+   close(fd);
+   dbg("lm_init: fstat(\"%s\") failed, %s", _PATH_LIBMAP_CONF,
+   strerror(errno));
+   goto override;
}
+   lm_map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
+   if (lm_map == (const char *)MAP_FAILED) {
+   close(fd);
+   dbg("lm_init: mmap(\"%s\") failed, %s", _PATH_LIBMAP_CONF,
+   strerror(errno));
+   goto override;
+   }
+   close(fd);
+   lmc_parse(lm_map, st.st_size);
+   munmap(lm_map, st.st_size);
 
+override:
if (libmap_override) {
-   char*p;
-   /* do some character replacement to make $LIBMAP look like a
-  text file, then "open" it with funopen */
+   /*
+* Do some character replacement to make $LIBMAP look
+* like a text file, then parse it.
+*/
libmap_override = xstrdup(libmap_override);
-
for (p = libmap_override; *p; p++) {
switch (*p) {
-   case '=':
-   *p = ' '; break;
-   case ',':
-   *p = '\n'; break;
+   case '=':
+   *p = ' ';
+   break;
+   case ',':
+   *p = '\n';
+   break;
}
}
-   fp = funopen(libmap_override, readstrfn, NULL, NULL, 
closestrfn);
-   if (fp) {
-   lmc_parse(fp);
-   fclose(fp);
-   }
+   lmc_parse(p, strlen(p));
+   free(p);
}
 
return (lm_count == 0);
 }
 
 static void
-lmc_parse (FILE *fp)
+lmc_parse(char *lm_p, size_t lm_len)
 {
-   char*cp;
-   char*f, *t, *c, *p;
-   charprog[MAXPATHLEN];
-   ch

Re: svn commit: r232862 - head/libexec/rtld-elf

2012-03-12 Thread Konstantin Belousov
On Mon, Mar 12, 2012 at 12:16:08PM +, Konstantin Belousov wrote:
> Author: kib
> Date: Mon Mar 12 12:16:08 2012
> New Revision: 232862
> URL: http://svn.freebsd.org/changeset/base/232862
> 
> Log:
>   Rtld on diet part 2:
>   
>   Do not use stdio for libmap.conf read.  Directly map the file and
>   parse lines from the mappings.
>   
>   Reviewed by:kan
>   MFC after:  3 weeks
Sample sizes of the ld-elf.so.1 on amd64 before (/libexec/ld-elf.so.1)
and after the removal of stdio:
$ size /libexec/ld-elf.so.1 ld-elf.so.1
   textdata bss dec hex filename
 225195   15648   58448  299291   4911b /libexec/ld-elf.so.1
 1339819124   18072  161177   27599 ld-elf.so.1

Also, stdio and locale stuff recently requires fully initialized
C runtime (like TLS), which is not true for rtld and relatively hard
to provide at early stages of binary activation.


pgpWpGMLD3tzE.pgp
Description: PGP signature


Re: svn commit: r232844 - head/contrib/ntp/ntpd

2012-03-12 Thread Andrey Zonov

On 12.03.2012 15:41, Bjoern A. Zeeb wrote:



[zont@ws34-005 ~]$ ifconfig
igb0: flags=8843  metric 0 mtu 8950
options=500bb
ether 00:25:90:37:8b:cc
inet6 fe80::225:90ff:fe37:8bcc%igb0 prefixlen 64 tentative scopeid 0x1
inet X.X.X.X netmask 0xfc00 broadcast X.X.X.X
inet6 2a02:X:X:X::X:9f09 prefixlen 64 tentative
nd6 options=29


You are not doing IPv6 here, fix your rc.conf probably as told on boot to get 
rid of the ifdisabled.



That is new for me.  Thanks!

--
Andrey Zonov
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232865 - in head: sbin/ipfw sys/netinet sys/netinet/ipfw

2012-03-12 Thread Alexander V. Chernikov
Author: melifaro
Date: Mon Mar 12 14:07:57 2012
New Revision: 232865
URL: http://svn.freebsd.org/changeset/base/232865

Log:
  - Add ipfw eXtended tables permitting radix to be used for any kind of keys.
  - Add support for IPv6 and interface extended tables
  - Make number of tables to be loader tunable in range 0..65534.
  - Use IP_FW3 opcode for all new extended table cmds
  
  No ABI changes are introduced. Old userland will see valid tables for
  IPv4 tables and no entries otherwise. Flush works for any table.
  
  IP_FW3 socket option is used to encapsulate all new opcodes:
   /* IP_FW3 header/opcodes */
   typedef struct _ip_fw3_opheader {
  uint16_t opcode;/* Operation opcode */
  uint16_t reserved[3];   /* Align to 64-bit boundary */
   } ip_fw3_opheader;
  
  New opcodes added:
   IP_FW_TABLE_XADD, IP_FW_TABLE_XDEL, IP_FW_TABLE_XGETSIZE, IP_FW_TABLE_XLIST
  
  ipfw(8) table argument parsing behavior is changed:
   'ipfw table 999 add host' now assumes 'host' to be interface name instead of
   hostname.
  
  New tunable:
   net.inet.ip.fw.tables_max controls number of table supported by ipfw in given
   VNET instance. 128 is still the default value.
  
  New syntax:
  ipfw add skipto tablearg ip from any to any via table(42) in
  ipfw add skipto tablearg ip from any to any via table(4242) out
  
  This is a bit hackish, special interface name '\1' is used to signal interface
  table number is passed in p.glob field.
  
  Sponsored by Yandex LLC
  
  Reviewed by:ae
  Approved by:ae (mentor)
  
  MFC after:  4 weeks

Modified:
  head/sbin/ipfw/ipfw.8
  head/sbin/ipfw/ipfw2.c
  head/sys/netinet/ip_fw.h
  head/sys/netinet/ipfw/ip_fw2.c
  head/sys/netinet/ipfw/ip_fw_private.h
  head/sys/netinet/ipfw/ip_fw_sockopt.c
  head/sys/netinet/ipfw/ip_fw_table.c

Modified: head/sbin/ipfw/ipfw.8
==
--- head/sbin/ipfw/ipfw.8   Mon Mar 12 12:53:27 2012(r232864)
+++ head/sbin/ipfw/ipfw.8   Mon Mar 12 14:07:57 2012(r232865)
@@ -1,7 +1,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 6, 2012
+.Dd March 9, 2012
 .Dt IPFW 8
 .Os
 .Sh NAME
@@ -1539,7 +1539,7 @@ and they are always printed as hexadecim
 option is used, in which case symbolic resolution will be attempted).
 .It Cm proto Ar protocol
 Matches packets with the corresponding IP protocol.
-.It Cm recv | xmit | via Brq Ar ifX | Ar if Ns Cm * | Ar ipno | Ar any
+.It Cm recv | xmit | via Brq Ar ifX | Ar if Ns Cm * | Ar table Ns Pq Ar number 
Ns Op , Ns Ar value | Ar ipno | Ar any
 Matches packets received, transmitted or going through,
 respectively, the interface specified by exact name
 .Ns No ( Ar ifX Ns No ),
@@ -1738,22 +1738,21 @@ connected networks instead of all source
 .El
 .Sh LOOKUP TABLES
 Lookup tables are useful to handle large sparse sets of
-addresses or other search keys (e.g. ports, jail IDs).
-In the rest of this section we will use the term ``address''
-to mean any unsigned value of up to 32-bit.
-There may be up to 128 different lookup tables, numbered 0 to 127.
+addresses or other search keys (e.g. ports, jail IDs, interface names).
+In the rest of this section we will use the term ``address''.
+There may be up to 4096 different lookup tables, numbered 0 to 4095.
 .Pp
 Each entry is represented by an
 .Ar addr Ns Op / Ns Ar masklen
 and will match all addresses with base
 .Ar addr
-(specified as an IP address, a hostname or an unsigned integer)
+(specified as an IPv4/IPv6 address, a hostname or an unsigned integer)
 and mask width of
 .Ar masklen
 bits.
 If
 .Ar masklen
-is not specified, it defaults to 32.
+is not specified, it defaults to 32 for IPv4 and 128 for IPv6.
 When looking up an IP address in a table, the most specific
 entry will match.
 Associated with each entry is a 32-bit unsigned
@@ -1776,7 +1775,8 @@ Internally, each table is stored in a Ra
 the routing table (see
 .Xr route 4 ) .
 .Pp
-Lookup tables currently support only ports, jail IDs and IPv4 addresses.
+Lookup tables currently support only ports, jail IDs, IPv4/IPv6  addresses
+and interface names. Wildcards is not supported for interface names.
 .Pp
 The
 .Cm tablearg
@@ -2579,6 +2579,22 @@ instances.
 See
 .Sx SYSCTL VARIABLES 
 for more info.
+.Sh LOADER TUNABLES 
+Tunables can be set in
+.Xr loader 8
+prompt,
+.Xr loader.conf 5
+or
+.Xr kenv 1
+before ipfw module gets loaded.
+.Bl -tag -width indent
+.It Va net.inet.ip.fw.default_to_accept: No 0
+Defines ipfw last rule behavior. This value overrides
+.Cd "options IPFW_DEFAULT_TO_(ACCEPT|DENY)"
+from kernel configuration file.
+.It Va net.inet.ip.fw.tables_max: No 128
+Defines number of tables available in ipfw. Number cannot exceed 65534.
+.El
 .Sh SYSCTL VARIABLES
 A set of
 .Xr sysctl 8
@@ -3112,6 +3128,16 @@ action, the table entries may include ho
 .Dl "ipfw table 1 add 192.168.0.0/27 router1.dmz"
 .Dl "..."
 .Dl "ipfw add 100 fwd tablearg ip from any to table(1)"
+.Pp
+In the follo

Re: svn commit: r232865 - in head: sbin/ipfw sys/netinet sys/netinet/ipfw

2012-03-12 Thread Bjoern A. Zeeb

On 12. Mar 2012, at 14:07 , Alexander V. Chernikov wrote:

> Author: melifaro
> Date: Mon Mar 12 14:07:57 2012
> New Revision: 232865
> URL: http://svn.freebsd.org/changeset/base/232865
> 
> Log:
>  Sponsored by Yandex LLC
> 
>  Reviewed by:ae
>  Approved by:ae (mentor)

This broke at least VIMAGE builds:

/scratch/tmp/bz/head.svn/sys/modules/ipfw/../../netinet/ipfw/ip_fw2.c:170: 
error: initializer element is not constant
/scratch/tmp/bz/head.svn/sys/modules/ipfw/../../netinet/ipfw/ip_fw2.c:170: 
error: (near initialization for 'sysctl___net_inet_ip_fw_tables_max.oid_arg1')
/scratch/tmp/bz/head.svn/sys/modules/ipfw/../../netinet/ipfw/ip_fw2.c:177: 
error: initializer element is not constant
/scratch/tmp/bz/head.svn/sys/modules/ipfw/../../netinet/ipfw/ip_fw2.c:177: 
error: (near initialization for '__tunable_int_177.var')



-- 
Bjoern A. Zeeb You have to have visions!
   It does not matter how good you are. It matters what good you do!

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232866 - head/sys/netinet

2012-03-12 Thread Randall Stewart
Author: rrs
Date: Mon Mar 12 15:05:17 2012
New Revision: 232866
URL: http://svn.freebsd.org/changeset/base/232866

Log:
  This fixes PR 165210. Basically we just
  add in the netgraph interface to the list of
  acceptable interfaces. A todo at the next
  IETF code blitz, though is we need to review
  why we screen interfaces, there was a reason ;-).
  
  PR:   165210
  MFC after:1 week

Modified:
  head/sys/netinet/sctp_bsd_addr.c

Modified: head/sys/netinet/sctp_bsd_addr.c
==
--- head/sys/netinet/sctp_bsd_addr.cMon Mar 12 14:07:57 2012
(r232865)
+++ head/sys/netinet/sctp_bsd_addr.cMon Mar 12 15:05:17 2012
(r232866)
@@ -184,6 +184,7 @@ sctp_is_desired_interface_type(struct if
case IFT_IP:
case IFT_IPOVERCDLC:
case IFT_IPOVERCLAW:
+   case IFT_PROPVIRTUAL:   /* NetGraph Virtual too */
case IFT_VIRTUALIPADDRESS:
result = 1;
break;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232868 - head/sys/netinet/ipfw

2012-03-12 Thread Alexander V. Chernikov
Author: melifaro
Date: Mon Mar 12 15:41:36 2012
New Revision: 232868
URL: http://svn.freebsd.org/changeset/base/232868

Log:
  Fix VNET build broken by r232865.
  Temporary remove the ability to assign different number of tables per VNET 
instance.

Modified:
  head/sys/netinet/ipfw/ip_fw2.c
  head/sys/netinet/ipfw/ip_fw_private.h

Modified: head/sys/netinet/ipfw/ip_fw2.c
==
--- head/sys/netinet/ipfw/ip_fw2.c  Mon Mar 12 15:13:17 2012
(r232867)
+++ head/sys/netinet/ipfw/ip_fw2.c  Mon Mar 12 15:41:36 2012
(r232868)
@@ -117,7 +117,7 @@ VNET_DEFINE(int, autoinc_step);
 VNET_DEFINE(int, fw_one_pass) = 1;
 
 /* Use 128 tables by default */
-VNET_DEFINE(int, fw_tables_max) = IPFW_TABLES_MAX;
+int fw_tables_max = IPFW_TABLES_MAX;
 
 /*
  * Each rule belongs to one of 32 different sets (0..31).

Modified: head/sys/netinet/ipfw/ip_fw_private.h
==
--- head/sys/netinet/ipfw/ip_fw_private.h   Mon Mar 12 15:13:17 2012
(r232867)
+++ head/sys/netinet/ipfw/ip_fw_private.h   Mon Mar 12 15:41:36 2012
(r232868)
@@ -209,8 +209,8 @@ VNET_DECLARE(u_int32_t, set_disable);
 VNET_DECLARE(int, autoinc_step);
 #define V_autoinc_step VNET(autoinc_step)
 
-VNET_DECLARE(int, fw_tables_max);
-#define V_fw_tables_maxVNET(fw_tables_max)
+extern int fw_tables_max;
+#define V_fw_tables_maxfw_tables_max
 
 struct ip_fw_chain {
struct ip_fw*rules; /* list of rules */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r232868 - head/sys/netinet/ipfw

2012-03-12 Thread Marko Zec
On Monday 12 March 2012 16:41:36 Alexander V. Chernikov wrote:
> Author: melifaro
> Date: Mon Mar 12 15:41:36 2012
> New Revision: 232868
> URL: http://svn.freebsd.org/changeset/base/232868
>
> Log:
>   Fix VNET build broken by r232865.
>   Temporary remove the ability to assign different number of tables per
> VNET instance.

Please don't let your code remain in this state for too long.  You've declared 
V_fw_tables_max to unconditionally resolve to a true global variable, which 
violates the convention of using V_ prefix in networking code exclusively for 
the purpose of denoting VNET-virtualized state.

Thanks,

Marko


> Modified:
>   head/sys/netinet/ipfw/ip_fw2.c
>   head/sys/netinet/ipfw/ip_fw_private.h
>
> Modified: head/sys/netinet/ipfw/ip_fw2.c
> ===
>=== --- head/sys/netinet/ipfw/ip_fw2.c Mon Mar 12 15:13:17 2012
>(r232867)
> +++ head/sys/netinet/ipfw/ip_fw2.cMon Mar 12 15:41:36 2012
> (r232868) @@
> -117,7 +117,7 @@ VNET_DEFINE(int, autoinc_step);
>  VNET_DEFINE(int, fw_one_pass) = 1;
>
>  /* Use 128 tables by default */
> -VNET_DEFINE(int, fw_tables_max) = IPFW_TABLES_MAX;
> +int fw_tables_max = IPFW_TABLES_MAX;
>
>  /*
>   * Each rule belongs to one of 32 different sets (0..31).
>
> Modified: head/sys/netinet/ipfw/ip_fw_private.h
> ===
>=== --- head/sys/netinet/ipfw/ip_fw_private.h  Mon Mar 12 15:13:17
> 2012  (r232867) +++ head/sys/netinet/ipfw/ip_fw_private.h Mon Mar 12
> 15:41:36 2012 (r232868) @@ -209,8 +209,8 @@ VNET_DECLARE(u_int32_t,
> set_disable);
>  VNET_DECLARE(int, autoinc_step);
>  #define V_autoinc_step   VNET(autoinc_step)
>
> -VNET_DECLARE(int, fw_tables_max);
> -#define V_fw_tables_max  VNET(fw_tables_max)
> +extern int fw_tables_max;
> +#define V_fw_tables_max  fw_tables_max
>
>  struct ip_fw_chain {
>   struct ip_fw*rules; /* list of rules */


___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232869 - head/sys/dev/hwpmc

2012-03-12 Thread Adrian Chadd
Author: adrian
Date: Mon Mar 12 17:25:35 2012
New Revision: 232869
URL: http://svn.freebsd.org/changeset/base/232869

Log:
  This header file no longer exists when doing cross builds, so remove it.
  
  mips24k hwpmc now compiles again.

Modified:
  head/sys/dev/hwpmc/hwpmc_mips24k.c

Modified: head/sys/dev/hwpmc/hwpmc_mips24k.c
==
--- head/sys/dev/hwpmc/hwpmc_mips24k.c  Mon Mar 12 15:41:36 2012
(r232868)
+++ head/sys/dev/hwpmc/hwpmc_mips24k.c  Mon Mar 12 17:25:35 2012
(r232869)
@@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
-#include 
 #include 
 
 /*
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232872 - in head/sys/mips: include mips

2012-03-12 Thread Juli Mallett
Author: jmallett
Date: Mon Mar 12 18:10:01 2012
New Revision: 232872
URL: http://svn.freebsd.org/changeset/base/232872

Log:
  Remove more unused stuff, primarily a set of (unused, thankfully) PIO
  functions.
  
  Adjust nearby style of one assembly function END().

Modified:
  head/sys/mips/include/cpufunc.h
  head/sys/mips/mips/support.S
  head/sys/mips/mips/swtch.S

Modified: head/sys/mips/include/cpufunc.h
==
--- head/sys/mips/include/cpufunc.h Mon Mar 12 17:56:57 2012
(r232871)
+++ head/sys/mips/include/cpufunc.h Mon Mar 12 18:10:01 2012
(r232872)
@@ -106,18 +106,6 @@ mips_wbflush(void)
 #endif
 }
 
-static __inline void
-mips_read_membar(void)
-{
-   /* Nil */
-}
-
-static __inline void
-mips_write_membar(void)
-{
-   mips_wbflush();
-}
-
 #ifdef _KERNEL
 /*
  * XXX
@@ -354,29 +342,8 @@ breakpoint(void)
 }
 
 #if defined(__GNUC__) && !defined(__mips_o32)
-static inline uint64_t
-mips3_ld(const volatile uint64_t *va)
-{
-   uint64_t rv;
-
-#if defined(_LP64)
-   rv = *va;
-#else
-   __asm volatile("ld  %0,0(%1)" : "=d"(rv) : "r"(va));
-#endif
-
-   return (rv);
-}
-
-static inline void
-mips3_sd(volatile uint64_t *va, uint64_t v)
-{
-#if defined(_LP64)
-   *va = v;
-#else
-   __asm volatile("sd  %0,0(%1)" :: "r"(v), "r"(va));
-#endif
-}
+#definemips3_ld(a) (*(const volatile uint64_t *)(a))
+#definemips3_sd(a, v)  (*(volatile uint64_t *)(a) = (v))
 #else
 uint64_t mips3_ld(volatile uint64_t *va);
 void mips3_sd(volatile uint64_t *, uint64_t);
@@ -392,81 +359,4 @@ void mips3_sd(volatile uint64_t *, uint6
 #definewritew(va, d)   (*(volatile uint16_t *) (va) = (d))
 #definewritel(va, d)   (*(volatile uint32_t *) (va) = (d))
 
-/*
- * I/O macros.
- */
-
-#defineoutb(a,v)   (*(volatile unsigned char*)(a) = (v))
-#defineout8(a,v)   (*(volatile unsigned char*)(a) = (v))
-#defineoutw(a,v)   (*(volatile unsigned short*)(a) = (v))
-#defineout16(a,v)  outw(a,v)
-#defineoutl(a,v)   (*(volatile unsigned int*)(a) = (v))
-#defineout32(a,v)  outl(a,v)
-#defineinb(a)  (*(volatile unsigned char*)(a))
-#definein8(a)  (*(volatile unsigned char*)(a))
-#defineinw(a)  (*(volatile unsigned short*)(a))
-#definein16(a) inw(a)
-#defineinl(a)  (*(volatile unsigned int*)(a))
-#definein32(a) inl(a)
-
-#defineout8rb(a,v) (*(volatile unsigned char*)(a) = (v))
-#defineout16rb(a,v)(__out16rb((volatile uint16_t *)(a), v))
-#defineout32rb(a,v)(__out32rb((volatile uint32_t *)(a), v))
-#definein8rb(a)(*(volatile unsigned char*)(a))
-#definein16rb(a)   (__in16rb((volatile uint16_t *)(a)))
-#definein32rb(a)   (__in32rb((volatile uint32_t *)(a)))
-
-#define_swap_(x)   (((x) >> 24) | ((x) << 24) | \
-   (((x) >> 8) & 0xff00) | (((x) & 0xff00) << 8))
-
-static __inline void __out32rb(volatile uint32_t *, uint32_t);
-static __inline void __out16rb(volatile uint16_t *, uint16_t);
-static __inline uint32_t __in32rb(volatile uint32_t *);
-static __inline uint16_t __in16rb(volatile uint16_t *);
-
-static __inline void
-__out32rb(volatile uint32_t *a, uint32_t v)
-{
-   uint32_t _v_ = v;
-
-   _v_ = _swap_(_v_);
-   out32(a, _v_);
-}
-
-static __inline void
-__out16rb(volatile uint16_t *a, uint16_t v)
-{
-   uint16_t _v_;
-
-   _v_ = ((v >> 8) & 0xff) | (v << 8);
-   out16(a, _v_);
-}
-
-static __inline uint32_t
-__in32rb(volatile uint32_t *a)
-{
-   uint32_t _v_;
-
-   _v_ = in32(a);
-   _v_ = _swap_(_v_);
-   return _v_;
-}
-
-static __inline uint16_t
-__in16rb(volatile uint16_t *a)
-{
-   uint16_t _v_;
-
-   _v_ = in16(a);
-   _v_ = ((_v_ >> 8) & 0xff) | (_v_ << 8);
-   return _v_;
-}
-
-void insb(uint8_t *, uint8_t *,int);
-void insw(uint16_t *, uint16_t *,int);
-void insl(uint32_t *, uint32_t *,int);
-void outsb(uint8_t *, const uint8_t *,int);
-void outsw(uint16_t *, const uint16_t *,int);
-void outsl(uint32_t *, const uint32_t *,int);
-
 #endif /* !_MACHINE_CPUFUNC_H_ */

Modified: head/sys/mips/mips/support.S
==
--- head/sys/mips/mips/support.SMon Mar 12 17:56:57 2012
(r232871)
+++ head/sys/mips/mips/support.SMon Mar 12 18:10:01 2012
(r232872)
@@ -167,148 +167,6 @@ END(copystr)
 
 
 /*
- * fillw(pat, addr, count)
- */
-LEAF(fillw)
-1:
-   PTR_ADDUa2, a2, -1
-   sh  a0, 0(a1)
-   bne a2,zero, 1b
-   PTR_ADDUa1, a1, 2
-
-   jr  ra
-   nop
-END(fillw)
-
-/*
- * Optimized memory zero code.
- * mem_zero_page(addr);
- */
-LEAF(mem_zero_page)
-   li  v0, PAGE_SIZE
-

svn commit: r232874 - in head/sys/dev: de glxsb hatm ipw ixgb ixgbe lmc mge mxge nve patm safe trm ubsec

2012-03-12 Thread Scott Long
Author: scottl
Date: Mon Mar 12 18:15:08 2012
New Revision: 232874
URL: http://svn.freebsd.org/changeset/base/232874

Log:
  More conversions of drivers to use the PCI parent DMA tag.

Modified:
  head/sys/dev/de/if_de.c
  head/sys/dev/glxsb/glxsb.c
  head/sys/dev/hatm/if_hatm.c
  head/sys/dev/ipw/if_ipw.c
  head/sys/dev/ipw/if_ipwvar.h
  head/sys/dev/ixgb/if_ixgb.c
  head/sys/dev/ixgbe/ixgbe.c
  head/sys/dev/ixgbe/ixv.c
  head/sys/dev/lmc/if_lmc.c
  head/sys/dev/mge/if_mge.c
  head/sys/dev/mxge/if_mxge.c
  head/sys/dev/nve/if_nve.c
  head/sys/dev/patm/if_patm_attach.c
  head/sys/dev/safe/safe.c
  head/sys/dev/trm/trm.c
  head/sys/dev/ubsec/ubsec.c

Modified: head/sys/dev/de/if_de.c
==
--- head/sys/dev/de/if_de.c Mon Mar 12 18:13:59 2012(r232873)
+++ head/sys/dev/de/if_de.c Mon Mar 12 18:15:08 2012(r232874)
@@ -4492,7 +4492,8 @@ tulip_busdma_allocring(device_t dev, tul
 /* First, setup a tag. */
 ri->ri_max = count;
 size = count * sizeof(tulip_desc_t);
-error = bus_dma_tag_create(NULL, 32, 0, BUS_SPACE_MAXADDR_32BIT,
+error = bus_dma_tag_create(bus_get_dma_tag(dev),
+   32, 0, BUS_SPACE_MAXADDR_32BIT,
BUS_SPACE_MAXADDR, NULL, NULL, size, 1, size, 0, NULL, NULL,
&ri->ri_ring_tag);
 if (error) {
@@ -4520,7 +4521,7 @@ tulip_busdma_allocring(device_t dev, tul
 }
 
 /* Allocate a tag for the data buffers. */
-error = bus_dma_tag_create(NULL, align, 0,
+error = bus_dma_tag_create(bus_get_dma_tag(dev), align, 0,
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
MCLBYTES * nsegs, nsegs, MCLBYTES, 0, NULL, NULL, &ri->ri_data_tag);
 if (error) {
@@ -4600,7 +4601,7 @@ tulip_busdma_init(device_t dev, tulip_so
 /*
  * Allocate a DMA tag, memory, and map for setup descriptor
  */
-error = bus_dma_tag_create(NULL, 32, 0,
+error = bus_dma_tag_create(bus_get_dma_tag(dev), 32, 0,
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
sizeof(sc->tulip_setupdata), 1, sizeof(sc->tulip_setupdata), 0,
NULL, NULL, &sc->tulip_setup_tag);

Modified: head/sys/dev/glxsb/glxsb.c
==
--- head/sys/dev/glxsb/glxsb.c  Mon Mar 12 18:13:59 2012(r232873)
+++ head/sys/dev/glxsb/glxsb.c  Mon Mar 12 18:15:08 2012(r232874)
@@ -397,7 +397,7 @@ glxsb_dma_alloc(struct glxsb_softc *sc)
dma->dma_size = GLXSB_MAX_AES_LEN * 2;
 
/* Setup DMA descriptor area */
-   rc = bus_dma_tag_create(NULL,   /* parent */
+   rc = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev),/* parent */
SB_AES_ALIGN, 0,/* alignments, bounds */
BUS_SPACE_MAXADDR_32BIT,/* lowaddr */
BUS_SPACE_MAXADDR,  /* highaddr */

Modified: head/sys/dev/hatm/if_hatm.c
==
--- head/sys/dev/hatm/if_hatm.c Mon Mar 12 18:13:59 2012(r232873)
+++ head/sys/dev/hatm/if_hatm.c Mon Mar 12 18:15:08 2012(r232874)
@@ -1722,7 +1722,7 @@ hatm_attach(device_t dev)
/*
 * ALlocate a DMA tag for subsequent allocations
 */
-   if (bus_dma_tag_create(NULL, 1, 0,
+   if (bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0,
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR,
NULL, NULL,
BUS_SPACE_MAXSIZE_32BIT, 1,
@@ -1751,7 +1751,7 @@ hatm_attach(device_t dev)
 * but this would not work. So make the maximum number of TPDs
 * occupied by one packet a configuration parameter.
 */
-   if (bus_dma_tag_create(NULL, 1, 0,
+   if (bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0,
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
HE_MAX_PDU, 3 * HE_CONFIG_MAX_TPD_PER_PACKET, HE_MAX_PDU, 0,
NULL, NULL, &sc->tx_tag)) {

Modified: head/sys/dev/ipw/if_ipw.c
==
--- head/sys/dev/ipw/if_ipw.c   Mon Mar 12 18:13:59 2012(r232873)
+++ head/sys/dev/ipw/if_ipw.c   Mon Mar 12 18:15:08 2012(r232874)
@@ -528,9 +528,21 @@ ipw_dma_alloc(struct ipw_softc *sc)
int error, i;
 
/*
+* Allocate parent DMA tag for subsequent allocations.
+*/
+   error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0,
+   BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
+   BUS_SPACE_MAXSIZE_32BIT, BUS_SPACE_UNRESTRICTED,
+   BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL, &sc->parent_dmat);
+   if (error != 0) {
+   device_printf(sc->sc_dev, "could not create parent DMA tag\n");
+   goto fail;
+   }
+
+   /*
 * Allocate and map tx ring.
 */
-   error = bus_dma_tag_creat

svn commit: r232880 - head/usr.sbin/pc-sysinstall/backend

2012-03-12 Thread Josh Paetzel
Author: jpaetzel
Date: Mon Mar 12 18:50:37 2012
New Revision: 232880
URL: http://svn.freebsd.org/changeset/base/232880

Log:
  Fix a bug running the autoinstall functionality.
  
  Submitted by: kris
  Obtained from:PC-BSD

Modified:
  head/usr.sbin/pc-sysinstall/backend/startautoinstall.sh

Modified: head/usr.sbin/pc-sysinstall/backend/startautoinstall.sh
==
--- head/usr.sbin/pc-sysinstall/backend/startautoinstall.sh Mon Mar 12 
18:44:30 2012(r232879)
+++ head/usr.sbin/pc-sysinstall/backend/startautoinstall.sh Mon Mar 12 
18:50:37 2012(r232880)
@@ -114,7 +114,7 @@ then
 esac
   fi
 
-  ${PROGDIR}/pc-sysinstall -c ${INSTALL_CFG}
+  pc-sysinstall -c ${INSTALL_CFG}
   if [ $? -eq 0 ]
   then
 if [ -n "$SHUTDOWN_CMD" ]
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232881 - head/sys/mips/include

2012-03-12 Thread Juli Mallett
Author: jmallett
Date: Mon Mar 12 18:56:16 2012
New Revision: 232881
URL: http://svn.freebsd.org/changeset/base/232881

Log:
  Use 64-bit bus space constants on 64-bit kernels.

Modified:
  head/sys/mips/include/bus.h

Modified: head/sys/mips/include/bus.h
==
--- head/sys/mips/include/bus.h Mon Mar 12 18:50:37 2012(r232880)
+++ head/sys/mips/include/bus.h Mon Mar 12 18:56:16 2012(r232881)
@@ -707,11 +707,19 @@ void  __bs_c(f,_bs_c_8) (void *t, bus_spa
 #define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
 
 #define BUS_SPACE_MAXADDR_24BIT0xFF
-#define BUS_SPACE_MAXADDR_32BIT 0x
-#define BUS_SPACE_MAXADDR  0x
 #define BUS_SPACE_MAXSIZE_24BIT0xFF
+
+#define BUS_SPACE_MAXADDR_32BIT 0x
 #define BUS_SPACE_MAXSIZE_32BIT0x
-#define BUS_SPACE_MAXSIZE  0x
+
+#if defined(__mips_n64)
+#define BUS_SPACE_MAXADDR  0xUL
+#define BUS_SPACE_MAXSIZE  0xUL
+#else
+#define BUS_SPACE_MAXADDR  0xUL
+#define BUS_SPACE_MAXSIZE  0xUL
+#endif
+
 
 #define BUS_SPACE_UNRESTRICTED (~0)
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232882 - in head/sys/dev: advansys aic7xxx buslogic dpt iir

2012-03-12 Thread Juli Mallett
Author: jmallett
Date: Mon Mar 12 19:29:32 2012
New Revision: 232882
URL: http://svn.freebsd.org/changeset/base/232882

Log:
  Remove comments about creating DMA tags as children of the DMA tags of their
  parent bus where the code has now been modified to do so.
  
  Reviewed by:  scottl

Modified:
  head/sys/dev/advansys/adv_pci.c
  head/sys/dev/advansys/adw_pci.c
  head/sys/dev/aic7xxx/ahc_eisa.c
  head/sys/dev/aic7xxx/ahc_isa.c
  head/sys/dev/aic7xxx/ahc_pci.c
  head/sys/dev/aic7xxx/ahd_pci.c
  head/sys/dev/buslogic/bt_pci.c
  head/sys/dev/dpt/dpt_pci.c
  head/sys/dev/iir/iir_pci.c

Modified: head/sys/dev/advansys/adv_pci.c
==
--- head/sys/dev/advansys/adv_pci.c Mon Mar 12 18:56:16 2012
(r232881)
+++ head/sys/dev/advansys/adv_pci.c Mon Mar 12 19:29:32 2012
(r232882)
@@ -187,7 +187,6 @@ adv_pci_attach(device_t dev)
}
 
/* Allocate a dmatag for our transfer DMA maps */
-   /* XXX Should be a child of the PCI bus dma tag */
error = bus_dma_tag_create(
/* parent   */ bus_get_dma_tag(dev),
/* alignment*/ 1,

Modified: head/sys/dev/advansys/adw_pci.c
==
--- head/sys/dev/advansys/adw_pci.c Mon Mar 12 18:56:16 2012
(r232881)
+++ head/sys/dev/advansys/adw_pci.c Mon Mar 12 19:29:32 2012
(r232882)
@@ -258,7 +258,6 @@ adw_pci_attach(device_t dev)
pci_write_config(dev, PCIR_COMMAND, command, /*bytes*/1);
 
/* Allocate a dmatag for our transfer DMA maps */
-   /* XXX Should be a child of the PCI bus dma tag */
error = bus_dma_tag_create(
/* parent   */ bus_get_dma_tag(dev),
/* alignment*/ 1,

Modified: head/sys/dev/aic7xxx/ahc_eisa.c
==
--- head/sys/dev/aic7xxx/ahc_eisa.c Mon Mar 12 18:56:16 2012
(r232881)
+++ head/sys/dev/aic7xxx/ahc_eisa.c Mon Mar 12 19:29:32 2012
(r232882)
@@ -130,7 +130,6 @@ aic7770_attach(device_t dev)
ahc_set_unit(ahc, device_get_unit(dev));
 
/* Allocate a dmatag for our SCB DMA maps */
-   /* XXX Should be a child of the PCI bus dma tag */
error = aic_dma_tag_create(ahc, /*parent*/bus_get_dma_tag(dev),
   /*alignment*/1, /*boundary*/0,
   /*lowaddr*/BUS_SPACE_MAXADDR_32BIT,

Modified: head/sys/dev/aic7xxx/ahc_isa.c
==
--- head/sys/dev/aic7xxx/ahc_isa.c  Mon Mar 12 18:56:16 2012
(r232881)
+++ head/sys/dev/aic7xxx/ahc_isa.c  Mon Mar 12 19:29:32 2012
(r232882)
@@ -253,7 +253,6 @@ ahc_isa_attach(device_t dev)
ahc_set_unit(ahc, device_get_unit(dev));
 
/* Allocate a dmatag for our SCB DMA maps */
-   /* XXX Should be a child of the VLB/ISA bus dma tag */
error = aic_dma_tag_create(ahc, /*parent*/bus_get_dma_tag(dev),
   /*alignment*/1, /*boundary*/0,
   /*lowaddr*/BUS_SPACE_MAXADDR_32BIT,

Modified: head/sys/dev/aic7xxx/ahc_pci.c
==
--- head/sys/dev/aic7xxx/ahc_pci.c  Mon Mar 12 18:56:16 2012
(r232881)
+++ head/sys/dev/aic7xxx/ahc_pci.c  Mon Mar 12 19:29:32 2012
(r232882)
@@ -105,7 +105,6 @@ ahc_pci_attach(device_t dev)
 ahc->flags |= AHC_39BIT_ADDRESSING;
 
/* Allocate a dmatag for our SCB DMA maps */
-   /* XXX Should be a child of the PCI bus dma tag */
error = aic_dma_tag_create(ahc, /*parent*/bus_get_dma_tag(dev),
   /*alignment*/1, /*boundary*/0,
   (ahc->flags & AHC_39BIT_ADDRESSING)

Modified: head/sys/dev/aic7xxx/ahd_pci.c
==
--- head/sys/dev/aic7xxx/ahd_pci.c  Mon Mar 12 18:56:16 2012
(r232881)
+++ head/sys/dev/aic7xxx/ahd_pci.c  Mon Mar 12 19:29:32 2012
(r232882)
@@ -107,7 +107,6 @@ ahd_pci_attach(device_t dev)
 ahd->flags |= AHD_39BIT_ADDRESSING;
 
/* Allocate a dmatag for our SCB DMA maps */
-   /* XXX Should be a child of the PCI bus dma tag */
error = aic_dma_tag_create(ahd, /*parent*/bus_get_dma_tag(dev),
   /*alignment*/1, /*boundary*/0,
   (ahd->flags & AHD_39BIT_ADDRESSING)

Modified: head/sys/dev/buslogic/bt_pci.c
==
--- head/sys/dev/buslogic/bt_pci.c  Mon Mar 12 18:56:16 2012
(r232881)
+++ head/sys/dev/buslogic/bt_pci.c  Mon Mar 12 19:29:32 2012
(r

svn commit: r232883 - in head/sys/dev: advansys ahb cesa en wds xen/blkfront

2012-03-12 Thread Scott Long
Author: scottl
Date: Mon Mar 12 19:29:35 2012
New Revision: 232883
URL: http://svn.freebsd.org/changeset/base/232883

Log:
  Final pass at having devices use their bus parent for dma tags.  The
  remaining drivers that haven't been converted have various problems or
  complexities that will be dealt with later.  This list includes:
  
  hptrr, hptmv, hpt27xx - device aggregation across multiple parents
  drm - want to talk to the maintainer first
  tsec, sec - Openfirmware devices, not sure if changes are warranted
  fatm - Done except for unused testing code
  usb - want to talk to the maintainer first
  ce, cp, ctau, cx - Significant driver changes needed to convey parent info
  
  There are also devices tucked into architecture subtrees that I'll leave
  for the respective maintainers to deal with.

Modified:
  head/sys/dev/advansys/adv_eisa.c
  head/sys/dev/advansys/adv_isa.c
  head/sys/dev/ahb/ahb.c
  head/sys/dev/cesa/cesa.c
  head/sys/dev/en/midway.c
  head/sys/dev/wds/wd7000.c
  head/sys/dev/xen/blkfront/blkfront.c

Modified: head/sys/dev/advansys/adv_eisa.c
==
--- head/sys/dev/advansys/adv_eisa.cMon Mar 12 19:29:32 2012
(r232882)
+++ head/sys/dev/advansys/adv_eisa.cMon Mar 12 19:29:35 2012
(r232883)
@@ -171,9 +171,8 @@ adv_eisa_attach(device_t dev)
 * Allocate a parent dmatag for all tags created
 * by the MI portions of the advansys driver
 */
-   /* XXX Should be a child of the PCI bus dma tag */
error = bus_dma_tag_create(
-   /* parent   */ NULL,
+   /* parent   */ bus_get_dma_tag(dev),
/* alignment*/ 1,
/* boundary */ 0,
/* lowaddr  */ ADV_EISA_MAX_DMA_ADDR,
@@ -211,9 +210,8 @@ adv_eisa_attach(device_t dev)
 * Allocate a parent dmatag for all tags created
 * by the MI portions of the advansys driver
 */
-   /* XXX Should be a child of the PCI bus dma tag */
error = bus_dma_tag_create(
-   /* parent   */ NULL,
+   /* parent   */ bus_get_dma_tag(dev),
/* alignment*/ 1,
/* boundary */ 0,
/* lowaddr  */ ADV_EISA_MAX_DMA_ADDR,

Modified: head/sys/dev/advansys/adv_isa.c
==
--- head/sys/dev/advansys/adv_isa.c Mon Mar 12 19:29:32 2012
(r232882)
+++ head/sys/dev/advansys/adv_isa.c Mon Mar 12 19:29:35 2012
(r232883)
@@ -226,9 +226,8 @@ adv_isa_probe(device_t dev)
 * Allocate a parent dmatag for all tags created
 * by the MI portions of the advansys driver
 */
-   /* XXX Should be a child of the ISA bus dma tag */ 
error = bus_dma_tag_create(
-   /* parent   */ NULL,
+   /* parent   */ bus_get_dma_tag(dev),
/* alignemnt*/ 1,
/* boundary */ 0,
/* lowaddr  */ lowaddr,

Modified: head/sys/dev/ahb/ahb.c
==
--- head/sys/dev/ahb/ahb.c  Mon Mar 12 19:29:32 2012(r232882)
+++ head/sys/dev/ahb/ahb.c  Mon Mar 12 19:29:35 2012(r232883)
@@ -292,7 +292,7 @@ ahbattach(device_t dev)
 */
/* DMA tag for mapping buffers into device visible space. */
/* XXX Should be a child of the EISA bus dma tag */
-   if (bus_dma_tag_create( /* parent   */ NULL,
+   if (bus_dma_tag_create( /* parent   */ bus_get_dma_tag(dev),
/* alignment*/ 1,
/* boundary */ 0,
/* lowaddr  */ BUS_SPACE_MAXADDR_32BIT,
@@ -311,7 +311,7 @@ ahbattach(device_t dev)
ahb->init_level++;
 
/* DMA tag for our ccb structures and ha inquiry data */
-   if (bus_dma_tag_create( /* parent   */ NULL,
+   if (bus_dma_tag_create( /* parent   */ bus_get_dma_tag(dev),
/* alignment*/ 1,
/* boundary */ 0,
/* lowaddr  */ BUS_SPACE_MAXADDR_32BIT,

Modified: head/sys/dev/cesa/cesa.c
==
--- head/sys/dev/cesa/cesa.cMon Mar 12 19:29:32 2012(r232882)
+++ head/sys/dev/cesa/cesa.cMon Mar 12 19:29:35 2012(r232883)
@@ -157,7 +157,7 @@ cesa_alloc_dma_mem(struct cesa_softc *sc
 

svn commit: r232884 - head/libexec/rtld-elf/mips

2012-03-12 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Mon Mar 12 20:24:59 2012
New Revision: 232884
URL: http://svn.freebsd.org/changeset/base/232884

Log:
  - Although we pass first 4 arguments in registers, function callinf ABI 
requires
 space to be reserved for them in stack. _rtld() prologue saves a1 and a2 in
 this space.
  
  - Whitespace cleanup while I'm at it

Modified:
  head/libexec/rtld-elf/mips/rtld_start.S

Modified: head/libexec/rtld-elf/mips/rtld_start.S
==
--- head/libexec/rtld-elf/mips/rtld_start.S Mon Mar 12 19:29:35 2012
(r232883)
+++ head/libexec/rtld-elf/mips/rtld_start.S Mon Mar 12 20:24:59 2012
(r232884)
@@ -58,28 +58,30 @@ LEAF(rtld_start)
 
PTR_LA  a1, 1f
bal 1f
-PTR_LA t0, _C_LABEL(_rtld_relocate_nonplt_self)
+   PTR_LA  t0, _C_LABEL(_rtld_relocate_nonplt_self)
 1: PTR_SUBU a1, ra, a1 /* relocbase */
PTR_LA  a0, _DYNAMIC
PTR_ADDU t9, a1, t0
jalrt9  /* _rtld_relocate_nonplt_self(dynp, 
relocabase) */
-PTR_ADDU a0, a1, a0/* &_DYNAMIC */
+   PTR_ADDU a0, a1, a0 /* &_DYNAMIC */
 
movea0, s0  /* sp */
PTR_ADDU a1, sp, 2*PTR_SIZE /* &our atexit function */
PTR_ADDU a2, sp, 3*PTR_SIZE /* obj_main entry */
+   subusp, 4*SZREG /* ABI requires to reserve memory for 4 
regs */
PTR_LA  t9, _C_LABEL(_rtld)
jalrt9  /* v0 = _rtld(sp, cleanup, objp) */
-nop
+   nop
+   addusp, 4*SZREG
 
PTR_L   a1, 2*PTR_SIZE(sp)  /* our atexit function */
PTR_L   a2, 3*PTR_SIZE(sp)  /* obj_main entry */
PTR_ADDU sp, 4*PTR_SIZE /* readjust stack */
movea0, s0  /* stack pointer */
movet9, v0
+   subusp, 4*SZREG /* ABI requires to reserve memory for 4 
regs */
jr  t9  /* _start(sp, cleanup, obj); */
-move   a3, s3  /* restore ps_strings */
-
+   movea3, s3  /* restore ps_strings */
 END(rtld_start)
 
 #defineXCALLFRAME_SIZ  (12*SZREG)
@@ -140,7 +142,7 @@ _rtld_bind_start:
 
PTR_LA  t9, _C_LABEL(_mips_rtld_bind)
jalrt9
-nop
+   nop
 
movesp, s0
REG_L   ra, XCALLFRAME_RA(sp)
@@ -159,5 +161,5 @@ _rtld_bind_start:
PTR_ADDU sp, XCALLFRAME_SIZ
movet9, v0
jr  t9
-nop
+   nop
 END(_rtld_bind_start)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232887 - head/sys/mips/conf

2012-03-12 Thread Adrian Chadd
Author: adrian
Date: Mon Mar 12 20:32:23 2012
New Revision: 232887
URL: http://svn.freebsd.org/changeset/base/232887

Log:
  Configuration changes/updates!
  
  * enable ALQ and net80211/ath ALQ logging by default, to make it possible
to get debug register traces.
  * Update some comments
  * Enable HWPMC for testing.

Modified:
  head/sys/mips/conf/AR91XX_BASE

Modified: head/sys/mips/conf/AR91XX_BASE
==
--- head/sys/mips/conf/AR91XX_BASE  Mon Mar 12 20:31:58 2012
(r232886)
+++ head/sys/mips/conf/AR91XX_BASE  Mon Mar 12 20:32:23 2012
(r232887)
@@ -21,10 +21,11 @@ files   "../atheros/files.ar71xx"
 hints  "AR91XX_BASE.hints"
 
 makeoptionsDEBUG=-g#Build kernel with gdb(1) debug symbols
-makeoptionsMODULES_OVERRIDE=""
+makeoptionsMODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge 
bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp 
wlan_rssadapt wlan_amrr ath ath_ahb hwpmc"
 
 optionsDDB
 optionsKDB
+optionsALQ
 
 optionsSCHED_4BSD  #4BSD scheduler
 optionsINET#InterNETworking
@@ -33,6 +34,10 @@ options  INET6   #InterNETworking
 optionsPSEUDOFS#Pseudo-filesystem framework
 options_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time 
extensions
 
+# PMC
+optionsHWPMC_HOOKS
+device hwpmc
+
 # options  NFS_LEGACYRPC
 # Debugging for use in -current
 optionsINVARIANTS
@@ -49,19 +54,21 @@ options NO_FFS_SNAPSHOT # We don't req
 optionsIEEE80211_DEBUG
 optionsIEEE80211_SUPPORT_MESH
 optionsIEEE80211_SUPPORT_TDMA
+optionsIEEE80211_ALQ   # 802.11 ALQ logging support
 device wlan# 802.11 support
 device wlan_wep# 802.11 WEP support
 device wlan_ccmp   # 802.11 CCMP support
 device wlan_tkip   # 802.11 TKIP support
 device wlan_xauth  # 802.11 hostap support
 
-# This will come later -adrian
-device ath # Atheros pci/cardbus NIC's
+# ath(4)
+device ath # Atheros network device
 device ath_rate_sample
-device ath_ahb
+device ath_ahb # Atheros host bus glue
 optionsATH_DEBUG
 optionsATH_DIAGAPI
 option ATH_ENABLE_11N
+option AH_DEBUG_ALQ
 
 # Don't bother compiling the whole HAL - AH_SUPPORT_AR9130 breaks the
 # rest of the 11n chipset support at the moment and the pre-AR5212
@@ -76,6 +83,7 @@ deviceath_ar9130
 optionsAH_DEBUG
 option AH_SUPPORT_AR5416
 option AH_SUPPORT_AR9130   # Makes other chipsets not function!
+option AH_DEBUG_ALQ
 # interrupt mitigation not possible on AR9130
 # option   AH_AR5416_INTERRUPT_MITIGATION
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232886 - head/sys/dev/ahb

2012-03-12 Thread Scott Long
Author: scottl
Date: Mon Mar 12 20:31:58 2012
New Revision: 232886
URL: http://svn.freebsd.org/changeset/base/232886

Log:
  Remove a stale comment.
  
  Submitted by: jimharris

Modified:
  head/sys/dev/ahb/ahb.c

Modified: head/sys/dev/ahb/ahb.c
==
--- head/sys/dev/ahb/ahb.c  Mon Mar 12 20:31:09 2012(r232885)
+++ head/sys/dev/ahb/ahb.c  Mon Mar 12 20:31:58 2012(r232886)
@@ -291,7 +291,6 @@ ahbattach(device_t dev)
 * need to perform during normal operation.
 */
/* DMA tag for mapping buffers into device visible space. */
-   /* XXX Should be a child of the EISA bus dma tag */
if (bus_dma_tag_create( /* parent   */ bus_get_dma_tag(dev),
/* alignment*/ 1,
/* boundary */ 0,
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232889 - in head/usr.sbin/pc-sysinstall: backend backend-partmanager

2012-03-12 Thread Josh Paetzel
Author: jpaetzel
Date: Mon Mar 12 20:41:36 2012
New Revision: 232889
URL: http://svn.freebsd.org/changeset/base/232889

Log:
  Make sure when creating new MBR partition it is set to active by default.
  
  Submitted by: kris
  Obtained from:PC-BSD

Modified:
  head/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh
  head/usr.sbin/pc-sysinstall/backend/functions-disk.sh

Modified: head/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh
==
--- head/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh  Mon Mar 
12 20:33:20 2012(r232888)
+++ head/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh  Mon Mar 
12 20:41:36 2012(r232889)
@@ -86,7 +86,12 @@ fi
 # If this is an empty disk, see if we need to create a new scheme for it
 gpart show ${DISK} >/dev/null 2>/dev/null
 if [ $? -eq 0 -a "${SLICENUM}" = "1" ] ; then
- gpart create -s ${TYPE} ${DISK}
+  if [ "${TYPE}" = "mbr" -o "${TYPE}" = "MBR" ] ; then 
+flags="-s ${TYPE} -f active"
+  else
+flags="-s ${TYPE}"
+  fi
+  gpart create ${flags} ${DISK}
 fi
 
 # If we have a starting block, use it

Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh
==
--- head/usr.sbin/pc-sysinstall/backend/functions-disk.sh   Mon Mar 12 
20:33:20 2012(r232888)
+++ head/usr.sbin/pc-sysinstall/backend/functions-disk.sh   Mon Mar 12 
20:41:36 2012(r232889)
@@ -641,7 +641,7 @@ init_mbr_full_disk()
   sleep 2
 
   echo_log "Running gpart on ${_intDISK}"
-  rc_halt "gpart create -s mbr ${_intDISK}"
+  rc_halt "gpart create -s mbr -f active ${_intDISK}"
 
   # Lets figure out disk size in blocks
   # Get the cyl of this disk
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232890 - head/usr.sbin/pc-sysinstall/backend

2012-03-12 Thread Josh Paetzel
Author: jpaetzel
Date: Mon Mar 12 20:44:44 2012
New Revision: 232890
URL: http://svn.freebsd.org/changeset/base/232890

Log:
  Fix a couple of bugs saving network config.
  Don't duplicate wlans_ lines.
  Enable ipv6 on wireless devices correctly.
  
  Submitted by: kris
  Obtained from:PC-BSD

Modified:
  head/usr.sbin/pc-sysinstall/backend/functions-networking.sh

Modified: head/usr.sbin/pc-sysinstall/backend/functions-networking.sh
==
--- head/usr.sbin/pc-sysinstall/backend/functions-networking.sh Mon Mar 12 
20:41:36 2012(r232889)
+++ head/usr.sbin/pc-sysinstall/backend/functions-networking.sh Mon Mar 12 
20:44:44 2012(r232890)
@@ -104,7 +104,10 @@ enable_dhcp_all()
   then
 # We have a wifi device, setup a wlan* entry for it
 WLAN="wlan${WLANCOUNT}"
-echo "wlans_${NIC}=\"${WLAN}\"" >>${FSMNT}/etc/rc.conf
+   cat ${FSMNT}/etc/rc.conf | grep -q "wlans_${NIC}="
+   if [ $? -ne 0 ] ; then
+  echo "wlans_${NIC}=\"${WLAN}\"" >>${FSMNT}/etc/rc.conf
+   fi
 echo "ifconfig_${WLAN}=\"DHCP\"" >>${FSMNT}/etc/rc.conf
 CNIC="${WLAN}"
 WLANCOUNT=$((WLANCOUNT+1))
@@ -138,7 +141,7 @@ enable_slaac_all()
 do
   NIC="`echo $line | cut -d ':' -f 1`"
   DESC="`echo $line | cut -d ':' -f 2`"
-  echo_log "Setting $NIC to acceptign RAs on the system."
+  echo_log "Setting $NIC to accepting RAs on the system."
   check_is_wifi ${NIC}
   if [ $? -eq 0 ]
   then
@@ -146,9 +149,12 @@ enable_slaac_all()
 # Given we cannot have DHCP and SLAAC the same time currently
# it's save to just duplicate.
 WLAN="wlan${WLANCOUNT}"
-echo "wlans_${NIC}=\"${WLAN}\"" >>${FSMNT}/etc/rc.conf
+   cat ${FSMNT}/etc/rc.conf | grep -q "wlans_${NIC}="
+   if [ $? -ne 0 ] ; then
+  echo "wlans_${NIC}=\"${WLAN}\"" >>${FSMNT}/etc/rc.conf
+   fi
#echo "ifconfig_${NIC}=\"up\"" >>${FSMNT}/etc/rc.conf
-echo "ifconfig_${WLAN}=\"inet6 accept_rtadv\"" >>${FSMNT}/etc/rc.conf
+echo "ifconfig_${WLAN}_ipv6=\"inet6 accept_rtadv\"" 
>>${FSMNT}/etc/rc.conf
 CNIC="${WLAN}"
 WLANCOUNT=$((WLANCOUNT+1))
   else
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232892 - head/libexec/rtld-elf/mips

2012-03-12 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Mon Mar 12 20:58:09 2012
New Revision: 232892
URL: http://svn.freebsd.org/changeset/base/232892

Log:
  Use PTR_(ADD|SUB)U macrosses instead of hardcoded addu/subu
  
  Spotted by: juli

Modified:
  head/libexec/rtld-elf/mips/rtld_start.S

Modified: head/libexec/rtld-elf/mips/rtld_start.S
==
--- head/libexec/rtld-elf/mips/rtld_start.S Mon Mar 12 20:46:18 2012
(r232891)
+++ head/libexec/rtld-elf/mips/rtld_start.S Mon Mar 12 20:58:09 2012
(r232892)
@@ -68,11 +68,11 @@ LEAF(rtld_start)
movea0, s0  /* sp */
PTR_ADDU a1, sp, 2*PTR_SIZE /* &our atexit function */
PTR_ADDU a2, sp, 3*PTR_SIZE /* obj_main entry */
-   subusp, 4*SZREG /* ABI requires to reserve memory for 4 
regs */
+   PTR_SUBU sp, 4*SZREG/* ABI requires to reserve memory for 4 
regs */
PTR_LA  t9, _C_LABEL(_rtld)
jalrt9  /* v0 = _rtld(sp, cleanup, objp) */
nop
-   addusp, 4*SZREG
+   PTR_ADDU sp, 4*SZREG
 
PTR_L   a1, 2*PTR_SIZE(sp)  /* our atexit function */
PTR_L   a2, 3*PTR_SIZE(sp)  /* obj_main entry */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232893 - head/libexec/rtld-elf/mips

2012-03-12 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Mon Mar 12 20:59:18 2012
New Revision: 232893
URL: http://svn.freebsd.org/changeset/base/232893

Log:
  Use PTR_SUBU instead of subu (missed this one)

Modified:
  head/libexec/rtld-elf/mips/rtld_start.S

Modified: head/libexec/rtld-elf/mips/rtld_start.S
==
--- head/libexec/rtld-elf/mips/rtld_start.S Mon Mar 12 20:58:09 2012
(r232892)
+++ head/libexec/rtld-elf/mips/rtld_start.S Mon Mar 12 20:59:18 2012
(r232893)
@@ -79,7 +79,7 @@ LEAF(rtld_start)
PTR_ADDU sp, 4*PTR_SIZE /* readjust stack */
movea0, s0  /* stack pointer */
movet9, v0
-   subusp, 4*SZREG /* ABI requires to reserve memory for 4 
regs */
+   PTR_SUBU sp, 4*SZREG/* ABI requires to reserve memory for 4 
regs */
jr  t9  /* _start(sp, cleanup, obj); */
movea3, s3  /* restore ps_strings */
 END(rtld_start)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232894 - head/contrib/llvm/tools/clang/lib/Basic

2012-03-12 Thread Dimitry Andric
Author: dim
Date: Mon Mar 12 21:07:22 2012
New Revision: 232894
URL: http://svn.freebsd.org/changeset/base/232894

Log:
  Pull in r145194 from upstream clang trunk:
  
Make our handling of MMX x SSE closer to what gcc does:
  
* Enabling sse enables mmx.
* Disabling (-mno-mmx) mmx, doesn't disable sse (we got this right already).
* The order in not important. -msse -mno-mmx is the same as -mno-mmx -msse.
  
  Some configure scripts depend on this.
  
  PR:   i386/165968
  MFC after:3 days

Modified:
  head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp

Modified: head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp
==
--- head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Mon Mar 12 20:59:18 
2012(r232893)
+++ head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Mon Mar 12 21:07:22 
2012(r232894)
@@ -1583,23 +1583,26 @@ bool X86TargetInfo::setFeatureEnabled(ll
   (Name != "sse4" && Name != "sse4.2" && Name != "sse4.1"))
 return false;
 
+  // FIXME: this should probably use a switch with fall through.
+
   if (Enabled) {
 if (Name == "mmx")
   Features["mmx"] = true;
 else if (Name == "sse")
-  Features["sse"] = true;
+  Features["mmx"] = Features["sse"] = true;
 else if (Name == "sse2")
-  Features["sse"] = Features["sse2"] = true;
+  Features["mmx"] = Features["sse"] = Features["sse2"] = true;
 else if (Name == "sse3")
-  Features["sse"] = Features["sse2"] = Features["sse3"] = true;
+  Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] =
+true;
 else if (Name == "ssse3")
-  Features["sse"] = Features["sse2"] = Features["sse3"] =
+  Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] =
 Features["ssse3"] = true;
 else if (Name == "sse4" || Name == "sse4.2")
-  Features["sse"] = Features["sse2"] = Features["sse3"] =
+  Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] =
 Features["ssse3"] = Features["sse41"] = Features["sse42"] = true;
 else if (Name == "sse4.1")
-  Features["sse"] = Features["sse2"] = Features["sse3"] =
+  Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] =
 Features["ssse3"] = Features["sse41"] = true;
 else if (Name == "3dnow")
   Features["mmx"] = Features["3dnow"] = true;
@@ -1608,10 +1611,11 @@ bool X86TargetInfo::setFeatureEnabled(ll
 else if (Name == "aes")
   Features["aes"] = true;
 else if (Name == "avx")
-  Features["avx"] = Features["sse"] = Features["sse2"] = Features["sse3"] =
-Features["ssse3"] = Features["sse41"] = Features["sse42"] = true;
+  Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] =
+Features["ssse3"] = Features["sse41"] = Features["sse42"] =
+Features["avx"] = true;
 else if (Name == "sse4a")
-  Features["sse4a"] = true;
+  Features["mmx"] = Features["sse4a"] = true;
   } else {
 if (Name == "mmx")
   Features["mmx"] = Features["3dnow"] = Features["3dnowa"] = false;
@@ -3779,13 +3783,32 @@ TargetInfo *TargetInfo::CreateTargetInfo
   Target->getDefaultFeatures(Features);
 
   // Apply the user specified deltas.
+  // First the enables.
   for (std::vector::const_iterator it = Opts.Features.begin(),
  ie = Opts.Features.end(); it != ie; ++it) {
 const char *Name = it->c_str();
 
+if (Name[0] != '+')
+  continue;
+
+// Apply the feature via the target.
+if (!Target->setFeatureEnabled(Features, Name + 1, true)) {
+  Diags.Report(diag::err_target_invalid_feature) << Name;
+  return 0;
+}
+  }
+
+  // Then the disables.
+  for (std::vector::const_iterator it = Opts.Features.begin(),
+ ie = Opts.Features.end(); it != ie; ++it) {
+const char *Name = it->c_str();
+
+if (Name[0] == '+')
+  continue;
+
 // Apply the feature via the target.
-if ((Name[0] != '-' && Name[0] != '+') ||
-!Target->setFeatureEnabled(Features, Name + 1, (Name[0] == '+'))) {
+if (Name[0] != '-' ||
+!Target->setFeatureEnabled(Features, Name + 1, false)) {
   Diags.Report(diag::err_target_invalid_feature) << Name;
   return 0;
 }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232895 - head/usr.sbin/pc-sysinstall/backend-query

2012-03-12 Thread Josh Paetzel
Author: jpaetzel
Date: Mon Mar 12 21:24:40 2012
New Revision: 232895
URL: http://svn.freebsd.org/changeset/base/232895

Log:
  Check for intel RAID devices
  
  Submitted by: kris
  Obtained from:PC-BSD

Modified:
  head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh

Modified: head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh
==
--- head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh  Mon Mar 12 
21:07:22 2012(r232894)
+++ head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh  Mon Mar 12 
21:24:40 2012(r232895)
@@ -58,6 +58,18 @@ then
   fi
 fi
 
+# Add any RAID devices
+if [ -d "/dev/raid" ] ; then
+  cd /dev/raid
+  for i in `ls`
+  do
+case ${i} in
+  r0|r1|r2|r3|r4|r5) SYSDISK="${SYSDISK} ${i}" ;;
+  *) ;;
+esac
+  done
+fi
+
 # Now loop through these devices, and list the disk drives
 for i in ${SYSDISK}
 do
@@ -77,7 +89,7 @@ do
   NEWLINE=$(camcontrol identify $DEV | sed -ne 's/^device model *//p')
   if [ -z "$NEWLINE" ]; then
# Now try atacontrol
-   NEWLINE=$(atacontrol list | sed -n "s|^.*$DEV <\(.*\)>.*|\1|p")
+   NEWLINE=$(atacontrol list 2>/dev/null | sed -n "s|^.*$DEV 
<\(.*\)>.*|\1|p")

if [ -z "$NEWLINE" ]; then
NEWLINE=" "
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232896 - in head/sys: conf mips/adm5120 mips/alchemy mips/atheros mips/conf mips/idt mips/include mips/malta mips/mips mips/nlm mips/rmi mips/rt305x mips/sentry5

2012-03-12 Thread Juli Mallett
Author: jmallett
Date: Mon Mar 12 21:25:32 2012
New Revision: 232896
URL: http://svn.freebsd.org/changeset/base/232896

Log:
  o) Use ABI, not ISA_* options, to determine whether to compile bits if libkern
 required for the ABI the kernel is being built for.
 XXX This is implemented in a kind-of nasty way that involves including 
source
 files, but it's still an improvement.
  o) Retire ISA_* options since they're unused and were always wrong.

Added:
  head/sys/mips/mips/libkern_machdep.c   (contents, props changed)
Modified:
  head/sys/conf/files.mips
  head/sys/conf/options.mips
  head/sys/mips/adm5120/std.adm5120
  head/sys/mips/alchemy/std.alchemy
  head/sys/mips/atheros/std.ar71xx
  head/sys/mips/conf/AR71XX_BASE
  head/sys/mips/conf/AR91XX_BASE
  head/sys/mips/conf/MALTA
  head/sys/mips/conf/MALTA64
  head/sys/mips/conf/OCTEON1
  head/sys/mips/conf/SWARM
  head/sys/mips/conf/SWARM_SMP
  head/sys/mips/conf/XLP
  head/sys/mips/conf/XLP64
  head/sys/mips/conf/XLPN32
  head/sys/mips/conf/XLR
  head/sys/mips/conf/XLR64
  head/sys/mips/conf/XLRN32
  head/sys/mips/idt/std.idt
  head/sys/mips/include/_bus.h
  head/sys/mips/malta/std.malta
  head/sys/mips/mips/bus_space_generic.c
  head/sys/mips/mips/cache.c
  head/sys/mips/mips/cache_mipsNN.c
  head/sys/mips/mips/cpu.c
  head/sys/mips/mips/exception.S
  head/sys/mips/mips/freebsd32_machdep.c
  head/sys/mips/mips/machdep.c
  head/sys/mips/mips/pm_machdep.c
  head/sys/mips/mips/support.S
  head/sys/mips/mips/swtch.S
  head/sys/mips/mips/tick.c
  head/sys/mips/mips/vm_machdep.c
  head/sys/mips/nlm/tick.c
  head/sys/mips/rmi/tick.c
  head/sys/mips/rt305x/std.rt305x
  head/sys/mips/sentry5/std.sentry5

Modified: head/sys/conf/files.mips
==
--- head/sys/conf/files.mipsMon Mar 12 21:24:40 2012(r232895)
+++ head/sys/conf/files.mipsMon Mar 12 21:25:32 2012(r232896)
@@ -56,6 +56,7 @@ mips/mips/in_cksum.c  optionalinet | in
 mips/mips/locore.S standardno-obj
 mips/mips/minidump_machdep.c   standard
 mips/mips/mem.coptionalmem
+mips/mips/libkern_machdep.cstandard
 mips/mips/nexus.c  standard
 mips/mips/stack_machdep.c  optionalddb | stack
 mips/mips/support.Sstandard
@@ -72,18 +73,13 @@ geom/geom_mbr_enc.c optionalgeom_mbr
 libkern/ashldi3.c  standard
 libkern/ashrdi3.c  standard
 libkern/cmpdi2.c   standard
-libkern/divdi3.c   optionalisa_mips32
 libkern/ffsl.c standard
 libkern/fls.c  standard
 libkern/flsl.c standard
 libkern/lshrdi3.c  standard
 libkern/memchr.c   optionalfdt
 libkern/memmove.c  standard
-libkern/moddi3.c   optionalisa_mips32
-libkern/qdivrem.c  optionalisa_mips32
 libkern/ucmpdi2.c  standard
-libkern/udivdi3.c  optionalisa_mips32
-libkern/umoddi3.c  optionalisa_mips32
 
 #XXX: We can't use these versions, as strcmp.c is included conf/files
 #libkern/mips/strcmp.S standard

Modified: head/sys/conf/options.mips
==
--- head/sys/conf/options.mips  Mon Mar 12 21:24:40 2012(r232895)
+++ head/sys/conf/options.mips  Mon Mar 12 21:25:32 2012(r232896)
@@ -38,14 +38,6 @@ CPU_CNMIPS   opt_global.h
 CPU_RMIopt_global.h
 CPU_NLMopt_global.h
 
-# XXX These are bogus and should be replaced by proper ABI or ISA checks.
-ISA_MIPS1  opt_cputype.h
-ISA_MIPS3  opt_cputype.h
-ISA_MIPS32 opt_cputype.h
-ISA_MIPS32v2   opt_cputype.h
-ISA_MIPS64 opt_cputype.h
-ISA_MIPS64v2   opt_cputype.h
-
 COMPAT_FREEBSD32   opt_compat.h
 
 YAMON  opt_global.h

Modified: head/sys/mips/adm5120/std.adm5120
==
--- head/sys/mips/adm5120/std.adm5120   Mon Mar 12 21:24:40 2012
(r232895)
+++ head/sys/mips/adm5120/std.adm5120   Mon Mar 12 21:25:32 2012
(r232896)
@@ -6,7 +6,6 @@ files   "../adm5120/files.adm5120"
 
 machinemips mipsel
 cpuCPU_MIPS4KC
-optionsISA_MIPS32
 
 # device   admpci
 device admsw

Modified: head/sys/mips/alchemy/std.alchemy
==
--- head/sys/mips/alchemy/std.alchemy   Mon Mar 12 21:24:40 2012
(r232895)
+++ head/sys/mips/alchemy/std.alchemy   Mon Mar 12 21:25:32 2012
(r232896)
@@ -6,4 +6,3 @@ files   "../alchemy/files.alchemy"
 
 machinemips mipsel
 cpuCPU_MIPS4KC
-optionsISA_MIPS32

Modified: head/sys/mips/atheros/std.ar71xx

svn commit: r232897 - head/sys/mips/conf

2012-03-12 Thread Juli Mallett
Author: jmallett
Date: Mon Mar 12 21:26:09 2012
New Revision: 232897
URL: http://svn.freebsd.org/changeset/base/232897

Log:
  Remove TARGET_BIG_ENDIAN which should have been removed previously.

Modified:
  head/sys/mips/conf/AR71XX_BASE

Modified: head/sys/mips/conf/AR71XX_BASE
==
--- head/sys/mips/conf/AR71XX_BASE  Mon Mar 12 21:25:32 2012
(r232896)
+++ head/sys/mips/conf/AR71XX_BASE  Mon Mar 12 21:26:09 2012
(r232897)
@@ -10,7 +10,6 @@
 machinemips mipseb
 ident  AR71XX_BASE
 cpuCPU_MIPS4KC
-makeoptionsTARGET_BIG_ENDIAN
 makeoptionsKERNLOADADDR=0x8005
 optionsHZ=1000
 optionsHWPMC_HOOKS
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232898 - head/usr.sbin/pc-sysinstall/backend

2012-03-12 Thread Josh Paetzel
Author: jpaetzel
Date: Mon Mar 12 21:28:54 2012
New Revision: 232898
URL: http://svn.freebsd.org/changeset/base/232898

Log:
  Improve ZFS exporting functionality, only export pools which are on a
  specific device we happen to be writing to. This fixes an issue when
  running pc-sysinstall on a running system which needs ZFS and the main
  disk gets exported.
  
  Submitted by: kris
  Obtained from:PC-BSD

Modified:
  head/usr.sbin/pc-sysinstall/backend/functions-disk.sh

Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh
==
--- head/usr.sbin/pc-sysinstall/backend/functions-disk.sh   Mon Mar 12 
21:26:09 2012(r232897)
+++ head/usr.sbin/pc-sysinstall/backend/functions-disk.sh   Mon Mar 12 
21:28:54 2012(r232898)
@@ -224,16 +224,6 @@ get_disk_mediasize()
   export VAL="${mediasize}"
 };
 
-# Function which exports all zpools, making them safe to overwrite potentially
-export_all_zpools()
-{
-  # Export any zpools
-  for i in `zpool list -H -o name`
-  do
-zpool export -f ${i}
-  done
-};
-
 # Function to delete all gparts before starting an install
 delete_all_gpart()
 {
@@ -268,10 +258,15 @@ delete_all_gpart()
 # Function to export all zpools before starting an install
 stop_all_zfs()
 {
-  # Export all zpools again, so that we can overwrite these partitions 
potentially
+  local DISK="`echo ${1} | sed 's|/dev/||g'`"
+
+  # Export any zpools using this device so we can overwrite
   for i in `zpool list -H -o name`
   do
-zpool export -f ${i}
+ztst=`zpool status ${i} | grep "ONLINE" | awk '{print $1}' | grep -q 
${DISK}`
+if [ "$ztst" = "$DISK" ] ; then
+  zpool export -f ${i}
+fi
   done
 };
 
@@ -324,9 +319,6 @@ setup_disk_slice()
   disknum="0"
   gmnum="0"
 
-  # Make sure all zpools are exported
-  export_all_zpools
-
   # We are ready to start setting up the disks, lets read the config and do 
the actions
   while read line
   do
@@ -354,7 +346,7 @@ setup_disk_slice()
   stop_all_geli ${DISK}
 
   # Make sure we don't have any zpools loaded
-  stop_all_zfs
+  stop_all_zfs ${DISK}
 
  fi
 
@@ -375,6 +367,16 @@ setup_disk_slice()
   then
 exit_err "ERROR: The mirror disk ${MIRRORDISK} does not exist!"
   fi
+
+  # Make sure we stop any gmirrors on this mirror disk
+  stop_all_gmirror ${MIRRORDISK}
+
+  # Make sure we stop any geli stuff on this mirror disk
+  stop_all_geli ${MIRRORDISK}
+
+  # Make sure we don't have any zpools mirror loaded
+  stop_all_zfs ${MIRRORDISK}
+
 fi
 
 # Lets see if we have been given a mirror balance choice
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232899 - head/usr.sbin/pc-sysinstall/backend

2012-03-12 Thread Josh Paetzel
Author: jpaetzel
Date: Mon Mar 12 21:32:43 2012
New Revision: 232899
URL: http://svn.freebsd.org/changeset/base/232899

Log:
  Add the ability to use a varity of ZFS dataset options.
  While here fix a bug causing zpools with /tmp mount-points to fail
  
  Submitted by: kris
  Obtained from:PC-BSD

Modified:
  head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh
  head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh
  head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh
  head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh
  head/usr.sbin/pc-sysinstall/backend/functions-unmount.sh

Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh
==
--- head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh   Mon Mar 12 
21:28:54 2012(r232898)
+++ head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh   Mon Mar 12 
21:32:43 2012(r232899)
@@ -50,14 +50,14 @@ get_fs_line_xvars()
   ACTIVEDEV="${1}"
   LINE="${2}"
 
-  echo $LINE | grep -q ' (' 2>/dev/null
+  echo $LINE | cut -d ' ' -f 4 | grep -q ' (' 2>/dev/null
   if [ $? -eq 0 ] ; then
 
 # See if we are looking for ZFS specific options
 echo $LINE | grep -q '^ZFS' 2>/dev/null
 if [ $? -eq 0 ] ; then
   ZTYPE="NONE"
-  ZFSVARS="`echo $LINE | cut -d '(' -f 2- | cut -d ')' -f 1 | xargs`"
+  ZFSVARS="`echo $LINE | cut -d ' ' -f 4 |cut -d '(' -f 2- | cut -d ')' -f 
1 | xargs`"
 
   echo $ZFSVARS | grep -qE 
"^(disk|file|mirror|raidz(1|2|3)?|spare|log|cache):" 2>/dev/null
  if [ $? -eq 0 ] ; then
@@ -126,9 +126,9 @@ gen_glabel_name()
   NUM="0"
   MAXNUM="20"
 
-  # Check if we are doing /, and rename it
-  if [ "$MOUNT" = "/" ]
-  then
+  if [ "$TYPE" = "ZFS" ] ; then
+NAME="zpool"
+  elif [ "$MOUNT" = "/" ] ; then
 NAME="rootfs"
   else
 # If doing a swap partition, also rename it
@@ -341,7 +341,7 @@ setup_gpart_partitions()
   # Save this data to our partition config dir
   if [ "${_pType}" = "gpt" ] ; then
_dFile="`echo $_pDisk | sed 's|/|-|g'`"
-echo "${FS}:${MNT}:${ENC}:${PLABEL}:GPT:${XTRAOPTS}" 
>${PARTDIR}/${_dFile}p${CURPART}
+echo "${FS}#${MNT}#${ENC}#${PLABEL}#GPT#${XTRAOPTS}" 
>${PARTDIR}/${_dFile}p${CURPART}
 
 # Clear out any headers
 sleep 2
@@ -354,7 +354,7 @@ setup_gpart_partitions()
   else
# MBR Partition or GPT slice
_dFile="`echo $_wSlice | sed 's|/|-|g'`"
-echo "${FS}:${MNT}:${ENC}:${PLABEL}:MBR:${XTRAOPTS}:${IMAGE}" 
>${PARTDIR}/${_dFile}${PARTLETTER}
+echo "${FS}#${MNT}#${ENC}#${PLABEL}#MBR#${XTRAOPTS}#${IMAGE}" 
>${PARTDIR}/${_dFile}${PARTLETTER}
 # Clear out any headers
 sleep 2
 dd if=/dev/zero of=${_wSlice}${PARTLETTER} count=2048 2>/dev/null
@@ -409,7 +409,7 @@ setup_gpart_partitions()
   fi
 
   # Found our flag to commit this label setup, check that we found at 
least 1 partition
-  if [ "${CURPART}" = "2" ] ; then
+  if [ "${CURPART}" = "1" ] ; then
 exit_err "ERROR: commitDiskLabel was called without any partition 
entries for it!"
   fi
 

Modified: head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh
==
--- head/usr.sbin/pc-sysinstall/backend/functions-cleanup.shMon Mar 12 
21:28:54 2012(r232898)
+++ head/usr.sbin/pc-sysinstall/backend/functions-cleanup.shMon Mar 12 
21:32:43 2012(r232899)
@@ -34,8 +34,8 @@ zfs_cleanup_unmount()
   for PART in `ls ${PARTDIR}`
   do
 PARTDEV=`echo $PART | sed 's|-|/|g'`
-PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`"
-PARTMNT="`cat ${PARTDIR}/${PART} | cut -d ':' -f 2`"
+PARTFS="`cat ${PARTDIR}/${PART} | cut -d '#' -f 1`"
+PARTMNT="`cat ${PARTDIR}/${PART} | cut -d '#' -f 2`"
 ZPOOLNAME=$(get_zpool_name "${PARTDEV}")
 
 if [ "$PARTFS" = "ZFS" ]
@@ -84,9 +84,9 @@ zfs_cleanup_unmount()
   for PART in `ls ${PARTDIR}`
   do
 PARTDEV=`echo $PART | sed 's|-|/|g'`
-PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`"
-PARTMNT="`cat ${PARTDIR}/${PART} | cut -d ':' -f 2`"
-PARTENC="`cat ${PARTDIR}/${PART} | cut -d ':' -f 3`"
+PARTFS="`cat ${PARTDIR}/${PART} | cut -d '#' -f 1`"
+PARTMNT="`cat ${PARTDIR}/${PART} | cut -d '#' -f 2`"
+PARTENC="`cat ${PARTDIR}/${PART} | cut -d '#' -f 3`"
 ZPOOLNAME=$(get_zpool_name "${PARTDEV}")
 
 if [ "$PARTFS" = "ZFS" ]
@@ -101,17 +101,20 @@ zfs_cleanup_unmount()
   # Check if we have multiple zfs mounts specified
   for ZMNT in `echo ${PARTMNT} | sed 's|,| |g'`
   do
+   ZMNT="`echo $ZMNT | cut -d '(' -f 1`"
 PARTMNTREV="${ZMNT} ${PARTMNTREV}"
   done
 
   for ZMNT in ${PARTMNTREV}
   do
-if [ "${ZMNT}" != "/" ]
-then
-  rc_halt "zfs set mountpoint=${ZMNT} ${ZPOOLNAME}${ZMNT}"
+if [ "${ZMNT}" = "/" ] ; then continue ; fi
+

svn commit: r232901 - head/usr.sbin/pc-sysinstall/backend

2012-03-12 Thread Josh Paetzel
Author: jpaetzel
Date: Mon Mar 12 21:41:29 2012
New Revision: 232901
URL: http://svn.freebsd.org/changeset/base/232901

Log:
  Use gpart "-a" flag to 4k alignment.
  
  Submitted by: kris
  Obtained from:PC-BSD

Modified:
  head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh
  head/usr.sbin/pc-sysinstall/backend/functions-disk.sh

Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh
==
--- head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh   Mon Mar 12 
21:34:10 2012(r232900)
+++ head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh   Mon Mar 12 
21:41:29 2012(r232901)
@@ -314,7 +314,7 @@ setup_gpart_partitions()
if [ "$CURPART" = "2" ] ; then
  # If this is GPT, make sure first partition is aligned to 4k
   sleep 2
-  rc_halt "gpart add -b 2016 ${SOUT} -t ${PARTYPE} ${_pDisk}"
+  rc_halt "gpart add -a 4k ${SOUT} -t ${PARTYPE} ${_pDisk}"
else
   sleep 2
   rc_halt "gpart add ${SOUT} -t ${PARTYPE} ${_pDisk}"

Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh
==
--- head/usr.sbin/pc-sysinstall/backend/functions-disk.sh   Mon Mar 12 
21:34:10 2012(r232900)
+++ head/usr.sbin/pc-sysinstall/backend/functions-disk.sh   Mon Mar 12 
21:41:29 2012(r232901)
@@ -645,33 +645,9 @@ init_mbr_full_disk()
   echo_log "Running gpart on ${_intDISK}"
   rc_halt "gpart create -s mbr -f active ${_intDISK}"
 
-  # Lets figure out disk size in blocks
-  # Get the cyl of this disk
-  get_disk_cyl "${_intDISK}"
-  cyl="${VAL}"
-
-  # Get the heads of this disk
-  get_disk_heads "${_intDISK}"
-  head="${VAL}"
-
-  # Get the tracks/sectors of this disk
-  get_disk_sectors "${_intDISK}"
-  sec="${VAL}"
-
-  # Multiply them all together to get our total blocks
-  totalblocks="`expr ${cyl} \* ${head} 2>/dev/null`"
-  totalblocks="`expr ${totalblocks} \* ${sec} 2>/dev/null`"
-  if [ -z "${totalblocks}" ]
-  then
-totalblocks=`gpart show "${_intDISK}"|tail -2|head -1|awk '{ print $2 }'`
-  fi
-
-  # Now set the ending block to the total disk block size
-  sizeblock="`expr ${totalblocks} - ${startblock}`"
-
   # Install new partition setup
   echo_log "Running gpart add on ${_intDISK}"
-  rc_halt "gpart add -b ${startblock} -s ${sizeblock} -t freebsd -i 1 
${_intDISK}"
+  rc_halt "gpart add -a 4k -t freebsd -i 1 ${_intDISK}"
   sleep 2
   
   echo_log "Cleaning up ${_intDISK}s1"
@@ -847,44 +823,9 @@ run_gpart_free()
 rc_halt "gpart create -s mbr ${DISK}"
   fi
 
-  # Lets get the starting block first
-  if [ "${slicenum}" = "1" ]
-  then
- startblock="63"
-  else
- # Lets figure out where the prior slice ends
- checkslice=$((slicenum-1))
-
- # Get starting block of this slice
- sblk=`gpart show ${DISK} | grep -v ${DISK} | tr -s '\t' ' ' | sed '/^$/d' 
| grep " ${checkslice} " | cut -d ' ' -f 2`
- blksize=`gpart show ${DISK} | grep -v ${DISK} | tr -s '\t' ' ' | sed 
'/^$/d' | grep " ${checkslice} " | cut -d ' ' -f 3`
- startblock=$((sblk+blksiz))
-  fi
-
-  # No slice after the new slice, lets figure out the free space remaining and 
use it
-  # Get the cyl of this disk
-  get_disk_cyl "${DISK}"
-  cyl="${VAL}"
-
-  # Get the heads of this disk
-  get_disk_heads "${DISK}"
-  head="${VAL}"
-
-  # Get the tracks/sectors of this disk
-  get_disk_sectors "${DISK}"
-  sec="${VAL}"
-
-  # Multiply them all together to get our total blocks
-  totalblocks=$((cyl*head))
-  totalblocks=$((totalblocks*sec))
-
-
-  # Now set the ending block to the total disk block size
-  sizeblock=$((totalblocks-startblock))
-
   # Install new partition setup
   echo_log "Running gpart on ${DISK}"
-  rc_halt "gpart add -b ${startblock} -s ${sizeblock} -t freebsd -i 
${slicenum} ${DISK}"
+  rc_halt "gpart add -a 4k -t freebsd -i ${slicenum} ${DISK}"
   sleep 2
   
   echo_log "Cleaning up $slice"
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232907 - head

2012-03-12 Thread Juli Mallett
Author: jmallett
Date: Tue Mar 13 00:38:49 2012
New Revision: 232907
URL: http://svn.freebsd.org/changeset/base/232907

Log:
  Add a kernel-toolchains target like the toolchains target, but building only
  the parts of the toolchain necessary to build kernels.

Modified:
  head/Makefile

Modified: head/Makefile
==
--- head/Makefile   Mon Mar 12 22:13:17 2012(r232906)
+++ head/Makefile   Tue Mar 13 00:38:49 2012(r232907)
@@ -18,6 +18,7 @@
 # reinstallkernel.debug
 # kernel  - buildkernel + installkernel.
 # kernel-toolchain- Builds the subset of world necessary to build a kernel
+# kernel-toolchains   - Build kernel-toolchain for all universe targets.
 # doxygen - Build API documentation of the kernel, needs doxygen.
 # update  - Convenient way to update your source tree(s).
 # check-old   - List obsolete directories/files/libraries.
@@ -317,6 +318,9 @@ tinderbox:
 toolchains:
@cd ${.CURDIR} && ${MAKE} UNIVERSE_TARGET=toolchain universe
 
+kernel-toolchains:
+   @cd ${.CURDIR} && ${MAKE} UNIVERSE_TARGET=kernel-toolchain universe
+
 #
 # universe
 #
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232908 - head/usr.sbin

2012-03-12 Thread Juli Mallett
Author: jmallett
Date: Tue Mar 13 00:45:27 2012
New Revision: 232908
URL: http://svn.freebsd.org/changeset/base/232908

Log:
  sysinstall was removed from usr.sbin/Makefile in r225937.  Because per-arch
  Makefiles were split out in this directory and others in userland, it makes it
  quite easy to miss per-arch conditionals when changing something generally.

Modified:
  head/usr.sbin/Makefile.arm
  head/usr.sbin/Makefile.mips

Modified: head/usr.sbin/Makefile.arm
==
--- head/usr.sbin/Makefile.arm  Tue Mar 13 00:38:49 2012(r232907)
+++ head/usr.sbin/Makefile.arm  Tue Mar 13 00:45:27 2012(r232908)
@@ -2,4 +2,3 @@
 
 SUBDIR+=   ofwdump
 SUBDIR+=   kgmon
-SUBDIR:=   ${SUBDIR:Nsysinstall}

Modified: head/usr.sbin/Makefile.mips
==
--- head/usr.sbin/Makefile.mips Tue Mar 13 00:38:49 2012(r232907)
+++ head/usr.sbin/Makefile.mips Tue Mar 13 00:45:27 2012(r232908)
@@ -1,6 +1,5 @@
 # $FreeBSD$
 
-SUBDIR:=   ${SUBDIR:Nsysinstall}
 # uathload broken for n32 and n64 due to toolchain issues
 .if ${MACHINE_ARCH:Mmipse[lb]} == ""
 SUBDIR:=   ${SUBDIR:Nuathload}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r232894 - head/contrib/llvm/tools/clang/lib/Basic

2012-03-12 Thread Alexander Best
On Mon Mar 12 12, Dimitry Andric wrote:
> Author: dim
> Date: Mon Mar 12 21:07:22 2012
> New Revision: 232894
> URL: http://svn.freebsd.org/changeset/base/232894
> 
> Log:
>   Pull in r145194 from upstream clang trunk:
>   
> Make our handling of MMX x SSE closer to what gcc does:
>   
> * Enabling sse enables mmx.
> * Disabling (-mno-mmx) mmx, doesn't disable sse (we got this right 
> already).
> * The order in not important. -msse -mno-mmx is the same as -mno-mmx 
> -msse.

are you sure that sys/conf/kern.mk doesn't need updating after this commit? if
now setting -mno-mmx doesn't imply -mno-sse, i think the i386 and amd64
sections in kern.mk needs to be updated (along with the comments).

cheers.
alex

>   
>   Some configure scripts depend on this.
>   
>   PR: i386/165968
>   MFC after:  3 days
> 
> Modified:
>   head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp
> 
> Modified: head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp
> ==
> --- head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp   Mon Mar 12 
> 20:59:18 2012(r232893)
> +++ head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp   Mon Mar 12 
> 21:07:22 2012(r232894)
> @@ -1583,23 +1583,26 @@ bool X86TargetInfo::setFeatureEnabled(ll
>(Name != "sse4" && Name != "sse4.2" && Name != "sse4.1"))
>  return false;
>  
> +  // FIXME: this should probably use a switch with fall through.
> +
>if (Enabled) {
>  if (Name == "mmx")
>Features["mmx"] = true;
>  else if (Name == "sse")
> -  Features["sse"] = true;
> +  Features["mmx"] = Features["sse"] = true;
>  else if (Name == "sse2")
> -  Features["sse"] = Features["sse2"] = true;
> +  Features["mmx"] = Features["sse"] = Features["sse2"] = true;
>  else if (Name == "sse3")
> -  Features["sse"] = Features["sse2"] = Features["sse3"] = true;
> +  Features["mmx"] = Features["sse"] = Features["sse2"] = 
> Features["sse3"] =
> +true;
>  else if (Name == "ssse3")
> -  Features["sse"] = Features["sse2"] = Features["sse3"] =
> +  Features["mmx"] = Features["sse"] = Features["sse2"] = 
> Features["sse3"] =
>  Features["ssse3"] = true;
>  else if (Name == "sse4" || Name == "sse4.2")
> -  Features["sse"] = Features["sse2"] = Features["sse3"] =
> +  Features["mmx"] = Features["sse"] = Features["sse2"] = 
> Features["sse3"] =
>  Features["ssse3"] = Features["sse41"] = Features["sse42"] = true;
>  else if (Name == "sse4.1")
> -  Features["sse"] = Features["sse2"] = Features["sse3"] =
> +  Features["mmx"] = Features["sse"] = Features["sse2"] = 
> Features["sse3"] =
>  Features["ssse3"] = Features["sse41"] = true;
>  else if (Name == "3dnow")
>Features["mmx"] = Features["3dnow"] = true;
> @@ -1608,10 +1611,11 @@ bool X86TargetInfo::setFeatureEnabled(ll
>  else if (Name == "aes")
>Features["aes"] = true;
>  else if (Name == "avx")
> -  Features["avx"] = Features["sse"] = Features["sse2"] = 
> Features["sse3"] =
> -Features["ssse3"] = Features["sse41"] = Features["sse42"] = true;
> +  Features["mmx"] = Features["sse"] = Features["sse2"] = 
> Features["sse3"] =
> +Features["ssse3"] = Features["sse41"] = Features["sse42"] =
> +Features["avx"] = true;
>  else if (Name == "sse4a")
> -  Features["sse4a"] = true;
> +  Features["mmx"] = Features["sse4a"] = true;
>} else {
>  if (Name == "mmx")
>Features["mmx"] = Features["3dnow"] = Features["3dnowa"] = false;
> @@ -3779,13 +3783,32 @@ TargetInfo *TargetInfo::CreateTargetInfo
>Target->getDefaultFeatures(Features);
>  
>// Apply the user specified deltas.
> +  // First the enables.
>for (std::vector::const_iterator it = Opts.Features.begin(),
>   ie = Opts.Features.end(); it != ie; ++it) {
>  const char *Name = it->c_str();
>  
> +if (Name[0] != '+')
> +  continue;
> +
> +// Apply the feature via the target.
> +if (!Target->setFeatureEnabled(Features, Name + 1, true)) {
> +  Diags.Report(diag::err_target_invalid_feature) << Name;
> +  return 0;
> +}
> +  }
> +
> +  // Then the disables.
> +  for (std::vector::const_iterator it = Opts.Features.begin(),
> + ie = Opts.Features.end(); it != ie; ++it) {
> +const char *Name = it->c_str();
> +
> +if (Name[0] == '+')
> +  continue;
> +
>  // Apply the feature via the target.
> -if ((Name[0] != '-' && Name[0] != '+') ||
> -!Target->setFeatureEnabled(Features, Name + 1, (Name[0] == '+'))) {
> +if (Name[0] != '-' ||
> +!Target->setFeatureEnabled(Features, Name + 1, false)) {
>Diags.Report(diag::err_target_invalid_feature) << Name;
>return 0;
>  }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To u

svn commit: r232910 - in head: contrib/gdb/gdb gnu/usr.bin/gdb/arch/mips

2012-03-12 Thread Juli Mallett
Author: jmallett
Date: Tue Mar 13 04:50:41 2012
New Revision: 232910
URL: http://svn.freebsd.org/changeset/base/232910

Log:
  Note two shortcomings of GDB on MIPS that should be addressed.

Modified:
  head/contrib/gdb/gdb/mipsfbsd-tdep.c
  head/gnu/usr.bin/gdb/arch/mips/Makefile

Modified: head/contrib/gdb/gdb/mipsfbsd-tdep.c
==
--- head/contrib/gdb/gdb/mipsfbsd-tdep.cTue Mar 13 02:10:15 2012
(r232909)
+++ head/contrib/gdb/gdb/mipsfbsd-tdep.cTue Mar 13 04:50:41 2012
(r232910)
@@ -205,6 +205,8 @@ static struct core_fns mipsfbsd_elfcore_
  * 0x7ffeffecsigcode   -> 44 bytes
  *
  * 0x7ffeffc4sigcode end   env strings etc start
+ *
+ * XXX This is out-of-date and varies by ABI.
  */
 #define MIPS_FBSD_SIGTRAMP_START   (0x7ffeffc4)
 #define MIPS_FBSD_SIGTRAMP_END (0x7ffeffec)

Modified: head/gnu/usr.bin/gdb/arch/mips/Makefile
==
--- head/gnu/usr.bin/gdb/arch/mips/Makefile Tue Mar 13 02:10:15 2012
(r232909)
+++ head/gnu/usr.bin/gdb/arch/mips/Makefile Tue Mar 13 04:50:41 2012
(r232910)
@@ -1,5 +1,8 @@
 # $FreeBSD$
 
+#
+# XXX Should set DEFAULT_BFD_VEC based on target.
+#
 .if !defined(GDB_CROSS_DEBUGGER)
 LIBSRCS+= mipsfbsd-nat.c fbsd-threads.c
 .endif
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r232894 - head/contrib/llvm/tools/clang/lib/Basic

2012-03-12 Thread Bruce Evans

On Mon, 12 Mar 2012, Dimitry Andric wrote:


Log:
 Pull in r145194 from upstream clang trunk:

   Make our handling of MMX x SSE closer to what gcc does:

   * Enabling sse enables mmx.
   * Disabling (-mno-mmx) mmx, doesn't disable sse (we got this right already).
   * The order in not important. -msse -mno-mmx is the same as -mno-mmx -msse.

 Some configure scripts depend on this.

 PR:i386/165968
 MFC after: 3 days


Can you turn off use of SSE[2] for float and double precision on i386?
This use might break the ABI, and FreeBSD headers don't support it.

I use the following to hack around the brokenness:

% Index: math.h
% ===
% RCS file: /home/ncvs/src/lib/msun/src/math.h,v
% retrieving revision 1.82
% diff -u -2 -r1.82 math.h
% --- math.h12 Nov 2011 19:55:48 -  1.82
% +++ math.h4 Jan 2012 05:09:51 -
% @@ -125,4 +130,10 @@
%  : __signbitl(x))
% 
% +#ifdef __SSE_MATH__

% +#define  __float_t   float
% +#endif
% +#ifdef __SSE2_MATH__
% +#define  __double_t  double
% +#endif
%  typedef  __double_t  double_t;
%  typedef  __float_t   float_t;

Parts of my libm make critical (at least for optimality) use of float_t
and double_t, and break when clang doesn't match either gcc's behaviour
or what the headers say they are.  The above changes the header to
match clang's behaviour.  There is still an ABI problem.  Although
the ABI isn't strictly broken (since clang uses the normal ABI for
function calls), programs and libraries should be able to assume that
float_t and double_t are independent of the compiler; but with clang,
they even depend on the compiler flags.  Also, converting to the normal
ABI across function calls is a slow operation.  clang on most of libm
ends up being slower on i386 with the SSE "optimization" than gcc
without this optimization.  clang doesn't really understand the i387
so it is even slower without this opimization.

FLT_EVAL_METHOD is also quite broken (it is -1, which is only correct
for clang with SSE because -1 can mean anything and what it actually
means is undocumented).  My libm also makes critical use of
FLT_EVAL_METHOD, but I havn't tested the parts that do as much as
the parts that use float_t etc., and it turns out that use of float_t
etc. makes FLT_EVAL_METHOD unimportant.

clang and gcc define __FLT_EVAL_METHOD__, but get it wrong in different
ways, so this definition is unusuable.  For example, it is always 0 for
clang; this is correct with SSE, but without SSE, -1 is correct.  Thus
__FLT_EVAL_METHOD__ is unusable for defining FLT_EVAL_METHOD.

The SSE defines work better and can be used to define FLT_EVAL_METHOD
as well as float_t and double_t.  You just have to know that clang has
the same compiler bugs^Wfeatures as gcc, so that FLT_EVAL_METHOD must
be define as -1 if the i387 is used.

Note that __SSE[2]_MATH__ are quite different from __SSE[2]__.  My
libm also uses the latter in critical ways without problems.

Bruce
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232911 - in head: . usr.sbin/crunch/crunchide

2012-03-12 Thread Juli Mallett
Author: jmallett
Date: Tue Mar 13 05:21:14 2012
New Revision: 232911
URL: http://svn.freebsd.org/changeset/base/232911

Log:
  Fix crunchide on MIPS with other than the O32 ABI.

Deleted:
  head/Makefile.mips
Modified:
  head/usr.sbin/crunch/crunchide/Makefile

Modified: head/usr.sbin/crunch/crunchide/Makefile
==
--- head/usr.sbin/crunch/crunchide/Makefile Tue Mar 13 04:50:41 2012
(r232910)
+++ head/usr.sbin/crunch/crunchide/Makefile Tue Mar 13 05:21:14 2012
(r232911)
@@ -11,7 +11,8 @@ SRCS+=exec_aout.c
 .endif
 
 .if ${TARGET_ARCH} == ia64 || ${TARGET_ARCH} == powerpc64 || \
-${TARGET_ARCH} == sparc64 || ${TARGET_ARCH} == amd64
+${TARGET_ARCH} == sparc64 || ${TARGET_ARCH} == amd64 || \
+${TARGET_ARCH:Mmips64*}
 CFLAGS+=-DNLIST_ELF64
 SRCS+= exec_elf64.c
 exec_elf64.o: exec_elf32.c
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232912 - head/sys/mips/atheros

2012-03-12 Thread Adrian Chadd
Author: adrian
Date: Tue Mar 13 06:15:20 2012
New Revision: 232912
URL: http://svn.freebsd.org/changeset/base/232912

Log:
  Correctly (I hope) deallocate the if_arge RX buffer ring on arge_stop().
  
  I had some interesting hangs until I realised I should try flushing the
  DDR FIFO register and lo and behold, hangs stopped occuring.
  
  I've put in a few DDR flushes here and there in case people decide to
  reuse some of these functions.  It's very very likely they're almost
  all superflous.
  
  To test:
  
  * Connect to a network with a _lot_ of broadcast traffic
  * Do this:
# while true; do ifconfig arge0 down; ifconfig arge0 up; done
  
  This fixes the mbuf exhaustion that has been reported when the interface
  state flaps up/down.

Modified:
  head/sys/mips/atheros/if_arge.c

Modified: head/sys/mips/atheros/if_arge.c
==
--- head/sys/mips/atheros/if_arge.c Tue Mar 13 05:21:14 2012
(r232911)
+++ head/sys/mips/atheros/if_arge.c Tue Mar 13 06:15:20 2012
(r232912)
@@ -118,6 +118,7 @@ static int arge_probe(device_t);
 static void arge_reset_dma(struct arge_softc *);
 static int arge_resume(device_t);
 static int arge_rx_ring_init(struct arge_softc *);
+static void arge_rx_ring_free(struct arge_softc *sc);
 static int arge_tx_ring_init(struct arge_softc *);
 #ifdef DEVICE_POLLING
 static int arge_poll(struct ifnet *, enum poll_cmd, int);
@@ -807,6 +808,12 @@ arge_reset_dma(struct arge_softc *sc)
DMA_RX_STATUS_BUS_ERROR | DMA_RX_STATUS_OVERFLOW);
ARGE_WRITE(sc, AR71XX_DMA_TX_STATUS,
DMA_TX_STATUS_BUS_ERROR | DMA_TX_STATUS_UNDERRUN);
+
+   /*
+* Force a DDR flush so any pending data is properly
+* flushed to RAM before underlying buffers are freed.
+*/
+   arge_flush_ddr(sc);
 }
 
 
@@ -1083,6 +1090,10 @@ arge_stop(struct arge_softc *sc)
ARGE_WRITE(sc, AR71XX_DMA_INTR, 0);
 
arge_reset_dma(sc);
+
+   /* Flush FIFO and free any existing mbufs */
+   arge_flush_ddr(sc);
+   arge_rx_ring_free(sc);
 }
 
 
@@ -1531,6 +1542,12 @@ arge_rx_ring_init(struct arge_softc *sc)
bzero(rd->arge_rx_ring, sizeof(rd->arge_rx_ring));
for (i = 0; i < ARGE_RX_RING_COUNT; i++) {
rxd = &sc->arge_cdata.arge_rxdesc[i];
+   if (rxd->rx_m != NULL) {
+   device_printf(sc->arge_dev,
+   "%s: ring[%d] rx_m wasn't free?\n",
+   __func__,
+   i);
+   }
rxd->rx_m = NULL;
rxd->desc = &rd->arge_rx_ring[i];
if (i == ARGE_RX_RING_COUNT - 1)
@@ -1551,6 +1568,32 @@ arge_rx_ring_init(struct arge_softc *sc)
 }
 
 /*
+ * Free all the buffers in the RX ring.
+ *
+ * TODO: ensure that DMA is disabled and no pending DMA
+ * is lurking in the FIFO.
+ */
+static void
+arge_rx_ring_free(struct arge_softc *sc)
+{
+   int i;
+   struct arge_rxdesc  *rxd;
+
+   ARGE_LOCK_ASSERT(sc);
+
+   for (i = 0; i < ARGE_RX_RING_COUNT; i++) {
+   rxd = &sc->arge_cdata.arge_rxdesc[i];
+   /* Unmap the mbuf */
+   if (rxd->rx_m != NULL) {
+   bus_dmamap_unload(sc->arge_cdata.arge_rx_tag,
+   rxd->rx_dmamap);
+   m_free(rxd->rx_m);
+   rxd->rx_m = NULL;
+   }
+   }
+}
+
+/*
  * Initialize an RX descriptor and attach an MBUF cluster.
  */
 static int
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232913 - in head/sys: conf mips/conf

2012-03-12 Thread Juli Mallett
Author: jmallett
Date: Tue Mar 13 06:22:49 2012
New Revision: 232913
URL: http://svn.freebsd.org/changeset/base/232913

Log:
  Don't build kernel.tramp on Octeon.  Probably building it should be opt-in
  not opt-out, but I don't know enough about which ports need it to get the
  defaults right.

Modified:
  head/sys/conf/Makefile.mips
  head/sys/mips/conf/OCTEON1

Modified: head/sys/conf/Makefile.mips
==
--- head/sys/conf/Makefile.mips Tue Mar 13 06:15:20 2012(r232912)
+++ head/sys/conf/Makefile.mips Tue Mar 13 06:22:49 2012(r232913)
@@ -63,6 +63,7 @@ TRAMP_ELFSIZE=32
 # XXX hardcoded kernel entry point
 ASM_CFLAGS+=${CFLAGS} -D_LOCORE -DLOCORE
 
+.if !defined(WITHOUT_KERNEL_TRAMPOLINE)
 KERNEL_EXTRA=trampoline
 trampoline: ${KERNEL_KO}.tramp.bin
 ${KERNEL_KO}.tramp.bin: ${KERNEL_KO} $S/$M/$M/elf_trampoline.c \
@@ -78,6 +79,7 @@ ${KERNEL_KO}.tramp.bin: ${KERNEL_KO} $S/
-o ${KERNEL_KO}.tramp.elf
${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.elf \
${KERNEL_KO}.tramp.bin
+.endif
 
 %BEFORE_DEPEND
 

Modified: head/sys/mips/conf/OCTEON1
==
--- head/sys/mips/conf/OCTEON1  Tue Mar 13 06:15:20 2012(r232912)
+++ head/sys/mips/conf/OCTEON1  Tue Mar 13 06:22:49 2012(r232913)
@@ -27,6 +27,9 @@ makeoptions   LDSCRIPT_NAME=ldscript.mips.
 makeoptionsMODULES_OVERRIDE=""
 makeoptionsKERNLOADADDR=0x8010
 
+# We don't need to build a trampolined version of the kernel.
+makeoptionsWITHOUT_KERNEL_TRAMPOLINE=1
+
 include"../cavium/std.octeon1"
 
 hints  "OCTEON1.hints" #Default places to look for devices.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232914 - head/sys/mips/atheros

2012-03-12 Thread Adrian Chadd
Author: adrian
Date: Tue Mar 13 06:28:52 2012
New Revision: 232914
URL: http://svn.freebsd.org/changeset/base/232914

Log:
  Fix link status handling on if_arge upon system boot to allow bootp/NFS to
  function.
  
  From the submitter:
  
  This patch fixes an issue I encountered using an NFS root with an
  ar71xx-based MikroTik RouterBoard 450G on -current where the kernel fails
  to contact a DHCP/BOOTP server via if_arge when it otherwise should be able
  to.  This may be the same issue that Monthadar Al Jaberi reported against
  an RSPRO on 6 March, as the signature is the same:
  
  %%%
  
  DHCP/BOOTP timeout for server 255.255.255.255
  DHCP/BOOTP timeout for server 255.255.255.255
  DHCP/BOOTP timeout for server 255.255.255.255
  .
  .
  .
  DHCP/BOOTP timeout for server 255.255.255.255
  DHCP/BOOTP timeout for server 255.255.255.255
  arge0: initialization failed: no memory for rx buffers
  DHCP/BOOTP timeout for server 255.255.255.255
  arge0: initialization failed: no memory for rx buffers
  
  %%%
  
  The primary issue that I found is that the DHCP/BOOTP message that
  bootpc_call() is sending never makes it onto the wire, which I believe is
  due to the following:
  
  - Last December, a change was made to the ifioctl that bootpc_call() uses
  to adjust the netmask around the sosend().
  
  - The new ioctl (SIOCAIFADDR) performs an if_init when invoked, whereas the
  old one (SIOCSIFNETMASK) did not.
  
  - if_arge maintains its own sense of link state in sc->arge_link_status.
  
  - On a single-phy interface, sc->arge_link_status is initialized to 0 in
  arge_init_locked().
  
  - sc->arge_link_status remains 0 until a phy state change notification
  causes arge_link_task to run, notice the link is up, and set it to 1.
  
  - The inits caused by the ifioctls in bootpc_call are reinitializing the
  interface, but not the phy, so sc->arge_link_status goes to 0 and remains
  there.
  
  - arge_start_locked() always sees sc->arge_link_status == 0 and returns
  without queuing anything.
  
  The attached patch changes arge_init_locked() such that in the single-phy
  case, instead of initializing sc->arge_link_status to 0, it runs
  arge_link_task() to set it according to the current phy state.  This change
  has allowed my setup to mount an NFS root successfully.
  
  Submitted by: Patrick Kelsey 
  Reviewed by:  juli

Modified:
  head/sys/mips/atheros/if_arge.c

Modified: head/sys/mips/atheros/if_arge.c
==
--- head/sys/mips/atheros/if_arge.c Tue Mar 13 06:22:49 2012
(r232913)
+++ head/sys/mips/atheros/if_arge.c Tue Mar 13 06:28:52 2012
(r232914)
@@ -110,6 +110,7 @@ static int arge_ioctl(struct ifnet *, u_
 static void arge_init(void *);
 static void arge_init_locked(struct arge_softc *);
 static void arge_link_task(void *, int);
+static void arge_update_link_locked(struct arge_softc *sc);
 static void arge_set_pll(struct arge_softc *, int, int);
 static int arge_miibus_readreg(device_t, int, int);
 static void arge_miibus_statchg(device_t);
@@ -684,13 +685,20 @@ static void
 arge_link_task(void *arg, int pending)
 {
struct arge_softc   *sc;
+   sc = (struct arge_softc *)arg;
+
+   ARGE_LOCK(sc);
+   arge_update_link_locked(sc);
+   ARGE_UNLOCK(sc);
+}
+
+static void
+arge_update_link_locked(struct arge_softc *sc)
+{
struct mii_data *mii;
struct ifnet*ifp;
uint32_tmedia, duplex;
 
-   sc = (struct arge_softc *)arg;
-
-   ARGE_LOCK(sc);
mii = device_get_softc(sc->arge_miibus);
ifp = sc->arge_ifp;
if (mii == NULL || ifp == NULL ||
@@ -708,10 +716,10 @@ arge_link_task(void *arg, int pending)
duplex = mii->mii_media_active & IFM_GMASK;
arge_set_pll(sc, media, duplex);
}
-   } else
+   } else {
sc->arge_link_status = 0;
+   }
 
-   ARGE_UNLOCK(sc);
 }
 
 static void
@@ -853,7 +861,6 @@ arge_init_locked(struct arge_softc *sc)
 
 
if (sc->arge_miibus) {
-   sc->arge_link_status = 0;
mii = device_get_softc(sc->arge_miibus);
mii_mediachg(mii);
}
@@ -867,8 +874,10 @@ arge_init_locked(struct arge_softc *sc)
ifp->if_drv_flags |= IFF_DRV_RUNNING;
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
 
-   if (sc->arge_miibus)
+   if (sc->arge_miibus) {
callout_reset(&sc->arge_stat_callout, hz, arge_tick, sc);
+   arge_update_link_locked(sc);
+   }
 
ARGE_WRITE(sc, AR71XX_DMA_TX_DESC, ARGE_TX_RING_ADDR(sc, 0));
ARGE_WRITE(sc, AR71XX_DMA_RX_DESC, ARGE_RX_RING_ADDR(sc, 0));
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232915 - head/sys/contrib/octeon-sdk

2012-03-12 Thread Juli Mallett
Author: jmallett
Date: Tue Mar 13 06:48:26 2012
New Revision: 232915
URL: http://svn.freebsd.org/changeset/base/232915

Log:
  Remove some files not used by the FreeBSD kernel which have been adding quite
  a bit of bloat to the kernel source tree's size.

Deleted:
  head/sys/contrib/octeon-sdk/cvmx-csr-db-support.c
  head/sys/contrib/octeon-sdk/cvmx-csr-db.c
  head/sys/contrib/octeon-sdk/cvmx-csr-db.h
  head/sys/contrib/octeon-sdk/cvmx-error-custom.c
  head/sys/contrib/octeon-sdk/cvmx-error-custom.h
  head/sys/contrib/octeon-sdk/cvmx-error-init-cn30xx.c
  head/sys/contrib/octeon-sdk/cvmx-error-init-cn31xx.c
  head/sys/contrib/octeon-sdk/cvmx-error-init-cn38xx.c
  head/sys/contrib/octeon-sdk/cvmx-error-init-cn38xxp2.c
  head/sys/contrib/octeon-sdk/cvmx-error-init-cn50xx.c
  head/sys/contrib/octeon-sdk/cvmx-error-init-cn52xx.c
  head/sys/contrib/octeon-sdk/cvmx-error-init-cn52xxp1.c
  head/sys/contrib/octeon-sdk/cvmx-error-init-cn56xx.c
  head/sys/contrib/octeon-sdk/cvmx-error-init-cn56xxp1.c
  head/sys/contrib/octeon-sdk/cvmx-error-init-cn58xx.c
  head/sys/contrib/octeon-sdk/cvmx-error-init-cn58xxp1.c
  head/sys/contrib/octeon-sdk/cvmx-error-init-cn61xx.c
  head/sys/contrib/octeon-sdk/cvmx-error-init-cn63xx.c
  head/sys/contrib/octeon-sdk/cvmx-error-init-cn63xxp1.c
  head/sys/contrib/octeon-sdk/cvmx-error-init-cn66xx.c
  head/sys/contrib/octeon-sdk/cvmx-error-init-cn68xx.c
  head/sys/contrib/octeon-sdk/cvmx-error-init-cn68xxp1.c
  head/sys/contrib/octeon-sdk/cvmx-error-init-cnf71xx.c
  head/sys/contrib/octeon-sdk/cvmx-error.c
  head/sys/contrib/octeon-sdk/cvmx-error.h
Modified:
  head/sys/contrib/octeon-sdk/cvmx-pcie.c
  head/sys/contrib/octeon-sdk/cvmx-twsi.c
  head/sys/contrib/octeon-sdk/cvmx-usb.c

Modified: head/sys/contrib/octeon-sdk/cvmx-pcie.c
==
--- head/sys/contrib/octeon-sdk/cvmx-pcie.c Tue Mar 13 06:28:52 2012
(r232914)
+++ head/sys/contrib/octeon-sdk/cvmx-pcie.c Tue Mar 13 06:48:26 2012
(r232915)
@@ -76,7 +76,9 @@
 #include 
 #else
 #include "cvmx.h"
+#if !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL)
 #include "cvmx-csr-db.h"
+#endif
 #include "cvmx-pcie.h"
 #include "cvmx-sysinfo.h"
 #include "cvmx-swap.h"

Modified: head/sys/contrib/octeon-sdk/cvmx-twsi.c
==
--- head/sys/contrib/octeon-sdk/cvmx-twsi.c Tue Mar 13 06:28:52 2012
(r232914)
+++ head/sys/contrib/octeon-sdk/cvmx-twsi.c Tue Mar 13 06:48:26 2012
(r232915)
@@ -59,8 +59,10 @@
 #else
 #include "cvmx.h"
 #include "cvmx-twsi.h"
+#if !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL)
 #include "cvmx-csr-db.h"
 #endif
+#endif
 
 //#define PRINT_TWSI_CONFIG
 #ifdef PRINT_TWSI_CONFIG

Modified: head/sys/contrib/octeon-sdk/cvmx-usb.c
==
--- head/sys/contrib/octeon-sdk/cvmx-usb.c  Tue Mar 13 06:28:52 2012
(r232914)
+++ head/sys/contrib/octeon-sdk/cvmx-usb.c  Tue Mar 13 06:48:26 2012
(r232915)
@@ -72,7 +72,9 @@
 #include "cvmx-usb.h"
 #include "cvmx-helper.h"
 #include "cvmx-helper-board.h"
+#if !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL)
 #include "cvmx-csr-db.h"
+#endif
 #include "cvmx-swap.h"
 #if !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL)
 #include "cvmx-error.h"
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232916 - head/sys/mips/atheros

2012-03-12 Thread Adrian Chadd
Author: adrian
Date: Tue Mar 13 06:50:56 2012
New Revision: 232916
URL: http://svn.freebsd.org/changeset/base/232916

Log:
  Remove a now unneeded ARGE_UNLOCK().
  
  Whilst I'm here, remove a couple blank lines.

Modified:
  head/sys/mips/atheros/if_arge.c

Modified: head/sys/mips/atheros/if_arge.c
==
--- head/sys/mips/atheros/if_arge.c Tue Mar 13 06:48:26 2012
(r232915)
+++ head/sys/mips/atheros/if_arge.c Tue Mar 13 06:50:56 2012
(r232916)
@@ -703,7 +703,6 @@ arge_update_link_locked(struct arge_soft
ifp = sc->arge_ifp;
if (mii == NULL || ifp == NULL ||
(ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) {
-   ARGE_UNLOCK(sc);
return;
}
 
@@ -719,7 +718,6 @@ arge_update_link_locked(struct arge_soft
} else {
sc->arge_link_status = 0;
}
-
 }
 
 static void
@@ -859,7 +857,6 @@ arge_init_locked(struct arge_softc *sc)
 
arge_reset_dma(sc);
 
-
if (sc->arge_miibus) {
mii = device_get_softc(sc->arge_miibus);
mii_mediachg(mii);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"