Re: git vs. $OpenBSD$

2010-04-25 Thread Marc Espie
On Sun, Apr 25, 2010 at 03:01:31PM +0200, Marc Espie wrote:
 I think I finally figured out how to work with git for small subtrees,
 and not get annoyed with the $OpenBSD$ keyword expansion...
 
 
 - define a filter in your git attributes, that's either
 $GITDIR/info/attributes or ~/.gitattributes:
 * filter=openbsd

PS: apparently, ~/.gitattributes does not exist. This part has to live inside
the git repo you want to use...



Re: git vs. $OpenBSD$

2010-04-25 Thread Marc Espie
On Sun, Apr 25, 2010 at 03:01:31PM +0200, Marc Espie wrote:
 - create a script in your PATH that cleans up things, in my case,
 ~/bin/openbsd-zap
 
 #! /usr/bin/perl -p
 # what ? you expected another scripting language
 s/\$OpenBSD\:.*?\$/\$OpenBSD\$/g;
 s/[ \t]+$//; # jmc's gonna love that

PS2: the following script handles more situations:
#! /usr/bin/perl -p
s/\$(OpenBSD|Mdocdate|Id)\:.*?\$/\$$1\$/gs;
s/[ \t]+$//;



Re: diff to add posix_madvise().

2010-04-25 Thread Brad
On Sat, Apr 24, 2010 at 08:52:25PM -0700, Philip Guenther wrote:
 On Sat, Apr 24, 2010 at 1:33 PM, Brad b...@comstyle.com wrote:
 ...
  I have updated the diff with your suggestions.
 
 Close: I think the #include of sys/cdefs.h needs to be moved up in
 sys/mman.h so that the __BSD_VISIBLE test actually works.  Otherwise,
 looks good to me.

How about this?


Index: sys/sys/mman.h
===
RCS file: /cvs/src/sys/sys/mman.h,v
retrieving revision 1.18
diff -u -p -r1.18 mman.h
--- sys/sys/mman.h  21 Jul 2003 22:52:19 -  1.18
+++ sys/sys/mman.h  25 Apr 2010 15:24:06 -
@@ -32,6 +32,10 @@
  * @(#)mman.h  8.1 (Berkeley) 6/2/93
  */
 
+#ifndef _KERNEL
+#include sys/cdefs.h
+#endif
+
 /*
  * Protections are chosen from these bits, or-ed together
  */
@@ -72,15 +76,28 @@
 #defineMAP_FLAGMASK0x17f7
 
 /*
- * Advice to madvise
+ * POSIX memory advisory values.
+ * Note: keep consistent with the original defintions below.
  */
-#defineMADV_NORMAL 0   /* no further special treatment */
-#defineMADV_RANDOM 1   /* expect random page references */
-#defineMADV_SEQUENTIAL 2   /* expect sequential page references */
-#defineMADV_WILLNEED   3   /* will need these pages */
-#defineMADV_DONTNEED   4   /* dont need these pages */
-#defineMADV_SPACEAVAIL 5   /* insure that resources are reserved */
-#defineMADV_FREE   6   /* pages are empty, free them */
+#definePOSIX_MADV_NORMAL   0   /* no further special treatment 
*/
+#definePOSIX_MADV_RANDOM   1   /* expect random page 
references */
+#definePOSIX_MADV_SEQUENTIAL   2   /* expect sequential page 
references */
+#definePOSIX_MADV_WILLNEED 3   /* will need these pages */
+#definePOSIX_MADV_DONTNEED 4   /* don't need these pages */
+
+#if __BSD_VISIBLE
+/*
+ * Original advice values, equivalent to POSIX defintions,
+ * and few implementation-specific ones.
+ */
+#defineMADV_NORMAL POSIX_MADV_NORMAL
+#defineMADV_RANDOM POSIX_MADV_RANDOM
+#defineMADV_SEQUENTIAL POSIX_MADV_SEQUENTIAL
+#defineMADV_WILLNEED   POSIX_MADV_WILLNEED
+#defineMADV_DONTNEED   POSIX_MADV_DONTNEED
+#defineMADV_SPACEAVAIL 5   /* insure that resources are 
reserved */
+#defineMADV_FREE   6   /* pages are empty, free them */
+#endif
 
 /*
  * Flags to minherit
@@ -105,8 +122,17 @@
 #defineMCL_FUTURE  0x02/* lock all pages mapped in the future 
*/
 
 #ifndef _KERNEL
+#include sys/_types.h
 
-#include sys/cdefs.h
+#ifndef _SIZE_T_DEFINED_
+#define _SIZE_T_DEFINED_
+typedef __size_t   size_t;
+#endif
+
+#ifndef _OFF_T_DEFINED_
+#define _OFF_T_DEFINED_
+typedef __off_toff_t;
+#endif
 
 __BEGIN_DECLS
 /* Some of these int's should probably be size_t's */
@@ -118,10 +144,13 @@ int   mlock(const void *, size_t);
 intmunlock(const void *, size_t);
 intmlockall(int);
 intmunlockall(void);
+#if __BSD_VISIBLE
 intmadvise(void *, size_t, int);
 intmincore(void *, size_t, char *);
 intminherit(void *, size_t, int);
 void * mquery(void *, size_t, int, int, int, off_t);
+#endif
+intposix_madvise(void *, size_t, int);
 __END_DECLS
 
 #endif /* !_KERNEL */
Index: lib/libc/shlib_version
===
RCS file: /cvs/src/lib/libc/shlib_version,v
retrieving revision 1.121
diff -u -p -r1.121 shlib_version
@@ -1,4 +1,4 @@
 major=53
-minor=1
+minor=2
 # note: If changes were made to include/thread_private.h or if system
 # calls were added/changed then libpthread must also be updated.
Index: lib/libc/sys/Makefile.inc
===
RCS file: /cvs/src/lib/libc/sys/Makefile.inc,v
retrieving revision 1.89
diff -u -p -r1.89 Makefile.inc
--- lib/libc/sys/Makefile.inc   3 Feb 2010 20:49:00 -   1.89
+++ lib/libc/sys/Makefile.inc   20 Apr 2010 00:35:43 -
@@ -23,6 +23,9 @@ DPSRCS+= Lint_Ovfork.c Lint_brk.c Lint_e
Lint_setjmp.c Lint_longjmp.c \
Lint_sigsetjmp.c Lint_siglongjmp.c
 
+# glue to offer userland wrappers for some syscalls
+SRCS+= posix_madvise.c
+
 # glue to provide compatibility between GCC 1.X and 2.X and for compat
 # with old syscall interfaces.
 SRCS+= ftruncate.c lseek.c mquery.c mmap.c ptrace.c semctl.c truncate.c \
@@ -264,6 +267,7 @@ MLINKS+=gettimeofday.2 settimeofday.2
 MLINKS+=getuid.2 geteuid.2
 MLINKS+=kqueue.2 kevent.2 kqueue.2 EV_SET.2
 MLINKS+=intro.2 errno.2
+MLINKS+=madvise.2 posix_madvise.2
 MLINKS+=mlock.2 munlock.2
 MLINKS+=mlockall.2 munlockall.2
 MLINKS+=mount.2 unmount.2
Index: lib/libc/sys/madvise.2
===
RCS file: /cvs/src/lib/libc/sys/madvise.2,v

Re: Add support to AR5424

2010-04-25 Thread Tom Murphy
Luis,

  I have an Asus EEE with uses an AR5424 chipset:

ath0 at pci3 dev 0 function 0 Atheros AR5424 rev 0x01: apic 1 int 18 (irq 10)
ath0: AR5424 14.2 phy 7.0 rf 0.0, WOR0W, address 00:15:af:b5:36:7f

  I tried the latest patch you posted and it locks OpenBSD completely up
when bringing the network up (even ifconfig ath0 up locks the system.)

  Tom



Re: New intel X driver requires testing.

2010-04-25 Thread J.C. Roberts
On Sun, 11 Apr 2010 18:47:45 +0100 Owain Ainsworth
zer...@googlemail.com wrote:

 The tarball that may be found at http://xenocara.org/intel-current.tgz
 contains an update to the intel 2.9.1 driver (the last one that
 supported userland modesetting) with a load of backports for bugfixes
 and performance improvements from drivers up to 2.11.

Per request, the kernel, userland, and xenocara were all rebuilt with
April 24th src checkout. New intel drive above was also rebuilt and
reinstalled. All tests were repeated, and results were basically the
same. All the torrid details, console output, X log, kernel, symbols
and core sent to oga@ off list.

Results:
1.) gpu hang still present on vt switching as before.
2.) Xv no longer works at all (previously xv worked at resolutions
of 1280x1024 and below).

starting to test the patch for inteldrm locking rework.

-- 
The OpenBSD Journal - http://www.undeadly.org



Re: Add support to AR5424

2010-04-25 Thread Luis Henriques
On Sun, Apr 25, 2010 at 08:29:35PM +0100, Tom Murphy wrote:
 Luis,
 
   I have an Asus EEE with uses an AR5424 chipset:
 
 ath0 at pci3 dev 0 function 0 Atheros AR5424 rev 0x01: apic 1 int 18 (irq 
 10)
 ath0: AR5424 14.2 phy 7.0 rf 0.0, WOR0W, address 00:15:af:b5:36:7f
 
   I tried the latest patch you posted and it locks OpenBSD completely up
 when bringing the network up (even ifconfig ath0 up locks the system.)

Thanks for testing and reporting this, Tom.

Just curious about something: the dmesg you show in your email has been
collected _without_ the patch, right?  Because with the patch I would
expect that the rf would be different from 0.0.

--
Luis