re: CVS commit: [matt-nb5-mips64] src/sys/conf

2009-09-05 Thread matthew green

I see no reason to make it fatal.
   
   Otherwise we cannot detect errors on release build,
   i.e. no ksym(4) supports.
   
It means that when I build a kernel  
with
DEBUG, my kernel build will fail.  That's stupid.
   
   Then disable it only if DEBUG, or keep it only in your local tree.


why can't we make it size for DEBUG builds and not fail anywhere?


.mrg.


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

2009-09-05 Thread Simon Burge
matthew green wrote:

 I see no reason to make it fatal.

Otherwise we cannot detect errors on release build,
i.e. no ksym(4) supports.

 It means that when I build a kernel  
 with
 DEBUG, my kernel build will fail.  That's stupid.

Then disable it only if DEBUG, or keep it only in your local tree.
 
 
 why can't we make it size for DEBUG builds and not fail anywhere?

The proper fix would be to dynamically size this somehow, so that no
space is ever wasted.

Cheers,
Simon.


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

2009-09-05 Thread David Young
On Sat, Sep 05, 2009 at 02:13:50PM +, Izumi Tsutsui wrote:
 Module Name:  src
 Committed By: tsutsui
 Date: Sat Sep  5 14:13:50 UTC 2009
 
 Modified Files:
   src/sys/dev/pci: if_an_pci.c if_ath_pci.c if_fxp_pci.c if_gem_pci.c
   if_rtk_pci.c if_rtw_pci.c if_wi_pci.c
 
 Log Message:
 Invert logic around nested pmf(9) registrations for readability.
 
 XXX: should these pmf(9) calls be moved into MI attach functions
 XXX: using function pointers for suspend and resume passed via softc?

I think that we would add callbacks to many, many softc's, like we did
with the enable/disable routines.  Lots of code would be duplicated.  I
am gradually replacing those routines with self-suspension.  PMF should
handle bus-independent/bus-dependent suspend/resume, too.

Let the programmer of drivers add a bus-dependent PMF hook in the bus
attachment routine, and a bus-independent PMF hook in the generic attach
routine.  Something like this, for example,

static bool
rtw_pci_suspend(device_t self ...)
{
/* ... */
/* no call to rtw_suspend, here! */
/* ... */
return true;
}

static bool
rtw_pci_resume(device_t self ...)
{
/* ... */
/* no call to rtw_resume, here! */
/* ... */
return true;
}

static void
rtw_pci_attach(device_t parent, device_t self, void *aux)
{
/* ... */
pmf_device_register_for_bus(self, rtw_pci_suspend, rtw_pci_resume);
/* ... */
}

void
rtw_attach(struct rtw_softc *sc)
{
/* ... */
if (pmf_device_register(self, rtw_suspend, rtw_resume)) {
pmf_class_network_register(self, sc-sc_if);
/* ... */
}
/* ... */
}

Dave

-- 
David Young OJC Technologies
dyo...@ojctech.com  Urbana, IL * (217) 278-3933