Re: [osol-code] copymsg and MBLK

2010-10-22 Thread Paul Durrant
; len = MBLKL(mc);// returns 0 ??? > > > -sf > -- > This message posted from opensolaris.org > ___ > opensolaris-code mailing list > opensolaris-code@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Re: [osol-code] Enhanced Minor Device Management

2009-04-16 Thread Paul Durrant
such that minors that are used for the filesystem nodes can be easily excluded from the arena. Paul -- === Paul Durrant http://www.linkedin.com/in/pdurrant === ___ opensolaris-code ma

Re: [osol-code] Thoughts on changes to DDI entry points for drivers

2009-04-09 Thread Paul Durrant
- hence my comment about stashing the context pointer there. Paul -- ======= Paul Durrant http://www.linkedin.com/in/pdurrant === ___ opensolaris-code mailing list opensolaris-

Re: [osol-code] Thoughts on changes to DDI entry points for drivers

2009-04-09 Thread Paul Durrant
lookup is best left in the hands of the driver (since it 'knows' its dev_t space and possibly its usage profile). Having a context pointer in the vnode (or snode) OTOH is simple and cheap, but does require an interface change. Paul -- ======= Paul Durrant h

Re: [osol-code] Thoughts on changes to DDI entry points for drivers

2009-04-09 Thread Paul Durrant
in the struct vnode? Paul -- ======= Paul Durrant http://www.linkedin.com/in/pdurrant === ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Re: [osol-code] module reference counter

2009-03-30 Thread Paul Durrant
n unload. Paul -- ======= Paul Durrant http://www.linkedin.com/in/pdurrant === ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Re: [osol-code] snv_110 fails to build

2009-03-13 Thread Paul Durrant
-- === Paul Durrant http://www.linkedin.com/in/pdurrant === ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Re: [osol-code] high resolution timer

2009-03-10 Thread Paul Durrant
yield the CPU though. I'd suggest using drv_usecwait() for anything up to the millisecond level and then perhaps cv_timedwait() (or if you don't care about using published interfaces, you could use realtime_timout() directly). Paul -- === Paul Du

Re: [osol-code] high resolution timer

2009-03-09 Thread Paul Durrant
ernel or user space? timeout is a kernel function (9f) and timer_create is a user function (3rt). Paul -- === Paul Durrant http://www.linkedin.com/in/pdurrant === ___ opensolaris-code ma

Re: [osol-code] high resolution timer

2009-03-09 Thread Paul Durrant
ou want to attach a callback to be kicked off by a cyclic then I guess you'll need to come up with your own mechanism. Paul -- ======= Paul Durrant http://www.linkedin.com/in/pdurrant === ___

Re: [osol-code] problems running nightly

2009-01-09 Thread Paul Durrant
James Carlson wrote: > Paul Durrant writes: >> James Carlson wrote: >>> I had this problem a while ago, and it turned out that I was using a >>> stale copy of the 'on-closed' tarball. Could that be your problem as >>> well? >>> >> That&

Re: [osol-code] problems running nightly

2009-01-09 Thread Paul Durrant
James Carlson wrote: > > I had this problem a while ago, and it turned out that I was using a > stale copy of the 'on-closed' tarball. Could that be your problem as > well? > That's quite likely. I'm build a recent ON but the most recent non-DEBUG on-closed I can find is the snv_105 set, since

[osol-code] problems running nightly

2009-01-09 Thread Paul Durrant
Hi, I'm running a nightly build on a recent (a couple of days ago) pull from onnv clone and I'm hitting the following error: Failed to create generic kernel archive:208450 blocks cpiotranslate: kernel/brand/amd64: no packaging info cpiotranslate: kernel/brand: no packaging info It

Re: [osol-code] DMA cache allocation

2008-12-11 Thread Paul Durrant
Christian Kaiser wrote: > > I wonder if there are cache allocation operations available for DMA memory? > > What I am searching would be something like kmem_cache_*(9F) but for DMA > memory and not for any kernel memory. > In a word, no. I did put together a proposal for DMA cache allocators

Re: [osol-code] LRO support in Open solaris

2008-10-29 Thread Paul Durrant
Mahesh wrote: > > I am in the process of implementing a GLD v3 driver for open solaris > and i would like to know the some info on LRO support in the Solaris > stack.Does it provide some hooks for Software based/Hardware based > LRO ?? . No. There is no support in the stack. > I read in some of

Re: [osol-code] Attach on non-available instances

2008-10-16 Thread Paul Durrant
Christian Kaiser wrote: >> Presumably, also, if you go look in /etc/devaliases you only see one >> entry for your driver? > > I don't have such a file here. > If you meant /etc/devlink.tab... yes. > No. Sorry, I mean /etc/driver_aliases >> Is there a call to detach(9e) between the two attach(9e

Re: [osol-code] Attach on non-available instances

2008-10-16 Thread Paul Durrant
Christian Kaiser wrote: > > But... unfortunately I still see the two attach calls for instance #0. > Any idea how to debug this? > After it is rebuilt you definitely only have one entry in /etc/path_to_inst? Presumably, also, if you go look in /etc/devaliases you only see one entry for your d

Re: [osol-code] Attach on non-available instances

2008-10-16 Thread Paul Durrant
Christian Kaiser wrote: > > But in the syslog I see two calls to my attach function for the same > instance #0. What other place may store the information about the second > (although non-existent) instance #0 then? > Did you rebuild your boot archive? /etc/path_to_inst is included in the boo

Re: [osol-code] Mapping device memory

2008-10-14 Thread Paul Durrant
Christian Kaiser wrote: > > Thanks Paul! That helped a lot! > But there is still one minor thing confusing me. Why is ddi_dev_nregs() > returning nregs=6 and not nregs=5? > The brutally simple answer is that the implementation of that function simply takes the length of the 'reg' property and

Re: [osol-code] Mapping device memory

2008-10-14 Thread Paul Durrant
Christian Kaiser wrote: > OK... I dont't understand this at all. I did a 32-bit read on all BARs. > Maybe you can explain me this? > > 0x10 0xc830 > 0x12 0xbeefc830 > 0x14 0x0 > 0x16 0x0 > 0x18 0xd800 > 0x20 0xd000 > 0x22 0xbeefd000 > 0x24 0xcc00 > 0x26 0xcc00 > Those are 32-bi

Re: [osol-code] Range of IO mapped IO and memory mapped IO address on solaris

2008-10-02 Thread Paul Durrant
sreenatha wrote: > I am doing some applications and wanted to know about: > How do we get the information like IO mapped IO(which port address is > assigned to which device) > and memory mapped IO(what memory range is assigned to which device) in > solaris > as is given by /proc/ioports and

Re: [osol-code] how to find the source code for command /usr/sbin/df

2008-08-15 Thread Paul Durrant
wan_jm wrote: > I want to find the source code for /usr/sbin/df , but I don't know to search, > use which key word and what project is it in? > could you please help me? Try http://src.opensolaris.org/source/search?q=&defs=&refs=&path=df&hist=&project=%2Fonnv __

Re: [osol-code] Bitmask macros?

2008-06-12 Thread Paul Durrant
Jason King wrote: > I'm curious to know if anyone feels if there might be utility in > providing macros in a header file for defining and manipulating > bitmasks (analogous to __BIT(x), __BITS(a,b), __SHIFTIN, __SHIFTOUT, > etc on some of the BSDs)? In some of the driver work I've done, I've > fou

Re: [osol-code] Problem about charactor device

2008-05-12 Thread Paul Durrant
mes in my recent memory, but it brings with it a lot of challenges and usually kills system performance. Paul -- Paul Durrant http://www.linkedin.com/in/pdurrant ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Re: [osol-code] Problem about charactor device

2008-05-09 Thread Paul Durrant
xulari wrote: > thanks for advice! > anyway,is there a way to load the driver once ,and system will not > detach the diver? > Yes, write your driver to return failure from it's detach(9e) routine: it's then no longer possible for the system to detach and unload your driver. (If you ev

Re: [osol-code] Problem about charactor device driver...........please!

2008-05-08 Thread Paul Durrant
xulari wrote: > I wrote a driver xxx, I want it to be loaded when i start the computer > so i put xxx into /kernel/drv/sparcv9/xxx > but after i reboot the solaris10, i check the /var/adm/messages > i found just after driver "attach", it "detach" ... > then i > "add_drv xxx" failed , instructions "

Re: [osol-code] memory of kmem_alloc() contiguous?

2008-04-28 Thread Paul Durrant
Joachim Worringen wrote: > As it isn't mentioned by the man page, and "Solaris Internal" makes only > an implicit statement (first sentence of 11.2.3.7, p.547): is the memory > returned by kmem_alloc() always physically contiguous? > No. Paul ___

Re: [osol-code] creating a kernel thread

2007-09-05 Thread Paul Durrant
; layers thin and simple. > Strangely enough our s/w stack has to run on Linux, Windows and Solaris too and the mismatching kernel APIs and threading models are a pain ;-/ Paul -- Paul Durrant http://www.linkedin.com/in/pdurrant ___ opens

Re: [osol-code] creating a kernel thread

2007-09-05 Thread Paul Durrant
ll work for you. As I said though, IMO the thread interface should be made public. In fact, it would be interesting to look at what interfaces are commonly used by drivers in Linux or Windows and make sure Solaris has similar functionality; the easier porting drivers is, the more people will

Re: [osol-code] creating a kernel thread

2007-09-05 Thread Paul Durrant
clics that could be arrived it. However, you *can* create a thread; thread_create() will do it for you (I think it's in kthread.c). I don't believe it's in the DDI, but IMO it should be as it can be highly useful. Paul -- Paul Durrant http://www.linkedin.com/in/pdurrant _

Re: [osol-code] timeout and mutexes

2007-05-30 Thread Paul Durrant
uired to do cv_signal. Ok. That makes perfect sense :-) Paul -- Paul Durrant http://www.linkedin.com/in/pdurrant ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Re: [osol-code] modload and ::load

2007-05-30 Thread Paul Durrant
not found Have you written an mdb module too? ::load is for loading mdb modules (see ::help load). Paul -- Paul Durrant http://www.linkedin.com/in/pdurrant ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.or

Re: [osol-code] timeout and mutexes

2007-05-29 Thread Paul Durrant
On 29/05/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Paul Durrant wrote: > On 28/05/07, Garrett D'Amore <[EMAIL PROTECTED]> wrote: >> You should not attempt to acquire a lock which will be held by other >> functions calling cv_wait, or its brethren. (The

Re: [osol-code] timeout and mutexes

2007-05-29 Thread Paul Durrant
ot aware of this restriction, nor can I find it documented. This suggests that one cannot call cv_signal() from within an interrupt handler. Is this true? Paul -- Paul Durrant http://www.linkedin.com/in/pdurrant ___ opensolaris-code mailing list opens

Re: [osol-code] passing properties or parameters to kernel modules

2007-05-21 Thread Paul Durrant
On 21/05/07, Thomas De Schampheleire <[EMAIL PROTECTED]> wrote: The exact location (/proc or elsewhere) is no point for me, but I do find this mechanism an extremely useful feature. You could try running mdb -wk and then patching globals in your module from there. Paul -- Paul D

Re: [osol-code] Re: s390x update

2007-05-17 Thread Paul Durrant
to see if you get to one of the core DDI guys. Paul -- Paul Durrant http://www.linkedin.com/in/pdurrant ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Re: [osol-code] kernel module coding

2007-05-17 Thread Paul Durrant
. You'll need the -N option in the linker for the first item too. Remember that globals and non-static functions are both examples of exported symbols. Paul -- Paul Durrant http://www.linkedin.com/in/pdurrant ___ opensolaris-code mailing list

Re: [osol-code] Executing a kernel thread periodically

2007-05-08 Thread Paul Durrant
;s probably a private function which you should consider unstable. Secondly, I am still stuck with the question about how my module will be loaded. It should be loaded by default when booting, is there a way to achieve that? What type of module is it? A driver? If so, I think ddi-forceattach

Re: [osol-code] Executing a kernel thread periodically

2007-05-02 Thread Paul Durrant
_fini()? Paul -- Paul Durrant http://www.linkedin.com/in/pdurrant ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Re: [osol-code] timing guarantees

2007-04-30 Thread Paul Durrant
On 4/30/07, Frank Hofmann <[EMAIL PROTECTED]> wrote: Hmm - ddi_enter_critical / ddi_exit_critical ? That certainly sounds like it would do the job. Thanks :-) Paul -- Paul Durrant http://www.linkedin.com/in/pdurrant ___ opensolaris-code m

[osol-code] timing guarantees

2007-04-30 Thread Paul Durrant
time) what mechanism could I use - within the Solaris DDI - to make sure a thread accessing the device was not pre-empted thus causing such a timeout? Outside of the DDI I have a few options it seems; kpreempt_disable/enable or splhigh/splx perhaps. Within the DDI I've not yet found anything.

Re: [osol-code] Executing a kernel thread periodically

2007-04-25 Thread Paul Durrant
om within a task handler, so you should be able to use taskqs or timeout to achieve what you want but using both is unnecessary. Paul -- Paul Durrant http://www.linkedin.com/in/pdurrant ___ opensolaris-code mailing list opensolaris-code@opensolar

Re: [osol-code] Executing a kernel thread periodically

2007-04-23 Thread Paul Durrant
ave certain advantages/disadvantages? You could also look at the interface in cyclic.h. The only problem with this is that it's not a public interface and so your build env. would be tied to ON. Paul -- Paul Durrant http://www.linkedin

Re: [osol-code] independent write function in assembly language

2007-04-10 Thread Paul Durrant
to avoid an LD_PRELOAD. I've had to pull such tricks in the past when writing my own preloads. Paul -- Paul Durrant http://www.linkedin.com/in/pdurrant ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/

Re: [osol-code] independent write function in assembly language

2007-04-10 Thread Paul Durrant
t;movl %%eax, 0(%%ebx)\n" "popl %%ebx\n" : /*wr*/ : /*rd*/"g" (block) : /*trash*/ "eax", "edi", "ecx", "edx", "memory", "cc" ); } Does anyone know where i am wrong? Thank you! Regard

Re: [osol-code] Mercurial Build Bundles Instructions fail

2007-02-27 Thread Paul Durrant
ns I'm using the "tip". Yes, until you do: hg update onnv_59 at which point you'll be using onnv_59. Paul -- Paul Durrant http://www.linkedin.com/in/pdurrant ___ opensolaris-code mailing list opensolaris-code@opensolaris.org

Re: [osol-code] what is the path of source directory?

2007-02-07 Thread Paul Durrant
t from opensolaris.org -- Paul Durrant http://www.linkedin.com/in/pdurrant ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Re: [osol-code] How to make in cmd/usr.sbin to open debug switch

2006-11-24 Thread Paul Durrant
n't help you much. How did you set up your environment. If you run /opt/onbld/bin/bldenv -d then you should get a DEBUG environment i.e. -DDEBUG will be defined on the compiler command line. Hence any code bracketed by #ifdef DEBUG/#endif will be compiled in. Paul -- Paul Durrant http

[osol-code] Re: [driver-discuss] GLDv3 (or v4) enhancements...

2006-11-22 Thread Paul Durrant
c' interface - see usr/src/uts/common/sys/mac.h Paul -- Paul Durrant http://www.linkedin.com/in/pdurrant ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Re: [osol-code] Programming funny PCI device

2006-11-14 Thread Paul Durrant
up(). There's a nexus upcall which uses the reg and assigned-addresses props to do figure out the mapping. If you can't sacrifice an existing BAR and want to add a BAR, assuming you can find a spare bit of physical address space then you should be able to tag on an entry to the reg and assi

Re: [osol-code] softintr vs. taskq's

2006-08-25 Thread Paul Durrant
duling. What would be useful to me is a means of kicking a soft interrupt of on a given CPU (I assume they run on the same CPU as the caller of 'trigger' at the moment) so I can get work done where I know the data should be in cache. Paul

Re: [osol-code] Fwd: missing def?

2006-05-22 Thread Paul Durrant
On 22 May 2006, at 19:26, Jack Schwartz wrote: This was fixed for X86 as well, but I believe this was done the day S10U1 released. The fix went into S10U2. X86 S10U1 is missing this definition. X86 KU patch 118844-27. Bug ID: 6356171 RTI: 305236 Thanks all. Paul -- Paul Durrant

[osol-code] Fwd: missing def?

2006-05-22 Thread Paul Durrant
dditypes.h so my question is, is the def. truly missing in s10 01/06 or am I missing a patch? Paul -- Paul Durrant http://www.linkedin.com/in/pdurrant ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman

Re: [osol-code] can't fine WaitForSingleObject on cvs.opensolaris.org

2006-02-21 Thread Paul Durrant
he def. of pthread_mutex_init() in open.c and you'll notice the #ifdef _WINDOWS] -- Paul Durrant PGP.sig Description: This is a digitally signed message part ___ opensolaris-code mailing list opensolaris-code@opensolaris.org https://opensolaris.

Re: [osol-code] Library Question

2005-07-25 Thread Paul Durrant
the idea of some sort of message saying what a library does is quite a cool one. Paul -- Paul Durrant PGP.sig Description: This is a digitally signed message part ___ opensolaris-code mailing list opensolaris-code@opensolaris.org https://ope

Re: [osol-code] Outstanding data on socket

2005-07-18 Thread Paul Durrant
port Linux application and want to implement the same workaround. Can you not use SO_LINGER? -- Paul Durrant PGP.sig Description: This is a digitally signed message part ___ opensolaris-code mailing list opensolaris-code@opensolaris.org