Re: CVS commit: src/sys/net

2009-04-01 Thread Masao Uebayashi
> Log Message:
> Also inherit the parent's TCP segmentation offload capability.
> Note the vlan interface does not see updates to the parents capabilities
> so if, for example, TSO is on in both, then turned off in the parent it
> will remain on in the vlan interface.

And now, why not IFCAP_TSOv6?

Masao


Re: CVS commit: src/sys/net

2009-04-04 Thread Masao Uebayashi
Sorry for delayed review.

> @@ -410,6 +419,10 @@
>   /* Tear down the routing table. */
>   bridge_rtable_fini(sc);
>  
> +
> +
> + softint_disestablish(sc->sc_softintr);
> +
>   free(sc, M_DEVBUF);
>  
>   return (0);

Please trim these blank lines.

> @@ -1305,124 +1318,139 @@
>   *   The forwarding function of the bridge.
>   */
>  static void
> -bridge_forward(struct bridge_softc *sc, struct mbuf *m)
> +bridge_forward(void *v)
>  {
> + struct bridge_softc *sc = v;
> + struct mbuf *m;
>   struct bridge_iflist *bif;
>   struct ifnet *src_if, *dst_if;
>   struct ether_header *eh;
> + int s;
>  

I think you have to take softnet_lock, since bridge_forward() is called from
softint where not lock is held.

> - src_if = m->m_pkthdr.rcvif;
> + if ((sc->sc_if.if_flags & IFF_RUNNING) == 0)
> + return;
>  
> - sc->sc_if.if_ipackets++;
> - sc->sc_if.if_ibytes += m->m_pkthdr.len;
> + s = splbio();
> + while (1) {
> + IFQ_POLL(&sc->sc_if.if_snd, m);
> + if (m == NULL)
> + break;
> + IFQ_DEQUEUE(&sc->sc_if.if_snd, m);
>  

Why splbio(), not splnet()???

Masao


Re: CVS commit: src/sys/net

2009-04-04 Thread Masao Uebayashi
I was reviewing this change. :)

On Sat, Apr 04, 2009 at 10:00:23AM +, Manuel Bouyer wrote:
> Module Name:  src
> Committed By: bouyer
> Date: Sat Apr  4 10:00:23 UTC 2009
> 
> Modified Files:
>   src/sys/net: if_bridge.c if_bridgevar.h
> 
> Log Message:
> Fix for if_start() and pfil_hook() being called from hardware interrupt
> context (reported on various mailing-lists, and part of PR kern/41114,
> causing panic in pf(4) and possibly ipf(4) when BRIDGE_IPF is used).
> Defer bridge_forward() to a software interrupt; bridge_input() enqueues
> mbufs to ifp->if_snd which is handled in bridge_forward().
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.64 -r1.65 src/sys/net/if_bridge.c
> cvs rdiff -u -r1.13 -r1.14 src/sys/net/if_bridgevar.h
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 

One more thing:

> @@ -1305,124 +1318,139 @@
>   *   The forwarding function of the bridge.
>   */
>  static void
> -bridge_forward(struct bridge_softc *sc, struct mbuf *m)
> +bridge_forward(void *v)
>  {
> + struct bridge_softc *sc = v;
> + struct mbuf *m;
>   struct bridge_iflist *bif;
>   struct ifnet *src_if, *dst_if;
>   struct ether_header *eh;
> + int s;
(snip)
> - bridge_enqueue(sc, dst_if, m, 1);
> + bridge_enqueue(sc, dst_if, m, 1);
> + }
> + splx(s);
>  }
>  
>  /*

You can put a wrapping function (for example bridge_forward_intr()) and call
the original bridge_forward() from within it.  And the diff will be much
smaller & easier to review.

tatic void
bridge_forward_intr(void *v)
{
   struct bridge_softc *sc = v;
   struct mbuf *m;
   int s;

   if ((sc->sc_if.if_flags & IFF_RUNNING) == 0)
   return;

   s = splnet();
   while (1) {
   IFQ_POLL(&sc->sc_if.if_snd, m);
   if (m == NULL)
   break;
   IFQ_DEQUEUE(&sc->sc_if.if_snd, m);
   bridge_forward(sc, m);
   }
   splx(s);
}

static void
bridge_forward(struct bridge_softc *sc, struct mbuf *m)
{
:

Masao


Re: CVS commit: src/sys/net

2009-04-04 Thread Masao Uebayashi
> I don't like such useless intermediate functions. It doesn't make code
> easier to read.

It is a useful intermediate function.  Code flow becomes clearer.  Or do you
think longer function is easier to read, like tcp_output()? :)

Masao


Re: CVS commit: src/sys/net

2009-04-04 Thread Masao Uebayashi
Late reply. :)

I just read if_vlan.c and found that part.  My complaint was that readers
can't know the intention of (IFCAP_CSUM_IPv4_Tx | IFCAP_CSUM_IPv4_Rx |
IFCAP_CSUM_TCPv4_Tx | IFCAP_CSUM_TCPv4_Rx | IFCAP_CSUM_UDPv4_Tx |
IFCAP_CSUM_UDPv4_Rx | IFCAP_CSUM_TCPv6_Tx | IFCAP_CSUM_TCPv6_Rx |
IFCAP_CSUM_UDPv6_Tx | IFCAP_CSUM_UDPv6_Rx) - is it kind of a selection, or
just all ot IFCAP_*?

> I'm only testing with IPv4.  Any volunteers for IPv6?

I wanted to know that if a) it should work but just not tested, or b) it
should not work.  In either case comment would be nice IMO.

Masao


Re: CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips

2009-09-02 Thread Masao Uebayashi
> @@ -876,10 +876,17 @@
>   moves2, t2  # stash most of temporary regs
>   REG_S   t3, FRAME_T3(k1)# syscall saved gp for fork
>   mfc0a1, MIPS_COP_0_STATUS   # 2nd arg is STATUS
> +#if defined(__mips_n32) || defined(__mips_n64)
> + REG_S   a4, FRAME_A4(k1)
> + REG_S   a5, FRAME_A5(k1)
> + REG_S   a6, FRAME_A6(k1)
> + REG_S   a7, FRAME_A7(k1)
> +#else
>   moves4, ta0
>   moves5, ta1
>   moves6, ta2
>   moves7, ta3
> +#endif
>   #REG_S  t8, FRAME_T8(k1)
>   #REG_S  t9, FRAME_T9(k1)
>   REG_S   gp, FRAME_GP(k1)

This should be #if !defined(__mips_o32) ... #else ... #endif.  Otherwise O64
kernel + N32/N64 userland won't work.

Masao


Re: CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips

2009-09-02 Thread Masao Uebayashi
> O64 kernel?  why should we worry about O64?

For "completeness". :)

Masao


Re: CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips

2009-09-14 Thread Masao Uebayashi
> Log Message:
> CP0 ECC and CACHE_ERR "not implemented" on RMI XLS, so avoid accessing them

> @@ -508,8 +508,10 @@
>  
>   if (MIPS_HAS_LLSC) {
>   if (CPUISMIPS64) {
> +#if !defined(MIPS64_XLS) /* CP0 reg #17 
> "reserved" */
>   SHOW64(MIPS_COP_0_LLADDR, "lladdr");
>   SHOW64(MIPS_COP_0_WATCH_LO, "watchlo");
> +#endif
>   } else {
>   SHOW32(MIPS_COP_0_LLADDR, "lladdr");
>   SHOW32(MIPS_COP_0_WATCH_LO, "watchlo");

Could you make this like #if !defined(__HAVE_COP0_ECC)?  #ifdef'ing by product
name leaves difficulties when those who don't know its specs maintain the
code.

(Let's not repeat MIPS3_5900 tragedy. ;)

Masao


Re: CVS commit: src

2009-09-17 Thread Masao Uebayashi
> Log Message:
> In pmf(9), improve the implementation of device self-suspension
> and make suspension by self, by drvctl(8), and by ACPI system sleep
> play nice together.  Start solidifying some temporary API changes.
:

Don't you need kernel version bump for this?

Masao


Re: CVS commit: src/sys/dev

2009-11-09 Thread Masao Uebayashi
> This is a step in the right direction, but now cgd(4) is doing
> malloc(..., M_WAITOK) in (software) interrupt context.  A LOCKDEBUG
> kernel will panic.  How can we avoid the stack overflows and such in a
> different way?

Allocating buffers in softc?  Buffer size is determined when cgd_ioctl_set()
is called.  cgd_ioctl_set() should be thread-context.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/lib/libc/arch/m68k/gen

2009-11-28 Thread Masao Uebayashi
> Module Name:  src
> Committed By: christos
> Date: Sat Nov 28 23:46:39 UTC 2009
> 
> Modified Files:
>   src/lib/libc/arch/m68k/gen: Makefile.inc
> Added Files:
>   src/lib/libc/arch/m68k/gen: fpfake.c
> 
> Log Message:
> Add no/op routines for m68000 for the sticky, mask, and round settings.

Could you consider to improve the quality of commit messages & always explain
the reason of the changes? :)

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src

2009-12-01 Thread Masao Uebayashi
> Because the current PF sources (=version 4.2) is (still) in those  
> directories as far as I can tell. The only reason for this import is to  
> make upgrades easier, see my mail to current-users@ yesterday.

I think doing repo-copy (from dist/ to external/) would help here?

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/sys/arch/arm/arm32

2009-12-02 Thread Masao Uebayashi
> Log Message:
> Apply some band-aid to pmap_activate() for PR kern/41058:
> 
> There's a corner case here which can leave turds in the cache as
> reported in kern/41058. They're probably left over during tear-down and
> switching away from an exiting process. Until the root cause is identified
> and fixed, zap the cache when switching pmaps. This will result in a few
> unnecessary cache flushes, but that's better than silently corrupting data.
> 
> Also remove an extraneous return statement in pmap_page_protect() which
> crept in during the matt-armv6 merge.

This seems to fix odd assertion failures seen on i.MX3x I have been seeing.
I'll test more with this and report later.

Huge thanks go for all of you involved!!

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/sys/arch/arm/arm32

2009-12-03 Thread Masao Uebayashi
I spoke too early.  I still see problems.  I'll post this to port-arm@ after
sorting out things.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/share/mk

2009-12-03 Thread Masao Uebayashi
Maybe this is simpler:

sidebeach% nbmake-i386 -V MKZFS
yes
sidebeach% nbmake-i386 -V MKZFS MKZFS=no
no
sidebeach% nbmake-shark -V MKZFS
no
sidebeach% nbmake-shark -V MKZFS MKZFS=yes
yes

Masao

Index: share/mk/bsd.own.mk
===
RCS file: /cvsroot/src/share/mk/bsd.own.mk,v
retrieving revision 1.601
diff -u -r1.601 bsd.own.mk
--- share/mk/bsd.own.mk 3 Dec 2009 15:57:18 -   1.601
+++ share/mk/bsd.own.mk 4 Dec 2009 03:41:12 -
@@ -663,6 +663,13 @@
 .endif
 
 #
+# We want to build zfs only for i386 and amd64 by default for now.
+#
+.if ${MACHINE} == "amd64" || ${MACHINE} == "i386"
+MKZFS?=yes
+.endif
+
+#
 # MK* options which default to "yes".
 #
 _MKVARS.yes= \
@@ -699,7 +706,7 @@
MKMANDOC MKMANZ MKOBJDIRS \
MKPCC MKPCCCMDS \
MKSOFTFLOAT MKSTRIPIDENT \
-   MKUNPRIVED MKUPDATE MKX11 
+   MKUNPRIVED MKUPDATE MKX11 MKZFS
 .for var in ${_MKVARS.no}
 ${var}?=no
 .endfor
@@ -721,17 +728,6 @@
 .endif
 
 #
-# We want to build zfs only for i386 and amd64 by default for now.
-#
-.if ${MACHINE} == "amd64" || ${MACHINE} == "i386"
-MKZFS?=yes
-_MKVARS.yes+=  MKZFS
-.else
-MKZFS?=no
-_MKVARS.no+=   MKZFS
-.endif
-
-#
 # Force some options off if their dependencies are off.
 #
 
-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/share/mk

2009-12-03 Thread Masao Uebayashi
> Yes, indeed. But this will only work if "sets.subr" actually
> checks for this variable, won't it?

Yes.

sets.subr fetches ${_MKVARS.yes} and ${_MKVARS.no} var names:
=> MKZFS is in ${_MKVARS.no}

sets.subr agains fetches all values for all var names:
=> MKZFS=${MKZFS}

Am I missing anything else?

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/distrib/sets

2009-12-05 Thread Masao Uebayashi
> @@ -32,15 +32,16 @@
>  while getopts L:bxXloa:m:s: ch; do
>   case ${ch} in
>   L)
> - lists=$(
> - for _list in $( echo ${OPTARG} | tr , ' ' ); do
> - case $_list in
> - base)   echo "${nlists}" ;;
> - x)  echo "${xlists}" ;;
> - ext)echo "${extlists}" ;;
> - esac
> - done
> - )
> + save_IFS="${IFS}"
> + IFS=,
> + for _list in ${OPTARG}; do
> + case $_list in
> + base)   lists="${lists} ${nlists}" ;;
> + x)  lists="${lists} ${xlists}" ;;
> + ext)lists="${lists} ${extlists}" ;;
> + esac
> + done
> + IFS="${save_IFS}"
>   ;;
>   # backward compat
>   b)

Thanks, this looks better.

Could you elaborate how the old version failed on Mac OS X?

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/distrib/sets

2009-12-06 Thread Masao Uebayashi
> My guess is that the parser has terminated the first '$(' on the
> case label 'base)' while trying to skip the unwanted case clause.
> 
> Quite possibly it would all work if the $(...) were replaced by `...`
> (the nested one just needs a couple of \).

Hmm.  Is my version incompatible to POSIX?  Or do we go to "write really
portable shell script" load like Autoconf, not POSIX shell? [1]

Masao

[1] http://www.gnu.org/software/hello/manual/autoconf/Portable-Shell.html

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/distrib/sets

2009-12-07 Thread Masao Uebayashi
> It is posix compliant, but falls foul of a common shell bug.
> 
> http://www.gnu.org/software/hello/manual/autoconf/Shell-Substitutions.html
> 
> Avoid commands that contain unbalanced parentheses in here-documents,
> comments, or case statement patterns, as many shells mishandle them.
> For example, Bash 3.1, ksh88, pdksh 5.2.14, and Zsh 4.2.6 all
> mishandle the following valid command: 
> 
>   echo $(case x in x) echo hello;; esac)

Thanks.  I've never known this.

I wonder why we don't have ${TOOL_SH}.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/share/mk

2009-12-08 Thread Masao Uebayashi
> > OTOH you can't pass parameters to ${CC}, because in suffix rules make(1) 
> > only
> > knows the name of ${.IMPSRC} and ${.TARGET}
> 
> Actually it would do no harm for bsd.prog.mk (IIRC) to define an
> explicit dependency when it generates ${OBJS} from ${SRCS}.
> Make will use the rules from the appropriate suffix rule, but
> it will force the specific dependency.
> 
> So if SRCS contains foo.c the will be built, even if there is a foo.S

I was unclear; I meant "you can't pass per-target (${PROG} / ${LIB}) parameters
to ${CC} directly".

And yes, it's actually possible to append ${CPPFLAGS.foo} to
${CPPFLAGS.foo_src_a.c}, ${CPPFLAGS.foo_src_b.c}, ... by using .for.  I don't
think that is worth bothering.  I can also think of odd situations where you
share one source among multiple targets:

PROGS=foo bar
SRCS.foo=foo.c common.c
SRCS.bar=bar.c common.c
CPPFLAGS.foo=-Dfoo
    CPPFLAGS.bar=-Dbar

Think how common.o will be built...

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/share/mk

2009-12-08 Thread Masao Uebayashi
>   ${_LDADD.${PROG}}
>   ${_LDFLAGS.${PROG}}
>   ${_LDSTATIC.${PROG}}
>   ${_LDADD.${LIB}}
>   ${_LDFLAGS.${LIB}}
>
>OTOH you can't pass parameters to ${CC}, because in suffix rules make(1) 
> only
>knows the name of ${.IMPSRC} and ${.TARGET}; it's users' responsivility to
>define ${CC} parameters to all the sources of a given ${PROG} / ${LIB}.
> 
> 
> why are these in the _ namespace?  are they not supposed to be
> used by end-user Makefiles?

Oops.  I meant ${LDADD.${PROG}} etc. (no _ prefix).  The _ prefix ones are
only used internally in bsd.{prog,lib}.mk.  I'll fix the cvs log.  Thanks.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/gnu/lib/libgcc4

2009-12-08 Thread Masao Uebayashi
> Log Message:
> Switch to new style only if  is explicitly set.
 ^^
I meant to mention ${MKNATIVE_LIBGCC_NEW} here.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/bin/sh

2009-12-09 Thread Masao Uebayashi
> This added:
> 
> arith.h: arith.c
> arith.c: arith.y
> 
> I'm fairly sure this doesn't have the desired effect!
> In particular if arith.h doesn't exist, but arith.c does then you'll
> get a 'no rules to create arith.h' (or similar error).
> 
> At least one of those dependencies must already exist! Otherwise
> the file would never have been generated!

True.

> Thinks 
> It might be best have:
> 
> arith.h: arith.y
>   
> 
> arith.o: arith.h
>   [ -f ${@:.o=c} ] || { rm ${@:.o=.h}; exit 1; }
>   
> 
> ie having no real dependency against arith.c

Another idea would be always generate two outputs independently.

arith.c: tmp_arith_c.c:
tmp_arith_c.c: tmp_arith_c.y
tmp_arith_c.y: arith.y
cp arith.y tmp_arith_c.y

arith.h: tmp_arith_h.h:
tmp_arith_h.h: tmp_arith_h.y
tmp_arith_h.y: arith.y
cp arith.y tmp_arith_h.y

I can think of no problem of this.  At the cost of redundancy (run command
twice + some tmp files) you get accurate dependency tree.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/bin/sh

2009-12-10 Thread Masao Uebayashi
More thought.

All these confusions come from the inability of commands to generate output
files separatedly.  This is perfect legal dependency tree because each
input/output relationship is 1:1

 +-> arith.c --+
arith.y -+ +-> arith.o
 +-> arith.h --+

If yacc can generate only either .c / .h, like

yacc --src arith.y
yacc --hdr arith.y

We can write the rule straight.

What we need is to have wrapper commands which extracts one of outputs.  If
a command generates 3 outputs from 4 inputs, we need 3 wrappers.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/distrib/sets

2009-12-11 Thread Masao Uebayashi
> Log Message:
> Prefix mkvars.mk with ${rundir}/, so that the scripts from this
> dir using sets.subr can be run from another directory, as is done
> e.g. during "make release" via the mksums script.

Thanks!

Masao


Re: CVS commit: src

2009-12-11 Thread Masao Uebayashi
> Log Message:
> Move the test for evbppc out of sets.subr and into bsd.own.mk, to
> decide whether to make kernel modules: set MKKMOD to no for evbppc.
> Use this in etc/Makefile to decide whether to do the "modules"
> obsolete sets.  Move the ./var/db/obsolete/modules entry from the
> "mi" to the "module.mi" file set.
> 
> Fixes the build for evbppc.

Thanks again.

> Index: src/etc/Makefile

Anothor source of heada^Wpleasure!

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/share/mk

2009-12-11 Thread Masao Uebayashi
> this seems pretty gross.  i'm not sure it's a good way to
> solve the problem at hand.  it hides everything away with
> @.  it also doesn't appear to avoid updating a file if it
> hasn't actually changed.  it also hard codes /tmp, which
> it shouldn't need to use at all.  it also uses "cp"
> instead of "mv".

Could you give me a test case this fails?  I'm all for better solution.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/share/mk

2009-12-11 Thread Masao Uebayashi
I had a discussion with dsl@ on source-change...@.

http://mail-index.netbsd.org/source-changes-d/2009/12/08/msg001261.html

His suggestion was:
arith.h: arith.y


arith.o: arith.h
[ -f ${@:.o=c} ] || { rm ${@:.o=.h}; exit 1; }


ie having no real dependency against arith.c

I showd my idea to make commands to generate only one output.  I got no
response.  I took that as no one has interest about this.  GENCMD is just
one way to achieve that.  You can do it in $YOUR_OWN_WAY but the idea is
that.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/distrib/sets

2009-12-11 Thread Masao Uebayashi
>Log Message:
>Put intermediate lists on the top of ${DESTDIR} (${DESTDIR}/SETS.*) and 
> leave
>them.  Teach list generators to ignore them.  Always generate metalog
>missing/extra lists too, but don't check it (for now).  I'll change "flist"
>to be generated only when set lists have changed.
>
>No functional changes.
> 
> 
> why are you polluting $DESTDIR even more?  please put these
> files in an objdir.

I put those files there because those are as important as METALOG*.  I'd also
want to leave make configuration variables in ${DESTDIR} so that you can
reproducible the resulting ${DESTDIR} from the recorded configuration.  This
is analogue to kernel config embedded in kernel itself.  How do you think?

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


make rule of multiple file generation (was Re: CVS commit: src/share/mk)

2009-12-11 Thread Masao Uebayashi
(Moved from source-change...@netbsd.org.)

> Actually I am interested. You just did not present your solution in
> tech-whatever so I did not have a chance to comment. Do you have an
> example where the existing rules fail, so that I can see what you are
> trying to fix?

% cd bin/sh
% cvs up -D20091201
% nbmake-XXX -n sh

I started looking at this when I found rescue/ rebuilds usr.bin/ktruss
everytime.  I first thought such file generation rules should have been gone,
and posted this:

http://mail-index.netbsd.org/tech-toolchain/2009/12/07/msg000805.html

Reading people's opinions, I changed my mind & looked closer to those rules.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/distrib/sets

2009-12-12 Thread Masao Uebayashi
BTW, creating those in ${.OBJDIR} is a little mess because those scripts
are called from within phony targets where ${.OBJDIR} is not set.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


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

2009-12-13 Thread Masao Uebayashi
> > Modified Files:
> > src/usr.bin/ktruss: Makefile
> > -   AWK=${TOOL_AWK:Q} CPP=${CPP:Q} CPPFLAGS=${CPPFLAGS:Q} \
> > +   ${GENCMD} ${.TARGET} \
> > +   AWK="${TOOL_AWK:Q}" CPP="${CPP:Q}" CPPFLAGS="${CPPFLAGS:Q}" \
> 
> The extra quotes here look wrong.  ${VAR:Q} should do the correct
> amount of quoting.  If you need two levels of quoting for some
> reason that I don't see, then use ${VAR:Q:Q}, not "${VAR:Q}".

:Q:Q seems to work, thanks.  The reason is ${GENCMD} uses eval.  Unlike
${MAKEDIRTARGET} arguments can have spaces...  This needs thought, yes.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/compat

2009-12-13 Thread Masao Uebayashi
Have you considered to extend bsd.lib.mk suffix rules?  The fact is that it
already build multiple ABIs / signatures (.o / .po / .go / .so).  I think
that direction is more straightforward.

I'm considering to extend that for crunch binaries.  Crunch object is another
ABI, and *.cro (the one just before linked) is kind of a static library.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: make rule of multiple file generation (was Re: CVS commit: src/share/mk)

2009-12-13 Thread Masao Uebayashi
> | % cd bin/sh
> | % cvs up -D20091201
> | % nbmake-XXX -n sh
> 
> Ok, this is fixed now (in bsd.sys.mk). What else is broken?

% cd bin/sh
% nbmake-XXX clean
% nbmake-XXX nodes.c nodes.h
% rm $( nbmake-XXX print-objdir )/nodes.h
% nbmake-XXX

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: make rule of multiple file generation (was Re: CVS commit: src/share/mk)

2009-12-13 Thread Masao Uebayashi
> This has nothing to do with yacc; the rules in that Makefile are wrong.
> 
> instead of:
> 
> nodes.h: nodes.c
> nodes.c: mknodes.sh nodetypes nodes.c.pat
> 
> it should be:
> 
> nodes.h nodes.c: mknodes.sh nodetypes nodes.c.pat

% /src/netbsd/work.TNF/landisk/tools/bin/nbmake-landisk -j 2 nodes.h 
nodes.c
 create  sh/nodes.c
 create  sh/nodes.h
mv: rename /src/netbsd/work.TNF/landisk/obj/bin/sh/nodes.h.tmp to 
/src/netbsd/work.TNF/landisk/obj/bin/sh/nodes.h: No such file or directory
--- nodes.h ---
*** [nodes.h] Error code 1
1 error

nbmake: stopped in /src/netbsd/src.TNF/bin/sh

"a b: c" doesn't describe a 1-to-N generation, but just a syntax sugar of
"a: c" and "b: c".  make(1) tries to build a and b in two jobs and gets
confused.

You'll realize what $GENCMD does is a solution, not a work-around.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: make rule of multiple file generation (was Re: CVS commit: src/share/mk)

2009-12-13 Thread Masao Uebayashi
> So this is fixed with an additional dependency to force serialization,
> or by fixing the script not to re-use the same temp filenames:
> 
> nodes.h: nodes.c
> nodes.c nodes.h: mknodes.sh nodetypes nodes.c.pat
> ${_MKTARGET_CREATE}
>   ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC:S/^nodes.c$//} ${.OBJDIR}
>   [ -f nodes.h ]

You should have written this version at first. :)

This seems work for me.  I think I tried a similar one but clearly I figured
out the trick of removing nodes.c from ${.ALLSRC}.

Next is usr.bin/ktruss.

> Still you have not shown me why GENCMD is necessary... For me it adds
> complexity and slows things down. Fixing parallelization in Makefiles
> is simple and adequately done with the existing make features, or by

$GENCMD provides a way to extract only one output file.  It looks like
complex because it's embedded in makefile.  I don't think it's really complex.
It's just redundant. :)

> correcting the scripts that generate files to use unique filenames.

Actually I like this more.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: make rule of multiple file generation (was Re: CVS commit: src/share/mk)

2009-12-13 Thread Masao Uebayashi
> Yes, it adds more explicit rules... My vote is to remove it and fix
> the Makefiles/scripts that are broken. It is pretty straight-forward.

Now I'm fine with nuking GENCMD and fix rules using ".ORDER:".  Please go
for it.  It'd be also nice if all instances are rewritten to look an idiom,
like:

# multiple outputs
.ORDER: nodes.h nodes.c
nodes.c nodes.h: mknodes.sh nodetypes nodes.c.pat
${_MKTARGET_CREATE}
${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} ${.OBJDIR}

So that the code fragment will propagate together.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: make rule of multiple file generation (was Re: CVS commit: src/share/mk)

2009-12-13 Thread Masao Uebayashi
Yes:

% find * -name Makefile | xargs grep -l GENCMD
usr.bin/ktruss/Makefile
% find * -name '*.mk' | xargs grep -l GENCMD
share/mk/bsd.own.mk

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/etc/mtree

2009-12-14 Thread Masao Uebayashi
> Log Message:
> NetBSD/mips64e[bl] userland is default to N32 ABI.  It needs /usr/lib/o32
> for O32 ABI and /usr/lib/64 for N32 ABI.
  ^^^
Of course I meant N64.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/sys/arch/mips/mips

2009-12-14 Thread Masao Uebayashi
> > Log Message:
> > We don't declare variables in for () statement.
> 
> The kernel is a C99 environment which makes that legal.  Limiting the scope
> of variables is always a good thing.

I agree that it's a good thing.  Its build failed in modules.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/sys/arch/mips/mips

2009-12-14 Thread Masao Uebayashi
This solves.  I'm not sure how to deal with other warning options.

Masao

Index: sys/modules/Makefile.inc
===
RCS file: /cvsroot/src/sys/modules/Makefile.inc,v
retrieving revision 1.1
diff -u -r1.1 Makefile.inc
--- sys/modules/Makefile.inc16 Jan 2008 12:34:56 -  1.1
+++ sys/modules/Makefile.inc14 Dec 2009 18:42:52 -
@@ -2,6 +2,7 @@
 
 S!=cd ${.CURDIR}/../..;pwd
 CPPFLAGS+= -I${NETBSDSRCDIR}/common/include
+COPTS+=-std=gnu99
 USE_FORT=  no
 WARNS?=1
 
-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/tools/gdb

2009-12-14 Thread Masao Uebayashi
> Log Message:
> disable only parallel make.

> @@ -11,7 +11,7 @@
>  
>  MAKE_ARGS=   MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}
>  
> -.MAKEFLAGS: -B   # XXX otherwise fails with itable.c / interp.c build
> +.NOTPARALLEL:# XXX otherwise fails with itable.c / interp.c build
>  ALL_TARGET=  all-gdb
>  INSTALL_TARGET=  install-gdb

Thanks, but .NOTPARALEL doesn't seem to work for me.  See attachment 1.

I made it work using Makefile.gmakehost too.  I don't know what those
NetBSD_DISABLED_* mean.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635
--- support.o ---
cc: support.c: No such file or directory
--- engine.o ---
cc: engine.c: No such file or directory
--- irun.o ---
cc: irun.c: No such file or directory
--- semantics.o ---
cc: semantics.c: No such file or directory
--- support.o ---
cc: no input files
--- engine.o ---
cc: no input files
--- irun.o ---
cc: no input files
--- semantics.o ---
cc: no input files
--- support.o ---
*** [support.o] Error code 1
--- engine.o ---
*** [engine.o] Error code 1
--- irun.o ---
*** [irun.o] Error code 1
--- semantics.o ---
*** [semantics.o] Error code 1
--- interp.o ---
/src/netbsd/src.TNF/tools/gdb/../../gnu/dist/gdb6/sim/mips/interp.c:39:20: 
error: itable.h: No such file or directory
/src/netbsd/src.TNF/tools/gdb/../../gnu/dist/gdb6/sim/mips/interp.c: In 
function 'sim_open':
/src/netbsd/src.TNF/tools/gdb/../../gnu/dist/gdb6/sim/mips/interp.c:344: error: 
'nr_itable_entries' undeclared (first use in this function)
/src/netbsd/src.TNF/tools/gdb/../../gnu/dist/gdb6/sim/mips/interp.c:344: error: 
(Each undeclared identifier is reported only once
/src/netbsd/src.TNF/tools/gdb/../../gnu/dist/gdb6/sim/mips/interp.c:344: error: 
for each function it appears in.)
/src/netbsd/src.TNF/tools/gdb/../../gnu/dist/gdb6/sim/mips/interp.c: In 
function 'get_insn_name':
/src/netbsd/src.TNF/tools/gdb/../../gnu/dist/gdb6/sim/mips/interp.c:731: error: 
'itable' undeclared (first use in this function)
/src/netbsd/src.TNF/tools/gdb/../../gnu/dist/gdb6/sim/mips/interp.c:732: 
warning: control reaches end of non-void function
*** [interp.o] Error code 1
8 errors

nbmake: stopped in 
/src/netbsd/work.TNF/sgimips_mips64eb/obj/tools/gdb/build/sim/mips
*** [all] Error code 1
1 error

nbmake: stopped in /src/netbsd/work.TNF/sgimips_mips64eb/obj/tools/gdb/build/sim
*** [all-sim] Error code 2
1 error

nbmake: stopped in /src/netbsd/work.TNF/sgimips_mips64eb/obj/tools/gdb/build
*** [.build_done] Error code 2
1 error

nbmake: stopped in /src/netbsd/src.TNF/tools/gdb
Index: tools/gdb/Makefile
===
RCS file: /cvsroot/src/tools/gdb/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- tools/gdb/Makefile  14 Dec 2009 14:13:16 -  1.13
+++ tools/gdb/Makefile  15 Dec 2009 01:37:01 -
@@ -11,11 +11,10 @@
 
 MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}
 
-.NOTPARALLEL:  # XXX otherwise fails with itable.c / interp.c build
 ALL_TARGET=all-gdb
 INSTALL_TARGET=install-gdb
 
-.include "${.CURDIR}/../Makefile.gnuhost"
+.include "${.CURDIR}/../Makefile.gmakehost"
 
 CCADDFLAGS= ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include -L${DESTDIR}/lib 
-L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/
 
Index: gnu/dist/gdb6/gdb/Makefile.in
===
RCS file: /cvsroot/src/gnu/dist/gdb6/gdb/Makefile.in,v
retrieving revision 1.5
diff -u -r1.5 Makefile.in
--- gnu/dist/gdb6/gdb/Makefile.in   10 Jan 2008 21:43:55 -  1.5
+++ gnu/dist/gdb6/gdb/Makefile.in   15 Dec 2009 01:37:04 -
@@ -1614,8 +1614,8 @@
 
 .SUFFIXES: .y .l
 .y.c: 
-   @echo "NOT REBUILDING $@"
-NetBSD_DISABLED_y_c:
+#  @echo "NOT REBUILDING $@"
+#NetBSD_DISABLED_y_c:
$(SHELL) $(YLWRAP) $< y.tab.c $...@.tmp -- $(YACC) $(YFLAGS)
-sed -e '/extern.*malloc/d' \
 -e '/extern.*realloc/d' \
@@ -1628,8 +1628,8 @@
-rm $...@.tmp
mv $...@.new ./$*.c
 .l.c:
-   @echo "NOT REBUILDING $@"
-NetBSD_DISABLED_l_c:
+#  @echo "NOT REBUILDING $@"
+#NetBSD_DISABLED_l_c:
if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \
$(FLEX) -o$@ $< && \
rm -f $...@.new && \


Re: CVS commit: src/tools/gdb

2009-12-14 Thread Masao Uebayashi
> I made it work using Makefile.gmakehost too.  I don't know what those
> NetBSD_DISABLED_* mean.

I found it's clearly mentioned in cvs log:


revision 1.3
date: 2007/01/12 13:24:30;  author: skrll;  state: Exp;  lines: +4 -0
branches:  1.3.4;
Deal with lex and yacc generated files for gdb in the same way as gcc.
That is, use the files supplied with the distribution and never attempt
to rebuild them.

Should fix PR/35271


So problems are:
- why .NOTPARALLEL doesn't work?
- if we use tools/Makefile.gmakehost
  - search path to gnu/dist/gdb6/gdb/f-exp.c is missing

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/tools/gdb

2009-12-14 Thread Masao Uebayashi
> Since not a parallel make problem.
> 
> enami.
> 
> Index: gnu/dist/gdb6/sim/mips/Makefile.in
> ===
> RCS file: /cvsroot/src/gnu/dist/gdb6/sim/mips/Makefile.in,v
> retrieving revision 1.1.1.2
> diff -u -r1.1.1.2 Makefile.in
> --- gnu/dist/gdb6/sim/mips/Makefile.in2 Jul 2006 20:28:34 -   
> 1.1.1.2
> +++ gnu/dist/gdb6/sim/mips/Makefile.in15 Dec 2009 05:24:08 -
> @@ -132,7 +132,7 @@
>  $(BUILT_SRC_FROM_IGEN): tmp-igen
>  
>  tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
> - cd ../igen && $(MAKE)
> + (cd ../igen && $(MAKE))
>   ../igen/igen \
>   $(IGEN_TRACE) \
>   -I $(srcdir) \
> @@ -213,7 +213,7 @@
>  $(BUILT_SRC_FROM_M16): tmp-m16
>  
>  tmp-m16: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
> - cd ../igen && $(MAKE)
> + (cd ../igen && $(MAKE))
>   ../igen/igen \
>   $(IGEN_TRACE) \
>   -I $(srcdir) \

This works!

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/tools/gdb

2009-12-15 Thread Masao Uebayashi
I changed other instances too.  OK to check in?

Masao

Index: gnu/dist/gdb6/sim/mips/Makefile.in
===
RCS file: /cvsroot/src/gnu/dist/gdb6/sim/mips/Makefile.in,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 Makefile.in
--- gnu/dist/gdb6/sim/mips/Makefile.in  2 Jul 2006 20:28:34 -   1.1.1.2
+++ gnu/dist/gdb6/sim/mips/Makefile.in  15 Dec 2009 07:33:37 -
@@ -84,7 +84,7 @@
 multi-run.o: multi-include.h tmp-mach-multi
 
 ../igen/igen:
-   cd ../igen && $(MAKE)
+   (cd ../igen && $(MAKE))
 
 IGEN_TRACE= # -G omit-line-numbers # -G trace-rule-selection -G 
trace-rule-rejection -G trace-entries # -G trace-all
 IGEN_INSN=$(srcdir)/mips.igen
@@ -132,7 +132,7 @@
 $(BUILT_SRC_FROM_IGEN): tmp-igen
 
 tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
-   cd ../igen && $(MAKE)
+   (cd ../igen && $(MAKE))
../igen/igen \
$(IGEN_TRACE) \
-I $(srcdir) \
@@ -213,7 +213,7 @@
 $(BUILT_SRC_FROM_M16): tmp-m16
 
 tmp-m16: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
-   cd ../igen && $(MAKE)
+   (cd ../igen && $(MAKE))
../igen/igen \
$(IGEN_TRACE) \
-I $(srcdir) \
Index: gnu/dist/gdb6/sim/mn10300/Makefile.in
===
RCS file: /cvsroot/src/gnu/dist/gdb6/sim/mn10300/Makefile.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile.in
--- gnu/dist/gdb6/sim/mn10300/Makefile.in   15 May 2006 14:24:50 -  
1.1.1.1
+++ gnu/dist/gdb6/sim/mn10300/Makefile.in   15 Dec 2009 07:33:37 -
@@ -76,13 +76,13 @@
rm -f tmp-igen tmp-insns
 
 ../igen/igen:
-   cd ../igen && $(MAKE)
+   (cd ../igen && $(MAKE))
 
 IGEN_TRACE= # -G omit-line-numbers # -G trace-rule-selection -G 
trace-rule-rejection -G trace-entries
 IGEN_INSN=$(srcdir)/mn10300.igen $(srcdir)/am33.igen $(srcdir)/am33-2.igen
 IGEN_DC=$(srcdir)/mn10300.dc
 tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen
-   cd ../igen && $(MAKE)
+   (cd ../igen && $(MAKE))
../igen/igen \
$(IGEN_TRACE) \
-G gen-direct-access \
Index: gnu/dist/gdb6/sim/v850/Makefile.in
===
RCS file: /cvsroot/src/gnu/dist/gdb6/sim/v850/Makefile.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile.in
--- gnu/dist/gdb6/sim/v850/Makefile.in  15 May 2006 14:26:30 -  1.1.1.1
+++ gnu/dist/gdb6/sim/v850/Makefile.in  15 Dec 2009 07:33:37 -
@@ -74,13 +74,13 @@
rm -f tmp-igen tmp-insns
 
 ../igen/igen:
-   cd ../igen && $(MAKE)
+   (cd ../igen && $(MAKE))
 
 IGEN_TRACE= # -G omit-line-numbers # -G trace-rule-selection -G 
trace-rule-rejection -G trace-entries
 IGEN_INSN=$(srcdir)/v850.igen
 IGEN_DC=$(srcdir)/v850-dc
 tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen
-   cd ../igen && $(MAKE)
+   (cd ../igen && $(MAKE))
../igen/igen \
$(IGEN_TRACE) \
-G gen-direct-access \
Index: tools/gdb/Makefile
===
RCS file: /cvsroot/src/tools/gdb/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- tools/gdb/Makefile  14 Dec 2009 14:13:16 -  1.13
+++ tools/gdb/Makefile  15 Dec 2009 07:33:37 -
@@ -11,7 +11,6 @@
 
 MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}
 
-.NOTPARALLEL:  # XXX otherwise fails with itable.c / interp.c build
 ALL_TARGET=all-gdb
 INSTALL_TARGET=install-gdb
 

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/tools/gdb

2009-12-15 Thread Masao Uebayashi
> Hm, it may be simpler to remove `cd ../igen && $(MAKE)' except the
> ../igen/igen target.

Ah, now I see this is also a simple race...

This works for me.

Masao

Index: gnu/dist/gdb6/sim/mips/Makefile.in
===
RCS file: /cvsroot/src/gnu/dist/gdb6/sim/mips/Makefile.in,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 Makefile.in
--- gnu/dist/gdb6/sim/mips/Makefile.in  2 Jul 2006 20:28:34 -   1.1.1.2
+++ gnu/dist/gdb6/sim/mips/Makefile.in  15 Dec 2009 08:55:03 -
@@ -132,7 +132,6 @@
 $(BUILT_SRC_FROM_IGEN): tmp-igen
 
 tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
-   cd ../igen && $(MAKE)
../igen/igen \
$(IGEN_TRACE) \
-I $(srcdir) \
Index: gnu/dist/gdb6/sim/mn10300/Makefile.in
===
RCS file: /cvsroot/src/gnu/dist/gdb6/sim/mn10300/Makefile.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile.in
--- gnu/dist/gdb6/sim/mn10300/Makefile.in   15 May 2006 14:24:50 -  
1.1.1.1
+++ gnu/dist/gdb6/sim/mn10300/Makefile.in   15 Dec 2009 08:55:03 -
@@ -82,7 +82,6 @@
 IGEN_INSN=$(srcdir)/mn10300.igen $(srcdir)/am33.igen $(srcdir)/am33-2.igen
 IGEN_DC=$(srcdir)/mn10300.dc
 tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen
-   cd ../igen && $(MAKE)
../igen/igen \
$(IGEN_TRACE) \
-G gen-direct-access \
Index: gnu/dist/gdb6/sim/v850/Makefile.in
===
RCS file: /cvsroot/src/gnu/dist/gdb6/sim/v850/Makefile.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile.in
--- gnu/dist/gdb6/sim/v850/Makefile.in  15 May 2006 14:26:30 -  1.1.1.1
+++ gnu/dist/gdb6/sim/v850/Makefile.in  15 Dec 2009 08:55:04 -
@@ -80,7 +80,6 @@
 IGEN_INSN=$(srcdir)/v850.igen
 IGEN_DC=$(srcdir)/v850-dc
 tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen
-   cd ../igen && $(MAKE)
../igen/igen \
$(IGEN_TRACE) \
-G gen-direct-access \
Index: tools/gdb/Makefile
===
RCS file: /cvsroot/src/tools/gdb/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- tools/gdb/Makefile  14 Dec 2009 14:13:16 -  1.13
+++ tools/gdb/Makefile  15 Dec 2009 08:55:04 -
@@ -11,7 +11,6 @@
 
 MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}
 
-.NOTPARALLEL:  # XXX otherwise fails with itable.c / interp.c build
 ALL_TARGET=all-gdb
 INSTALL_TARGET=install-gdb
 

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: [matt-nb5-mips64] src/gnu/dist/gdb6/sim/mips

2009-12-15 Thread Masao Uebayashi

I should have done this.  Thanks.

uebay...@iphone


On 2009/12/16, at 15:24, Matt Thomas  wrote:


Module Name:src
Committed By:matt
Date:Wed Dec 16 06:24:33 UTC 2009

Modified Files:
   src/gnu/dist/gdb6/sim/mips [matt-nb5-mips64]: Makefile.in

Log Message:
wrap cd ../igen && ${MAKE} with ( )


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.32.1 src/gnu/dist/gdb6/sim/mips/ 
Makefile.in


Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files: Index: src/gnu/dist/gdb6/sim/mips/Makefile.in diff - 
u src/gnu/dist/gdb6/sim/mips/Makefile.in:1.1.1.2 src/gnu/dist/gdb6/ 
sim/mips/Makefile.in:1.1.1.2.32.1 --- src/gnu/dist/gdb6/sim/mips/ 
Makefile.in:1.1.1.2	Sun Jul 2 20:28:34 2006 +++ src/gnu/dist/gdb6/ 
sim/mips/Makefile.in	Wed Dec 16 06:24:33 2009 @@ -84,7 +84,7 @@  
multi-run.o: multi-include.h tmp-mach-multi ../igen/igen: -	cd ../ 
igen && $(MAKE) +	(cd ../igen && $(MAKE)) IGEN_TRACE= # -G omit-line- 
numbers # -G trace-rule-selection -G trace-rule-rejection -G trace- 
entries # -G trace-all IGEN_INSN=$(srcdir)/mips.igen @@ -132,7  
+132,7 @@ $(BUILT_SRC_FROM_IGEN): tmp-igen tmp-igen: $(IGEN_INSN) $ 
(IGEN_DC) ../igen/igen $(IGEN_INCLUDE) -	cd ../igen && $(MAKE) +	 
(cd ../igen && $(MAKE)) ../igen/igen \ $(IGEN_TRACE) \ -I $(srcdir)  
\ @@ -213,7 +213,7 @@ $(BUILT_SRC_FROM_M16): tmp-m16 tmp-m16: $ 
(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE) -	cd ../igen && $ 
(MAKE) +	(cd ../igen && $(MAKE)) ../igen/igen \ $(IGEN_TRACE) \ -I $ 
(srcdir) \


CVS commit: src/sys/arch/arm/arm32

2009-12-30 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Dec 31 02:36:14 UTC 2009

Modified Files:
src/sys/arch/arm/arm32: pmap.c

Log Message:
Correct assertions for PMAP_CACHE_VIPT code; if page coloring is disabled
(arm_cache_prefer_mask == 0), pvh_attrs has never PVF_COLORED, so don't assert
it.  No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.206 -r1.207 src/sys/arch/arm/arm32/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/arm32

2009-12-31 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Dec 31 16:00:53 UTC 2009

Modified Files:
src/sys/arch/arm/arm32: pmap.c

Log Message:
pmap_page_remove(): remove an unused local variable; no functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.207 -r1.208 src/sys/arch/arm/arm32/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/arm32

2009-12-31 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Dec 31 18:34:56 UTC 2009

Modified Files:
src/sys/arch/arm/arm32: pmap.c

Log Message:
Use pmap_is_current() where appropriate.  No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.208 -r1.209 src/sys/arch/arm/arm32/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/arm32

2009-12-31 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Jan  1 02:32:29 UTC 2010

Modified Files:
src/sys/arch/arm/arm32: pmap.c

Log Message:
Sprinkle assertions after calling pmap_get_l2_bucket().


To generate a diff of this commit:
cvs rdiff -u -r1.209 -r1.210 src/sys/arch/arm/arm32/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/arm

2010-01-02 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Jan  3 04:25:16 UTC 2010

Modified Files:
src/sys/arch/arm/arm: cpufunc_asm_arm10.S cpufunc_asm_arm11.S
cpufunc_asm_arm67.S cpufunc_asm_arm7tdmi.S cpufunc_asm_arm8.S
cpufunc_asm_arm9.S cpufunc_asm_sa1.S cpufunc_asm_xscale.S

Log Message:
s/These is/These are/


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/arm/cpufunc_asm_arm10.S
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/arm/cpufunc_asm_arm11.S \
src/sys/arch/arm/arm/cpufunc_asm_arm8.S
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/arm/cpufunc_asm_arm67.S \
src/sys/arch/arm/arm/cpufunc_asm_arm7tdmi.S
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/arm/cpufunc_asm_arm9.S
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/arm/cpufunc_asm_sa1.S
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/arm/cpufunc_asm_xscale.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2010-01-04 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Jan  4 16:01:43 UTC 2010

Modified Files:
src/sys/kern: subr_kmem.c

Log Message:
Use CTASSERT() for constant only assertions.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/kern/subr_kmem.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/lib/libm/arch/m68060

2010-01-06 Thread Masao Uebayashi
You can also conditionalize code by using CSHLIBFLAGS.  FYI.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


CVS commit: src/sys/dev/sdmmc

2010-01-12 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Tue Jan 12 08:41:16 UTC 2010

Modified Files:
src/sys/dev/sdmmc: sdhc.c

Log Message:
According to SD Host Controller Simplified Specification Version 2.00, 2.2.10.
Host Control Register (Offset 028h), the "Data Transfer Width" bit is in Host
Control Register (Offset 028h), not Power Control Register (Offset 029h).


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/sdmmc/sdhc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/kern

2010-01-12 Thread Masao Uebayashi
> @@ -1882,6 +1900,7 @@
>  device_t
>  device_lookup(cfdriver_t cd, int unit)
>  {
> + struct devicelist garbage = TAILQ_HEAD_INITIALIZER(garbage);
>   device_t dv;
>   int s;
>  
> @@ -1892,6 +1911,7 @@
>   else if ((dv = cd->cd_devs[unit]) != NULL && dv->dv_del_gen != 0)
>   dv = NULL;
>   config_alldevs_unlock(s);
> + config_dump_garbage(&garbage);
>  
>   return dv;
>  }

I wonder why this part was needed.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


CVS commit: src/usr.sbin/mtree

2010-01-20 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Jan 20 13:50:27 UTC 2010

Modified Files:
src/usr.sbin/mtree: mtree.8

Log Message:
Document -t (modify mtime).  Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/usr.sbin/mtree/mtree.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-01-24 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Jan 24 15:03:02 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
Clean up an internal flag usage.  No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.129 -r1.130 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-01-26 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Jan 27 03:56:33 UTC 2010

Modified Files:
src/sys/uvm: uvm_page.c

Log Message:
uvm_pageinsert, uvm_pageremove: Pass the uboj, to/from which a pg is
inserted/removed, as an argument, because looking up a back-reference from
pg is redundant.  No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 src/sys/uvm/uvm_page.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/miscfs/genfs

2010-01-27 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Jan 27 15:18:40 UTC 2010

Modified Files:
src/sys/miscfs/genfs: genfs_node.h genfs_vnops.c

Log Message:
Add genfs_node_rdtrylock().


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/miscfs/genfs/genfs_node.h
cvs rdiff -u -r1.174 -r1.175 src/sys/miscfs/genfs/genfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/miscfs/genfs

2010-01-27 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Jan 27 15:24:54 UTC 2010

Modified Files:
src/sys/miscfs/genfs: genfs_io.c

Log Message:
Constify some pointers in genfs_getpages() and genfs_do_putpages().


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/miscfs/genfs/genfs_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2010-01-27 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Jan 27 15:34:08 UTC 2010

Modified Files:
src/sys/sys: vnode.h

Log Message:
Typo in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.212 -r1.213 src/sys/sys/vnode.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/miscfs/genfs

2010-01-27 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Jan 27 15:52:31 UTC 2010

Modified Files:
src/sys/miscfs/genfs: genfs_node.h genfs_vnops.c

Log Message:
Don't forget to tell the result of rw_tryenter().


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/miscfs/genfs/genfs_node.h
cvs rdiff -u -r1.175 -r1.176 src/sys/miscfs/genfs/genfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/miscfs/genfs

2010-01-27 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Jan 27 15:53:06 UTC 2010

Modified Files:
src/sys/miscfs/genfs: genfs_io.c

Log Message:
Use genfs_node_*lock().


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/miscfs/genfs/genfs_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/miscfs/genfs

2010-01-27 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Jan 28 07:24:56 UTC 2010

Modified Files:
src/sys/miscfs/genfs: genfs_io.c

Log Message:
genfs_putpages: Localize a few variables.  No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/miscfs/genfs/genfs_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/miscfs/genfs

2010-01-27 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Jan 28 07:26:25 UTC 2010

Modified Files:
src/sys/miscfs/genfs: genfs_io.c

Log Message:
genfs_getpages: Localize a few more variables.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/miscfs/genfs/genfs_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/miscfs/genfs

2010-01-27 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Jan 28 07:38:32 UTC 2010

Modified Files:
src/sys/miscfs/genfs: genfs_io.c

Log Message:
genfs_getpages: Move local variable declarations that are used only for I/O
to where they're used.  This helps to track what's going in this lengthy
function.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/miscfs/genfs/genfs_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/miscfs/genfs

2010-01-27 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Jan 28 07:44:54 UTC 2010

Modified Files:
src/sys/miscfs/genfs: genfs_io.c

Log Message:
genfs_getpages: Constify & localize more variables.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/miscfs/genfs/genfs_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/miscfs/genfs

2010-01-27 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Jan 28 07:49:08 UTC 2010

Modified Files:
src/sys/miscfs/genfs: genfs_io.c

Log Message:
Unbreak modules build.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/miscfs/genfs/genfs_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/miscfs/genfs

2010-01-28 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Jan 28 08:02:12 UTC 2010

Modified Files:
src/sys/miscfs/genfs: genfs_io.c

Log Message:
genfs_getpages: Constify orignpages.  Don't override its meaning by the value
re-calucated from GOP_SIZE(GOP_SIZE_MEM), but assign another variable
(orignmempages).


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/miscfs/genfs/genfs_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/miscfs/genfs

2010-01-28 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Jan 28 08:20:00 UTC 2010

Modified Files:
src/sys/miscfs/genfs: genfs_io.c

Log Message:
genfs_getpages: Constify 2 variables, move one.  No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/miscfs/genfs/genfs_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/miscfs/genfs

2010-01-28 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Jan 28 13:43:53 UTC 2010

Modified Files:
src/sys/miscfs/genfs: genfs_io.c

Log Message:
genfs_getpages: More constification & localization.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/miscfs/genfs/genfs_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/miscfs/genfs

2010-01-28 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Jan 28 14:25:17 UTC 2010

Modified Files:
src/sys/miscfs/genfs: genfs_io.c

Log Message:
Revert part which variable initializations within interleaved gotos.

again:  if (...) goto err;
void *ptr = alloc();
if (...) goto again;
if (...) goto err1;
...
err1:   if (ptr) free(ptr);
err:
return;

This leaks memory if exited with "goto again; -> goto err;".


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/miscfs/genfs/genfs_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/miscfs/genfs

2010-01-28 Thread Masao Uebayashi
> Log Message:
> Revert part which variable initializations within interleaved gotos.
> 
> again:
>   if (...) goto err;
>   void *ptr = alloc();
>   if (...) goto again;
>   if (...) goto err1;
>   ...
> err1: if (ptr) free(ptr);
> err:
>   return;
> 
> This leaks memory if exited with "goto again; -> goto err;".

Actually it did NOT.  Because the "if (...) goto again;" part carefully
free()'ed the object.  In the actual code:

312 if (vp->v_size < origvsize) {
313 rw_exit(&gp->g_glock);
314 if (pgs != pgs_onstack)
315 kmem_free(pgs, pgs_size);
    316 goto startover;
317 }

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


CVS commit: src/sys/miscfs/genfs

2010-01-28 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Jan 29 04:33:37 UTC 2010

Modified Files:
src/sys/miscfs/genfs: genfs_io.c

Log Message:
genfs_getpages: Redo previous with a better goto label.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/miscfs/genfs/genfs_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/miscfs/genfs

2010-01-28 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Jan 29 04:36:20 UTC 2010

Modified Files:
src/sys/miscfs/genfs: genfs_io.c

Log Message:
genfs_getpages: Narrow & clarify the context where I/O happens & vmobjlock is 
dropped.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/miscfs/genfs/genfs_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/miscfs/genfs

2010-01-29 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Jan 30 05:19:20 UTC 2010

Modified Files:
src/sys/miscfs/genfs: genfs_io.c

Log Message:
Slightly more descriptive local variable names.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/miscfs/genfs/genfs_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/miscfs/genfs

2010-01-30 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Jan 30 12:06:20 UTC 2010

Modified Files:
src/sys/miscfs/genfs: genfs_io.c

Log Message:
Reduce the diff between genfs_getpages() and genfs_do_io().  These should be
merged eventually.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/miscfs/genfs/genfs_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-01-30 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Jan 30 15:13:25 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
Calculate the offset from vm_map_entry's start to vm_page array's start once.


To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-01-30 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Jan 31 01:40:13 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
Correct previous; fix a miscalculation of offset-into-entry in MADV_SEQUENTIAL
case.  Pointed out by po...@.


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/uvm

2010-01-30 Thread Masao Uebayashi
> It is highly unobvious what happens now in the case where startva is
> modified after your calculation.

You're correct.  I broke MADV_SEQUENTIAL case.

What I was really wrong is I made a const var (eoff) from !const var
(startva)...

Masao


CVS commit: src/sys/uvm

2010-01-30 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Jan 31 07:32:35 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
uvm_fault_internal: Put a goto label "Case1" as well as "Case2".  Clarify
that if the faulting page is shadowed, we don't care the lower layer at all.


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-01-30 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Jan 31 07:37:24 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
uvm_fault_internal: Skip another long code segment (lower "neighbor" fault)
by a goto.


To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-01-30 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Jan 31 07:46:03 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
uvm_fault_internal: In lower fault handling case, put another goto to clarify
that we don't care lower neighboring pages for the zero-fill object.


To generate a diff of this commit:
cvs rdiff -u -r1.134 -r1.135 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-01-30 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Jan 31 07:47:29 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
Indent.


To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-01-31 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Jan 31 09:20:31 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
uvm_fault_internal:

Move local variables around to isolate contexts.  Note that remaining variables
are global in that function, and some hold state across re-fault.

Slilently clean-up the "eoff" mess.

(Superfluous braces will go once things settle down.)


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.137 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-01-31 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Jan 31 17:13:38 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
Ax uvm_fault_internal() & break it into functions.  "Upper" fault and "lower"
fault routines are separated now.


To generate a diff of this commit:
cvs rdiff -u -r1.137 -r1.138 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-01-31 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Feb  1 05:48:19 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
ERESTART is already negative.  Give up negating error values to not override
the original values.  Pointed out by rmind@, thanks.

In the lower fault case, if (*pgo_get)() can return ERESTART and we should
re-fault for that remains a question.  The original code just returned the
error, so keep that behaviour for now.  In case (*pgo_get)() really returns
ERESTART, pass EIO to tell the uvm_fault caller that (*pgo_get)() failed.

(As far as I grep callers don't check if the return value is ERESTART or not.
So assuming (*pgo_get)() never returns ERESTART should be a safe bet.)


To generate a diff of this commit:
cvs rdiff -u -r1.138 -r1.139 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-01-31 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Feb  1 06:56:22 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
uvm_fault: Pack variables shared during fault / re-fault into a struct named
uvm_faultctx.  Unfortunately ~all of those values are overriden in various
ways.  Constification doesn't help much...


To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/uvm

2010-01-31 Thread Masao Uebayashi
> > Log Message:
> > uvm_fault: Pack variables shared during fault / re-fault into a struct named
> > uvm_faultctx.  Unfortunately ~all of those values are overriden in various
> > ways.  Constification doesn't help much...
> 
> Isn't that what uvm_faultinfo is for?  Why are you inventing a new structure?

I thought uvm_faultinfo was there for uvmfault_lookup() and other various
functions to omit arguments.  It's a public structure.  My intent is to
consolidate variables (state) kept in one fault, especially across re-faults.
Those state is internal to uvm_fault.  Exposing the internal seems odd to
me.

(But yes, the name is confusing.)

Masao


CVS commit: src/sys/uvm

2010-02-01 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Feb  1 08:16:32 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
Split uvm_fault() into 2 more functions, uvm_fault_check() and
uvm_fault_upper_lookup().  Omit unnecessary arguments passed around.


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-02-01 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Feb  1 08:19:17 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
Rewrite uvm_fault() loop using while () than goto.


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-02-01 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Feb  1 08:23:13 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
Indent.


To generate a diff of this commit:
cvs rdiff -u -r1.142 -r1.143 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-02-01 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Feb  1 09:06:43 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
uvm_fault:
- Lower fault routines don't care the vm_anon array found in upper lookup.
  Don't pass the pointer down.
- The flag "shadowed" is known when we lookup upper layer.  Don't need to
  keep in the fault context struct.


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-02-01 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Feb  1 09:18:41 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
uvm_fault_upper_lookup: This is totally my personal preference, but can't help
adding one goto to reduce one indent.


To generate a diff of this commit:
cvs rdiff -u -r1.144 -r1.145 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-02-01 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Feb  1 10:22:40 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
uvm_fault: Clarify when to wire what.


To generate a diff of this commit:
cvs rdiff -u -r1.145 -r1.146 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-02-01 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Feb  1 11:58:39 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
Fix build without DIAGNOSTIC.


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-02-01 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Feb  1 16:08:27 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
More split.


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-02-01 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Feb  1 16:12:36 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
Indent.


To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.149 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-02-01 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Tue Feb  2 01:54:48 UTC 2010

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
Sort struct uvm_faultctx members for better alignment.


To generate a diff of this commit:
cvs rdiff -u -r1.149 -r1.150 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



  1   2   3   4   >