From: Richard Weinberger <richard@nod.at>
To: "Peter Hüwe" <PeterHuewe@gmx.de>
Cc: Jean Delvare <khali@linux-fr.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] Emulate I2C subsystem/slaves
Date: Sun, 09 Sep 2012 14:23:06 +0200 [thread overview]
Message-ID: <504C8A2A.2060802@nod.at> (raw)
In-Reply-To: <201209091415.02460.PeterHuewe@gmx.de>
[-- Attachment #1: Type: text/plain, Size: 1787 bytes --]
Am 09.09.2012 14:15, schrieb Peter Hüwe:
> Am Sonntag, 9. September 2012, 13:28:38 schrieb Jean Delvare:
>> Thanks for the info. I thought UML was no longer used with all the
>> virtualization solutions available, but apparently I was wrong.
> I guess it's mainly used for sandboxing, testing and development ;)
It's mostly used where KVM does not work.
For example low end i586 servers in schools.
Using UML you can still run 10+ instances on a P3 with 512MiB ram.
>
>> My bet is that all I2C bus drivers do use I/O or memory mapped
>> operations directly or indirectly, except i2c-stub. So it would
>> probably make more sense, and be a less intrusive change, to move the
>> HAS_IOMEM dependency to drivers/i2c/busses, and move (logically or for
>> real) i2c-stub out of it.
>>
>> Or are there really other I2C bus drivers which make sense to enable
>> under UML?
> The only other available in UML which doesn't rely on HAS_IOMEM is the
> PARPORT_LIGHT which relies on direct io access - so I guess this one doesn't
> make sense either.
>
> I created a patch for your proposed solution, I moved the stub driver to the
> end in order to have only one big if HAS_IOMEM.
UML does not have IO_MEM but some sub-systems have "depend HAS_IOMEM" which is
often too coarse grained.
To deal with that I've introduced GENERIC_IO some time ago to support MTD (and nandsim)
on UML.
Maybe some parts of the I2C sub-system can also just depend on GENERIC_IO instead of
HAS_IOMEM.
An arch has GENERIC_IO=y if it supports everything defined in generic-asm/io.h which is
more than enough for most stub drivers.
Please look at this patch series:
https://lkml.org/lkml/2012/2/6/489
I'm sure it will help you in bringing I2C to UML.
Thanks,
//richard
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2012-09-09 12:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-02 20:45 [uml-devel] Emulate I2C subsystem/slaves Peter Hüwe
2012-09-03 12:52 ` Richard Weinberger
2012-09-09 1:08 ` Peter Hüwe
2012-09-09 8:13 ` Geert Uytterhoeven
2012-09-09 10:49 ` Peter Hüwe
2012-09-09 11:28 ` Jean Delvare
2012-09-09 12:15 ` Peter Hüwe
2012-09-09 12:21 ` Geert Uytterhoeven
2012-09-09 12:23 ` Richard Weinberger [this message]
2012-09-09 12:52 ` Peter Hüwe
2012-09-09 12:57 ` Richard Weinberger
2012-09-09 13:11 ` Peter Hüwe
2012-09-09 13:27 ` Richard Weinberger
2012-09-09 14:52 ` Geert Uytterhoeven
2012-09-09 15:00 ` Richard Weinberger
2012-09-09 15:48 ` Jean Delvare
2012-09-09 19:12 ` Peter Hüwe
2012-09-09 20:08 ` Richard Weinberger
2012-09-09 13:04 ` Richard Weinberger
2012-09-09 18:40 ` Jean Delvare
2012-09-09 19:17 ` Peter Hüwe
2012-09-10 7:29 ` Jean Delvare
2012-09-10 19:21 ` Peter Hüwe
2012-09-11 15:03 ` Richard Weinberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=504C8A2A.2060802@nod.at \
--to=richard@nod.at \
--cc=PeterHuewe@gmx.de \
--cc=geert@linux-m68k.org \
--cc=khali@linux-fr.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox