Re: CVS commit: src/sys/dev/ieee1394

2010-04-29 Thread Adam Hoka
On Thu, 29 Apr 2010 06:56:00 +
KIYOHARA Takashi  wrote:

> Module Name:  src
> Committed By: kiyohara
> Date: Thu Apr 29 06:56:00 UTC 2010
> 
> Modified Files:
>   src/sys/dev/ieee1394: fwdma.c
> 
> Log Message:
> Call malloc(M_ZERO) instead of malloc() and memset().

Why not kmem_zalloc()?


-- 
NetBSD - Simplicity is prerequisite for reliability


Re: CVS commit: src/sys/dev/ieee1394

2010-04-29 Thread KIYOHARA Takashi
Hi!


From: Adam Hoka 
Date: Thu, 29 Apr 2010 09:38:31 +0200

> On Thu, 29 Apr 2010 06:56:00 +
> KIYOHARA Takashi  wrote:
> 
> > Module Name:src
> > Committed By:   kiyohara
> > Date:   Thu Apr 29 06:56:00 UTC 2010
> > 
> > Modified Files:
> > src/sys/dev/ieee1394: fwdma.c
> > 
> > Log Message:
> > Call malloc(M_ZERO) instead of malloc() and memset().
> 
> Why not kmem_zalloc()?

Oops, I learnt kmem(9) just now.
Also malloc(9) says 'These interfaces are being obsoleted and their new
use is discouraged.' in man-page.

Please wait a few days.  ;-)

Thanks,
--
kiyohara


Re: CVS commit: src/lib/libc/sys

2010-04-29 Thread David Holland
On Thu, Apr 29, 2010 at 07:14:35AM +, Jukka Ruohonen wrote:
 > Note that utimes(2) no longer enjoys the blessing of POSIX.

What's the currently-blessed alternative?

-- 
David A. Holland
dholl...@netbsd.org


Re: CVS commit: src/sys

2010-04-29 Thread Andrew Doran
On Thu, Apr 29, 2010 at 09:39:50AM +1000, matthew green wrote:
>
>Modified Files:
>   src/sys/arch/amd64/amd64: busfunc.S genassym.cf mainbus.c
>   src/sys/arch/i386/i386: apmbios.c busfunc.S genassym.cf ipkdb_glue.c
>   mainbus.c
>   src/sys/arch/i386/isa: isapnp_machdep.c
>   src/sys/arch/i386/pci: pceb.c pcibios.c pcmb.c
>   src/sys/arch/i386/pnpbios: pnpbios.c
>   src/sys/arch/i386/xbox: xbox.c xboxfb.c
>   src/sys/arch/x86/include: bus.h
>   src/sys/arch/x86/pci: pcib.c
>   src/sys/arch/x86/x86: acpi_machdep.c bus_space.c consinit.c
>   genfb_machdep.c
>   src/sys/arch/xen/x86: consinit.c mainbus.c
>   src/sys/arch/xen/xen: hypervisor.c xpci_xenbus.c
>   src/sys/compat/ndis: nbcompat.h
>   src/sys/dev/if_ndis: if_ndis_pci.c
>   src/sys/dev/pci: puccn.c
>
>Log Message:
>On x86, change the bus_space_tag_t to a pointer to a struct
>bus_space_tag.  For now, bus_space_tag's only member is
>bst_type, the type of space, which is either X86_BUS_SPACE_IO
>or X86_BUS_SPACE_MEM.  In the future, new bus_space_tag members
>will refer to override-functions installed by a new function,
>bus_space_tag_create(9).
>
>Add pointers to constant struct bus_space_tag, x86_bus_space_io and
>x86_bus_space_mem.  Use them to replace most uses of X86_BUS_SPACE_IO
>and X86_BUS_SPACE_MEM.
>
>Add an x86-specific bus_space_is_equal(9) implementation that compares
>the two tags' bst_type.
> 
> this needs a kernel version bump i believe.  old drivers
> should be allowed to load anymore...  at the very least,
> the *drm driver modules will be broken.
> 
> annoying that an MD change requires the MI version to bump
> but these sorts of changes aren't too common i guess.

Also annoying that so much of this code is MD.

Please run large x86 changes by me before commit.  I would have told you
what Matt just did :-).  FYI you can now remove the #error from both busfunc.S
and special _ALIGN_TEXT definitions since the sizes of the routines will be
quite different now.



Re: CVS commit: src/lib/libc/sys

2010-04-29 Thread Jukka Ruohonen
On Thu, Apr 29, 2010 at 08:51:19AM +, David Holland wrote:
> On Thu, Apr 29, 2010 at 07:14:35AM +, Jukka Ruohonen wrote:
>  > Note that utimes(2) no longer enjoys the blessing of POSIX.
> 
> What's the currently-blessed alternative?

2004:

APPLICATION USAGE

"For applications portability, the utime() function should be used to set
file access and modification times instead of utimes()."

FUTURE DIRECTIONS

This function may be withdrawn in a future version.

2008:

"The utimes() function shall be equivalent to the utimensat() function with
 the special value AT_FDCWD as the fd argument and the flag argument set to
 zero, except that the times argument is a timeval structure rather than a
 timespec structure, and accuracy is only to the microsecond, not nanosecond,
 and rounding towards the nearest second may occur."

So I guess the *at() thing strikes again.

- Jukka.


Re: CVS commit: src/lib/libc/sys

2010-04-29 Thread David Holland
On Thu, Apr 29, 2010 at 12:05:02PM +0300, Jukka Ruohonen wrote:
 > > What's the currently-blessed alternative?
 > 
 > 2004:
 > 
 > APPLICATION USAGE
 > 
 > "For applications portability, the utime() function should be used to set
 > file access and modification times instead of utimes()."

oh goody, yet another slightly-different variant to cause confusion.

I don't suppose their new invention is the same as (or even compatible
with) the utime() we already have that's marked obsolete?

 > So I guess the *at() thing strikes again.

Apparently.

-- 
David A. Holland
dholl...@netbsd.org


Re: CVS commit: src/share/man/man9

2010-04-29 Thread Adam Hoka
On Thu, 29 Apr 2010 16:31:11 +
Jukka Ruohonen  wrote:

> Module Name:  src
> Committed By: jruoho
> Date: Thu Apr 29 16:31:11 UTC 2010
> 
> Modified Files:
>   src/share/man/man9: signal.9
> 
> Log Message:
> Update this, mechanically, to match the new functions and their prototypes.
> 
> XXX: Someone more familiar with the code should proofread the page and
>  evaluate how well it reflects the reality in 2010.

Thanks for working on the docs!

-- 
NetBSD - Simplicity is prerequisite for reliability


Re: CVS commit: src/sys

2010-04-29 Thread David Young
On Thu, Apr 29, 2010 at 08:52:16AM +, Andrew Doran wrote:
> Also annoying that so much of this code is MD.
> 
> Please run large x86 changes by me before commit.  I would have told you
> what Matt just did :-).  FYI you can now remove the #error from both busfunc.S
> and special _ALIGN_TEXT definitions since the sizes of the routines will be
> quite different now.

Something like this?

Dave

-- 
David Young OJC Technologies
dyo...@ojctech.com  Urbana, IL * (217) 278-3933
Index: sys/arch/i386/i386/busfunc.S
===
RCS file: /cvsroot/src/sys/arch/i386/i386/busfunc.S,v
retrieving revision 1.6
diff -u -p -r1.6 busfunc.S
--- sys/arch/i386/i386/busfunc.S28 Apr 2010 19:17:03 -  1.6
+++ sys/arch/i386/i386/busfunc.S29 Apr 2010 17:30:57 -
@@ -34,10 +34,6 @@ __KERNEL_RCSID(0, "$NetBSD: busfunc.S,v 
 
 #include "assym.h"
 
-/* XXX */
-#undef _ALIGN_TEXT
-#define_ALIGN_TEXT .align 16
-
 /*
  * uint8_t bus_space_read_1(bus_space_tag_t tag, bus_space_handle_t bsh,
  *bus_size_t offset);
Index: sys/arch/amd64/amd64/busfunc.S
===
RCS file: /cvsroot/src/sys/arch/amd64/amd64/busfunc.S,v
retrieving revision 1.8
diff -u -p -r1.8 busfunc.S
--- sys/arch/amd64/amd64/busfunc.S  28 Apr 2010 19:17:03 -  1.8
+++ sys/arch/amd64/amd64/busfunc.S  29 Apr 2010 17:30:57 -
@@ -33,14 +33,6 @@
 
 #include "assym.h"
 
-/* XXX */
-#undef _ALIGN_TEXT
-#define_ALIGN_TEXT .align 16
-
-#if X86_BUS_SPACE_IO != 0
-#error depends on X86_BUS_SPACE_IO == 0
-#endif
-
 .Ldopanic:
movq$.Lpstr, %rdi
call_C_LABEL(panic)


Re: CVS commit: src/usr.bin/make

2010-04-29 Thread Joerg Sonnenberger
On Thu, Apr 29, 2010 at 11:12:21PM +, Simon J. Gerraty wrote:
> Module Name:  src
> Committed By: sjg
> Date: Thu Apr 29 23:12:21 UTC 2010
> 
> Modified Files:
>   src/usr.bin/make: main.c parse.c
> 
> Log Message:
> fflush stdout, before writing to stderr.

In which situation does it actually help? I think this is supposed to be
the default behavior for stderr after all.

Joerg


Re: CVS commit: src/usr.bin/make

2010-04-29 Thread Phil Nelson
On Thursday 29 April 2010 17:02:50 Joerg Sonnenberger wrote:
> On Thu, Apr 29, 2010 at 11:12:21PM +, Simon J. Gerraty wrote:
> > Module Name:  src
> > Committed By: sjg
> > Date: Thu Apr 29 23:12:21 UTC 2010
> > 
> > Modified Files:
> >   src/usr.bin/make: main.c parse.c
> > 
> > Log Message:
> > fflush stdout, before writing to stderr.
> 
> In which situation does it actually help? I think this is supposed to be
> the default behavior for stderr after all.

In a shell that allows you to say:

   make target >& logfile &

In this case, stdout defaults to fully buffered mode instead of
line buffered mode and with stderr being unbuffered, the fflush
is needed to make sure that anything written to standard out
appears in the output before the stuff written to stderr.

--Phil



-- 
Phil Nelson (phil at cs.wwu.edu) http://www.cs.wwu.edu/nelson
NetBSD: http://www.NetBSD.org  Coda: http://www.coda.cs.cmu.edu