Re: CVS commit: src/sys

2011-08-27 Thread David Young
On Sat, Aug 27, 2011 at 05:05:58PM +, Manuel Bouyer wrote:
> Module Name:  src
> Committed By: bouyer
> Date: Sat Aug 27 17:05:58 UTC 2011
> 
> Modified Files:
>   src/sys/arch/evbmips/conf: LOONGSON
>   src/sys/conf: files
>   src/sys/dev/ata: ata_wdc.c
>   src/sys/dev/ic: wdc.c
> 
> Log Message:
> The loongon2f+cs5526+jmicron PATA->SATA bridge cause an interresting issue:
> 1) because the CS5536 is not associated with a x86 CPU, interrupts are not
>   ack'ed as it expects so interrupts cannot configured as edge-triggered
>   (as is expected for a PCIIDE in compat mode)
> 2) the PATA->SATA bridge ignores the WDC_IDS (interrupt disable bit) so
>   the PATA IRQ line gets asserted when resetting or running some polled
>   commands. It also wrongly asserts IRQ when the (nonexistent) slave
>   device is selected
> 2) wouldn't be an issue with edge-triggered interrupt because we would
>get a spurious interrupt and continue operation, a new interrupt only shows
>up when the PATA IRQ line goes low and high again. But because of 1),
>we get an unclearable interrupt instead, and the system loops on the
>interrupt handler.
> 
> To workaround this, introduce a WDC_NO_IDS compile option which runs
> all polled commands (including reset) at splbio() and without sleeps,
> so that the controller's interrupt is effectively disabled and
> won't be reenabled before the interrupt can be cleared.

ata_wdc.c does not compile if !WDC_NO_IDS because it contains:

+#ifdef WDC_NO_IDS
+   wait_flags = AT_POLL;
+#else
+#error "NEED WDC_NO_IDS"
+#endif

Dave

-- 
David Young OJC Technologies
dyo...@ojctech.com  Urbana, IL * (217) 344-0444 x24


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

2011-08-27 Thread Jean-Yves Migeon
On 27.08.2011 20:28, Joerg Sonnenberger wrote:
> On Sat, Aug 27, 2011 at 08:13:28PM +0200, Jean-Yves Migeon wrote:
>> On 27.08.2011 19:57, Reinoud Zandijk wrote:
>>> Fix copystring routines to NOT just copy all since not all space might be
>>> writable. This can be fixed by implementing/importing strnlen(3) in the 
>>> kernel
>>
>> Any reason no to? If there's none, I can do it.
>>
>> At first sight it's straightforward to add to common/, and I am more at
>> peace knowing that we have a "valid" strnlen() in kernel rather than a
>> bogus macro that may spread elsewhere...
> 
> Or it could use memchr for that same purpose.

Right; note that the question about strnlen(3) remains valid though:
strlen/strnlen appear in the same man page. So one's could expect to
have both accessible, even in kernel.

-- 
Jean-Yves Migeon
jeanyves.mig...@free.fr


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

2011-08-27 Thread Joerg Sonnenberger
On Sat, Aug 27, 2011 at 08:13:28PM +0200, Jean-Yves Migeon wrote:
> On 27.08.2011 19:57, Reinoud Zandijk wrote:
> > Fix copystring routines to NOT just copy all since not all space might be
> > writable. This can be fixed by implementing/importing strnlen(3) in the 
> > kernel
> 
> Any reason no to? If there's none, I can do it.
> 
> At first sight it's straightforward to add to common/, and I am more at
> peace knowing that we have a "valid" strnlen() in kernel rather than a
> bogus macro that may spread elsewhere...

Or it could use memchr for that same purpose.

Joerg


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

2011-08-27 Thread Jean-Yves Migeon
On 27.08.2011 19:57, Reinoud Zandijk wrote:
> Fix copystring routines to NOT just copy all since not all space might be
> writable. This can be fixed by implementing/importing strnlen(3) in the kernel

Any reason no to? If there's none, I can do it.

At first sight it's straightforward to add to common/, and I am more at
peace knowing that we have a "valid" strnlen() in kernel rather than a
bogus macro that may spread elsewhere...

-- 
Jean-Yves Migeon
jeanyves.mig...@free.fr


Re: CVS commit: src/sys

2011-08-27 Thread Christos Zoulas
On Aug 27, 12:03pm, rm...@netbsd.org (Mindaugas Rasiukevicius) wrote:
-- Subject: Re: CVS commit: src/sys

| > Log Message:
| > Add an optional pglist argument to uvm_obj_wirepages, to be
| > filled with the list of pages that were wired.
| > 
| > 
| > To generate a diff of this commit:
| > cvs rdiff -u -r1.121 -r1.122 src/sys/kern/sysv_shm.c
| > cvs rdiff -u -r1.174 -r1.175 src/sys/uvm/uvm_extern.h
| > cvs rdiff -u -r1.10 -r1.11 src/sys/uvm/uvm_object.c
| 
| Why?

The AGP/DRM code seems to need it. I sent mail to chuq asking if there is
a better way. 

christos
PS: Are you looking at PR/45177? What should we do about it?

christos


Re: CVS commit: src/sys

2011-08-27 Thread Mindaugas Rasiukevicius
"Christos Zoulas"  wrote:
> Log Message:
> Add an optional pglist argument to uvm_obj_wirepages, to be
> filled with the list of pages that were wired.
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.121 -r1.122 src/sys/kern/sysv_shm.c
> cvs rdiff -u -r1.174 -r1.175 src/sys/uvm/uvm_extern.h
> cvs rdiff -u -r1.10 -r1.11 src/sys/uvm/uvm_object.c

Why?

-- 
Mindaugas