* [ALSA - driver 0001998]: Audigy 2 ZS Platinum's hardware AC3/DD decoder isn't supported?
From: bugtrack @ 2006-04-03 15:18 UTC (permalink / raw)
To: alsa-devel
A NOTE has been added to this issue.
======================================================================
<https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1998>
======================================================================
Reported By: pmn
Assigned To:
======================================================================
Project: ALSA - driver
Issue ID: 1998
Category: PCI - emu10k1
Reproducibility: always
Severity: feature
Priority: normal
Status: new
Distribution: Gentoo
Kernel Version: 2.6.16
======================================================================
Date Submitted: 04-03-2006 13:34 CEST
Last Modified: 04-03-2006 17:18 CEST
======================================================================
Summary: Audigy 2 ZS Platinum's hardware AC3/DD decoder isn't
supported?
Description:
If I have understood right this card should be able to decode AC3/DD by
itself when sent into SPDIF/IN...
Well Sending AC3/DD signal to card's SPDIF/IN results in crackling noise
from my 7.1 analog speakers that are connected to card. Sending PCM into
SPDIF/IN works fine, but it would be nice to get AC3 (and by that way DD
sounds) alive and kicking.
Am I doing something wrong or is it just that emu10k1 doesn't support
Audigy2ZS's hardware AC3 decoder? If so please tell me what I am
doing/have understood wrong or are there any plans to get hardware AC3
decoder to work?
======================================================================
----------------------------------------------------------------------
pzad - 04-03-06 17:18
----------------------------------------------------------------------
Are you sure Audigy 2 ZS has hardware ac3 decoder (AFAIK there is none) ?
AFAIK ac3 spdif input is not suported for now.
Issue History
Date Modified Username Field Change
======================================================================
04-03-06 13:34 pmn New Issue
04-03-06 13:34 pmn Distribution => Gentoo
04-03-06 13:34 pmn Kernel Version => 2.6.16
04-03-06 17:18 pzad Note Added: 0009100
======================================================================
-------------------------------------------------------
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: 2.6.17-rc1 compile failure
From: Jiri Slaby @ 2006-04-03 15:16 UTC (permalink / raw)
To: Horst von Brand; +Cc: Linux Kernel Mailing List, sds, jmorris, selinux
In-Reply-To: <200604030521.k335LRu4018913@laptop11.inf.utfsm.cl>
[-- Attachment #1: Type: text/plain, Size: 935 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Horst von Brand napsal(a):
> It ends with:
>
> CC security/selinux/xfrm.o
> security/selinux/xfrm.c: In function â??selinux_socket_getpeer_dgramâ??:
> security/selinux/xfrm.c:284: error: â??struct sec_pathâ?? has no member named â??xâ??
> security/selinux/xfrm.c: In function â??selinux_xfrm_sock_rcv_skbâ??:
> security/selinux/xfrm.c:317: error: â??struct sec_pathâ?? has no member named â??xâ??
> make[2]: *** [security/selinux/xfrm.o] Error 1
Could you test attached patch?
thanks,
- --
Jiri Slaby www.fi.muni.cz/~xslaby
\_.-^-._ jirislaby@gmail.com _.-^-._/
B67499670407CE62ACC8 22A032CC55C339D47A7E
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFEMTxDMsxVwznUen4RAgLCAJ9WEAU018cecP1emeMZKfCTrttVeQCgric6
g9Cq+yh5IvmVJGHqlVsIEXs=
=9MLb
-----END PGP SIGNATURE-----
[-- Attachment #2: selinux-xfrm.txt --]
[-- Type: text/plain, Size: 1317 bytes --]
SELinux-xfrm-compilation-fix
sec_path struct no longer contains sec_decap_state struct, but only
xfrm_state.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit 87b9e5f728ab1f5f805f1db9d96d569b1218b611
tree 60d080432a06f8bdddb8665a89dd825a33b2b01f
parent 9e4a4f43bab1268fc459295a673d00470d5e150d
author Jiri Slaby <ku@bellona.localdomain> Mon, 03 Apr 2006 17:11:07 +0159
committer Jiri Slaby <ku@bellona.localdomain> Mon, 03 Apr 2006 17:11:07 +0159
security/selinux/xfrm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c
index dfab6c8..abe99d8 100644
--- a/security/selinux/xfrm.c
+++ b/security/selinux/xfrm.c
@@ -281,7 +281,7 @@ u32 selinux_socket_getpeer_dgram(struct
int i;
for (i = sp->len-1; i >= 0; i--) {
- struct xfrm_state *x = sp->x[i].xvec;
+ struct xfrm_state *x = sp->xvec[i];
if (selinux_authorizable_xfrm(x)) {
struct xfrm_sec_ctx *ctx = x->security;
return ctx->ctx_sid;
@@ -314,7 +314,7 @@ int selinux_xfrm_sock_rcv_skb(u32 isec_s
* Only need to verify the existence of an authorizable sp.
*/
for (i = 0; i < sp->len; i++) {
- struct xfrm_state *x = sp->x[i].xvec;
+ struct xfrm_state *x = sp->xvec[i];
if (x && selinux_authorizable_xfrm(x))
goto accept;
^ permalink raw reply related
* Re: Cygwin can't handle huge packfiles?
From: Johannes Schindelin @ 2006-04-03 15:12 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Kees-Jan Dijkzeul, git
In-Reply-To: <Pine.LNX.4.64.0604030730040.3781@g5.osdl.org>
Hi,
On Mon, 3 Apr 2006, Linus Torvalds wrote:
> On Mon, 3 Apr 2006, Johannes Schindelin wrote:
> >
> > The problem is not mmap() on cygwin, but that a fork() has to jump through
> > loops to reinstall the open file descriptors on cygwin. If the
> > corresponding file was deleted, that fails. Therefore, we work around that
> > on cygwin by actually reading the file into memory, *not* mmap()ing it.
>
> Well, we could actually do a _real_ mmap on pack-files. The pack-files are
> much better mmap'ed - there we don't _want_ them to be removed while we're
> using them. It was the index file etc that was problematic.
>
> Maybe the cygwin fake mmap should be triggered only for the index (and
> possibly the individual objects - if only because there doing a
> malloc+read may actually be faster).
I hit the problem *only* with "git-whatchanged -p". Which means that the
upcoming we-no-longer-write-temp-files-for-diff version should make that
gitfakemmap() hack obsolete. (I have not checked whether there are other
places where a file is mmap()ed and then used by a fork()ed process.)
Ciao,
Dscho
^ permalink raw reply
* [U-Boot-Users] [PATCH] SPI relocation fix
From: David Ho @ 2006-04-03 15:09 UTC (permalink / raw)
To: u-boot
In-Reply-To: <442DA4AD.9080709@paulidav.org>
Hi Vladimir,
> Do you happen to have any other 8xx CPUs to test with?
I had an EP860 board to play with before I moved on to our custom
MPC852T. However after a few server changes I have lost my u-boot
port to the board.
I wouldn't mind giving a go on my EP860 if someone has a u-boot port
handy for that.
Thanks, David
^ permalink raw reply
* Re:IO error on DM device
From: Murthy, Narasimha Doraswamy (STSD) @ 2006-04-03 15:05 UTC (permalink / raw)
To: device-mapper development
[-- Attachment #1.1: Type: text/plain, Size: 1725 bytes --]
My comments are below.
-----Original Message-----
From: dm-devel-bounces@redhat.com [mailto:dm-devel-bounces@redhat.com]
On Behalf Of Mike Christie
Sent: Thursday, March 30, 2006 2:45 PM
To: device-mapper development
Cc: Ryan O'Hara
Subject: Re: Fwd: [dm-devel] IO error on DM device
Jonathan E Brassow wrote:
>
> Another observation is that we are not seeing any IO errors when
the
> same test is executed on SLES9 SP3/SP4.
>
[Murthy] our other team has seen the error on SLES9 too. The Qlogic
driver is same as RHEL ones, so we have to see similar behaviour.
I think Ryan's post is correct, but I wonder why the SLES9 is not
returning errors. Was the SLES statement referring to the scsi errors
you see in the log like this:
Feb 1 11:47:45 apwtest52 kernel: SCSI error : <3 0 0 1> return
code
= 0x20000
or the dm-multipath and block layer messages
Feb 1 11:48:40 apwtest52 kernel: device-mapper: dm-multipath:
Failing path 8:32.
Feb 1 11:48:40 apwtest52 kernel: Buffer I/O error on device dm-0,
logical block 116940 u
or both?
Do you have the same dm-multipath settings (queue if no path, etc)?
[Murthy] yes
Is this is the qlogic qla2xxx driver? [Murthy] yes
Are there qlogic guys on the list that would know if there are any
differences between the SLES and RHEL drivers or are we going to have to
dig in there? Are there differences between the SLES and RHEL dm
multipath drivers? Does this occur with the upstream kernel?
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
[-- Attachment #1.2: Type: text/html, Size: 11497 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply
* Re: [PATCH] crypto: fix unaligned access in khazad module
From: Atsushi Nemoto @ 2006-04-03 15:05 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-crypto, herbert, akpm
In-Reply-To: <20060309.122638.07642914.nemoto@toshiba-tops.co.jp>
Ping. This patch can be applied cleanly to 2.6.17-rc1.
On 64-bit platform, reading directly from keys (which supposed to be
32-bit aligned) will result in unaligned access.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
diff --git a/crypto/khazad.c b/crypto/khazad.c
index 807f2bf..c7e1d25 100644
--- a/crypto/khazad.c
+++ b/crypto/khazad.c
@@ -26,6 +26,7 @@
#include <asm/scatterlist.h>
#include <linux/crypto.h>
#include <linux/types.h>
+#include <asm/unaligned.h>
#define KHAZAD_KEY_SIZE 16
#define KHAZAD_BLOCK_SIZE 8
@@ -769,8 +770,8 @@ static int khazad_setkey(void *ctx_arg,
return -EINVAL;
}
- K2 = be64_to_cpu(key[0]);
- K1 = be64_to_cpu(key[1]);
+ K2 = be64_to_cpu(get_unaligned(&key[0]));
+ K1 = be64_to_cpu(get_unaligned(&key[1]));
/* setup the encrypt key */
for (r = 0; r <= KHAZAD_ROUNDS; r++) {
^ permalink raw reply related
* Daily Xen-HVM Builds: cs9514
From: Rick Gonzalez @ 2006-04-03 15:04 UTC (permalink / raw)
To: Xen Developers
changeset: 9514:4ad317429111
tag: tip
user: kaf24@firebug.cl.cam.ac.uk
date: Sun Apr 2 10:16:53 2006 +0100
summary: Make checksum handling in the virtual network drivers more
robust.
Hardware: x460
******************** x86_32(no PAE): ***************************
* dom0: SLES9 SP2
* dom0 boots fine
* xend starts without problem
--- Linux HVM domain status: ---
* Xm-test completes.
* Able to boot multiple HVM domains
ISSUES:
* 4 fails on xm-test
SUMMARY:
Xm-test execution summary:
PASS: 71
FAIL: 4
XPASS: 2
XFAIL: 1
Details:
FAIL: 11_create_concurrent_pos
[2] Failed to create domain
FAIL: 12_create_concurrent_stress_pos
Failed to start 12_create_concurrent_stress_pos-1144034163
FAIL: 01_enforce_dom0_cpus_basic_pos
/proc/cpuinfo says xend didn't enforce dom0_cpus (6 != 1)
XFAIL: 02_network_local_ping_pos
ping loopback failed for size 65507. ping eth0 failed for size
65507.
--- Windows HVM domain status: ---
* I'll get to testing the other Windowns OS when I automate the test cases.
+------------------------------------+
| Test | OS |
| Category |-----------------------|
| | Win2k| Win2k3 | WinXP |
+------------------------------------+
| Networking | | | pass |
| Graphics | | | pass |
| Disk I/O | | | pass |
| Xen | | | N/A |
+------------------------------------+
ISSUES:
None
********************** x86_64: *********************************
* dom0: SLES9 SP2
* dom0 boots fine
* xend starts without problems
--- Linux HVM domain status: ---
* Xm-test completes
* Able to boot multiple HVM domains
ISSUES:
* 5 xm-tests failing
SUMMERY:
Xm-test execution summary:
PASS: 71
FAIL: 4
XPASS: 2
XFAIL: 1
Details:
FAIL: 11_create_concurrent_pos
[2] Failed to create domain
FAIL: 12_create_concurrent_stress_pos
Failed to start 12_create_concurrent_stress_pos-1144049724
FAIL: 01_enforce_dom0_cpus_basic_pos
/proc/cpuinfo says xend didn't enforce dom0_cpus (7 != 1)
XFAIL: 02_network_local_ping_pos
ping loopback failed for size 65507. ping eth0 failed for size
65507.
vmxdom2:/usr/xen/xen-unstable.hg/tools/xm-test # uname -a
Linux vmxdom2 2.6.16-xen #1 SMP Mon Apr 3 01:59:02 CDT 2006 x86_64
x86_64 x86_64 GNU/Linux
--- Windows HVM domain status: ---
+------------------------------------+
| Test | OS |
| Category |-----------------------|
| | Win2k| Win2k3 | WinXP |
+------------------------------------+
| Networking | | | pass |
| Graphics | | | pass |
| Disk I/O | | | pass |
| Xen | | | N/A |
+------------------------------------+
ISSUES:
none
NOTE: Contact me if you would like to see all the output files.
regards,
------------------------
Rick Gonzalez
Linux Technology Center
IBM Corporation
Phone#: 512-838-0623
^ permalink raw reply
* Re: [PATCH] crypto: add alignment handling to digest layer
From: Atsushi Nemoto @ 2006-04-03 15:04 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-crypto, herbert, akpm
In-Reply-To: <20060309.123608.08076793.nemoto@toshiba-tops.co.jp>
Ping. This patch can be applied cleanly to 2.6.17-rc1.
Some hash modules load/store data words directly. The digest layer
should pass properly aligned buffer to update()/final() method. This
patch also add cra_alignmask to some hash modules.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
digest.c | 42 +++++++++++++++++++++++++++---------------
michael_mic.c | 1 +
sha1.c | 1 +
sha256.c | 1 +
sha512.c | 2 ++
tgr192.c | 3 +++
6 files changed, 35 insertions(+), 15 deletions(-)
diff --git a/crypto/digest.c b/crypto/digest.c
index d9b6ac9..062d0a5 100644
--- a/crypto/digest.c
+++ b/crypto/digest.c
@@ -27,6 +27,7 @@ static void update(struct crypto_tfm *tf
struct scatterlist *sg, unsigned int nsg)
{
unsigned int i;
+ unsigned int alignmask = crypto_tfm_alg_alignmask(tfm);
for (i = 0; i < nsg; i++) {
@@ -38,12 +39,24 @@ static void update(struct crypto_tfm *tf
unsigned int bytes_from_page = min(l, ((unsigned int)
(PAGE_SIZE)) -
offset);
- char *p = crypto_kmap(pg, 0) + offset;
+ char *src = crypto_kmap(pg, 0);
+ char *p = src + offset;
+ if (unlikely(offset & alignmask)) {
+ unsigned int bytes =
+ alignmask + 1 - (offset & alignmask);
+ bytes = min(bytes, bytes_from_page);
+ tfm->__crt_alg->cra_digest.dia_update
+ (crypto_tfm_ctx(tfm), p,
+ bytes);
+ p += bytes;
+ bytes_from_page -= bytes;
+ l -= bytes;
+ }
tfm->__crt_alg->cra_digest.dia_update
(crypto_tfm_ctx(tfm), p,
bytes_from_page);
- crypto_kunmap(p, 0);
+ crypto_kunmap(src, 0);
crypto_yield(tfm);
offset = 0;
pg++;
@@ -54,7 +67,15 @@ static void update(struct crypto_tfm *tf
static void final(struct crypto_tfm *tfm, u8 *out)
{
- tfm->__crt_alg->cra_digest.dia_final(crypto_tfm_ctx(tfm), out);
+ unsigned long alignmask = crypto_tfm_alg_alignmask(tfm);
+ if (unlikely((unsigned long)out & alignmask)) {
+ unsigned int size = crypto_tfm_alg_digestsize(tfm);
+ u8 buffer[size + alignmask];
+ u8 *dst = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1);
+ tfm->__crt_alg->cra_digest.dia_final(crypto_tfm_ctx(tfm), dst);
+ memcpy(out, dst, size);
+ } else
+ tfm->__crt_alg->cra_digest.dia_final(crypto_tfm_ctx(tfm), out);
}
static int setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen)
@@ -69,18 +90,9 @@ static int setkey(struct crypto_tfm *tfm
static void digest(struct crypto_tfm *tfm,
struct scatterlist *sg, unsigned int nsg, u8 *out)
{
- unsigned int i;
-
- tfm->crt_digest.dit_init(tfm);
-
- for (i = 0; i < nsg; i++) {
- char *p = crypto_kmap(sg[i].page, 0) + sg[i].offset;
- tfm->__crt_alg->cra_digest.dia_update(crypto_tfm_ctx(tfm),
- p, sg[i].length);
- crypto_kunmap(p, 0);
- crypto_yield(tfm);
- }
- crypto_digest_final(tfm, out);
+ init(tfm);
+ update(tfm, sg, nsg);
+ final(tfm, out);
}
int crypto_init_digest_flags(struct crypto_tfm *tfm, u32 flags)
diff --git a/crypto/michael_mic.c b/crypto/michael_mic.c
index 4f6ab23..701f859 100644
--- a/crypto/michael_mic.c
+++ b/crypto/michael_mic.c
@@ -145,6 +145,7 @@ static struct crypto_alg michael_mic_alg
.cra_blocksize = 8,
.cra_ctxsize = sizeof(struct michael_mic_ctx),
.cra_module = THIS_MODULE,
+ .cra_alignmask = 3,
.cra_list = LIST_HEAD_INIT(michael_mic_alg.cra_list),
.cra_u = { .digest = {
.dia_digestsize = 8,
diff --git a/crypto/sha1.c b/crypto/sha1.c
index 21571ed..b96f57d 100644
--- a/crypto/sha1.c
+++ b/crypto/sha1.c
@@ -112,6 +112,7 @@ static struct crypto_alg alg = {
.cra_blocksize = SHA1_HMAC_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct sha1_ctx),
.cra_module = THIS_MODULE,
+ .cra_alignmask = 3,
.cra_list = LIST_HEAD_INIT(alg.cra_list),
.cra_u = { .digest = {
.dia_digestsize = SHA1_DIGEST_SIZE,
diff --git a/crypto/sha256.c b/crypto/sha256.c
index 9d5ef67..d62264a 100644
--- a/crypto/sha256.c
+++ b/crypto/sha256.c
@@ -313,6 +313,7 @@ static struct crypto_alg alg = {
.cra_blocksize = SHA256_HMAC_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct sha256_ctx),
.cra_module = THIS_MODULE,
+ .cra_alignmask = 3,
.cra_list = LIST_HEAD_INIT(alg.cra_list),
.cra_u = { .digest = {
.dia_digestsize = SHA256_DIGEST_SIZE,
diff --git a/crypto/sha512.c b/crypto/sha512.c
index 3e6e939..7dbec4f 100644
--- a/crypto/sha512.c
+++ b/crypto/sha512.c
@@ -281,6 +281,7 @@ static struct crypto_alg sha512 = {
.cra_blocksize = SHA512_HMAC_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct sha512_ctx),
.cra_module = THIS_MODULE,
+ .cra_alignmask = 3,
.cra_list = LIST_HEAD_INIT(sha512.cra_list),
.cra_u = { .digest = {
.dia_digestsize = SHA512_DIGEST_SIZE,
@@ -295,6 +296,7 @@ static struct crypto_alg sha384 = {
.cra_flags = CRYPTO_ALG_TYPE_DIGEST,
.cra_blocksize = SHA384_HMAC_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct sha512_ctx),
+ .cra_alignmask = 3,
.cra_module = THIS_MODULE,
.cra_list = LIST_HEAD_INIT(sha384.cra_list),
.cra_u = { .digest = {
diff --git a/crypto/tgr192.c b/crypto/tgr192.c
index 2d8e44f..1eae1bb 100644
--- a/crypto/tgr192.c
+++ b/crypto/tgr192.c
@@ -627,6 +627,7 @@ static struct crypto_alg tgr192 = {
.cra_blocksize = TGR192_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct tgr192_ctx),
.cra_module = THIS_MODULE,
+ .cra_alignmask = 7,
.cra_list = LIST_HEAD_INIT(tgr192.cra_list),
.cra_u = {.digest = {
.dia_digestsize = TGR192_DIGEST_SIZE,
@@ -641,6 +642,7 @@ static struct crypto_alg tgr160 = {
.cra_blocksize = TGR192_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct tgr192_ctx),
.cra_module = THIS_MODULE,
+ .cra_alignmask = 7,
.cra_list = LIST_HEAD_INIT(tgr160.cra_list),
.cra_u = {.digest = {
.dia_digestsize = TGR160_DIGEST_SIZE,
@@ -655,6 +657,7 @@ static struct crypto_alg tgr128 = {
.cra_blocksize = TGR192_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct tgr192_ctx),
.cra_module = THIS_MODULE,
+ .cra_alignmask = 7,
.cra_list = LIST_HEAD_INIT(tgr128.cra_list),
.cra_u = {.digest = {
.dia_digestsize = TGR128_DIGEST_SIZE,
^ permalink raw reply related
* [Bluez-devel] Headsets that support sniff mode?
From: Ulisses Furquim @ 2006-04-03 14:56 UTC (permalink / raw)
To: bluez-devel
Hi,
I'm looking for headsets that support sniff mode. Are there any
devices that you could recommend to me?
Best regards,
-- Ulisses
-------------------------------------------------------
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-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply
* Hot Stock Information
From: Porfirio Hamm @ 2006-04-03 14:53 UTC (permalink / raw)
To: alsa-announce, alsa-cvslog, alsa-devel, alsa-devel-request,
alsa-user
Vol. IV, Issue II 04/02/2006
This tightly held company has rocketed up in price on every
great news release. More spectacular news expected this week.
All our members should get in on this one early before it blows up.
Co: Ever-Glory International Group Inc.
Sym:(egly)
Currently Trading at: $1.25
Target_Price: $4.5O
A Massive PR Campaign is Underway and is set to EXPLODE Monday,
and ALL Next Week!!
* GET IN EARLY FOR THE MOST GAINS *
2005 gross Profits: $2.1mil UP +19.43% from previous year!!
Ever-Glory International Group is an American public company located in
China engaged in international business and garment manufacturing mainly
for middle-to-high grade well-known casual wear, outwear and sportswear
brands such as Reebok, North Face, Levi's and more.
It has a wholly-owned subsidiary company in mainIand China-Nanjing
Goldenway GarmentCompany, Ltd.
The company has over 700 team members, total assets near US$7.5M, and
annual revenue of approx US$11m.
GREAT NEWS EXPECTED TO CONTINUE PUSHING THIS ONE UP:
The company's 10-k report was released today. Among the company highlights
are an increase of approximately 36% in total net sales in 2005 compared to
that of 2004. Moreover, acquisition of an additional manufacturing facility
has been negotiated and will be completed in 2006.
This is the first release in a series of good reports. It's already up 20%
today and we are expecting more big gains this week and next.
Watch this one go Higher and Higher ALL WEEK!!!
^ permalink raw reply
* [U-Boot-Users] Run Time Changes in bdinfo
From: Wolfgang Denk @ 2006-04-03 14:53 UTC (permalink / raw)
To: u-boot
In-Reply-To: <21c86c970604030652m785bd092y534ded8cce91ce28@mail.gmail.com>
In message <21c86c970604030652m785bd092y534ded8cce91ce28@mail.gmail.com> you wrote:
> I am using U-boot loader 1.1.4 with ARM Integrator/CP. I ported my
> u-boot loaders and kernel in Flash and while running i didnt get any
> warning information for default environment. I could ensure that board
> has not been loaded with default settings. However while displaying
> __bdinfo__ i am getting bad instructions. I could see my settings are
> crashed. I could see the value of ARCH only has crashed.
I don't understand. What exactly is happening? Does "getting bad
instructions" mean that U-Boot crashed with an illegal instruction
exception?
What does "the value of ARCH only has crashed" mean? Do you want to
tell us that the content of bi_arch_number is wrong? In which way is
it wrong? What does "crashed" mean? Do yoiu have reasons to assume
that there was a correct value stored in this variable, and it
suddenly changed the content?
> Is bdinfo using Hex value for Arch and Params?
Oops? Please look up the structure definition. These are plain binary
data (unsigned long).
> How to change the ARCH and params in Run Time?
You don't. The code is supposed to set up the values correctly.
> While I am trying to copy my flash data into __0x7fc0__ entry always I
Please define what "my flash data" means, and how exactly you are
trying to copy it, and why you think that 0x7fc0 would be a good
address to copy to.
> am getting bad magic number and when I came to display my entry using
> __md__ no data has been copied into memory in __0x7fc0__. Where will
> be the problem?
The main problem is with your way to report the problem - you don't
provide any clear information (like logs of the actual error
messages), and your description is a bit vague.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If a packet hits a pocket on a socket on a port,
And the bus is interrupted as a very last resort,
And the address of the memory makes your floppy disk abort,
Then the socket packet pocket has an error to report! - Ken Burchill?
^ permalink raw reply
* Re: [patch] do_no_pfn handler
From: Jes Sorensen @ 2006-04-03 14:49 UTC (permalink / raw)
To: Nick Piggin
Cc: Linus Torvalds, Andrew Morton, linux-kernel, Hugh Dickins,
bjorn_helgaas, cotte
In-Reply-To: <44310B0C.3070203@yahoo.com.au>
Nick Piggin wrote:
> Should you recheck to make sure nobody else faulted this in
> before it was relocked? Doesn't seem to matter in this case,
> but it would be more consistent with the other fault handlers.
>
I'm fine either way. It didn't matter to the case I need it for, but
if you think it would make more sense I am fine with that.
Cheers,
Jes
^ permalink raw reply
* [PATCH] arch/x86_64/kernel/process.c do_arch_prctl() ARCH_GET_GS
From: John Blackwood @ 2006-04-03 14:48 UTC (permalink / raw)
To: linux-kernel; +Cc: ak, bugsy
Hi Andi,
In linux-2.6.16, we have noticed a problem where the gs base value
returned from an arch_prtcl(ARCH_GET_GS, ...) call will be incorrect if:
- the current/calling task has NOT set its own gs base yet to a
non-zero value,
- some other task that ran on the same processor previously set their
own gs base to a non-zero value.
In this situation, the ARCH_GET_GS code will read and return the
MSR_KERNEL_GS_BASE msr register.
However, since the __switch_to() code does NOT load/zero the
MSR_KERNEL_GS_BASE register when the task that is switched IN has a zero
next->gs value, the caller of arch_prctl(ARCH_GET_GS, ...) will get back
the value of some previous tasks's gs base value instead of 0.
I guess that there might be two approaches to fixing this problem:
1. Change the arch_prctl() ARCH_GET_GS code to only read and return
the MSR_KERNEL_GS_BASE msr register if the 'gs' register of the calling
task is non-zero.
Side note: Since in addition to using arch_prctl(ARCH_SET_GS, ...),
a task can also setup a gs base value by using modify_ldt() and write
an index value into 'gs' from user space, the patch below reads
'gs' instead of using thread.gs, since in the modify_ldt() case,
the thread.gs value will be 0, and incorrect value would be returned
(the task->thread.gs value).
When the user has not set its own gs base value and the 'gs'
register is zero, then the MSR_KERNEL_GS_BASE register will not be
read and a value of zero will be returned by reading and returning
'task->thread.gs'.
The first patch shown below is an attempt at implementing this
approach.
2. The second approach would would be to the __switch_to() code, and while
it keeps another task's gs base value from lying around in the
MSR_KERNEL_GS_BASE msr register after that task has been switched out,
it does add overhead to __switch_to() when ever the current and/or
next task has a non-zero gs value.
In this case, always write the next tasks's next-gs value to the
MSR_KERNEL_GS_BASE msr register when the previous and/or next task has
a non-zero gsindex or (prev) gs value. Thus, the zero gs base value
will be written into this msr register when ever transitioning from
a non-zero gs base value to a zero gs base value.
This approach is shown below in the 2nd patch.
Maybe one of these approaches could be used as a fix.
I have tested both approaches with tasks that have a 0 gs base value
along with tasks that have set their gs base value with 32 and 64 bit
values via the arch_prctl() ARCH_GET_GS interface, and also with the
modify_ldt()/set gs interface.
Thank you for you time and considerations.
============== Approach 1 =================
diff -up linux-2.6.16/arch/x86_64/kernel/process.c
new/arch/x86_64/kernel/process.c
--- linux-2.6.16/arch/x86_64/kernel/process.c 2006-03-20
00:53:29.000000000 -0500
+++ new/arch/x86_64/kernel/process.c 2006-04-03 09:27:09.000000000 -0400
@@ -794,10 +794,16 @@ long do_arch_prctl(struct task_struct *t
}
case ARCH_GET_GS: {
unsigned long base;
+ unsigned gsindex;
if (task->thread.gsindex == GS_TLS_SEL)
base = read_32bit_tls(task, GS_TLS);
- else if (doit)
- rdmsrl(MSR_KERNEL_GS_BASE, base);
+ else if (doit) {
+ asm("movl %%gs,%0" : "=r" (gsindex));
+ if (gsindex)
+ rdmsrl(MSR_KERNEL_GS_BASE, base);
+ else
+ base = task->thread.gs;
+ }
else
base = task->thread.gs;
ret = put_user(base, (unsigned long __user *)addr);
============== Approach 2 =================
diff -up linux-2.6.16/arch/x86_64/kernel/process.c
new/arch/x86_64/kernel/process.c
--- linux-2.6.16/arch/x86_64/kernel/process.c 2006-04-03
09:29:30.000000000 -0400
+++ new/arch/x86_64/kernel/process.c 2006-04-03 09:35:51.000000000 -0400
@@ -579,8 +579,9 @@ __switch_to(struct task_struct *prev_p,
load_gs_index(next->gsindex);
if (gsindex)
prev->gs = 0;
+ wrmsrl(MSR_KERNEL_GS_BASE, next->gs);
}
- if (next->gs)
+ else if (next->gs)
wrmsrl(MSR_KERNEL_GS_BASE, next->gs);
prev->gsindex = gsindex;
}
^ permalink raw reply
* 2.6.17-rc1 compile failure
From: Horst von Brand @ 2006-04-03 5:21 UTC (permalink / raw)
To: Linux Kernel Mailing List
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 697 bytes --]
It ends with:
CC security/selinux/xfrm.o
security/selinux/xfrm.c: In function ‘selinux_socket_getpeer_dgram’:
security/selinux/xfrm.c:284: error: ‘struct sec_path’ has no member named ‘x’
security/selinux/xfrm.c: In function ‘selinux_xfrm_sock_rcv_skb’:
security/selinux/xfrm.c:317: error: ‘struct sec_path’ has no member named ‘x’
make[2]: *** [security/selinux/xfrm.o] Error 1
--
Dr. Horst H. von Brand User #22616 counter.li.org
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria +56 32 654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
^ permalink raw reply
* Re: [patch] do_no_pfn handler
From: Nick Piggin @ 2006-04-03 11:46 UTC (permalink / raw)
To: Jes Sorensen
Cc: Linus Torvalds, Andrew Morton, linux-kernel, Hugh Dickins,
bjorn_helgaas, cotte
In-Reply-To: <yq0k6a6uc7i.fsf@jaguar.mkp.net>
Jes Sorensen wrote:
> +static int do_no_pfn(struct mm_struct *mm, struct vm_area_struct *vma,
> + unsigned long address, pte_t *page_table, pmd_t *pmd,
> + int write_access)
> +{
> + spinlock_t *ptl;
> + pte_t entry;
> + long pfn;
> + int ret = VM_FAULT_MINOR;
> +
> + pte_unmap(page_table);
> + BUG_ON(!(vma->vm_flags & VM_PFNMAP));
> +
> + pfn = vma->vm_ops->nopfn(vma, address & PAGE_MASK, &ret);
> + if (pfn == -ENOMEM)
> + return VM_FAULT_OOM;
> + if (pfn == -EFAULT)
> + return VM_FAULT_SIGBUS;
> + if (pfn < 0)
> + return VM_FAULT_SIGBUS;
> +
> + page_table = pte_offset_map_lock(mm, pmd, address, &ptl);
> +
> + entry = pfn_pte(pfn, vma->vm_page_prot);
> + if (write_access)
> + entry = maybe_mkwrite(pte_mkdirty(entry), vma);
> + set_pte_at(mm, address, page_table, entry);
> +
Should you recheck to make sure nobody else faulted this in
before it was relocked? Doesn't seem to matter in this case,
but it would be more consistent with the other fault handlers.
--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com
^ permalink raw reply
* Patch for AICA sound support on SEGA Dreamcast
From: Adrian McMenamin @ 2006-04-03 14:45 UTC (permalink / raw)
To: Alsa-devel; +Cc: linux-sh, Paul Mundt, Takashi Iwai, LKML
[-- Attachment #1: Type: text/plain, Size: 171 bytes --]
This provides ALSA sound for the Sega Dreamcast. Seems to work well for
me, but there is a dearth of testers.
Signed off by Adrian McMenamin (adrian@mcmen.demon.co.uk)
[-- Attachment #2: aica.patch --]
[-- Type: text/x-patch, Size: 22826 bytes --]
diff -ruN /home/adrian/alsa-old/alsa-driver/sh/aica.h /home/adrian/alsa-driver/sh/aica.h
--- /home/adrian/alsa-old/alsa-driver/sh/aica.h 1970-01-01 01:00:00.000000000 +0100
+++ /home/adrian/alsa-driver/sh/aica.h 2006-04-03 15:40:07.000000000 +0100
@@ -0,0 +1,79 @@
+/* aica.h
+ * Header file for ALSA driver for
+ * Sega Dreamcast Yamaha AICA sound
+ * Copyright Adrian McMenamin
+ * <adrian@mcmen.demon.co.uk>
+ * 2006
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+/* SPU memory and register constants etc */
+#define G2_FIFO 0xa05f688c
+#define SPU_MEMORY_BASE 0xA0800000
+#define ARM_RESET_REGISTER 0xA0702C00
+#define SPU_REGISTER_BASE 0xA0700000
+
+
+
+/* AICA channels stuff */
+
+#define AICA_CONTROL_POINT 0xA0810000
+#define AICA_CONTROL_CHANNEL_SAMPLE_NUMBER 0xA0810008
+#define AICA_CHANNEL0_CONTROL_OFFSET 0x10004
+
+/* Command values */
+#define AICA_CMD_KICK 0x80000000
+#define AICA_CMD_NONE 0
+#define AICA_CMD_START 1
+#define AICA_CMD_STOP 2
+#define AICA_CMD_VOL 3
+
+/* Sound modes */
+#define SM_8BIT 1
+#define SM_16BIT 0
+#define SM_ADPCM 2
+
+/* Buffer and period size */
+#define AICA_BUFFER_SIZE 0x8000
+#define AICA_PERIOD_SIZE 0x800
+#define AICA_PERIOD_NUMBER 16
+
+#define AICA_CHANNEL0_OFFSET 0x11000
+#define AICA_CHANNEL1_OFFSET 0x21000
+
+
+typedef struct {
+ snd_card_t *card;
+ snd_pcm_substream_t *substream;
+ int clicks;
+ int current_period;
+ struct timer_list timer;
+ int master_volume;
+
+} snd_card_aica_t;
+
+
+
+typedef struct aica_channel {
+ uint32_t cmd; /* Command ID */
+ uint32_t pos; /* Sample position */
+ uint32_t length; /* Sample length */
+ uint32_t freq; /* Frequency */
+ uint32_t vol; /* Volume 0-255 */
+ uint32_t pan; /* Pan 0-255 */
+ uint32_t sfmt; /* Sound format */
+ uint32_t flags; /* Bit flags */
+} aica_channel_t;
diff -ruN /home/adrian/alsa-old/alsa-driver/sh/Kconfig /home/adrian/alsa-driver/sh/Kconfig
--- /home/adrian/alsa-old/alsa-driver/sh/Kconfig 1970-01-01 01:00:00.000000000 +0100
+++ /home/adrian/alsa-driver/sh/Kconfig 2006-04-03 15:40:12.000000000 +0100
@@ -0,0 +1,16 @@
+menu "SH (Super-H) devices"
+ depends on SND!=n && SUPERH
+
+config SND_AICA
+ tristate "Yamaha AICA sound for SEGA Dreamcast"
+ depends on SND
+ depends on SH_DREAMCAST
+ select SND_PCM
+ help
+ Say Y here to include support for sound on your SEGA Dreamcast
+
+ To compile this driver as a module, choose M here: the module
+ will be called snd-aica.
+
+endmenu
+
diff -ruN /home/adrian/alsa-old/alsa-driver/sh/Makefile /home/adrian/alsa-driver/sh/Makefile
--- /home/adrian/alsa-old/alsa-driver/sh/Makefile 1970-01-01 01:00:00.000000000 +0100
+++ /home/adrian/alsa-driver/sh/Makefile 2006-04-03 15:40:16.000000000 +0100
@@ -0,0 +1,2 @@
+ snd-aica-objs := aica.o
+ obj-$(CONFIG_SND_AICA) += snd-aica.o
diff -ruN /home/adrian/alsa-old/alsa-driver/sh/snd_aica.c /home/adrian/alsa-driver/sh/snd_aica.c
--- /home/adrian/alsa-old/alsa-driver/sh/snd_aica.c 1970-01-01 01:00:00.000000000 +0100
+++ /home/adrian/alsa-driver/sh/snd_aica.c 2006-04-03 15:40:20.000000000 +0100
@@ -0,0 +1,802 @@
+/*
+* This code is licenced under
+* the General Public Licence
+* version 2
+*
+* Copyright Adrian McMenamin 2005, 2006
+* <adrian@mcmen.demon.co.uk>
+* See also http://newgolddream.dyndns.info/cgi-bin/cvsweb
+*
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of version 2 of the GNU General Public License as published by
+* the Free Software Foundation.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*
+*/
+
+
+#include <linux/init.h>
+#include <linux/jiffies.h>
+#include <linux/slab.h>
+#include <linux/time.h>
+#include <linux/wait.h>
+#include <linux/moduleparam.h>
+#include <linux/platform_device.h>
+#include <linux/firmware.h>
+#include <linux/timer.h>
+#include <linux/delay.h>
+#include <asm-sh/io.h>
+#include <asm-sh/dma.h>
+#include <asm-sh/dreamcast/sysasic.h>
+#include <sound/driver.h>
+#include <sound/core.h>
+#include <sound/control.h>
+#include <sound/pcm.h>
+#include <sound/initval.h>
+#include <sound/info.h>
+#include "aica.h"
+
+
+MODULE_AUTHOR("Adrian McMenamin <adrian@mcmen.demon.co.uk>");
+MODULE_DESCRIPTION("Dreamcast AICA sound (pcm) driver");
+MODULE_LICENSE("GPL");
+MODULE_SUPPORTED_DEVICE("{{Yamaha/SEGA, AICA}}");
+
+/* module parameters */
+#define CARD_NAME "AICA"
+
+static int index = 0;
+static char *id = "0";
+static int enable= 1;
+
+module_param(index, int, 0444);
+MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard.");
+module_param(id, charp, 0444);
+MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard.");
+module_param(enable, bool, 0644);
+MODULE_PARM_DESC(enable, "Enable " CARD_NAME " soundcard.");
+
+
+/* SPU specific functions */
+
+inline void spu_write_wait()
+{
+ while (1) {
+ if (!(readl(G2_FIFO) & 0x11))
+ break;
+ }
+
+ return;
+}
+
+
+
+static void spu_memset(uint32_t toi, unsigned long what, int length)
+{
+ uint32_t *to = (uint32_t *) (SPU_MEMORY_BASE + toi);
+ int i;
+
+ if (length % 4)
+ length = (length / 4) + 1;
+ else
+ length = length / 4;
+ spu_write_wait();
+ for (i = 0; i < length; i++) {
+ writel(what, to);
+ to++;
+ if (i && !(i % 8))
+ spu_write_wait();
+ }
+ return;
+}
+
+static void spu_memload(uint32_t toi, uint8_t * from, int length)
+{
+ uint32_t *froml = (uint32_t *) from;
+ uint32_t *to = (uint32_t *) (SPU_MEMORY_BASE + toi);
+ int i, val;
+ if (length % 4)
+ length = (length / 4) + 1;
+ else
+ length = length / 4;
+ spu_write_wait();
+ for (i = 0; i < length; i++) {
+ val = *froml;
+ writel(val, to);
+ froml++;
+ to++;
+ if (i && !(i % 8))
+ spu_write_wait();
+ }
+ return;
+
+}
+
+static void spu_disable()
+{
+ int i;
+ uint32_t regval;
+ spu_write_wait();
+ regval = readl(ARM_RESET_REGISTER);
+ regval |= 1;
+ spu_write_wait();
+ writel(regval, ARM_RESET_REGISTER);
+ for (i = 0; i < 64; i++) {
+ spu_write_wait();
+ regval = readl(SPU_REGISTER_BASE + (i * 0x80));
+ regval = (regval & ~0x4000) | 0x8000;
+ spu_write_wait();
+ writel(regval, SPU_REGISTER_BASE + (i * 0x80));
+
+ }
+
+}
+
+
+static void spu_enable()
+{
+ uint32_t regval = readl(ARM_RESET_REGISTER);
+ regval &= ~1;
+ spu_write_wait();
+ writel(regval, ARM_RESET_REGISTER);
+ return;
+
+}
+
+
+/* Halt the sound processor,
+ clear the memory,
+ load some default ARM7 code,
+ and then restart ARM7
+*/
+static int spu_init()
+{
+
+ spu_disable();
+ spu_memset(0, 0, 0x200000 / 4);
+ *(uint32_t *) SPU_MEMORY_BASE = 0xea000002;
+ spu_enable();
+ schedule();
+ return 0;
+}
+
+
+
+static aica_channel_t *channel;
+
+inline static void aica_chn_start()
+{
+ spu_write_wait();
+ writel(AICA_CMD_KICK | AICA_CMD_START,
+ (uint32_t *) AICA_CONTROL_POINT);
+
+}
+
+inline static void aica_chn_halt()
+{
+ spu_write_wait();
+ writel(AICA_CMD_KICK | AICA_CMD_STOP,
+ (uint32_t *) AICA_CONTROL_POINT);
+
+}
+
+
+/* ALSA code below */
+
+static snd_pcm_hardware_t snd_pcm_aica_playback_hw = {
+
+ .info = (SNDRV_PCM_INFO_NONINTERLEAVED),
+ .formats =
+ (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE |
+ SNDRV_PCM_FMTBIT_IMA_ADPCM),
+ .rates = SNDRV_PCM_RATE_8000_48000,
+ .rate_min = 8000,
+ .rate_max = 48000,
+ .channels_min = 1,
+ .channels_max = 2,
+ .buffer_bytes_max = AICA_BUFFER_SIZE,
+ .period_bytes_min = AICA_PERIOD_SIZE,
+ .period_bytes_max = AICA_PERIOD_SIZE,
+ .periods_min = AICA_PERIOD_NUMBER,
+ .periods_max = AICA_PERIOD_NUMBER,
+};
+
+/* There is only one sound card on a Dreamcast */
+static snd_card_aica_t *dreamcastcard = NULL;
+static struct platform_device *pd = NULL;
+
+
+
+
+static int stereo_buffer_transfer(snd_pcm_substream_t * substream,
+ int buffer_size, int period)
+{
+ int transferred;
+ snd_pcm_runtime_t *runtime;
+ int period_offset;
+ period_offset = period;
+ period_offset %= (AICA_PERIOD_NUMBER / 2);
+ runtime = substream->runtime;
+
+ //snd_printk("period is 0x%X, period_offset is 0x%X, buffer_size is 0x%X\n", period, period_offset, buffer_size);
+ /* transfer left and then right */
+ dma_xfer(0,
+ runtime->dma_area + (AICA_PERIOD_SIZE * period_offset),
+ AICA_CHANNEL0_OFFSET + (AICA_PERIOD_SIZE * period_offset),
+ buffer_size / 2, 5);
+ /* wait for completion */
+ do {
+ udelay(5);
+ transferred = get_dma_residue(0);
+ }
+ while (transferred < buffer_size / 2);
+ dma_xfer(0,
+ AICA_BUFFER_SIZE / 2 + runtime->dma_area +
+ (AICA_PERIOD_SIZE * period_offset),
+ AICA_CHANNEL1_OFFSET + (AICA_PERIOD_SIZE * period_offset),
+ buffer_size / 2, 5);
+ /* have to wait again */
+ do {
+ udelay(5);
+ transferred = get_dma_residue(0);
+ }
+ while (transferred < buffer_size / 2);
+ return 0;
+}
+
+
+
+
+void aica_period_elapsed(unsigned long timer_var)
+{
+ int transferred;
+ int play_period;
+ snd_pcm_runtime_t *runtime;
+ runtime = (dreamcastcard->substream)->runtime;
+
+ /* Have we played out an additional period? */
+ play_period =
+ frames_to_bytes(runtime,
+ readl
+ (AICA_CONTROL_CHANNEL_SAMPLE_NUMBER)) /
+ AICA_PERIOD_SIZE;
+ if (play_period == dreamcastcard->current_period) {
+ dreamcastcard->timer.expires = jiffies + 1;
+ add_timer(&(dreamcastcard->timer));
+ return;
+ }
+ if (runtime->channels > 1) {
+ dreamcastcard->current_period = play_period; /*TO DO: Work out why this doesn't work for 1 channel */
+
+ stereo_buffer_transfer(dreamcastcard->substream,
+ AICA_PERIOD_SIZE * 2,
+ dreamcastcard->clicks);
+ } else {
+ dma_xfer(0,
+ runtime->dma_area +
+ (AICA_PERIOD_SIZE * dreamcastcard->clicks),
+ AICA_CHANNEL0_OFFSET +
+ (AICA_PERIOD_SIZE * dreamcastcard->clicks),
+ AICA_PERIOD_SIZE, 5);
+ do {
+ /* Try to fine tune the delay to keep it as short as possible */
+ udelay(5);
+ /* get_dma_residue reports residue until completion when it reports total bytes transferred */
+ transferred = get_dma_residue(0);
+ }
+ while (transferred < AICA_PERIOD_SIZE);
+ }
+
+ snd_pcm_period_elapsed(dreamcastcard->substream);
+ dreamcastcard->clicks++;
+ dreamcastcard->clicks %= AICA_PERIOD_NUMBER;
+ /* reschedule the timer */
+ dreamcastcard->timer.expires = jiffies + 1;
+ add_timer(&(dreamcastcard->timer));
+ return;
+}
+
+static int snd_aicapcm_pcm_open(snd_pcm_substream_t * substream)
+{
+ if (!enable) return -ENOENT;
+
+ channel = kmalloc(sizeof(aica_channel_t), GFP_KERNEL);
+ if (!channel)
+ return -ENOMEM;
+ /* set defaults for channel */
+ channel->sfmt = SM_8BIT;
+ channel->cmd = AICA_CMD_START;
+ channel->vol = dreamcastcard->master_volume;
+ channel->pan = 0x80;
+ channel->pos = 0;
+ channel->flags = 0; /* default to mono */
+ snd_pcm_runtime_t *runtime;
+ runtime = substream->runtime;
+ runtime->hw = snd_pcm_aica_playback_hw;
+ spu_enable();
+ dreamcastcard->clicks = 0;
+ dreamcastcard->current_period = 0;
+ return 0;
+
+}
+
+static int snd_aicapcm_pcm_close(snd_pcm_substream_t * substream)
+{
+ del_timer(&dreamcastcard->timer);
+ kfree(channel);
+ spu_disable();
+ return 0;
+}
+
+static int snd_aicapcm_pcm_hw_free(snd_pcm_substream_t * substream)
+{
+ /* Free the DMA buffer */
+ return snd_pcm_lib_free_pages(substream);
+}
+
+static int snd_aicapcm_pcm_hw_params(snd_pcm_substream_t * substream,
+ snd_pcm_hw_params_t * hw_params)
+{
+ /* Allocate a DMA buffer using ALSA built-ins */
+ return
+ snd_pcm_lib_malloc_pages(substream,
+ params_buffer_bytes(hw_params));
+}
+
+static int snd_aicapcm_pcm_prepare(snd_pcm_substream_t * substream)
+{
+
+ /* Set up the playback */
+ /* basic settings to test working */
+ if ((substream->runtime)->format == SNDRV_PCM_FORMAT_S16_LE)
+ channel->sfmt = SM_16BIT;
+ channel->freq = substream->runtime->rate;
+ dreamcastcard->substream = substream;
+ return 0;
+}
+
+
+static void startup_aica()
+{
+ spu_memload(AICA_CHANNEL0_CONTROL_OFFSET, (uint8_t *) channel,
+ sizeof(aica_channel_t));
+ aica_chn_start();
+ return;
+}
+
+
+static void spu_begin_dma(snd_pcm_substream_t * substream)
+{
+ int buffer_size;
+ snd_pcm_runtime_t *runtime;
+ runtime = substream->runtime;
+ buffer_size = frames_to_bytes(runtime, runtime->buffer_size);
+ if (runtime->channels == 1)
+ dma_xfer(0, runtime->dma_area, AICA_CHANNEL0_OFFSET,
+ buffer_size, 5);
+ else {
+ int transfer_status;
+ channel->flags |= 0x01;
+ transfer_status =
+ stereo_buffer_transfer(substream, buffer_size, 0);
+ if (transfer_status != 0)
+ return;
+ dreamcastcard->clicks =
+ buffer_size / (AICA_PERIOD_SIZE * runtime->channels);
+ }
+ startup_aica();
+ init_timer(&(dreamcastcard->timer));
+ dreamcastcard->timer.function = aica_period_elapsed;
+
+
+ dreamcastcard->timer.expires = jiffies + 4;
+ add_timer(&(dreamcastcard->timer));
+ return;
+}
+
+static int snd_aicapcm_pcm_trigger(snd_pcm_substream_t * substream,
+ int cmd)
+{
+
+ switch (cmd) {
+ case SNDRV_PCM_TRIGGER_START:
+ spu_begin_dma(substream);
+ break;
+ case SNDRV_PCM_TRIGGER_STOP:
+ aica_chn_halt();
+ break;
+ default:
+ return -EINVAL;
+ }
+
+
+ return 0;
+}
+
+static snd_pcm_uframes_t snd_aicapcm_pcm_pointer(snd_pcm_substream_t *
+ substream)
+{
+ return readl(AICA_CONTROL_CHANNEL_SAMPLE_NUMBER);
+
+}
+
+
+static snd_pcm_ops_t snd_aicapcm_playback_ops = {
+ .open = snd_aicapcm_pcm_open,
+ .close = snd_aicapcm_pcm_close,
+ .ioctl = snd_pcm_lib_ioctl,
+ .hw_params = snd_aicapcm_pcm_hw_params,
+ .hw_free = snd_aicapcm_pcm_hw_free,
+ .prepare = snd_aicapcm_pcm_prepare,
+ .trigger = snd_aicapcm_pcm_trigger,
+ .pointer = snd_aicapcm_pcm_pointer,
+};
+
+
+static int snd_aicapcm_free(snd_card_aica_t * dreamcastcard)
+{
+ release_mem_region(ARM_RESET_REGISTER, 0x4);
+ release_mem_region(SPU_MEMORY_BASE, 0x200000);
+ return 0;
+}
+
+/* Set up the PCM playback device
+ card is pointer to the overall AICA device
+ pcm_index is number of PCM instances - 1
+
+ TO DO: set up to handle more than one pcm instance
+*/
+
+
+static int __init snd_aicapcmchip(snd_card_aica_t * dreamcastcard,
+ int pcm_index)
+{
+ snd_pcm_t *pcm;
+ int err;
+
+ /* Can we lock the memory */
+
+ if (request_mem_region(ARM_RESET_REGISTER, 4, "AICA ARM control")
+ == NULL)
+ return -ENOMEM;
+ if (request_mem_region(SPU_MEMORY_BASE, 0x200000, "AICA Sound RAM")
+ == NULL) {
+ release_mem_region(ARM_RESET_REGISTER, 0x4);
+ return -ENOMEM;
+ }
+
+ /* AICA has no capture ability */
+ if ((err =
+ snd_pcm_new(dreamcastcard->card, "AICA PCM", pcm_index, 1, 0,
+ &pcm)) < 0)
+ return err;
+ pcm->private_data = dreamcastcard;
+ dreamcastcard->card->private_data = pcm;
+ strcpy(pcm->name, "AICA PCM");
+
+ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK,
+ &snd_aicapcm_playback_ops);
+
+ /* Allocate the DMA buffers */
+ err =
+ snd_pcm_lib_preallocate_pages_for_all(pcm,
+ SNDRV_DMA_TYPE_CONTINUOUS,
+ snd_dma_continuous_data
+ (GFP_KERNEL),
+ AICA_BUFFER_SIZE,
+ AICA_BUFFER_SIZE);
+
+ return err;
+}
+
+/* Mixer controls */
+static int aica_pcmswitch_info(snd_kcontrol_t * kcontrol,
+ snd_ctl_elem_info_t * uinfo)
+{
+ uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
+ uinfo->count = 1;
+ uinfo->value.integer.min = 0;
+ uinfo->value.integer.max = 1;
+ return 0;
+}
+
+static int aica_pcmswitch_get(snd_kcontrol_t * kcontrol,
+ snd_ctl_elem_value_t * ucontrol)
+{
+ ucontrol->value.integer.value[0] = 1; /* TO DO: Fix me */
+ return 0;
+}
+
+static int aica_pcmswitch_put(snd_kcontrol_t * kcontrol,
+ snd_ctl_elem_value_t * ucontrol)
+{
+ if (ucontrol->value.integer.value[0] == 1)
+ return 0; /* TO DO: Fix me */
+ else
+ aica_chn_halt();
+ return 0;
+}
+
+
+
+
+static int aica_pcmvolume_info(snd_kcontrol_t * kcontrol,
+ snd_ctl_elem_info_t * uinfo)
+{
+
+ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
+ uinfo->count = 1;
+ uinfo->value.integer.min = 0;
+ uinfo->value.integer.max = 0xFF;
+
+ return 0;
+}
+
+static int aica_pcmvolume_get(snd_kcontrol_t * kcontrol,
+ snd_ctl_elem_value_t * ucontrol)
+{
+ if (!channel)
+ return -ETXTBSY; /* we've not yet been set up */
+ ucontrol->value.integer.value[0] = channel->vol;
+ return 0;
+}
+
+static int aica_pcmvolume_put(snd_kcontrol_t * kcontrol,
+ snd_ctl_elem_value_t * ucontrol)
+{
+ if (!channel) {
+ snd_printk("No channel yet\n");
+ return -ETXTBSY; /* too soon */
+ }
+
+ else if (channel->vol == ucontrol->value.integer.value[0])
+ return 0;
+
+ else {
+ channel->vol = ucontrol->value.integer.value[0];
+ dreamcastcard->master_volume = ucontrol->value.integer.value[0];
+ spu_memload(AICA_CHANNEL0_CONTROL_OFFSET,
+ (uint8_t *) channel, sizeof(aica_channel_t));
+ }
+ return 1;
+}
+
+
+static snd_kcontrol_new_t snd_aica_masterswitch_control __devinitdata = {
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "Playback Switch",
+ .info = aica_pcmswitch_info,
+ .get = aica_pcmswitch_get,
+ .put = aica_pcmswitch_put
+};
+
+static snd_kcontrol_new_t snd_aica_pcmswitch_control __devinitdata = {
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "PCM Playback Switch",
+ .index = 0,
+ .info = aica_pcmswitch_info,
+ .get = aica_pcmswitch_get,
+ .put = aica_pcmswitch_put
+};
+
+
+static snd_kcontrol_new_t snd_aica_mastervolume_control __devinitdata = {
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "Playback Volume",
+ .info = aica_pcmvolume_info,
+ .get = aica_pcmvolume_get,
+ .put = aica_pcmvolume_put
+};
+
+static snd_kcontrol_new_t snd_aica_pcmvolume_control __devinitdata = {
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "PCM Playback Volume",
+ .index = 0,
+ .info = aica_pcmvolume_info,
+ .get = aica_pcmvolume_get,
+ .put = aica_pcmvolume_put
+};
+
+
+
+static struct device_driver aica_driver = {
+ .name = "AICA",
+ .bus = &platform_bus_type,
+};
+
+
+/* Fill up the members of the embedded device structure */
+
+static void populate_dreamcastaicadev(struct device *dev)
+{
+ dev->bus = &platform_bus_type;
+ dev->driver = &aica_driver;
+ driver_register(dev->driver);
+ device_bind_driver(dev);
+}
+
+static int load_aica_firmware()
+{
+ int err;
+ err = 0;
+ spu_init();
+ const struct firmware *fw_entry;
+ err = request_firmware(&fw_entry, "aica_firmware.bin", &pd->dev);
+ if (err)
+ return err;
+ /* write firware into memory */
+ spu_disable();
+ spu_memload(0, fw_entry->data, fw_entry->size);
+ spu_enable();
+ release_firmware(fw_entry);
+ return err;
+}
+
+static int __devinit add_aicamixer_controls()
+{
+ int err;
+ err = snd_ctl_add
+ (dreamcastcard->card,
+ snd_ctl_new1(&snd_aica_pcmvolume_control,
+ dreamcastcard));
+ if (err < 0){
+ snd_printk("pcmvolume failed\n");
+ return err;
+ }
+
+ err= snd_ctl_add
+ (dreamcastcard->card,
+ snd_ctl_new1(&snd_aica_pcmswitch_control,
+ dreamcastcard));
+ if (err < 0){
+ snd_printk("pcmswitch failed\n");
+ return err;
+ }
+
+
+ err = snd_ctl_add
+ (dreamcastcard->card,
+ snd_ctl_new1(&snd_aica_mastervolume_control,
+ dreamcastcard));
+ if (err < 0){
+ snd_printk("mastervolume failed\n");
+ return err;
+ }
+
+
+ err = snd_ctl_add
+ (dreamcastcard->card,
+ snd_ctl_new1(&snd_aica_masterswitch_control,
+ dreamcastcard));
+ if (err < 0){
+ snd_printk("masterswitch failed\n");
+ return err;
+ }
+
+
+
+ /* succeeded */
+ return 0;
+}
+
+
+
+static int __init aica_init(void)
+{
+
+
+ int err;
+ int idx;
+
+ /* Are we in a Dreamcast at all? */
+ if (!mach_is_dreamcast())
+ return -ENODEV;
+ dreamcastcard = kmalloc(sizeof(snd_card_aica_t), GFP_KERNEL);
+ if (!dreamcastcard)
+ return -ENOMEM;
+ dreamcastcard->card = NULL;
+ /* Can only be one real device on a Dreamcast
+ but we might have the dummy or some other driver loaded */
+ for (idx = 0; idx < SNDRV_CARDS; idx++) {
+ dreamcastcard->card =
+ snd_card_new(idx, "AICA", THIS_MODULE, 0);
+ if (dreamcastcard->card)
+ break;
+ }
+ if (!dreamcastcard->card) {
+ kfree(dreamcastcard);
+ return -ENODEV;
+ }
+ strcpy(dreamcastcard->card->driver, "snd_card_aica");
+ strcpy(dreamcastcard->card->shortname, "AICA");
+ strcpy(dreamcastcard->card->longname,
+ "Yamaha AICA Super Intelligent Sound Processor for SEGA Dreamcast");
+
+ /* Load the PCM 'chip' */
+ if ((err = snd_aicapcmchip(dreamcastcard, 0)) < 0)
+ goto freedreamcast;
+
+
+ pd = platform_device_register_simple(dreamcastcard->card->driver,
+ -1, NULL, 0);
+
+ if (IS_ERR(pd)) {
+ err = -ENODEV;
+ goto freepcm;
+ }
+
+ populate_dreamcastaicadev(&pd->dev);
+ snd_card_set_dev(dreamcastcard->card, &pd->dev);
+ /* Register the card with ALSA subsystem */
+ if ((err = snd_card_register(dreamcastcard->card)) < 0)
+ goto freepcm;
+
+ /* Load the firmware */
+ err = load_aica_firmware();
+
+ if (err)
+ goto freepcm;
+
+
+ /* Add basic controls */
+ if (add_aicamixer_controls() < 0) goto freepcm;
+
+ snd_printk
+ ("ALSA Driver for Yamaha AICA Super Intelligent Sound Processor on slot %d\n",
+ idx);
+
+ return 0;
+
+ freepcm:
+ snd_aicapcm_free(dreamcastcard);
+
+ freedreamcast:
+ snd_card_free(dreamcastcard->card);
+
+ if (pd) {
+ struct device_driver *drv = (&pd->dev)->driver;
+ device_release_driver(&pd->dev);
+ driver_unregister(drv);
+ platform_device_unregister(pd);
+ pd = NULL;
+ }
+ kfree(dreamcastcard);
+ return err;
+
+
+}
+
+static void __exit aica_exit(void)
+{
+
+ if (likely(dreamcastcard->card)) {
+ snd_aicapcm_free(dreamcastcard);
+ snd_card_free(dreamcastcard->card);
+ kfree(dreamcastcard);
+ if (likely(pd)) {
+ struct device_driver *drv = (&pd->dev)->driver;
+ device_release_driver(&pd->dev);
+ driver_unregister(drv);
+ platform_device_unregister(pd);
+ }
+
+ }
+ /* Kill any sound still playing and reset ARM7 to safe state */
+ spu_init();
+
+
+ return;
+}
+
+
+module_init(aica_init);
+module_exit(aica_exit);
^ permalink raw reply
* Re: MPC5200 FEC Ethernet only halfduplex ?
From: Dale Farnsworth @ 2006-04-03 14:44 UTC (permalink / raw)
To: TSchnuerer, linuxppc-dev
In-Reply-To: <0ABEEA3685414344B4BE536AE3912E6EC0506F@men-exch1.intra.men.de>
TSchnuerer@men.de wrote:
> Im working with Linux on our MPC5200 Board, with the latest Rev. B3
> Processor.
> I was updating our Linux BSP from BestComm 2.1 to 2.2 some time ago and
> used your patches which increased usability of the FEC very much.
>
> There is a line in the driver code which I dont understand, it says:
> + fec_restart(dev, 0); /* always use half duplex mode only */
>
> Why can only half duplex be used ?
The reason is simple, but not satisfying. The driver has no
mechanism to detect PHY status changes and thus no way to determine
when a connection changes from full to half duplex. It needs a
poll function for PHY status change. Doing only half-duplex
avoids this issue--at a big performance cost.
I think a poll function was added in the Denx version.
The MPC5200 FEC driver desperately needs a rewrite.
-Dale
^ permalink raw reply
* Re: parsecvs tool now creates git repositories
From: Keith Packard @ 2006-04-03 14:39 UTC (permalink / raw)
To: Jakub Narebski; +Cc: keithp, git
In-Reply-To: <e0rb0j$ml9$1@sea.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 601 bytes --]
On Mon, 2006-04-03 at 16:21 +0200, Jakub Narebski wrote:
> From the comments on #git, parsecvs reads raw ,v files for creating history
> tree, then uses 'cvs co ...' for getting the contents.
It's not using cvs co, it's using the rcs 'co' command. I will probably
fix it to just generate the files directly as that will be a lot faster.
If there was a git command to create blobs directly from file contents,
it would be faster still as I could create all of the blobs for a
particular file in one pass and then just build trees in the index out
of those.
--
keith.packard@intel.com
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply
* [U-Boot-Users] Re: PATCH: apply SoC concept on arm926 cpus
From: Bignaux Ronan @ 2006-04-03 14:39 UTC (permalink / raw)
To: u-boot
In-Reply-To: <200506201527.j5KFR6hj008474@lisbon.ucdavis.edu>
Stephen Donecker <sdonecker <at> sbcglobal.net> writes:
> Tom,
>
> I too, just started working on an mx21ads port. Are you planning on booting
> from the NOR or NAND flash. I am primarily interested in NAND boot. Let me
> know what exactly you are working on, and maybe we can organize our effort.
>
I'm trying to make a port of openembedded BSP for the i.mx21 ADS .
I started a wiki page at :
http://handhelds.org/moin/moin.cgi/SupportedHardwareTargets
I'm interessting for information about bootloader ( specially U-Boot ) and
kernel support . Thanks to contribuate and release code or mail me .
Ronan
^ permalink raw reply
* Re: Cygwin can't handle huge packfiles?
From: Alex Riesen @ 2006-04-03 14:38 UTC (permalink / raw)
To: Kees-Jan Dijkzeul; +Cc: git
In-Reply-To: <fa0b6e200604030246q21fccb9ar93004ac67d8b28b3@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]
On 4/3/06, Kees-Jan Dijkzeul <k.j.dijkzeul@gmail.com> wrote:
> I'm trying to get Git to manage a 5Gb source tree. Under linux, this
> works like a charm. Under cygwin, however, I run in to difficulties.
> For example:
>
> $ git-clone sgp-wa/ sgp-wa.clone
> fatal: packfile
> ./objects/pack/pack-56aa013a0234e198467ed37ae5db925764a6ee98.pack
> cannot be mapped.
> fatal: unexpected EOF
> fetch-pack from '/cygdrive/e/Projects/sgp-wa/.git' failed.
>
> To figure out what is happening, I printed the value of errno, which
> turns out to be 12 (Cannot allocate memory). I'm not sure how mmap is
mmap in git on cygwin does not mmaps anything,
but just reads the whole file in memory.
> I'm not sure how to approach this problem. Any tips would be greatly
> appreciated.
I ended up hacking gitfakemmap like in the attached patches (sorry for mime).
It's very ugly and unsafe hack, and it's actually exactly the reason why it was
never submitted. Still, it helps me (it speedups revlist, for
instance), and maybe
it'll help you.
It is a really good example what stupid windows restrictions can do to
a program.
The patch is against git as of 3-Apr-2005, ~10 CET
[-- Attachment #2: cygmmap.patch --]
[-- Type: text/x-patch, Size: 5710 bytes --]
diff --git a/Makefile b/Makefile
index c79d646..8a46436
--- a/Makefile
+++ b/Makefile
@@ -389,7 +389,7 @@ ifdef NO_SETENV
endif
ifdef NO_MMAP
COMPAT_CFLAGS += -DNO_MMAP
- COMPAT_OBJS += compat/mmap.o
+ COMPAT_OBJS += compat/mmap.o compat/realmmap.o
endif
ifdef NO_IPV6
ALL_CFLAGS += -DNO_IPV6
diff --git a/compat/realmmap.c b/compat/realmmap.c
new file mode 100644
index 0000000..8f26641
--- /dev/null
+++ b/compat/realmmap.c
@@ -0,0 +1,26 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <sys/mman.h>
+#include "../git-compat-util.h"
+
+#undef mmap
+#undef munmap
+
+void *realmmap(void *start, size_t length, int prot , int flags, int fd, off_t offset)
+{
+ if (start != NULL || !(flags & MAP_PRIVATE)) {
+ errno = ENOTSUP;
+ return MAP_FAILED;
+ }
+ start = mmap(start, length, prot, flags, fd, offset);
+ return start;
+}
+
+int realmunmap(void *start, size_t length)
+{
+ return munmap(start, length);
+}
+
+
diff --git a/diff.c b/diff.c
index e496905..f1a2cf0 100644
--- a/diff.c
+++ b/diff.c
@@ -450,7 +450,7 @@ int diff_populate_filespec(struct diff_f
fd = open(s->path, O_RDONLY);
if (fd < 0)
goto err_empty;
- s->data = mmap(NULL, s->size, PROT_READ, MAP_PRIVATE, fd, 0);
+ s->data = realmmap(NULL, s->size, PROT_READ, MAP_PRIVATE, fd, 0);
close(fd);
if (s->data == MAP_FAILED)
goto err_empty;
@@ -482,7 +482,7 @@ void diff_free_filespec_data(struct diff
if (s->should_free)
free(s->data);
else if (s->should_munmap)
- munmap(s->data, s->size);
+ realmunmap(s->data, s->size);
s->should_free = s->should_munmap = 0;
s->data = NULL;
free(s->cnt_data);
diff --git a/git-compat-util.h b/git-compat-util.h
index 5d543d2..85150f8 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -42,22 +42,28 @@ extern int error(const char *err, ...) _
#ifdef NO_MMAP
-#ifndef PROT_READ
+#include <sys/mman.h>
+/*#ifndef PROT_READ
#define PROT_READ 1
#define PROT_WRITE 2
#define MAP_PRIVATE 1
#define MAP_FAILED ((void*)-1)
-#endif
+#endif*/
#define mmap gitfakemmap
#define munmap gitfakemunmap
extern void *gitfakemmap(void *start, size_t length, int prot , int flags, int fd, off_t offset);
extern int gitfakemunmap(void *start, size_t length);
+extern void *realmmap(void *start, size_t length, int prot , int flags, int fd, off_t offset);
+extern int realmunmap(void *start, size_t length);
+
#else /* NO_MMAP */
#include <sys/mman.h>
+#define realmmap mmap
+#define realmunmap munmap
#endif /* NO_MMAP */
#ifdef NO_SETENV
diff --git a/sha1_file.c b/sha1_file.c
index 58edec0..712a068 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -330,14 +330,14 @@ void prepare_alt_odb(void)
close(fd);
return;
}
- map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
+ map = realmmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
close(fd);
if (map == MAP_FAILED)
return;
link_alt_odb_entries(map, map + st.st_size, '\n',
get_object_directory());
- munmap(map, st.st_size);
+ realmunmap(map, st.st_size);
}
static char *find_sha1_file(const unsigned char *sha1, struct stat *st)
@@ -378,7 +378,7 @@ static int check_packed_git_idx(const ch
return -1;
}
idx_size = st.st_size;
- idx_map = mmap(NULL, idx_size, PROT_READ, MAP_PRIVATE, fd, 0);
+ idx_map = realmmap(NULL, idx_size, PROT_READ, MAP_PRIVATE, fd, 0);
close(fd);
if (idx_map == MAP_FAILED)
return -1;
@@ -423,7 +423,7 @@ static int unuse_one_packed_git(void)
}
if (!lru)
return 0;
- munmap(lru->pack_base, lru->pack_size);
+ realmunmap(lru->pack_base, lru->pack_size);
lru->pack_base = NULL;
return 1;
}
@@ -460,7 +460,7 @@ int use_packed_git(struct packed_git *p)
}
if (st.st_size != p->pack_size)
die("packfile %s size mismatch.", p->pack_name);
- map = mmap(NULL, p->pack_size, PROT_READ, MAP_PRIVATE, fd, 0);
+ map = realmmap(NULL, p->pack_size, PROT_READ, MAP_PRIVATE, fd, 0);
close(fd);
if (map == MAP_FAILED)
die("packfile %s cannot be mapped.", p->pack_name);
@@ -494,7 +494,7 @@ struct packed_git *add_packed_git(char *
/* do we have a corresponding .pack file? */
strcpy(path + path_len - 4, ".pack");
if (stat(path, &st) || !S_ISREG(st.st_mode)) {
- munmap(idx_map, idx_size);
+ realmunmap(idx_map, idx_size);
return NULL;
}
/* ok, it looks sane as far as we can check without
@@ -647,7 +647,7 @@ static void *map_sha1_file_internal(cons
*/
sha1_file_open_flag = 0;
}
- map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
+ map = realmmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
close(fd);
if (map == MAP_FAILED)
return NULL;
@@ -1184,7 +1184,7 @@ int sha1_object_info(const unsigned char
*sizep = size;
}
inflateEnd(&stream);
- munmap(map, mapsize);
+ realmunmap(map, mapsize);
return status;
}
@@ -1210,7 +1210,7 @@ void * read_sha1_file(const unsigned cha
map = map_sha1_file_internal(sha1, &mapsize);
if (map) {
buf = unpack_sha1_file(map, mapsize, type, size);
- munmap(map, mapsize);
+ realmunmap(map, mapsize);
return buf;
}
return NULL;
@@ -1493,7 +1493,7 @@ int write_sha1_to_fd(int fd, const unsig
} while (posn < objsize);
if (map)
- munmap(map, objsize);
+ realmunmap(map, objsize);
if (temp_obj)
free(temp_obj);
@@ -1646,7 +1646,7 @@ int index_fd(unsigned char *sha1, int fd
buf = "";
if (size)
- buf = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
+ buf = realmmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
close(fd);
if (buf == MAP_FAILED)
return -1;
@@ -1660,7 +1660,7 @@ int index_fd(unsigned char *sha1, int fd
ret = 0;
}
if (size)
- munmap(buf, size);
+ realmunmap(buf, size);
return ret;
}
^ permalink raw reply related
* Re: parsecvs tool now creates git repositories
From: Keith Packard @ 2006-04-03 14:37 UTC (permalink / raw)
To: Erik Mouw; +Cc: keithp, Git Mailing List
In-Reply-To: <20060403140348.GE16823@harddisk-recovery.com>
[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]
On Mon, 2006-04-03 at 16:03 +0200, Erik Mouw wrote:
> On Sat, Apr 01, 2006 at 09:36:28PM -0800, Keith Packard wrote:
> > The UI is a total disaster, sufficient for testing. You must create an
> > Authors file in the current directory which looks like the git-cvsimport
> > authors file. You must also have a edit-change-log program in your path
> > which edits the commit message in place. /bin/true will work if you
> > don't need to edit the messages.
> >
> > I should clearly steal the existing git-cvsimport command line arguments
> > and use those.
>
> What is the current way to use it? I get the impression it reads raw ,v
> files, but how do I get along with a remote CVS repository?
You can't. You need to create a local copy of the repository. There is a
tool which can do that using the cvs protocol, but I don't recall the
name.
It turns out that parsing the ,v files directly is both faster and more
accurate than attempting to interpret the output of cvs log.
--
keith.packard@intel.com
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply
* Re: [PATCHSET] libata: improve ata_bus_probe failure handling, take 2
From: Greg Freemyer @ 2006-04-03 14:37 UTC (permalink / raw)
To: Jeff Garzik; +Cc: albertl, Tejun Heo, linux-ide, alan
In-Reply-To: <4430FB37.6040600@pobox.com>
On 4/3/06, Jeff Garzik <jgarzik@pobox.com> wrote:
> For the record, I do consider irq-pio upstream ready. It still needs to
> wait for Tejun's EH work to make it upstream, to give upstream people
> the test sets of
>
> - prep EH (2.6.17-rc1)
> - EH
> - NCQ
> - irq-pio
>
> Since each of these sets is staged, upstream testers will be able to say
> "2.6.17-rc1 works, but 2.6.18-git1 doesn't", which gives us a lot of
> good info.
>
> Jeff
So for those of us anxiously waiting for the above great enhancements
it looks like it will be 5 months or so before it is in a released
vanilla kernel? ie. assuming 2 1/2 months per kernel release.
Not as good as I hoped, but not horrible either.
Greg
--
Greg Freemyer
The Norcross Group
Forensics for the 21st Century
^ permalink raw reply
* Re: Cygwin can't handle huge packfiles?
From: Linus Torvalds @ 2006-04-03 14:36 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Kees-Jan Dijkzeul, git
In-Reply-To: <Pine.LNX.4.64.0604030730040.3781@g5.osdl.org>
On Mon, 3 Apr 2006, Linus Torvalds wrote:
>
> That said, I think git _does_ have problems with large pack-files. We have
> some 32-bit issues etc
I should clarify that. git _itself_ shouldn't have any 32-bit issues, but
the packfile data structure does. The index has 32-bit offsets into
individual pack-files.
That's not hugely fundamental, but I didn't expect people to hit it this
quickly. What kind of project has a 1.5GB pack-file _already_? I hope it's
fifteen years of history (so that we'll have another fifteen years before
we'll have to worry about 4GB pack-files ;)
Linus
^ permalink raw reply
* Re: [linux-usb-devel] Problems with USB setup with Linux 2.6.16
From: Alan Stern @ 2006-04-03 14:36 UTC (permalink / raw)
To: Joshua Kwan; +Cc: linux-kernel, linux-usb-devel
In-Reply-To: <44309821.1090600@triplehelix.org>
On Sun, 2 Apr 2006, Joshua Kwan wrote:
> On 04/02/2006 07:09 PM, Alan Stern wrote:
> > If you were to continue looking farther down in the log, you would find
> > that ehci-hcd sees all those devices. Those that can run at high speed
> > continue using the EHCI controller. For those that can't, the switch is
> > reset and they get reconnected to their UHCI controller.
>
> That makes sense - that is indeed what happens when it DOES work (i.e.
> with 2.6.15), but the fact is that they don't come back in 2.6.16. I
> will try building ehci-hcd in and see what happens.
If the devices don't come back, it's an indication that some driver has
hung. A stack trace (Alt-SysRq-T) should help identify which driver is in
trouble.
Alan Stern
^ permalink raw reply
* RE: acpi_thread_id = acpi_os_get_thread_id()
From: Moore, Robert @ 2006-04-03 14:35 UTC (permalink / raw)
To: Brown, Len; +Cc: linux-acpi
HP-UX wanted the new type. It can be defined as necessary for Linux;
However,I can change the default to UINT32 if that's what is used on
most operating systems.
The information as to thread ID can be very useful when debugging multi
threaded issues, and will probably become more important as we encounter
more of these. I would like to keep it around for the time being.
Bob
> -----Original Message-----
> From: Brown, Len
> Sent: Saturday, April 01, 2006 12:14 AM
> To: Moore, Robert
> Cc: linux-acpi@vger.kernel.org
> Subject: acpi_thread_id = acpi_os_get_thread_id()
>
> Bob,
> with the new type acpi_thread_id, it seems that the thread_id grows
from
> 32-bits
> to 64-bits on a 64-bit mahcine.
>
> acpi_os_get_thread_id() currently returns task.pid on Linux,
> a 32-bit integer on both 32 and 64-bit machines.
>
> So if acpi_os_get_thread_id() is called at interrupt level,
> its return value is meaningless.
>
> Linux doesn't define ACPI_MUTEX_DEBUG, and looks like it never will.
>
> Is it possible to delete the concept of acpi_os_get_thread_id()?
> I'm wondering at the moment if the right thing isn't to do this:
>
> #define acpi_os_get_thread_id() (0)
>
> thanks,
> -Len
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
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.