All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Qemu-devel] Gentlemen we have absolute movement! was:Absolute USB-HID device musings (was Re: VNC Terminal Server)
From: Johannes Schindelin @ 2006-04-09 21:20 UTC (permalink / raw)
  To: qemu-devel
In-Reply-To: <44397848.1070707@wasp.net.au>

Hi,

On Mon, 10 Apr 2006, Brad Campbell wrote:

> The VNC patch extends the existing mouse handler by passing it abs 
> coordinates as well, (this is the basis of what I used) so there are no 
> additional routines.. I figure if you pass both relative (faked if need 
> be) and abs to the routine then the mouse can use whatever it likes.

That was a kludge. I always meant to do some cleanup there as soon as I 
got Summagraphics to work with win98 (which has not yet happened :-( ).

I'd rather have two calls, one for absolute and one for relative, where 
relative checks if the current active mouse is relative or absolute, and 
in the latter case just calls absolute and vice versa.

Ciao,
Dscho

^ permalink raw reply

* Re: alpha DEAD on >=2.6.16-rc3
From: Andrew Morton @ 2006-04-09 20:18 UTC (permalink / raw)
  To: leonie herzberg; +Cc: linux-kernel
In-Reply-To: <44397596.5020809@net4u.de>

leonie herzberg <leo@net4u.de> wrote:
>
> Hi. I already posted a bugreport on the bugzilla
>  (http://bugzilla.kernel.org/show_bug.cgi?id=6351) but I feel no one is
>  recognizing that; and as I see it, it's a rather hard bug since it
>  throws a kernel panic immediately at boot time. I believe it has to do
>  with the change made in 2.6.16-rc3 concerning "cpu_possible_map". None
>  of the newer kernel versions works.
>  As you can see at the first (and up to now, only) comment, this is not
>  only my problem.
>  Maybe it appears only in connection with SMP. I can't tell.

Please test ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17-rc1/2.6.17-rc1-mm2/broken-out/alpha-smp-boot-fixes.patch

^ permalink raw reply

* [ALSA - driver 0001732]: Support for Intel D945Pvs Board
From: bugtrack @ 2006-04-09 21:19 UTC (permalink / raw)
  To: alsa-devel


A NOTE has been added to this issue.
======================================================================
<https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1732> 
======================================================================
Reported By:                timtt
Assigned To:                tiwai
======================================================================
Project:                    ALSA - driver
Issue ID:                   1732
Category:                   PCI - hda-intel
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     assigned
Distribution:               FC4
Kernel Version:             2.6.14-1656
======================================================================
Date Submitted:             01-11-2006 04:53 CET
Last Modified:              04-09-2006 23:19 CEST
======================================================================
Summary:                    Support for Intel D945Pvs Board
Description: 
Alsa is only able to output regular 2-channel audio via the headphone jack
at the back of this motherboard. This motherboard has an SPDIF connection
available that is currently not supported, but should be.
======================================================================

----------------------------------------------------------------------
 timtt - 01-20-06 22:47 
----------------------------------------------------------------------
So I finally got around to trying this. Sorry for the delay. I looked at
the back of the chassis again and it's a 6-stack digital out. I had
initially filed this bug from work, so I wasn't sure. There are 5 analog
jacks and 1 SPDIF.

After trying the model options, I still can't get sound out, so I have
some basic questions:

1) I assume if all is working correctly, I should be able to see a red
light at the other end of the optical cable (the receiver side), right?
2) Should I see a separate volume control in alsamixer for the digital
out? I currently have PCM, Front and Input.
3) I keep my FC4 system up to date with yum, but for some reason the
alsamixer app still says 1.0.10rc3 at the top. Should I be worried about
this?

Here is the /proc/asound/cards output:
0 [Intel          ]: HDA-Intel - HDA Intel
                     HDA Intel at 0x59200000 irq 9

Please let me know if you need anything else. I'll be quite available
tonight and over the weekend.

----------------------------------------------------------------------
 aclark - 04-09-06 23:19 
----------------------------------------------------------------------
This patch adds the 5-stack pin-config for the STAC chip on the Intel
D945Pvs board with subdevice id 0x0707.

With this patch against 1.0.11rc4, I'm able to successfully output over
the optical port and analog ports.

Issue History
Date Modified  Username       Field                    Change              
======================================================================
01-11-06 04:53 timtt          New Issue                                    
01-11-06 04:53 timtt          Distribution              => FC4             
01-11-06 04:53 timtt          Kernel Version            => 2.6.14-1656     
01-11-06 05:04 rlrevell       Note Added: 0007558                          
01-11-06 18:30 timtt          Note Added: 0007563                          
01-11-06 18:36 rlrevell       Note Added: 0007564                          
01-20-06 22:47 timtt          Note Added: 0007728                          
04-09-06 23:19 aclark         Note Added: 0009187                          
======================================================================




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

^ permalink raw reply

* Re: Oops: machine check, sig: 7 [#1] - 16-bit Pccard - SOLVED!!!
From: Daniel Ritz @ 2006-04-09 20:57 UTC (permalink / raw)
  To: Edward Felberbaum; +Cc: linuxppc-dev, linux-pcmcia, paulus
In-Reply-To: <BAY104-F3E7D812AD1E707C145856ABC90@phx.gbl>

On Friday 07 April 2006 08.25, Edward Felberbaum wrote:
> >From: Daniel Ritz <daniel.ritz-ml@swissonline.ch>
> >To: Edward Felberbaum <efelberbaum@hotmail.com>
> >CC: "linux-pcmcia" <linux-pcmcia@lists.infradead.org>
> >Subject: Re: Oops: machine check, sig: 7 [#1] - 16-bit Pccard - CardBus OK 
> >Edward Felberbaum
> >Date: Thu, 6 Apr 2006 20:11:50 +0200
> >
> > > >Can you try booting with the boot parameter
> > > >
> > > >reserve=0xfd000000-0xfdffffff
> > > >
> > > >?
> >
> >errm...that should have been:
> >	reserve=0xfd000000,0xffffff
> >ie. reserve=start,size
> >
> > >
> > > I added the above reserve to the boot parameters, it shows up on the 
> >Kernel
> > > command line in dmesg,  but dmesg still displays
> > >
> > > pcmcia: parent PCI bridge Memory window: 0xfd000000 - 0xfdffffff
> > >
> > > I would have expected the above line to not appear - use a different 
> >memory
> > > range due to the kernel command line "reserve".
> >
> >it will...:)
> >
> >rgds
> >-daniel
> 
> I followed your advice and inserted a 3Com 589 card and there was NO Oops!  
> WOW!
> 
> I built the 3c589 driver and the card works too.
> 
> Now I'm trying to get my Belkin F5D6020 v2 Wifi card to work.
> 
> Thanks very much for your help!
> 
> I see from the dmesg output from my original post that memory ranges 
> 0xfdd7f000 and 0xfddff000 are used by the Gatwick and Heathrow mac io 
> controllers.  That explains the conflict with PCMCIA over 0xfd000000.

interesting...the memory ranges are used by other devices yet the
request_resource() call in PCMCIA succeeds,,,and PCI resources shoudn't
be there in the first place then...

ok, it's in file arch/powerpc/platforms/powermac/feature.c...
i can't see any request_resource() calls in there...so CC'ing the PPC guys..
they can sure comment...

> 
> Question, can I minimize the range of memory that is reserved 0xffffff - or 
> is it a waste of time?
> 

yeah, you probably could, but it sounds like a waste of time...

> Eddie
> 

rgds
-daniel

^ permalink raw reply

* Re: [ANNOUNCE] git-svnconvert: YASI (Yet Another SVN importer)
From: Rutger Nijlunsing @ 2006-04-09 21:15 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git
In-Reply-To: <e1bdjq$qf6$1@sea.gmane.org>

On Sun, Apr 09, 2006 at 06:43:53PM +0200, Jakub Narebski wrote:
> Rutger Nijlunsing wrote:
> 
> > Since I didn't succeed in importing a (private) SVN repo into git, I
> > wrote a new converter to handle more cases like:
> 
> Both git-svn[*1*] and git-svnimport failed? Have you tried Tailor tool:
>   http://www.darcs.net/DarcsWiki/Tailor

git-svn and tailor can only track one branch (or trunk). As the
git-svn page states, it is for contributing to such a branch /
trunk. git-svnconvert is for converting a whole repository
incrementally of which branches (IMHO) are important to keep and
convert.

git-svnimport does handle multiple branches, but could not cope with
proxy + repo authentification, the weird repo layout I've had to cope
with (branches not only in /branches, several trunks) and some
revisions which contain non-sensical actions.

> >   - use command line svn instead of some perl library to have less
> >     dependancies and to support proxy + repo authentification.
> >     Might even work on MacOSX ;)
> 
> Instead adding dependence on Ruby, eh?

Take some, lose some ;)

Seriously, though, a dependancy on a mainstream language like
Python/Perl/Ruby/.. isn't a problem since a package is available for
all distributions. However, packages for mainstream languages are
quite often out-of-date or are not supported at all. Seeing a program
being dependant on a non-packaged module is enough for a truckload of
people to not even try it.

-- 
Rutger Nijlunsing ---------------------------------- eludias ed dse.nl
never attribute to a conspiracy which can be explained by incompetence
----------------------------------------------------------------------

^ permalink raw reply

* Re: [Xenomai-core] latency -t 1 crashes on SMP.
From: Philippe Gerum @ 2006-04-09 21:14 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai
In-Reply-To: <17465.8101.106079.634470@domain.hid>

Gilles Chanteperdrix wrote:
> I tried latency -t 1 on an SMP machines, and observed a very
> reproducible crash. Most of the time, the machine locks up
> completely. The rest of the time, I get :
> 
> Xenomai: suspending kernel thread e7559044 ('timerbench') at 0xb01051f2 after ex
> ception #14
> 
> And the system remains runnable, but 0xb01051f2 is not a valid kernel
> module text address.

Looks like a kernel-based task stack address on x86.

-- 

Philippe.


^ permalink raw reply

* Re: [PATCH] git log [diff-tree options]...
From: Johannes Schindelin @ 2006-04-09 21:13 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Junio C Hamano, git
In-Reply-To: <Pine.LNX.4.64.0604091158310.9504@g5.osdl.org>

Hi,

On Sun, 9 Apr 2006, Linus Torvalds wrote:

>  - keep it - for historical reasons - as a internal shorthand, and just 
>    turn it into "git log --diff -cc"

It is "git log --cc", right? And BTW, I was burnt by the difference of 
"git-log" and "git log" this time. "git-log" does not understand "--cc". 
Could we kill "git-log", please?

Ciao,
Dscho

^ permalink raw reply

* Re: [Xenomai-core] [PATCH] improve XENO_ASSERT verbosity
From: Philippe Gerum @ 2006-04-09 21:12 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core
In-Reply-To: <44397511.2070508@domain.hid>

Jan Kiszka wrote:
> Hi,
> 
> this patch adds xnlogerr to the XENO_ASSERT macro, making the failure
> visible so that the user does not have to bother. Furthermore, it adds
> panic tracing.
> 
> Tested and found useful with latest RTDM debugging, ok to apply?

Ok.

-- 

Philippe.


^ permalink raw reply

* RE: Huge impact of the conntrack mechanism on routing performance (30% with a single conntrack entry)
From: Eddy Kvetny @ 2006-04-09 21:10 UTC (permalink / raw)
  To: netfilter-devel

> From: David S. Miller davem at davemloft.net
> Date: Fri Apr 7 23:28:29 CEST 2006

>> From: Eddy Kvetny <eddy_kvetny at yahoo.com>
>> Date: Wed, 5 Apr 2006 07:03:05 -0700 (PDT)

>> Right after "insmod ip_conntrack.ko" the throughput
>> drastically falls to 28 kpps (-12 kpps or -30%
!!!).

> Yes, this is pretty much what the cost of netfilter 
> is for a router.

> This has been known and well understood for a long 
> time, and solutions
> to this problem are not easy which is why there 
> hasn't been any progress in this area to date.

Thanks for the response

I would appreciate if someone could explain this "well
understood" :-) thing to me. How come such an overhead
for a single entry in the conntrack table ? After
putting it to the table this entry is hashed and later
is supposed to be find very quickly. What am I missing
here ?

Thanks in advance

Best regards, Eddy



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply

* Re: [Qemu-devel] Unified device model
From: Fabrice Bellard @ 2006-04-09 21:02 UTC (permalink / raw)
  To: qemu-devel
In-Reply-To: <E1FSf5V-0001xW-2i@lists.gnu.org>

Hi,

My feeling is that QEMU already has what is needed to make a "plugin 
API". In particular, each device driver is clearly separated from the 
rest of the emulator and adding a new "machine" just consists in adding 
a new C file instanciating the different devices and processors. The 
fact that the devices or machines cannot come from a DLL or cannot be 
compiled separately is a cosmetic issue and could be easily added. I see 
little advantage in it except to make binary device models which I don't 
want to promote.

The real issues I see to improve the QEMU device model for the short 
term are:

- Rename some structures or functions to have a more consistent naming 
and rename vl.h to something like qemu/qemu.h and eventually split it to 
have a few subsystems such as isa, pci, usb... The question whether we 
keep a QEMU prefix is mostly political.

- Implement reproductible execution support and see if API changes are 
needed in the devices.

- Add explicit contexts in the (rare) cases where there are not already 
explicit. The API shall allow any number of CPUs and buses. A device 
tree should be added to give a global name for each device and cpu that 
can be referenced in the monitor and in the traces.

- Improve the tracing API. It should be possible to enable traces for 
each instance of a device. The various I/Os and events should be 
displayed in a uniform way.

- Make it possible to integrate different CPU types and all devices in 
the same executables without loosing performance. There are some API 
issues to solve regarding endianness.

- Document the API various functions by adding javadoc comments.

Another interesting point would be to see how to interface with hardware 
device models (for example written in VHDL and compiled with GHDL).

Looking at the API of other projects such as MAME which are more mature 
than QEMU or Bochs in the sense that they have far more devices and 
processors would be interesting too.

Fabrice.

Stanislav Shwartsman wrote:
> Hello All,
> 
> I'll try to answer to everybody in single mail and explain my vision of
> unified plugin API and why I see them essential.
> 
> Yes, I am Bochs developer, but I am more CPU expert and only learning the
> devices subsystem and dynamic translation subjects so Bochs is a right place
> for me ;) I am pretty understand all the Bochs code including devices and
> also have some vision of highly portable and extendable simulator.
> 
> Now I'll try to explain how I see the plugin architecture and why I think it
> essential.
> 
> - I am not talking about binary level plugins support and maintenance or
> sources level. 
> - I am not talking about open source or closed source, commercial and
> freeware devices for emulator, but I think the plugin architecture should
> support both.
> - I not think the plugin API should be C++, actually Bochs plugin API is
> pure-C based. The device itself is written in C++ but it has something like
> C++ -> C proxy implemented as a part of plugin API. I think here we are
> agree.
> - It is doesn't matter if the plugin is shared or static library, the code
> size of Bochs or QEMU is so small and I don't think it is important feature
> to "share" devices in memory.
> 
> The keyword is expendability. Now if you would like to write a new device
> for Bochs or QEMU you cannot open a separate project on SF.net and start
> development. Even if you need to add some exotic experimental device which
> is not exists in real life you should interfere with simulator code.
> Moreover, if you need to add this device to Bochs, QEMU and Xen you
> basically have to do the work three times !
> 
> I hope I am not disclose any secret if I say that HiPEAC beginning a new
> project of open source full-system simulator, something that could be
> alternative to SimpleScalar and also have full-system emulation capabilities
> (platform + power + performance in single box). The simulator would reuse
> the devices from some existent open source emulator, Bochs or QEMU. But as
> any academia model it should be highly extendable and super-modular. The
> ability to add a new device to the system without touching the main
> simulator kernel is a MUST. 
> 
> I believe it is right direction too. Somebody could establish a new project
> of developing new device and when contribute the device when it will be
> done. In my opinion, it is even not important if the device written in C/C++
> or any other language, if it is distributed with sources or not, under
> commercial license or not. If I could download device binary, plug it in to
> the simulator and get new capabilities, which were not available before -
> why not ?
> 
> I could provide more and more examples, more and more advantages of this
> arch and almost no disadvantages. There are a lot of successful examples of
> products with extendable user plugins where functionality of the product as
> a very small piece near the variety of plugins written by users.
> 
> Now the advantages of making every device separate library (shared or
> static). When every device is separate library you try to build your
> emulated system by yourself choosing the CPU core emulator + chipset plugin
> + devices plugins you want. If some set of plugins distributed as single
> library - they are not separatable one from another. This is only a
> disadvantage which could simply avoided, so again, why not ?
> 
> I am already not talking about devices maintenance. The best example is
> Brendan BIOS. Brendan started a new project of writing new ACPI-compatible
> BIOS for open source emulators. His BIOS require ACPI compatibility changes
> in the device models and CPU emulator and Bochs already started to support
> his requirements. Currently, when his BIOS will be done, QEMU will remain
> behind it and not be able to run with it. Anyway, to support the
> requirements the work should be done 2-3 times, from the beginning for each
> simulator.
> 
> The Bochs will start from some PCI device and try to separate it from the
> simulator code, compile it stand-alone and make it pluginable in run-time.
> Why PCI device ? Just because it has more functionality than PC-speaker card
> and require more interference with core simulator. Actually might be several
> device models for core plugins (chipset, PCI bus, AGP bus), ISA/PCI cards
> and COM devices, everything is open. During the separation work I hope to
> figure out requirements from devices and simulator core for new plugin
> architecture. In Bochs, a lot of changes required to make it happen, and we
> believe we'll make it possible until next Bochs 2.3 release.
> 
> Thanks,
> Stanislav
> 
> -----Original Message-----
> From: qemu-devel-bounces+stl=fidonet.org.il@nongnu.org
> [mailto:qemu-devel-bounces+stl=fidonet.org.il@nongnu.org] On Behalf Of Jim
> C. Brown
> Sent: Sunday, April 09, 2006 6:08 PM
> To: qemu-devel@nongnu.org
> Subject: Re: [Qemu-devel] Unified device model
> 
> On Sun, Apr 09, 2006 at 04:21:42PM +0100, Paul Brook wrote:
> 
>>>>I'm not a fan of binary plugins (for the same reasons I'm don't like
>>>>binary kernel modules), and don't think there's any real need to them.
>>>
>>>A binary plugin API and a source plugin API (one that requires each
> 
> driver
> 
>>>device to be recompiled for each of the platforms (Xen, qemu, bochs,
> 
> etc.)
> 
>>>would probably be equally hard to design and maintain.
>>
>>You've missed my point. The only reason I can see for wanting binary
> 
> plugins 
> 
>>is so that people can distribute proprietary closed-source device
> 
> emulation.
> 
> I agree that proprietary or closed-source device emulation is a bad thing
> and
> should not be supported.
> 
> 
>>A stable source API is a prerequisite for any sort of binary plugins.
>>
> 
> 
> In that case, perhaps a stable source API would be best.
> 
> Like I said before, the type of API/sharing (source vs binary API, and
> static
> vs shared libraries) is a separate issue from the one we are discussing
> (should
> we have or support a unified plugin API?).
> 
> 
>>>>I can't see
>>>>any good reasons why open source devices would need to be broken out
> 
> into
> 
>>>>a separate shared library.
>>>
>>>I think the case was already made for this.
>>>
>>>Xen's hardware emulation, while based on qemu's, is already ahead in
>>>several aspects. A separate library would make it more convenient for
> 
> these
> 
>>>changes to be shared back with qemu. Or with E/OS.
>>
>>I don't buy that. We either share the same drivers (in which case keeping
> 
> the 
> 
>>two in sync is trivial) or we don't. All of the systems under
> 
> consideration 
> 
>>are [L]GPL licences. We can easily copy the source, so I don't think being
> 
> 
>>able to copy bits of binary goo gains us anything.
> 
> 
> A) Makes it simpler for end users to move devices over (they don't have to
> know
> how to cut-and-paste C code)
> 
> B) Bochs is not related to qemu at all code-wise, so the cut-and-paste
> senario
> doesn't work here. If we want to share drivers with Bochs we'd need at least
> a
> source API. (The starter of this thread is a Bochs developer I believe...
> but correct me if I'm wrong here. :) The alternative is to rewrite Bochs
> drivers for qemu from scratch (possbly using the Bochs code as a guide) but
> that is even harder than the qemu-xen case.
> 
> C) If they are in a special library (say maintained by a 3rd party group
> that
> consists of developers from all the major projects) then maintainance is
> greatly
> simplified over time.
> 
> 
>>I don't think executable size is a valid argument either. Device emulation
> 
> 
>>code generally isn't that big so the overhead of breaking it up into
> 
> multiple 
> 
>>shared libraries would outweigh the benefits of not loading the bits
> 
> you're 
> 
>>not using.
> 
> 
> Perhaps you are right about that. The size of having even 4 or 5 copies of
> complete PC hardware emulation code isn't so large as to be a problem except
> on systems that are either embedded or ancient (in which case you probably
> have
> no business running 4 different PC emulators anyways).
> 
> Personally, it just seems inelegant to have such code duplication.
> 
> 
>>Paul
>>
> 
> 

^ permalink raw reply

* Re: [Qemu-devel] Gentlemen we have absolute movement! was:Absolute USB-HID device musings (was Re: VNC Terminal Server)
From: Brad Campbell @ 2006-04-09 21:10 UTC (permalink / raw)
  To: qemu-devel
In-Reply-To: <4439753C.8080405@us.ibm.com>

Anthony Liguori wrote:
> Hi Brad,
> 
> I have your patch applied and the previous one and it doesn't seem to 
> work under win2k.  Can you post a patch of what you have?
> 
> I've got what I have attached.  I did a little bit of SDL plumbing based 
> on my touchscreen patch.
> 

Ok.. now I've embarrassed myself by publicly releasing my spaghetti, I've had a look at what you are 
up to..
The VNC patch extends the existing mouse handler by passing it abs coordinates as well, (this is the 
basis of what I used) so there are no additional routines.. I figure if you pass both relative 
(faked if need be) and abs to the routine then the mouse can use whatever it likes.

It looks like you are adding a completely separate handler there ?

I had to stop the ps2 mouse handler registering itself to let the usb one have a go. But now its 
working. I've left both cursors live so you can see how well it mates up. There is a minor elastic 
discrepancy toward the bottom right of the screen, but I'm *sure* its just due to my off the top of 
my head hacky position calculations and it can be refined further..

I figure a command line switch for usbmouse/usbabs/ps2 might be in order so you can change depending 
on your os. Hopefully the evdev patch in X gets up and running and we can just default to abs mode.

I'll get hold of a wheel mouse tomorrow (my trackpad does not have a Z) and see if I can get the Z 
axis going..

Tested under win2k-SP4. How cool is it to be grabless and change resolutions on the fly..
I'll clean it up tomorrow and graft it into the vnc patch also.. virtual servers here we come!

Brad
-- 
"Human beings, who are almost unique in having the ability
to learn from the experience of others, are also remarkable
for their apparent disinclination to do so." -- Douglas Adams

^ permalink raw reply

* EMPLOYMENT MAIL
From: MR KENT ANDERSON @ 2006-04-09 21:06 UTC (permalink / raw)
  To: linux-kernel

>From The Desk of:
            
Kent Anderson PhD 
L. G. A. (Woodworking Machinery) Ltd, 
1 Rutland Court,EH3 8EY,
London.
 
Dear Sir/Madam, 
 
We will be very glad if you can be our representative in your country and earn 10% of every payment made through you to us. 
 
For more information, contact us through email. Note that you shall not be liable to make any upfront payment. 
 
Thanks in advance. 
 
Kind Regards, 
Kent Anderson (CEO) 





^ permalink raw reply

* Re: patches for fsample/850
From: Brian Swetland @ 2006-04-09 21:05 UTC (permalink / raw)
  To: tony; +Cc: linux-omap-open-source
In-Reply-To: <20060409183557.GF5032@atomide.com>

[tony@atomide.com]
> Hi,
> 
> Few comments below.
> 
> * Brian Swetland <swetland@google.com> [060408 08:45]:
> > --- linux-omap-2.6/arch/arm/mach-omap1/clock.h	2006-04-05 10:33:20.000000000 -0700
> > +++ linux-omap-fsample/arch/arm/mach-omap1/clock.h	2006-04-06 13:15:34.000000000 -0700
> > @@ -101,44 +101,50 @@
> >  /*-------------------------------------------------------------------------
> >   * Omap1 MPU rate table
> >   *-------------------------------------------------------------------------*/
> > +#if defined(CONFIG_ARCH_OMAP730)
> > +	#define CKCTL_RESERVED_1_MASK (0x2000)
> > +#else
> > +	#define CKCTL_RESERVED_1_MASK (0x0000)
> > +#endif
> 
> This addds yet another extra hurdle compiling 730 in with 15xx and 16xx.
> Although we cannot do it because of the interrupt handler, maybe we'll
> fix that someday. So let's try not to add more hurdles if we can avoid
> it.
> 
> How about doing the masking when the CKCTL value is written based on the
> cpu_is_omap730()?

We can do that.  I'll change it.

> > --- linux-omap-2.6/arch/arm/mach-omap1/pm.c	2006-04-05 10:33:20.000000000 -0700
> > +++ linux-omap-fsample/arch/arm/mach-omap1/pm.c	2006-04-06 13:15:34.000000000 -0700
> > @@ -326,8 +326,10 @@
> >  	/* stop DSP */
> >  	omap_writew(omap_readw(ARM_RSTCT1) & ~(1 << DSP_EN), ARM_RSTCT1);
> >  
> > +#if !defined(CONFIG_ARCH_OMAP730)
> >  	/* shut down dsp_ck */
> >  	omap_writew(omap_readw(ARM_CKCTL) & ~(1 << EN_DSPCK), ARM_CKCTL);
> > +#endif
> 
> This too would be better with if (!cpu_is_omap730()).

Okay.

> > @@ -189,8 +197,6 @@
> >  	omap_writel(value, OMAP730_IO_CONF_4);
> >  
> >  	omap_uwire_configure_mode(0,16);
> > -
> > -	omap_uwire_data_transfer(LCD_UWIRE_CS, LCD_DISOFF, 9, 0,NULL,1);
> >  	omap_uwire_data_transfer(LCD_UWIRE_CS, LCD_SLPIN, 9, 0,NULL,1);
> >  	omap_uwire_data_transfer(LCD_UWIRE_CS, LCD_DISNOR, 9, 0,NULL,1);
> >  	omap_uwire_data_transfer(LCD_UWIRE_CS, LCD_GSSET, 9, 0,NULL,1);
> 
> Is the removal of one of the omap_uwire_data_transfer() calls intended?

Oops. That was unintentional.

> Then does it compile and boot for p2 and fsample both selected?

Probably not -- is there something like cpu_is_*() that I could
use to make this conditional at runtime?
 
> Also, could you please do one patch for the core support, and then
> another patch for files that don't touch the omap core files?
> 
> That way we can send you patch directly upstream when we merge next
> time. Otherwise I have to redo the patch to strip out the drivers when
> we merge as not many omap drivers are yet merged with the mainline tree.

Sure.  I'll clean up the above and break it into two pieces.

Brian

^ permalink raw reply

* Re: [Qemu-devel] Gentlemen we have absolute movement! was:Absolute USB-HID device musings (was Re: VNC Terminal Server)
From: Brad Campbell @ 2006-04-09 21:02 UTC (permalink / raw)
  To: qemu-devel
In-Reply-To: <4439753C.8080405@us.ibm.com>

Anthony Liguori wrote:
> Hi Brad,
> 
> I have your patch applied and the previous one and it doesn't seem to 
> work under win2k.  Can you post a patch of what you have?
> 
> I've got what I have attached.  I did a little bit of SDL plumbing based 
> on my touchscreen patch.


Really sorry about that.. it was not a patch as just an indicator of what I was doing..
here is what I have against latest cvs.. I've applied malc's grabless patch also and hacked around 
just to get it to work.. try to pretend it's not 1am here and I've not just left crap all over the 
place :)

http://fnarfbargle.dyndns.org:81/qemu/hid-grabless-001.patch

-- 
"Human beings, who are almost unique in having the ability
to learn from the experience of others, are also remarkable
for their apparent disinclination to do so." -- Douglas Adams

^ permalink raw reply

* [PATCH] kbuild: rebuild initramfs if included files changes
From: Sam Ravnborg @ 2006-04-09 20:59 UTC (permalink / raw)
  To: LKML, klibc, H. Peter Anvin

This fix has been implemented in preparation for the upcoming klibc
merge in -mm. But as it fixes a real (but rare I hope) bug in vanilla
kernel it will be added to my pending 2.6.17 kbuild queue.

I've done quite some changes to the gen_initramfs script and
being shell programming newbie review by more experienced shell
hackers would be appreciated.

I did a git mv scripts/gen_initramfs_list.sh usr/gen_initramfs.sh
But the changes was so many that git does not see the rename.
Due to the rename the diffstat shows a bit mroe changes than reality.

	Sam

 b/usr/Makefile                |   82 ++++--------
 b/usr/gen_initramfs.sh        |  285 ++++++++++++++++++++++++++++++++++++++++++
 scripts/gen_initramfs_list.sh |  203 -----------------------------
 3 files changed, 313 insertions(+), 257 deletions(-)

diff-tree 73ef2e1760bb20a1190b25a2d559789b513bd3c2 (from d9df92e22aca939857c5bc9ecb130ef22307ccc1)
Author: Sam Ravnborg <sam@mars.ravnborg.org>
Date:   Sun Apr 9 22:48:16 2006 +0200

    kbuild: rebuild initramfs if included files changes

    initramfs.cpio.gz being build in usr/ and included in the
    kernel was not rebuild when the included files changed.

    To fix this the following was done:
    - moved gen_init_ramfs_list.sh to usr/gen_initramfs.sh
    - let gen_initramfs.sh generate a list of files and directories included
      in the initramfs
    - gen_initramfs generate the gzipped cpio archive so we could simplify
      the kbuild file (Makefile)
    - utilising the kbuild infrastructure so when uid/gid root mapping changes
      the initramfs will be rebuild

    With this change we have a much more robust initramfs generation.

    Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

diff --git a/usr/Makefile b/usr/Makefile
index e2129cb..ed18668 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -1,65 +1,39 @@
+#
+# kbuild file for usr/ - including initramfs image
+#
 
+# Generate builtin.o based on initramfs_data.o
 obj-y := initramfs_data.o
 
-hostprogs-y  := gen_init_cpio
-
-clean-files := initramfs_data.cpio.gz initramfs_list
-
 # initramfs_data.o contains the initramfs_data.cpio.gz image.
 # The image is included using .incbin, a dependency which is not
 # tracked automatically.
 $(obj)/initramfs_data.o: $(obj)/initramfs_data.cpio.gz FORCE
-
-ifdef CONFIG_INITRAMFS_ROOT_UID
-gen_initramfs_args += -u $(CONFIG_INITRAMFS_ROOT_UID)
-endif
-
-ifdef CONFIG_INITRAMFS_ROOT_GID
-gen_initramfs_args += -g $(CONFIG_INITRAMFS_ROOT_GID)
-endif
-
-# The $(shell echo $(CONFIG_INITRAMFS_SOURCE)) is to remove the
-# gratuitous begin and end quotes from the Kconfig string type.
-# Internal, escaped quotes in the Kconfig string will loose the
-# escape and become active quotes.
-quotefixed_initramfs_source := $(shell echo $(CONFIG_INITRAMFS_SOURCE))
-
-filechk_initramfs_list = $(CONFIG_SHELL) \
- $(srctree)/scripts/gen_initramfs_list.sh $(gen_initramfs_args) $(quotefixed_initramfs_source)
-
-$(obj)/initramfs_list: $(obj)/Makefile FORCE
-	$(call filechk,initramfs_list)
-
-quiet_cmd_cpio = CPIO    $@
-      cmd_cpio = ./$< $(obj)/initramfs_list > $@
 
+#####
+# Generate the initramfs cpio archive
+# Following steps are executed:
+# Create list of files to be included in archive (ramfs-filelist)
+# If any of the files are newer than target generate new cpio archive
 
-# Check if the INITRAMFS_SOURCE is a cpio archive
-ifneq (,$(findstring .cpio,$(quotefixed_initramfs_source)))
-
-# INITRAMFS_SOURCE has a cpio archive - verify that it's a single file
-ifneq (1,$(words $(quotefixed_initramfs_source)))
-$(error Only a single file may be specified in CONFIG_INITRAMFS_SOURCE (="$(quotefixed_initramfs_source)") when a cpio archive is directly specified.)
-endif
-# Now use the cpio archive directly
-initramfs_data_cpio = $(quotefixed_initramfs_source)
-targets += $(quotefixed_initramfs_source)
-
-else
-
-# INITRAMFS_SOURCE is not a cpio archive - create one
-$(obj)/initramfs_data.cpio: $(obj)/gen_init_cpio \
-                            $(initramfs-y) $(obj)/initramfs_list FORCE
-	$(call if_changed,cpio)
-
-targets += initramfs_data.cpio
-initramfs_data_cpio = $(obj)/initramfs_data.cpio
-
-endif
-
-
-$(obj)/initramfs_data.cpio.gz: $(initramfs_data_cpio) FORCE
-	$(call if_changed,gzip)
+# Create cpio archive from filelist
+hostprogs-y  := gen_init_cpio
 
-targets += initramfs_data.cpio.gz
+# Files included in cpio archive (cpio archive is updated if
+# any included files are newer than the cpio archive)
+initramfs     := $(CONFIG_SHELL) $(srctree)/$(src)/gen_initramfs.sh
+ramfs-input    = $(if $(filter-out "",$(CONFIG_INITRAMFS_SOURCE)), \
+                      $(CONFIG_INITRAMFS_SOURCE),-d)
+ramfs-filelist = $(shell $(initramfs) -l $(ramfs-input))
+
+quiet_cmd_initfs = GEN     $@
+      cmd_initfs = \
+	$(initramfs) -o $@ \
+	$(if $(CONFIG_INITRAMFS_ROOT_UID), -u $(CONFIG_INITRAMFS_ROOT_UID)) \
+	$(if $(CONFIG_INITRAMFS_ROOT_GID), -g $(CONFIG_INITRAMFS_ROOT_GID)) \
+	$(ramfs-input)
+
+targets := initramfs_data.cpio.gz
+$(obj)/initramfs_data.cpio.gz: $(ramfs-filelist) $(obj)/gen_init_cpio FORCE
+	$(call if_changed,initfs)
 
diff --git a/usr/gen_initramfs.sh b/usr/gen_initramfs.sh
new file mode 100755
index 0000000..7749615
--- /dev/null
+++ b/usr/gen_initramfs.sh
@@ -0,0 +1,285 @@
+#!/bin/bash
+# Copyright (C) Martin Schlemmer <azarah@nosferatu.za.org>
+# Copyright (c) 2006           Sam Ravnborg <sam@ravnborg.org>
+#
+# Released under the terms of the GNU GPL
+#
+# Generate a cpio packed initramfs. It uses gen_init_cpio to generate
+# the cpio archive, and gzip to pack it.
+# The script may also be sued to generate the inputfile used for gen_init_cpio
+# This script assumes that gen_init_cpio is located in same directory
+# as the script
+
+# error out on errors
+set -e
+
+usage() {
+cat << EOF
+Usage:
+$0 -l {-d | <cpio_source>} ...
+$0 [-o <file>] [-u <uid>] [-g <gid>] {-d | <cpio_source>} ...
+	-l             List all files/dirs that will be added to initramfs
+	-o <file>      Create gzipped initramfs file named <file> using
+	               gen_init_cpio and gzip
+	-u <uid>       User ID to map to user ID 0 (root).
+	               <uid> is only meaningful if <cpio_source>
+	               is a directory.
+	-g <gid>       Group ID to map to group ID 0 (root).
+	               <gid> is only meaningful if <cpio_source>
+	               is a directory.
+	<cpio_source>  File list or directory for cpio archive.
+	               If <cpio_source> is a .cpio file it will be used
+		       as direct input to initramfs.
+	-d             Output the default cpio list.
+
+All options except -o and -l may be repeated and are interpreted
+sequentially and immediately.  -u and -g states are preserved across
+<cpio_source> options so an explicit "-u 0 -g 0" is required
+to reset the root/group mapping.
+EOF
+}
+
+list_default_initramfs() {
+	# echo usr/kinit/kinit
+	:
+}
+
+default_initramfs() {
+	cat <<-EOF >> ${output}
+		# This is a very simple, default initramfs
+
+		dir /dev 0755 0 0
+		nod /dev/console 0600 0 0 c 5 1
+		dir /root 0700 0 0
+		# file /kinit usr/kinit/kinit 0755 0 0
+		# slink /init kinit 0755 0 0
+	EOF
+}
+
+filetype() {
+	local argv1="$1"
+
+	# symlink test must come before file test
+	if [ -L "${argv1}" ]; then
+		echo "slink"
+	elif [ -f "${argv1}" ]; then
+		echo "file"
+	elif [ -d "${argv1}" ]; then
+		echo "dir"
+	elif [ -b "${argv1}" -o -c "${argv1}" ]; then
+		echo "nod"
+	elif [ -p "${argv1}" ]; then
+		echo "pipe"
+	elif [ -S "${argv1}" ]; then
+		echo "sock"
+	else
+		echo "invalid"
+	fi
+	return 0
+}
+
+list_print_mtime() {
+	:
+}
+
+print_mtime() {
+	local my_mtime="0"
+
+	if [ -e "$1" ]; then
+		my_mtime=$(find "$1" -printf "%T@\n" | sort -r | head -n 1)
+	fi
+
+	echo "# Last modified: ${my_mtime}" >> ${output}
+	echo "" >> ${output}
+}
+
+list_parse() {
+	echo "$1"
+}
+
+# for each file print a line in following format
+# <filetype> <name> <path to file> <octal mode> <uid> <gid>
+# for links, devices etc the format differs. See gen_init_cpio for details
+parse() {
+	local location="$1"
+	local name="${location/${srcdir}//}"
+	# change '//' into '/'
+	name="${name//\/\///}"
+	local mode="$2"
+	local uid="$3"
+	local gid="$4"
+	local ftype=$(filetype "${location}")
+	# remap uid/gid to 0 if necessary
+	[ "$uid" -eq "$root_uid" ] && uid=0
+	[ "$gid" -eq "$root_gid" ] && gid=0
+	local str="${mode} ${uid} ${gid}"
+
+	[ "${ftype}" == "invalid" ] && return 0
+	[ "${location}" == "${srcdir}" ] && return 0
+
+	case "${ftype}" in
+		"file")
+			str="${ftype} ${name} ${location} ${str}"
+			;;
+		"nod")
+			local dev_type=
+			local maj=$(LC_ALL=C ls -l "${location}" | \
+					gawk '{sub(/,/, "", $5); print $5}')
+			local min=$(LC_ALL=C ls -l "${location}" | \
+					gawk '{print $6}')
+
+			if [ -b "${location}" ]; then
+				dev_type="b"
+			else
+				dev_type="c"
+			fi
+			str="${ftype} ${name} ${str} ${dev_type} ${maj} ${min}"
+			;;
+		"slink")
+			local target=$(LC_ALL=C ls -l "${location}" | \
+					gawk '{print $11}')
+			str="${ftype} ${name} ${target} ${str}"
+			;;
+		*)
+			str="${ftype} ${name} ${str}"
+			;;
+	esac
+
+	echo "${str}" >> ${output}
+
+	return 0
+}
+
+unknown_option() {
+	printf "ERROR: unknown option \"$arg\"\n" >&2
+	printf "If the filename validly begins with '-', " >&2
+	printf "then it must be prefixed\n" >&2
+	printf "by './' so that it won't be interpreted as an option." >&2
+	printf "\n" >&2
+	usage >&2
+	exit 1
+}
+
+list_header() {
+	:
+}
+
+header() {
+	printf "\n#####################\n# $1\n" >> ${output}
+}
+
+# process one directory (incl sub-directories)
+dir_filelist() {
+	${file_list}header "$1"
+
+	srcdir=$(echo "$1" | sed -e 's://*:/:g')
+	dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" 2>/dev/null)
+
+	# If $dirlist is only one line, then the directory is empty
+	if [  "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then
+		${file_list}print_mtime "$1"
+
+		echo "${dirlist}" | \
+		while read x; do
+			${file_list}parse ${x}
+		done
+	fi
+}
+
+# if only one file is specified and it is .cpio file then use it direct as fs
+# if a directory is specified then add all files in given direcotry to fs
+# if a regular file is specified assume it is in gen_initramfs format
+input_file() {
+	source="$1"
+	if [ -f "$1" ]; then
+		is_cpio="$(echo "$1" | sed 's/^.*\.cpio/cpio/')"
+		if [ $2 -eq 0 -a ${is_cpio} == "cpio" ]; then
+			cpio_file=$1
+			[ ! -z ${list_file} ] && echo "$1"
+			return 0
+		fi
+		if [ -z ${file_list} ]; then
+			header "$1"
+			print_mtime "$1" >> ${output}
+			cat "$1"         >> ${output}
+		else
+			grep ^file "$1" | cut -d ' ' -f 3
+		fi
+	elif [ -d "$1" ]; then
+		dir_filelist "$1"
+	else
+		echo "  ${prog}: Cannot open '$1'" >&2
+		exit 1
+	fi
+}
+
+prog=$0
+root_uid=0
+root_gid=0
+file_list=
+cpio_file=
+cpio_list=
+output="/dev/stdout"
+output_file=""
+
+arg="$1"
+case "$arg" in
+	"-l")	# list contained files only
+		file_list="list_"
+		shift
+		;;
+	"-o")	# generate gzipped cpio image named $1
+		shift
+		output_file="$1"
+		cpio_list="$(mktemp ${TMPDIR:-/tmp}/cpiolist.XXXXXX)"
+		output=${cpio_list}
+		shift
+		;;
+esac
+while [ $# -gt 0 ]; do
+	arg="$1"
+	shift
+	case "$arg" in
+		"-u")	# map $1 to uid=0 (root)
+			root_uid="$1"
+			shift
+			;;
+		"-g")	# map $1 to gid=0 (root)
+			root_gid="$1"
+			shift
+			;;
+		"-d")	# display default initramfs list
+			default_list="$arg"
+			${file_list}default_initramfs
+			;;
+		"-h")
+			usage
+			exit 0
+			;;
+		*)
+			case "$arg" in
+				"-"*)
+					unknown_option
+					;;
+				*)	# input file/dir - process it
+					input_file "$arg" "$#"
+					;;
+			esac
+			;;
+	esac
+done
+
+# If output_file is set we will generate cpio archive and gzip it
+# we are carefull to delete tmp files
+if [ ! -z ${output_file} ]; then
+	if [ -z ${cpio_file} ]; then
+		cpio_tfile="$(mktemp ${TMPDIR:-/tmp}/cpiofile.XXXXXX)"
+		$(dirname ${prog})/gen_init_cpio ${cpio_list} > ${cpio_tfile}
+	else
+		cpio_tfile=${cpio_file}
+	fi
+	rm ${cpio_list}
+	cat ${cpio_tfile} | gzip -f -9 - > ${output_file}
+	[ -z ${cpio_file} ] && rm ${cpio_tfile}
+fi
+exit 0
diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh
deleted file mode 100644
index 6d41116..0000000
--- a/scripts/gen_initramfs_list.sh
+++ /dev/null
@@ -1,203 +0,0 @@
-#!/bin/bash
-# Copyright (C) Martin Schlemmer <azarah@nosferatu.za.org>
-# Released under the terms of the GNU GPL
-#
-# Generate a newline separated list of entries from the file/directory
-# supplied as an argument.
-#
-# If a file/directory is not supplied then generate a small dummy file.
-#
-# The output is suitable for gen_init_cpio built from usr/gen_init_cpio.c.
-#
-
-default_initramfs() {
-	cat <<-EOF
-		# This is a very simple, default initramfs
-
-		dir /dev 0755 0 0
-		nod /dev/console 0600 0 0 c 5 1
-		dir /root 0700 0 0
-	EOF
-}
-
-filetype() {
-	local argv1="$1"
-
-	# symlink test must come before file test
-	if [ -L "${argv1}" ]; then
-		echo "slink"
-	elif [ -f "${argv1}" ]; then
-		echo "file"
-	elif [ -d "${argv1}" ]; then
-		echo "dir"
-	elif [ -b "${argv1}" -o -c "${argv1}" ]; then
-		echo "nod"
-	elif [ -p "${argv1}" ]; then
-		echo "pipe"
-	elif [ -S "${argv1}" ]; then
-		echo "sock"
-	else
-		echo "invalid"
-	fi
-	return 0
-}
-
-print_mtime() {
-	local argv1="$1"
-	local my_mtime="0"
-
-	if [ -e "${argv1}" ]; then
-		my_mtime=$(find "${argv1}" -printf "%T@\n" | sort -r | head -n 1)
-	fi
-	
-	echo "# Last modified: ${my_mtime}"
-	echo
-}
-
-parse() {
-	local location="$1"
-	local name="${location/${srcdir}//}"
-	# change '//' into '/'
-	name="${name//\/\///}"
-	local mode="$2"
-	local uid="$3"
-	local gid="$4"
-	local ftype=$(filetype "${location}")
-	# remap uid/gid to 0 if necessary
-	[ "$uid" -eq "$root_uid" ] && uid=0
-	[ "$gid" -eq "$root_gid" ] && gid=0
-	local str="${mode} ${uid} ${gid}"
-
-	[ "${ftype}" == "invalid" ] && return 0
-	[ "${location}" == "${srcdir}" ] && return 0
-
-	case "${ftype}" in
-		"file")
-			str="${ftype} ${name} ${location} ${str}"
-			;;
-		"nod")
-			local dev_type=
-			local maj=$(LC_ALL=C ls -l "${location}" | \
-					gawk '{sub(/,/, "", $5); print $5}')
-			local min=$(LC_ALL=C ls -l "${location}" | \
-					gawk '{print $6}')
-
-			if [ -b "${location}" ]; then
-				dev_type="b"
-			else
-				dev_type="c"
-			fi
-			str="${ftype} ${name} ${str} ${dev_type} ${maj} ${min}"
-			;;
-		"slink")
-			local target=$(LC_ALL=C ls -l "${location}" | \
-					gawk '{print $11}')
-			str="${ftype} ${name} ${target} ${str}"
-			;;
-		*)
-			str="${ftype} ${name} ${str}"
-			;;
-	esac
-
-	echo "${str}"
-
-	return 0
-}
-
-usage() {
-	printf    "Usage:\n"
-	printf    "$0 [ [-u <root_uid>] [-g <root_gid>] [-d | <cpio_source>] ] . . .\n"
-	printf    "\n"
-	printf -- "-u <root_uid>  User ID to map to user ID 0 (root).\n"
-	printf    "               <root_uid> is only meaningful if <cpio_source>\n"
-	printf    "               is a directory.\n"
-	printf -- "-g <root_gid>  Group ID to map to group ID 0 (root).\n"
-	printf    "               <root_gid> is only meaningful if <cpio_source>\n"
-	printf    "               is a directory.\n"
-	printf    "<cpio_source>  File list or directory for cpio archive.\n"
-	printf    "               If <cpio_source> is not provided then a\n"
-	printf    "               a default list will be output.\n"
-	printf -- "-d             Output the default cpio list.  If no <cpio_source>\n"
-	printf    "               is given then the default cpio list will be output.\n"
-	printf    "\n"
-	printf    "All options may be repeated and are interpreted sequentially\n"
-	printf    "and immediately.  -u and -g states are preserved across\n"
-	printf    "<cpio_source> options so an explicit \"-u 0 -g 0\" is required\n"
-	printf    "to reset the root/group mapping.\n"
-}
-
-build_list() {
-	printf "\n#####################\n# $cpio_source\n"
-
-	if [ -f "$cpio_source" ]; then
-		print_mtime "$cpio_source"
-		cat "$cpio_source"
-	elif [ -d "$cpio_source" ]; then
-		srcdir=$(echo "$cpio_source" | sed -e 's://*:/:g')
-		dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" 2>/dev/null)
-
-		# If $dirlist is only one line, then the directory is empty
-		if [  "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then
-			print_mtime "$cpio_source"
-		
-			echo "${dirlist}" | \
-			while read x; do
-				parse ${x}
-			done
-		else
-			# Failsafe in case directory is empty
-			default_initramfs
-		fi
-	else
-		echo "  $0: Cannot open '$cpio_source'" >&2
-		exit 1
-	fi
-}
-
-
-root_uid=0
-root_gid=0
-
-while [ $# -gt 0 ]; do
-	arg="$1"
-	shift
-	case "$arg" in
-		"-u")
-			root_uid="$1"
-			shift
-			;;
-		"-g")
-			root_gid="$1"
-			shift
-			;;
-		"-d")
-			default_list="$arg"
-			default_initramfs
-			;;
-		"-h")
-			usage
-			exit 0
-			;;
-		*)
-			case "$arg" in
-				"-"*)
-					printf "ERROR: unknown option \"$arg\"\n" >&2
-					printf "If the filename validly begins with '-', then it must be prefixed\n" >&2
-					printf "by './' so that it won't be interpreted as an option." >&2
-					printf "\n" >&2
-					usage >&2
-					exit 1
-					;;
-				*)
-					cpio_source="$arg"
-					build_list
-					;;
-			esac
-			;;
-	esac
-done
-
-# spit out the default cpio list if a source hasn't been specified
-[ -z "$cpio_source" -a -z "$default_list" ] && default_initramfs
-
-exit 0


^ permalink raw reply related

* alpha DEAD on >=2.6.16-rc3
From: leonie herzberg @ 2006-04-09 20:59 UTC (permalink / raw)
  To: linux-kernel

Hi. I already posted a bugreport on the bugzilla
(http://bugzilla.kernel.org/show_bug.cgi?id=6351) but I feel no one is
recognizing that; and as I see it, it's a rather hard bug since it
throws a kernel panic immediately at boot time. I believe it has to do
with the change made in 2.6.16-rc3 concerning "cpu_possible_map". None
of the newer kernel versions works.
As you can see at the first (and up to now, only) comment, this is not
only my problem.
Maybe it appears only in connection with SMP. I can't tell.


Leonie

^ permalink raw reply

* Re: [Qemu-devel] Gentlemen we have absolute movement! was:Absolute USB-HID device musings (was Re: VNC Terminal Server)
From: Anthony Liguori @ 2006-04-09 20:57 UTC (permalink / raw)
  To: qemu-devel
In-Reply-To: <44396E20.6010103@wasp.net.au>

[-- Attachment #1: Type: text/plain, Size: 3343 bytes --]

Hi Brad,

I have your patch applied and the previous one and it doesn't seem to 
work under win2k.  Can you post a patch of what you have?

I've got what I have attached.  I did a little bit of SDL plumbing based 
on my touchscreen patch.

Regards,

Anthony Liguori

Brad Campbell wrote:
> Brad Campbell wrote:
>> Lonnie Mendez wrote:
>>
>>>   Please see the patch posted yesterday to this mailing list:
>>>
>>> http://gnome.dnsalias.net/patches/qemu-hidmousexp.patch
>>
>> Ta for that.. not sure how I missed it.
>> Now to try and get it to work..
>>
>
> Ok.. 1st cut.. it's not great, and it's not hooked up to anything at 
> the moment (the mouse just tootles around the screen on a timer) BUT! 
> we have absolute movement.
>
> The *stunning* news is it's resolution independent.. 640x480 - 800x600 
> - 1024x768
> 0,0 is top left and 7fff.7fff is bottom right.. no client scaling 
> required..
>
> Think I've figured out the Z axis thing also.. and we are good for 
> relative movement on that still
> (The Z axis below is way wrong, but I think I have figured it out)
>
> static const uint8_t qemu_mouse_hid_report_descriptor[] = {
>         0x05, 0x01, /* Usage Page Generic Desktop */
>         0x09, 0x01, /* Usage Mouse */
>         0xA1, 0x01, /* Collection Application */
>         0x09, 0x01, /* Usage Pointer */
>         0xA1, 0x00, /* Collection Physical */
>         0x05, 0x09, /* Usage Page Button */
>         0x19, 0x01, /* Usage Minimum Button 1 */
>         0x29, 0x03, /* Usage Maximum Button 3 */
>         0x15, 0x00, /* Logical Minimum 0 */
>         0x25, 0x01, /* Logical Maximum 1 */
>         0x95, 0x03, /* Report Count 3 */
>         0x75, 0x01, /* Report Size 1 */
>         0x81, 0x02, /* Input (Data, Var, Abs) */
>         0x95, 0x01, /* Report Count 1 */
>         0x75, 0x05, /* Report Size 5 */
>         0x81, 0x01, /* Input (Cnst, Var, Abs) */
>         0x05, 0x01, /* Usage Page Generic Desktop */
>         0x09, 0x30, /* Usage X */
>         0x09, 0x31, /* Usage Y */
>         0x15, 0x00, /* Logical Minimum 0 */
>         0x27, 0xFF, 0xFF, 0x00, 0x00, /* Logical Maximum 0xffff */
>         0x75, 0x10, /* Report Size 32 */
>         0x95, 0x02, /* Report Count 2 */
>         0x81, 0x02, /* Input (Data, Var, Abs) */
> //      0x09, 0x32, /* Usage Z */
> //      0x15, 0x81, /* Logical Minimum -127 */
> //      0x25, 0x7F, /* Logical Maximum 127 */
> //      0x75, 0x08, /* Report Size 8 */
> //      0x95, 0x01, /* Report Count 1 */
>         0xC0,       /* End Collection */
>         0xC0,       /* End Collection */
> };
> #endif
>
> static int usb_mouse_poll(USBMouseState *s, uint8_t *buf, int len)
> {
>     int dx, dy, dz, b, l, aa, bb, cc, dd;
>
>     dx = int_clamp(s->dx, -128, 127);
>     dy = int_clamp(s->dy, -128, 127);
>     dz = int_clamp(s->dz, -128, 127);
>
>     s->dx -= dx;
>     s->dy -= dy;
>     s->dz -= dz;
>     b = 0;
>     if (s->buttons_state & MOUSE_EVENT_LBUTTON)
>         b |= 0x01;
>     if (s->buttons_state & MOUSE_EVENT_RBUTTON)
>         b |= 0x02;
>     if (s->buttons_state & MOUSE_EVENT_MBUTTON)
>         b |= 0x04;
>
>     buf[0] = b;
>     buf[1] = s->X & 0xff;
>     buf[2] = s->X >> 8;
>     buf[3] = s->Y & 0xff;
>     buf[4] = s->Y >> 8;
>     aa=buf[1];
>     bb=buf[2];
>     cc=buf[3];
>     dd=buf[4];
>     l = 5;
>
>     return l;
> }
>


[-- Attachment #2: qemu-usb-abs.diff --]
[-- Type: text/plain, Size: 7547 bytes --]

diff -r 8937c657c23f hw/usb-hid.c
--- a/hw/usb-hid.c	Sun Mar 26 01:31:22 2006 +0000
+++ b/hw/usb-hid.c	Sun Apr  9 15:57:13 2006 -0500
@@ -33,6 +33,7 @@
 typedef struct USBMouseState {
     USBDevice dev;
     int dx, dy, dz, buttons_state;
+    int X, Y;
 } USBMouseState;
 
 /* mostly the same values as the Bochs USB Mouse device */
@@ -92,14 +93,6 @@
 	0x01,       /*  u8  if_bInterfaceSubClass; */
 	0x02,       /*  u8  if_bInterfaceProtocol; [usb1.1 or single tt] */
 	0x05,       /*  u8  if_iInterface; */
-     
-	/* one endpoint (status change endpoint) */
-	0x07,       /*  u8  ep_bLength; */
-	0x05,       /*  u8  ep_bDescriptorType; Endpoint */
-	0x81,       /*  u8  ep_bEndpointAddress; IN Endpoint 1 */
- 	0x03,       /*  u8  ep_bmAttributes; Interrupt */
- 	0x03, 0x00, /*  u16 ep_wMaxPacketSize; */
-	0x0a,       /*  u8  ep_bInterval; (255ms -- usb 2.0 spec) */
 
         /* HID descriptor */
         0x09,        /*  u8  bLength; */
@@ -109,8 +102,17 @@
         0x01,        /*  u8 num_descriptors */
         0x22,        /*  u8 type; Report */
         50, 0,       /*  u16 len */
+
+	/* one endpoint (status change endpoint) */
+	0x07,       /*  u8  ep_bLength; */
+	0x05,       /*  u8  ep_bDescriptorType; Endpoint */
+	0x81,       /*  u8  ep_bEndpointAddress; IN Endpoint 1 */
+ 	0x03,       /*  u8  ep_bmAttributes; Interrupt */
+ 	0x03, 0x00, /*  u16 ep_wMaxPacketSize; */
+	0x0a,       /*  u8  ep_bInterval; (255ms -- usb 2.0 spec) */
 };
 
+#if 0
 static const uint8_t qemu_mouse_hid_report_descriptor[] = {
     0x05, 0x01, 0x09, 0x02, 0xA1, 0x01, 0x09, 0x01, 
     0xA1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x03,
@@ -120,6 +122,41 @@
     0x25, 0x7F, 0x75, 0x08, 0x95, 0x02, 0x81, 0x06,
     0xC0, 0xC0,
 };
+#else
+static const uint8_t qemu_mouse_hid_report_descriptor[] = {
+        0x05, 0x01, /* Usage Page Generic Desktop */
+        0x09, 0x01, /* Usage Mouse */
+        0xA1, 0x01, /* Collection Application */
+        0x09, 0x01, /* Usage Pointer */
+        0xA1, 0x00, /* Collection Physical */
+        0x05, 0x09, /* Usage Page Button */
+        0x19, 0x01, /* Usage Minimum Button 1 */
+        0x29, 0x03, /* Usage Maximum Button 3 */
+        0x15, 0x00, /* Logical Minimum 0 */
+        0x25, 0x01, /* Logical Maximum 1 */
+        0x95, 0x03, /* Report Count 3 */
+        0x75, 0x01, /* Report Size 1 */
+        0x81, 0x02, /* Input (Data, Var, Abs) */
+        0x95, 0x01, /* Report Count 1 */
+        0x75, 0x05, /* Report Size 5 */
+        0x81, 0x01, /* Input (Cnst, Var, Abs) */
+        0x05, 0x01, /* Usage Page Generic Desktop */
+        0x09, 0x30, /* Usage X */
+        0x09, 0x31, /* Usage Y */
+        0x15, 0x00, /* Logical Minimum 0 */
+        0x27, 0xFF, 0xFF, 0x00, 0x00, /* Logical Maximum 0xffff */
+        0x75, 0x10, /* Report Size 32 */
+        0x95, 0x02, /* Report Count 2 */
+        0x81, 0x02, /* Input (Data, Var, Abs) */
+//      0x09, 0x32, /* Usage Z */
+//      0x15, 0x81, /* Logical Minimum -127 */
+//      0x25, 0x7F, /* Logical Maximum 127 */
+//      0x75, 0x08, /* Report Size 8 */
+//      0x95, 0x01, /* Report Count 1 */
+        0xC0,       /* End Collection */
+        0xC0,       /* End Collection */
+};
+#endif 
 
 static void usb_mouse_event(void *opaque,
                             int dx1, int dy1, int dz1, int buttons_state)
@@ -129,6 +166,8 @@
     s->dx += dx1;
     s->dy += dy1;
     s->dz += dz1;
+    s->X = dx1;
+    s->Y = dy1;
     s->buttons_state = buttons_state;
 }
 
@@ -142,6 +181,7 @@
         return val;
 }
 
+#if 0
 static int usb_mouse_poll(USBMouseState *s, uint8_t *buf, int len)
 {
     int dx, dy, dz, b, l;
@@ -172,6 +212,37 @@
     }
     return l;
 }
+#else
+
+static int usb_mouse_poll(USBMouseState *s, uint8_t *buf, int len)
+{
+    int dx, dy, dz, b, l;
+
+    dx = int_clamp(s->dx, -128, 127);
+    dy = int_clamp(s->dy, -128, 127);
+    dz = int_clamp(s->dz, -128, 127);
+
+    s->dx -= dx;
+    s->dy -= dy;
+    s->dz -= dz;
+    b = 0;
+    if (s->buttons_state & MOUSE_EVENT_LBUTTON)
+        b |= 0x01;
+    if (s->buttons_state & MOUSE_EVENT_RBUTTON)
+        b |= 0x02;
+    if (s->buttons_state & MOUSE_EVENT_MBUTTON)
+        b |= 0x04;
+
+    buf[0] = b;
+    buf[1] = s->X & 0xff;
+    buf[2] = s->X >> 8;
+    buf[3] = s->Y & 0xff;
+    buf[4] = s->Y >> 8;
+    l = 5;
+
+    return l;
+}
+#endif
 
 static void usb_mouse_handle_reset(USBDevice *dev)
 {
@@ -180,6 +251,8 @@
     s->dx = 0;
     s->dy = 0;
     s->dz = 0;
+    s->X = 0;
+    s->Y = 0;
     s->buttons_state = 0;
 }
 
@@ -341,7 +414,8 @@
     s->dev.handle_control = usb_mouse_handle_control;
     s->dev.handle_data = usb_mouse_handle_data;
 
-    qemu_add_mouse_event_handler(usb_mouse_event, s);
+    qemu_add_mouse_event_handler(NULL, NULL);
+    qemu_add_mouse_abs_event_handler(usb_mouse_event, s);
     
     return (USBDevice *)s;
 }
diff -r 8937c657c23f sdl.c
--- a/sdl.c	Sun Mar 26 01:31:22 2006 +0000
+++ b/sdl.c	Sun Apr  9 15:57:13 2006 -0500
@@ -301,6 +301,9 @@
     if (state & SDL_BUTTON(SDL_BUTTON_MIDDLE))
         buttons |= MOUSE_EVENT_MBUTTON;
     kbd_mouse_event(dx, dy, dz, buttons);
+
+    SDL_GetMouseState(&dx, &dy);
+    kbd_mouse_abs_event(dx, dy, dz, buttons);
 }
 
 static void toggle_full_screen(DisplayState *ds)
diff -r 8937c657c23f vl.c
--- a/vl.c	Sun Mar 26 01:31:22 2006 +0000
+++ b/vl.c	Sun Apr  9 15:57:13 2006 -0500
@@ -475,6 +475,8 @@
 static void *qemu_put_kbd_event_opaque;
 static QEMUPutMouseEvent *qemu_put_mouse_event;
 static void *qemu_put_mouse_event_opaque;
+static QEMUPutMouseAbsEvent *qemu_put_mouse_abs_event;
+static void *qemu_put_mouse_abs_event_opaque;
 
 void qemu_add_kbd_event_handler(QEMUPutKBDEvent *func, void *opaque)
 {
@@ -486,6 +488,12 @@
 {
     qemu_put_mouse_event_opaque = opaque;
     qemu_put_mouse_event = func;
+}
+
+void qemu_add_mouse_abs_event_handler(QEMUPutMouseAbsEvent *func, void *opaque)
+{
+    qemu_put_mouse_abs_event_opaque = opaque;
+    qemu_put_mouse_abs_event = func;
 }
 
 void kbd_put_keycode(int keycode)
@@ -500,6 +508,14 @@
     if (qemu_put_mouse_event) {
         qemu_put_mouse_event(qemu_put_mouse_event_opaque, 
                              dx, dy, dz, buttons_state);
+    }
+}
+
+void kbd_mouse_abs_event(int x, int y, int dz, int buttons_state)
+{
+    if (qemu_put_mouse_abs_event) {
+	qemu_put_mouse_abs_event(qemu_put_mouse_abs_event_opaque,
+				 x, y, dz, buttons_state);
     }
 }
 
@@ -1308,7 +1324,7 @@
 /* for STDIO, we handle the case where several clients use it
    (nographic mode) */
 
-#define TERM_ESCAPE 0x01 /* ctrl-a is used for escape */
+#define TERM_ESCAPE 0x1d /* ctrl-a is used for escape */
 
 #define TERM_FIFO_MAX_SIZE 1
 
diff -r 8937c657c23f vl.h
--- a/vl.h	Sun Mar 26 01:31:22 2006 +0000
+++ b/vl.h	Sun Apr  9 15:57:13 2006 -0500
@@ -156,12 +156,15 @@
 
 typedef void QEMUPutKBDEvent(void *opaque, int keycode);
 typedef void QEMUPutMouseEvent(void *opaque, int dx, int dy, int dz, int buttons_state);
+typedef void QEMUPutMouseAbsEvent(void *opaque, int x, int y, int dz, int buttons_state);
 
 void qemu_add_kbd_event_handler(QEMUPutKBDEvent *func, void *opaque);
 void qemu_add_mouse_event_handler(QEMUPutMouseEvent *func, void *opaque);
+void qemu_add_mouse_abs_event_handler(QEMUPutMouseAbsEvent *func, void *opaque);
 
 void kbd_put_keycode(int keycode);
 void kbd_mouse_event(int dx, int dy, int dz, int buttons_state);
+void kbd_mouse_abs_event(int x, int y, int dz, int buttons_state);
 
 /* keysym is a unicode code except for special keys (see QEMU_KEY_xxx
    constants) */

^ permalink raw reply

* [Xenomai-core] [PATCH] improve XENO_ASSERT verbosity
From: Jan Kiszka @ 2006-04-09 20:56 UTC (permalink / raw)
  To: xenomai-core


[-- Attachment #1.1: Type: text/plain, Size: 241 bytes --]

Hi,

this patch adds xnlogerr to the XENO_ASSERT macro, making the failure
visible so that the user does not have to bother. Furthermore, it adds
panic tracing.

Tested and found useful with latest RTDM debugging, ok to apply?

Jan

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: rtdm-asserts.patch --]
[-- Type: text/x-patch; name="rtdm-asserts.patch", Size: 10179 bytes --]

Index: include/rtdm/rtdm_driver.h
===================================================================
--- include/rtdm/rtdm_driver.h	(Revision 793)
+++ include/rtdm/rtdm_driver.h	(Arbeitskopie)
@@ -40,6 +40,13 @@
 #include <nucleus/synch.h>
 #include <rtdm/rtdm.h>
 
+/* debug support */
+#include <nucleus/assert.h>
+
+#ifndef CONFIG_XENO_OPT_DEBUG_RTDM
+#define CONFIG_XENO_OPT_DEBUG_RTDM  0
+#endif
+
 
 struct rtdm_dev_context;
 
@@ -891,6 +898,7 @@ static inline rtdm_task_t *rtdm_task_cur
 
 static inline int rtdm_task_wait_period(void)
 {
+    XENO_ASSERT(RTDM, !xnpod_unblockable_p(), return -EPERM;);
     return xnpod_wait_thread_period(NULL);
 }
 
Index: include/nucleus/assert.h
===================================================================
--- include/nucleus/assert.h	(Revision 793)
+++ include/nucleus/assert.h	(Arbeitskopie)
@@ -22,20 +22,12 @@
 
 #include <nucleus/compiler.h>
 
-#ifndef CONFIG_XENO_OPT_DEBUG_LEVEL
-#define CONFIG_XENO_OPT_DEBUG_LEVEL  0
-#endif
-
-#if CONFIG_XENO_OPT_DEBUG_LEVEL > 0
-#define XENO_ASSERT(cond,action)  do { \
-if (unlikely((cond) != 0)) \
+#define XENO_ASSERT(group,cond,action)  do { \
+if (unlikely(CONFIG_XENO_OPT_DEBUG_##group > 0 && !(cond))) \
 	do { action; } while(0); \
 } while(0)
-#else  /* CONFIG_XENO_OPT_DEBUG_LEVEL == 0 */
-#define XENO_ASSERT(cond,action) do { } while(0)
-#endif /* CONFIG_XENO_OPT_DEBUG_LEVEL > 0 */
 
-#define XENO_BUGON(cond)  \
-    XENO_ASSERT(cond,xnpod_fatal("assertion failed at %s:%d",__FILE__,__LINE__))
+#define XENO_BUGON(group,cond)  \
+    XENO_ASSERT(group,cond,xnpod_fatal("assertion failed at %s:%d",__FILE__,__LINE__))
 
 #endif /* !_XENO_NUCLEUS_ASSERT_H */
Index: ChangeLog
===================================================================
--- ChangeLog	(Revision 793)
+++ ChangeLog	(Arbeitskopie)
@@ -1,3 +1,13 @@
+2006-03-26  Jan Kiszka  <jan.kiszka@domain.hid>
+
+	* ksrc/include/nucleus/assert.h: XENO_ASSERT with built-in
+	activation at compile time.
+
+	* ksrc/skins/rtdm/Kconfig, ksrc/skins/rtdm/Config.in,
+	ksrc/skins/rtdm/drvlib.c, include/rtdm/rtdm_driver.h: Use
+	XENO_ASSERT to check for correct RTDM driver API invocation
+	contexts.
+
 2006-03-24  Gilles Chanteperdrix  <gilles.chanteperdrix@xenomai.org>
 
 	* ksrc/nucleus/pod.c (xnpod_init): Return immediately with an
Index: ksrc/skins/rtdm/Kconfig
===================================================================
--- ksrc/skins/rtdm/Kconfig	(Revision 793)
+++ ksrc/skins/rtdm/Kconfig	(Arbeitskopie)
@@ -7,3 +7,12 @@ config XENO_SKIN_RTDM
 	This API skin allows to write real-time drivers against a common
 	light weight interface in kernel mode, but use them across all other
 	skins in both kernel and user mode.
+
+config XENO_OPT_DEBUG_RTDM
+    bool "RTDM Debugging support"
+    depends on XENO_OPT_DEBUG && XENO_SKIN_RTDM
+    help
+
+    This option activates debugging checks for the RTDM subsystem.
+    It is a recommended option for analysing potential issues in RTDM
+    drivers. A minor runtime overhead is added.
Index: ksrc/skins/rtdm/drvlib.c
===================================================================
--- ksrc/skins/rtdm/drvlib.c	(Revision 793)
+++ ksrc/skins/rtdm/drvlib.c	(Arbeitskopie)
@@ -279,6 +279,8 @@ void rtdm_task_join_nrt(rtdm_task_t *tas
     spl_t s;
 
 
+    XENO_ASSERT(RTDM, xnpod_root_p(), return;);
+
     xnlock_get_irqsave(&nklock, s);
 
     while (!xnthread_test_flags(task, XNZOMBIE)) {
@@ -305,6 +307,9 @@ EXPORT_SYMBOL(rtdm_task_join_nrt);
  * - -EINTR is returned if calling task has been unblock by a signal or
  * explicitely via rtdm_task_unblock().
  *
+ * - -EPERM @e may be returned if an illegal invocation environment is
+ * detected.
+ *
  * Environments:
  *
  * This service can be called from:
@@ -319,6 +324,8 @@ int rtdm_task_sleep(uint64_t delay)
     xnthread_t  *thread = xnpod_current_thread();
 
 
+    XENO_ASSERT(RTDM, !xnpod_unblockable_p(), return -EPERM;);
+
     xnpod_suspend_thread(thread, XNDELAY, xnpod_ns2ticks(delay), NULL);
 
     return xnthread_test_flags(thread, XNBREAK) ? -EINTR : 0;
@@ -337,6 +344,9 @@ EXPORT_SYMBOL(rtdm_task_sleep);
  * - -EINTR is returned if calling task has been unblock by a signal or
  * explicitely via rtdm_task_unblock().
  *
+ * - -EPERM @e may be returned if an illegal invocation environment is
+ * detected.
+ *
  * Environments:
  *
  * This service can be called from:
@@ -354,6 +364,8 @@ int rtdm_task_sleep_until(uint64_t wakeu
     int         err = 0;
 
 
+    XENO_ASSERT(RTDM, !xnpod_unblockable_p(), return -EPERM;);
+
     xnlock_get_irqsave(&nklock, s);
 
     delay = xnpod_ns2ticks(wakeup_time) - xnpod_get_time();
@@ -626,6 +638,9 @@ EXPORT_SYMBOL(rtdm_event_signal);
  *
  * - -EIDRM is returned if @a event has been destroyed.
  *
+ * - -EPERM @e may be returned if an illegal invocation environment is
+ * detected.
+ *
  * Environments:
  *
  * This service can be called from:
@@ -641,6 +656,8 @@ int rtdm_event_wait(rtdm_event_t *event)
     int     err = 0;
 
 
+    XENO_ASSERT(RTDM, !xnpod_unblockable_p(), return -EPERM;);
+
     xnlock_get_irqsave(&nklock, s);
 
     if (testbits(event->synch_base.status, SYNCH_DELETED))
@@ -689,6 +706,9 @@ EXPORT_SYMBOL(rtdm_event_wait);
  *
  * - -EIDRM is returned if @a event has been destroyed.
  *
+ * - -EPERM @e may be returned if an illegal invocation environment is
+ * detected.
+ *
  * Environments:
  *
  * This service can be called from:
@@ -706,6 +726,8 @@ int rtdm_event_timedwait(rtdm_event_t *e
     int         err = 0;
 
 
+    XENO_ASSERT(RTDM, !xnpod_unblockable_p(), return -EPERM;);
+
     xnlock_get_irqsave(&nklock, s);
 
     if (unlikely(testbits(event->synch_base.status, SYNCH_DELETED)))
@@ -810,6 +832,9 @@ void rtdm_sem_destroy(rtdm_sem_t *sem);
  *
  * - -EIDRM is returned if @a sem has been destroyed.
  *
+ * - -EPERM @e may be returned if an illegal invocation environment is
+ * detected.
+ *
  * Environments:
  *
  * This service can be called from:
@@ -825,6 +850,8 @@ int rtdm_sem_down(rtdm_sem_t *sem)
     int     err = 0;
 
 
+    XENO_ASSERT(RTDM, !xnpod_unblockable_p(), return -EPERM;);
+
     xnlock_get_irqsave(&nklock, s);
 
     if (testbits(sem->synch_base.status, SYNCH_DELETED))
@@ -878,6 +905,9 @@ EXPORT_SYMBOL(rtdm_sem_down);
  *
  * - -EIDRM is returned if @a sem has been destroyed.
  *
+ * - -EPERM @e may be returned if an illegal invocation environment is
+ * detected.
+ *
  * Environments:
  *
  * This service can be called from:
@@ -895,6 +925,8 @@ int rtdm_sem_timeddown(rtdm_sem_t *sem, 
     int         err = 0;
 
 
+    XENO_ASSERT(RTDM, !xnpod_unblockable_p(), return -EPERM;);
+
     xnlock_get_irqsave(&nklock, s);
 
     if (testbits(sem->synch_base.status, SYNCH_DELETED))
@@ -1035,6 +1067,9 @@ void rtdm_mutex_destroy(rtdm_mutex_t *mu
  *
  * - -EIDRM is returned if @a mutex has been destroyed.
  *
+ * - -EPERM @e may be returned if an illegal invocation environment is
+ * detected.
+ *
  * Environments:
  *
  * This service can be called from:
@@ -1050,6 +1085,8 @@ int rtdm_mutex_lock(rtdm_mutex_t *mutex)
     int     err = 0;
 
 
+    XENO_ASSERT(RTDM, !xnpod_unblockable_p(), return -EPERM;);
+
     xnlock_get_irqsave(&nklock, s);
 
     if (testbits(mutex->synch_base.status, SYNCH_DELETED))
@@ -1097,6 +1134,9 @@ EXPORT_SYMBOL(rtdm_mutex_lock);
  *
  * - -EIDRM is returned if @a mutex has been destroyed.
  *
+ * - -EPERM @e may be returned if an illegal invocation environment is
+ * detected.
+ *
  * Environments:
  *
  * This service can be called from:
@@ -1114,6 +1154,8 @@ int rtdm_mutex_timedlock(rtdm_mutex_t *m
     int         err = 0;
 
 
+    XENO_ASSERT(RTDM, !xnpod_unblockable_p(), return -EPERM;);
+
     xnlock_get_irqsave(&nklock, s);
 
     if (testbits(mutex->synch_base.status, SYNCH_DELETED))
@@ -1179,6 +1221,8 @@ void rtdm_mutex_unlock(rtdm_mutex_t *mut
     spl_t s;
 
 
+    XENO_ASSERT(RTDM, !xnpod_asynch_p(), return;);
+
     xnlock_get_irqsave(&nklock, s);
 
     __clear_bit(0, &mutex->locked);
@@ -1426,6 +1470,9 @@ static struct file_operations rtdm_mmap_
  * - -EAGAIN is returned if too much memory has been already locked by the
  * user process.
  *
+ * - -EPERM @e may be returned if an illegal invocation environment is
+ * detected.
+ *
  * @note RTDM supports two models for unmapping the user memory range again.
  * One is explicite unmapping via rtdm_munmap(), either performed when the
  * user requests it via an IOCTL etc. or when the related device is closed.
@@ -1457,6 +1504,9 @@ int rtdm_mmap_to_user(rtdm_user_info_t *
     void                    *old_priv_data;
     void                    *user_ptr;
 
+
+    XENO_ASSERT(RTDM, xnpod_root_p(), return -EPERM;);
+
     filp = filp_open("/dev/zero", O_RDWR, 0);
     if (IS_ERR(filp))
         return PTR_ERR(filp);
@@ -1499,6 +1549,9 @@ EXPORT_SYMBOL(rtdm_mmap_to_user);
  *
  * - -EINVAL is returned if an invalid address or size was passed.
  *
+ * - -EPERM @e may be returned if an illegal invocation environment is
+ * detected.
+ *
  * Environments:
  *
  * This service can be called from:
@@ -1512,6 +1565,9 @@ int rtdm_munmap(rtdm_user_info_t *user_i
 {
     int err;
 
+
+    XENO_ASSERT(RTDM, xnpod_root_p(), return -EPERM;);
+
     down_write(&user_info->mm->mmap_sem);
     err = do_munmap(user_info->mm, (unsigned long)ptr, len);
     up_write(&user_info->mm->mmap_sem);
Index: ksrc/skins/rtdm/Config.in
===================================================================
--- ksrc/skins/rtdm/Config.in	(Revision 793)
+++ ksrc/skins/rtdm/Config.in	(Arbeitskopie)
@@ -3,3 +3,10 @@
 #
 
 dep_tristate 'Real-Time Driver Model' CONFIG_XENO_SKIN_RTDM $CONFIG_XENO_OPT_NUCLEUS
+
+if [ "$CONFIG_XENO_SKIN_RTDM" != "n" ]; then
+	mainmenu_option next_comment
+	comment 'RTDM interface options'
+	dep_bool 'Debugging support' CONFIG_XENO_OPT_DEBUG_RTDM $CONFIG_XENO_OPT_DEBUG
+	endmenu
+fi

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

^ permalink raw reply

* help
From: amirhosein jahanbekam @ 2006-04-09 20:47 UTC (permalink / raw)
  To: linux-mtd

Hi all
I have an 'at91rm9200 development kit'.
Recently, I `ve attached an 'AT45DB642' serial data
flash
to the board and installed uboot via XModem
successfully.
But somethings seemed to go wrong:

Firstly, uboot is not able to erase or unprotect the  
    flash as I tested  several versions of uboot and
also compiled 'u-boot-1.1.2' to be certain that
dataflash options are correctly enabled.
It pretend to work,but really does nothing.

Secondly, after booting via network,linux also is not
able to deal with flash operations, for instance:

--[root@AT91RM9200DK /root]$flash_erase
/dev/mtdblock/1
--Erase Total 1 Units
 but in fact nothing happens.


My linux version is '2.4.27-vrs1-ATMEL' and my mtd
configs are as follow.

 Tanks in advanced.
 
 Amir.H.J


#
# Memory Technology Devices (MTD)
#
CONFIG_MTD=y
CONFIG_MTD_DEBUG=y
CONFIG_MTD_DEBUG_VERBOSE=0
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_CONCAT=y
CONFIG_MTD_REDBOOT_PARTS=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_AFS_PARTS=y
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
# CONFIG_FTL is not set
# CONFIG_NFTL is not set

#
# RAM/ROM/Flash chip drivers
#
CONFIG_MTD_CFI=y
# CONFIG_MTD_JEDECPROBE is not set
CONFIG_MTD_GEN_PROBE=y
# CONFIG_MTD_CFI_ADV_OPTIONS is not set
CONFIG_MTD_CFI_INTELEXT=y
# CONFIG_MTD_CFI_AMDSTD is not set
# CONFIG_MTD_CFI_STAA is not set
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_ABSENT is not set
# CONFIG_MTD_OBSOLETE_CHIPS is not set
# CONFIG_MTD_AMDSTD is not set
# CONFIG_MTD_SHARP is not set
# CONFIG_MTD_JEDEC is not set

#
# Mapping drivers for chip access
#
# CONFIG_MTD_PHYSMAP is not set
# CONFIG_MTD_NORA is not set
# CONFIG_MTD_ARM_INTEGRATOR is not set
# CONFIG_MTD_CDB89712 is not set
# CONFIG_MTD_SA1100 is not set
# CONFIG_MTD_DC21285 is not set
# CONFIG_MTD_IQ80310 is not set
# CONFIG_MTD_FORTUNET is not set
# CONFIG_MTD_EPXA is not set
# CONFIG_MTD_AUTCPU12 is not set
# CONFIG_MTD_EDB7312 is not set
# CONFIG_MTD_IMPA7 is not set
# CONFIG_MTD_CEIVA is not set
# CONFIG_MTD_PCI is not set
# CONFIG_MTD_PCMCIA is not set

#
# Self-contained MTD device drivers
#
# CONFIG_MTD_PMC551 is not set
# CONFIG_MTD_SLRAM is not set
CONFIG_MTD_AT91_DATAFLASH=y
CONFIG_MTD_AT91_DATAFLASH_CARD=y
CONFIG_MTD_MTDRAM=y
CONFIG_MTDRAM_TOTAL_SIZE=4096
CONFIG_MTDRAM_ERASE_SIZE=128
CONFIG_MTDRAM_ABS_POS=0
CONFIG_MTD_BLKMTD=y
# CONFIG_MTD_DOC1000 is not set
# CONFIG_MTD_DOC2000 is not set
# CONFIG_MTD_DOC2001 is not set
# CONFIG_MTD_DOCPROBE is not set

#
# NAND Flash Device Drivers
#
# CONFIG_MTD_NAND is not set
# CONFIG_MTD_AT91_SMARTMEDIA is not set

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply

* Re: Can't mount /dev/md0 after stopping a synchronization
From: Tuomas Leikola @ 2006-04-09 20:48 UTC (permalink / raw)
  To: Mike Garey; +Cc: linux-raid
In-Reply-To: <c79e949d0604080845m720f2bard3a140486155c006@mail.gmail.com>

On 4/8/06, Mike Garey <random51k@gmail.com> wrote:
> I have one last question though.. When I update /boot/grub/menu.lst
> while booted from /dev/md0 with both disks available, does this file
> get written to the MBR on both disks, or do I have to do this
> manually?
>

Grub's configuration lives on both mirrors, as it's in the filesystem,
not in MBR. At boot time, grub kinda "mounts" the filesystem and reads
the configuration from there. (grub doesn't understand the mirror, but
it doesn't need to)

^ permalink raw reply

* [Qemu-devel] qemu Makefile Makefile.target
From: Paul Brook @ 2006-04-09 20:47 UTC (permalink / raw)
  To: qemu-devel

CVSROOT:	/sources/qemu
Module name:	qemu
Branch: 	
Changes by:	Paul Brook <pbrook@savannah.gnu.org>	06/04/09 20:47:35

Modified files:
	.              : Makefile Makefile.target 

Log message:
	DESTDIR makefile support.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/Makefile.diff?tr1=1.93&tr2=1.94&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/Makefile.target.diff?tr1=1.94&tr2=1.95&r1=text&r2=text

^ permalink raw reply

* [Patch] Static overruns in drivers/isdn/i4l/isdn_ppp.c
From: Eric Sesterhenn @ 2006-04-09 20:47 UTC (permalink / raw)
  To: LKML; +Cc: paulus

hi,

coverity found some static overruns in isdn_ppp.c (bug id #519)
At several places slot is compared <0 and > ISDN_MAX_CHANNELS
and then used to index ippp_table[ISDN_MAX_CHANNELS]
A value of slot = ISDN_MAX_CHANNELS would run over the end
of the array.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>

--- linux-2.6.17-rc1/drivers/isdn/i4l/isdn_ppp.c.orig	2006-04-09 22:37:42.000000000 +0200
+++ linux-2.6.17-rc1/drivers/isdn/i4l/isdn_ppp.c	2006-04-09 22:42:34.000000000 +0200
@@ -109,7 +109,7 @@ isdn_ppp_free(isdn_net_local * lp)
 {
 	struct ippp_struct *is;
 
-	if (lp->ppp_slot < 0 || lp->ppp_slot > ISDN_MAX_CHANNELS) {
+	if (lp->ppp_slot < 0 || lp->ppp_slot >= ISDN_MAX_CHANNELS) {
 		printk(KERN_ERR "%s: ppp_slot(%d) out of range\n",
 			__FUNCTION__, lp->ppp_slot);
 		return 0;
@@ -126,7 +126,7 @@ isdn_ppp_free(isdn_net_local * lp)
 	lp->netdev->pb->ref_ct--;
 	spin_unlock(&lp->netdev->pb->lock);
 #endif /* CONFIG_ISDN_MPP */
-	if (lp->ppp_slot < 0 || lp->ppp_slot > ISDN_MAX_CHANNELS) {
+	if (lp->ppp_slot < 0 || lp->ppp_slot >= ISDN_MAX_CHANNELS) {
 		printk(KERN_ERR "%s: ppp_slot(%d) now invalid\n",
 			__FUNCTION__, lp->ppp_slot);
 		return 0;
@@ -279,7 +279,7 @@ isdn_ppp_open(int min, struct file *file
 	int slot;
 	struct ippp_struct *is;
 
-	if (min < 0 || min > ISDN_MAX_CHANNELS)
+	if (min < 0 || min >= ISDN_MAX_CHANNELS)
 		return -ENODEV;
 
 	slot = isdn_ppp_get_slot();
@@ -1042,7 +1042,7 @@ isdn_ppp_push_higher(isdn_net_dev * net_
  	if (lp->master) { // FIXME?
 		mlp = (isdn_net_local *) lp->master->priv;
  		slot = mlp->ppp_slot;
- 		if (slot < 0 || slot > ISDN_MAX_CHANNELS) {
+ 		if (slot < 0 || slot >= ISDN_MAX_CHANNELS) {
  			printk(KERN_ERR "isdn_ppp_push_higher: master->ppp_slot(%d)\n",
  				lp->ppp_slot);
 			goto drop_packet;
@@ -1264,7 +1264,7 @@ isdn_ppp_xmit(struct sk_buff *skb, struc
 	/* we have our lp locked from now on */
 
 	slot = lp->ppp_slot;
-	if (slot < 0 || slot > ISDN_MAX_CHANNELS) {
+	if (slot < 0 || slot >= ISDN_MAX_CHANNELS) {
 		printk(KERN_ERR "isdn_ppp_xmit: lp->ppp_slot(%d)\n",
 			lp->ppp_slot);
 		kfree_skb(skb);
@@ -1603,7 +1603,7 @@ static void isdn_ppp_mp_receive(isdn_net
     	mp = net_dev->pb;
         stats = &mp->stats;
 	slot = lp->ppp_slot;
-	if (slot < 0 || slot > ISDN_MAX_CHANNELS) {
+	if (slot < 0 || slot >= ISDN_MAX_CHANNELS) {
 		printk(KERN_ERR "%s: lp->ppp_slot(%d)\n",
 			__FUNCTION__, lp->ppp_slot);
 		stats->frame_drops++;
@@ -1640,7 +1640,7 @@ static void isdn_ppp_mp_receive(isdn_net
 	is->last_link_seqno = minseq = newseq;
 	for (lpq = net_dev->queue;;) {
 		slot = lpq->ppp_slot;
-		if (slot < 0 || slot > ISDN_MAX_CHANNELS) {
+		if (slot < 0 || slot >= ISDN_MAX_CHANNELS) {
 			printk(KERN_ERR "%s: lpq->ppp_slot(%d)\n",
 				__FUNCTION__, lpq->ppp_slot);
 		} else {
@@ -2648,7 +2648,7 @@ static void isdn_ppp_receive_ccp(isdn_ne
 
 	printk(KERN_DEBUG "Received CCP frame from peer slot(%d)\n",
 		lp->ppp_slot);
-	if (lp->ppp_slot < 0 || lp->ppp_slot > ISDN_MAX_CHANNELS) {
+	if (lp->ppp_slot < 0 || lp->ppp_slot >= ISDN_MAX_CHANNELS) {
 		printk(KERN_ERR "%s: lp->ppp_slot(%d) out of range\n",
 			__FUNCTION__, lp->ppp_slot);
 		return;
@@ -2658,7 +2658,7 @@ static void isdn_ppp_receive_ccp(isdn_ne
 
 	if(lp->master) {
 		int slot = ((isdn_net_local *) (lp->master->priv))->ppp_slot;
-		if (slot < 0 || slot > ISDN_MAX_CHANNELS) {
+		if (slot < 0 || slot >= ISDN_MAX_CHANNELS) {
 			printk(KERN_ERR "%s: slot(%d) out of range\n",
 				__FUNCTION__, slot);
 			return;
@@ -2845,7 +2845,7 @@ static void isdn_ppp_send_ccp(isdn_net_d
 
 	if (lp->master) {
 		slot = ((isdn_net_local *) (lp->master->priv))->ppp_slot;
-		if (slot < 0 || slot > ISDN_MAX_CHANNELS) {
+		if (slot < 0 || slot >= ISDN_MAX_CHANNELS) {
 			printk(KERN_ERR "%s: slot(%d) out of range\n",
 				__FUNCTION__, slot);
 			return;



^ permalink raw reply

* Re: [Bluez-users] Anonymous service setup
From: Christoph Simon @ 2006-04-09 20:46 UTC (permalink / raw)
  To: bluez-users; +Cc: ashuang
In-Reply-To: <ef9938ec0604021017q786d33e5r32692f7fb33fad91@mail.gmail.com>

On Sun, 2 Apr 2006 13:17:55 -0400
"Albert Huang" <ashuang@gmail.com> wrote:

> Many phones do not require authentication for OBEX Push.  You might try to
> use that instead of OBEX File Transfer to avoid the PIN issue.  take a look
> at ussp-push.
> 
> -albert

Thanks, Albert, and sorry for taking so long to check it
out. Unfortunately, ussp-push also requires a PIN. This is exactly
what I tried. First:

	obexftp -b 00:15:A8:F3:B5:DF -l
	Browsing 00:15:A8:E3:A5:DF ...
	Channel: 9
	No custom transport

Here the phone askes if I want to connect and I say Yes. Then it asks
me for a PIN which I type in (the same which is in /etc/bluetooth/pin)
and the phone tells me that the PIN is invalid. I can try the same or
any other...

	Connecting...failed: connect
	Still trying to connect
	Connecting...failed: connect
	Still trying to connect
	Connecting...failed: connect
	Still trying to connect

until, eventually, they give up. Then, with ussp-push:

	ussp-push --dev hci:0 00:15:A8:F3:B5:DF@1 test.jpg test.jpg
	pushing file test.jpg
	name=test.jpg, size=1377
	Registered transport

	set user data

	created new objext
	Local device 00:10:60:AA:BA:53
	Remote device 00:15:A8:E3:B5:DF (1)

Here I'm asked by the phone to type in the PIN.

	connect: Connection refused
	Link broken!

	started a new request
	Error while doing OBEX_HandleInput()
	Connection return code: -1, id: 0
	Local device 00:10:60:AA:BA:53
	Remote device 00:15:A8:C3:A5:DF (1)
	connect: Connection refused
	Link broken!
	Error while doing OBEX_HandleInput()unable to connect to the
	server error

ObexFTP is version 0.10.8, ussp-push is version v0.5.

What else could I try?

Thanks,

-- 
Cris


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply

* Re: 2.6.17-rc1-mm2: badness in 3w_xxxx driver
From: Andrew Morton @ 2006-04-09 19:43 UTC (permalink / raw)
  To: Nick Orlov; +Cc: linux-kernel
In-Reply-To: <20060409191256.GA4609@nickolas.homeunix.com>

Nick Orlov <bugfixer@list.ru> wrote:
>
> Confirmed, this patch solves the "badness" problem for me.

yup, thanks.

>  I still experiencing a weird hangs though (the box just hangs, no
>  messages on console/syslog, nothing). I'll try to nail it down.
> 
>  2.6.16-mm2 works like a charm with the same config.
>  Do you know which patches should I try to revert first?

Gee, 2.6.16-mm2 was a long time ago.

Tried sysrq?

	echo 1 > /proc/sys/kernel/sysrq
	<wait for hang>
	ALT-SYSRQ-P or ALT-SYSRQ-T

Is the NMi watchdog enabled?  Boot with `nmi_watchdog=1', make sure that
the NMI counts are incrementing in /proc/interrupts.

Failing all that, testing 2.6.17-rc1 would be interesting.

^ permalink raw reply

* [PATCH] PCMCIA: make Pretec CF Wifi use hostap_cs by default
From: Marcin Juszkiewicz @ 2006-04-09 20:39 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jouni Malinen, Pavel Roskin


I use two Zaurus palmtops - one run 2.4.18 kernel (it's sl-5500) and second 
run 2.6.16. Both are running under control of OpenZaurus distribution 
(I'm Release Manager of it).

When I use pcmcia-cs then my Pretec WiFi card is handled by hostap driver
and everything is working fine. Recently I switched to pcmciautils and after
card insert orinoco modules are loaded. I prefer to use hostap modules
because they work the same under 2.4 and 2.6 kernels (with orinoco I have to
use 0.13e ones because never ones does not work under 2.4/arm).

This patch adds definition of my card to hostap_cs cardlist. It was tested on
Sharp Zaurus C760 palmtop running 2.6.16 + pcmciautils 010 + udev 084


PS - I'm not subscribed to that list - so please Cc: me on reply.

Signed-off-by: Marcin Juszkiewicz <openembedded@hrw.one.pl>

--- drivers/net/wireless/hostap/hostap_cs.c.orig
+++ drivers/net/wireless/hostap/hostap_cs.c
@@ -912,6 +912,9 @@ static struct pcmcia_device_id hostap_cs
        PCMCIA_DEVICE_PROD_ID123(
                "SMC", "SMC2632W", "Version 01.02",
                0xc4f8b18b, 0x474a1f2a, 0x4b74baa0),
+       PCMCIA_DEVICE_PROD_ID123(
+               "Pretec", "CompactWLAN Card 802.11b", "2.5",
+               0x1cadd3e5, 0xe697636c, 0x7a5bfcf1),
        PCMCIA_DEVICE_PROD_ID12("BUFFALO", "WLI-CF-S11G",
                                0x2decece3, 0x82067c18),
        PCMCIA_DEVICE_PROD_ID12("Compaq", "WL200_11Mbps_Wireless_PCI_Card",


-- 
JID: hrw-jabber.org
Palmtop: Sharp Zaurus C760
OpenEmbedded/OpenZaurus developer

Vi has two modes: the one in which it beeps, and the one in which it doesn't.

^ permalink raw reply


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.