* Re: [PATCH] ASoC: codecs: wm8753: Fix DAI mode switching
From: Mark Brown @ 2011-02-07 19:11 UTC (permalink / raw)
To: Liam Girdwood; +Cc: alsa-devel, Lars-Peter Clausen, linux-kernel
In-Reply-To: <1297105825.3331.353.camel@odin>
On Mon, Feb 07, 2011 at 07:10:25PM +0000, Liam Girdwood wrote:
> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] ASoC: codecs: wm8753: Fix DAI mode switching
From: Liam Girdwood @ 2011-02-07 19:10 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: Mark Brown, alsa-devel, linux-kernel
In-Reply-To: <1296983051-3105-1-git-send-email-lars@metafoo.de>
On Sun, 2011-02-06 at 10:04 +0100, Lars-Peter Clausen wrote:
> The wm8753 codec supports switching between different DAI modes.
> The current drivers tries to implement this by changing the DAI driver at
> runtime. But to properly work this would require support from the ASoC core.
>
> So this patch takes a different approch on how the DAI mode switching is
> implemented.
>
> The only difference, from a driver point of view, between the different DAI modes
> is how to program the DAI format to the hardware. So what this patch is, it
> stores the current format for each DAI in the drivers private struct and when
> the DAI mode is changed the format gets simply reprogrammed according to the
> new DAI mode.
>
> Futhermore this patch restricts the changing of the DAI format to when the
> codec is inactive.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
^ permalink raw reply
* Re: eglibc configurability
From: Mark Hatle @ 2011-02-07 19:09 UTC (permalink / raw)
To: Gary Thomas; +Cc: Poky
In-Reply-To: <4D503284.6020301@mlbassoc.com>
On 2/7/11 11:57 AM, Gary Thomas wrote:
> On 02/07/2011 10:04 AM, Mark Hatle wrote:
>> On 2/7/11 10:57 AM, Richard Purdie wrote:
>>> On Mon, 2011-02-07 at 09:54 -0700, Gary Thomas wrote:
>>>> On 02/07/2011 09:29 AM, Mark Hatle wrote:
>>>>> Could you find the related init script and point me to the contents. I don't
>>>>> see any initscripts in the eglibc integration. The only thing I see is a switch
>>>>> in the locale generation between on target, on host and via QEMU. I'm wondering
>>>>> if maybe this is being triggered?
>>>>
>>>> This could be what I'm seeing. I have ENABLE_BINARY_LOCALE_GENERATION disabled
>>>> in my local.conf (I had troubles with QEMU-ARM on Fedora in the past and this
>>>> was the way around it). It looks like that may be pushing the locale compilation
>>>> to the target.
>>>
>>> Correct. The locales have to be generated somewhere!
>>>
>>> You turned them off on the build machine so they run on the target. All
>>> is functioning as it should.
>>>
>>> FWIW, cross locale gen doesn't use qemu now and is a lot faster so
>>> perhaps you could turn it back on ;-).
>>
>> Just to be clear, I'm running builds on machines where QEMU is unhappy (and I've
>> disabled the QEMU check...) I have locales being generated and they are working
>> fine in the testing I have done with them.
>>
>> This is using eglibc and the default conf file configuration setting.
>
> I enabled ENABLE_BINARY_LOCALE_GENERATION and now the locale
> generation is being done at build time - hurray :-) Boot time
> is much improved.
>
> Now to figure out how to control the ones that are installed.
The value is "IMAGE_LINGUAS". It defaults to "en-us en-gb".
(default is located in meta/conf/distro/poky.conf.. but you should override this
in your build/conf/local.conf)
--Mark
> Thanks
>
^ permalink raw reply
* RE: [PATCH 02/12] gprs: driver interface changes for IPv6
From: Marcel Holtmann @ 2011-02-07 19:09 UTC (permalink / raw)
To: ofono
In-Reply-To: <CB0EE8641411214CBAFF8AEBB26ABCEC2985A8@008-AM1MPN1-001.mgdnok.nokia.com>
[-- Attachment #1: Type: text/plain, Size: 2944 bytes --]
Hi Mika,
> > > +enum ofono_gprs_addrconf {
> > > + OFONO_GPRS_ADDRCONF_NONE,
> > > + OFONO_GPRS_ADDRCONF_STATIC,
> > > + OFONO_GPRS_ADDRCONF_DHCP,
> > > +};
> > > +
> >
> > What exactly is the _NONE addrconf for? And why don't we use
> > a gboolean
> > here like before?
>
> Neither "static" nor "DHCP" makes sense for IPv6. If we have an IPv6 only context, the "Method" property will not show up at all.
>
> I also wanted to leave the door open for additional address configuration protocols in case e.g. IPv6 capable modems with virtual ethernet intefaces require some weird quirks. I also felt this was a bit cleaner, although that is a matter of opinion, of course.
>
> Normally, IPv6 addresses and routes are autoconfigured using IPv6 stateless address autoconfiguration followed optionally by DHCPv6 to get additional settings. The kernel actually starts stateless address autoconfiguration immediately when the interface is configured up (which oFono does), assuming the interface already has a link-local IPv6 address (which all Ethernet interface do have, as it is calculated from the MAC address and added automatically).
>
> Point-to-point interfaces, on the other, require the link-local address to be added manually to the interface before the autoconfiguration can happen. oFono should probably add the address to be consistent with Ethernet interfaces.
I am not sure we really wanna be consistent with how Ethernet works
since we are not actually Ethernet.
So I can see benefits for having ConnMan control the link-local in case
of point-to-point, but then I also do see the benefit oFono doing it.
We might have to spin of ideas and see what is the most logical one and
what works best. Especially also in the context of LTE support in the
future.
> The upshot would be that IPv6 could be autoconfigured immediately without connman's intervention. IPv6 does not have private address spaces, so in theory connman does not really have to care about IPv6 addresses and routes. However, the optional DHCPv6 step would probably be controlled by connman. Configuration of IPv6 tethering would be another optional followup step controlled by connman.
Yes, DHCPv6 step needs to be done by ConnMan. We do not have DHCPv6
support right now. We only plan to use it for extra settings like
proxies, timeservers etc.
> On the other hand, if we want connman to be fully in charge, we could change oFono to always leave the network interface down and let connman do everything. Marcels input on this would be welcome as well.
This is something we need to figure out. And of course this all needs to
be aligned with IPv4 and IPv6. Right now we are treating this similar to
how wpa_supplicant for WiFi does this.
So going back to potential LTE and IMS support; if that runs IPv6 then
it might make sense to just autoconfigure it without ConnMan
interaction.
Regards
Marcel
^ permalink raw reply
* Re: [Xenomai-help] Exception handlers in primary domain / user-space signals
From: Gilles Chanteperdrix @ 2011-02-07 19:08 UTC (permalink / raw)
To: Henri Roosen; +Cc: xenomai
In-Reply-To: <AANLkTincD+0eKF7tM8aj5s4tepF0KwQ6xkJ52G1Lq4iT@mail.gmail.com>
Henri Roosen wrote:
> On Mon, Feb 7, 2011 at 7:27 PM, Gilles Chanteperdrix
> <gilles.chanteperdrix@xenomai.org> wrote:
>> Henri Roosen wrote:
>>> We are using signal handlers for catching exceptions which our
>>> application is allowed to make and which we know how to handle.
>>>
>>> The current Xenomai implementation is to switch to the secondary
>>> domain and call the handlers from there.
>>> Unfortunately this takes too much time for our application and we
>>> would like to handle the exception without the switch to the secondary
>>> domain, in primary domain.
>>>
>>> Can anyone give some advice how to implement that?
>>> Will "user-space signals" which was planned for Xenomai 2.6 fulfill this need?
>>> Is there already code available for user-space signals?
>> In the 2.5 series, we added some code to support signals. The signals
>> are multiplexed per-skin in kernel-space, and demultiplexed in
>> user-space, upon exit of system calls. We implemented a unit test of
>> this functionality with the "sigtest" skin and user-space test, but they
>> only work upon return from system calls.
>>
>> Then we added support for the "mayday" page, which made us realize, that
>> maybe implementing signals handling at any time, not only when returning
>> from system calls, was possible. But then came the realization that in
>> order to implement that, we would have to fiddle with the FPU, which is
>> an area where we have a certain tradition for not getting the things
>> right at the first attempt. So, we kind of stopped here.
>>
>> So, if you want some ad-hoc signals upon return from system call, the
>> task is pretty easy. If you want the full posix signals interface, then
>> things are going to be a bit harder.
>>
> I am afraid it's going to be a bit harder; we would need it when the
> exception occurs and that is in most cases not at a place in the code
> where there is a system call :-(.
What kind of exception is it? Could not the exception be signalled at
the next system call?
>
> I was thinking of adding a hook in Xenomai's exception handler before
> it makes the switch to the secondary domain... but that would of
> course be a very ugly hack and I don't know if it can be done. Do you
> have a suggestion?
>
> What are the plans with the full posix signals interface?
Plans were to get it during the 2.6 branch, but of course if someone is
able to contribute it before, there is no problem.
>
> Thanks,
>> --
>> Gilles.
>>
>
--
Gilles.
^ permalink raw reply
* i915 context support remote repo
From: Ben Widawsky @ 2011-02-07 19:05 UTC (permalink / raw)
To: intel-gfx
Chris, those interest:
Here is a remote set up for review. The commits will definitely need to
be rebased later.
http://cgit.freedesktop.org/~bwidawsk/i915-context-support/
git://anongit.freedesktop.org/~bwidawsk/i915-context-support
This weekend I addressed some of the locking issues, although it
turned out a little uglier than I had hoped for. I would like to get
your feedback on this when you have some time.
For the near future:
1. Continue on looking, validate & hopefully simplify
2. Swappable context backing objects
3. Mesa support
Thanks.
Ben
P.S. Chris - sorry you received two of these, my mutt is misbehaving.
^ permalink raw reply
* [PATCH] cthon: remove extraneous files
From: Jim Rees @ 2011-02-07 19:05 UTC (permalink / raw)
To: Steve Dickson; +Cc: peter honeyman, linux-nfs
These are generated files and don't belong in the distribution.
Signed-off-by: Jim Rees <rees@umich.edu>
---
general/large1.c | 443 ------------------------------------------------------
general/large2.c | 443 ------------------------------------------------------
general/large3.c | 443 ------------------------------------------------------
3 files changed, 0 insertions(+), 1329 deletions(-)
delete mode 100644 general/large1.c
delete mode 100644 general/large2.c
delete mode 100644 general/large3.c
diff --git a/general/large1.c b/general/large1.c
deleted file mode 100644
index 5dd2950..0000000
--- a/general/large1.c
+++ /dev/null
@@ -1,443 +0,0 @@
-/* @(#)large.c 1.3 2002/12/13 Connectathon Testsuite */
-/*
- * cc - front end for C compiler
- */
-#include <sys/param.h>
-#ifndef major
-#include <sys/types.h>
-#endif
-#include <stdio.h>
-#include <ctype.h>
-#include <signal.h>
-#ifdef SVR4
-#include <dirent.h>
-#else
-#include <sys/dir.h>
-#endif
-
-#undef MAXNAMLEN
-#define MAXNAMLEN 256
-
-/* return type for signal handlers */
-#if defined(SVR4) || defined (TRU64)
-#define SIGHAND_T void
-#else
-#define SIGHAND_T int
-#endif
-
-char *cpp = "/lib/cpp";
-char *ccom = "/lib/ccom";
-char *c2 = "/lib/c2";
-char *as = "/bin/as";
-char *ld = "/bin/ld";
-char *crt0 = "/lib/crt0.o";
-
-char tmp0[30]; /* big enough for /tmp/ctm%05.5d */
-char *tmp1, *tmp2, *tmp3, *tmp4, *tmp5;
-char *outfile;
-char *savestr(), *strspl(), *setsuf();
-SIGHAND_T idexit();
-char **av, **clist, **llist, **plist;
-int cflag, eflag, oflag, pflag, sflag, wflag, Rflag, exflag, proflag;
-int gflag, Gflag;
-char *dflag;
-int exfail;
-char *passes;
-char *npassname;
-
-int nc, nl, np, nxo, na;
-
-#define cunlink(s) if (s) unlink(s)
-
-main(argc, argv)
- char **argv;
-{
- char *t;
- char *assource;
- int i, j, c;
-
- /* ld currently adds upto 5 args; 10 is room to spare */
- av = (char **)calloc(argc+10, sizeof (char **));
- clist = (char **)calloc(argc, sizeof (char **));
- llist = (char **)calloc(argc, sizeof (char **));
- plist = (char **)calloc(argc, sizeof (char **));
- for (i = 1; i < argc; i++) {
- if (*argv[i] == '-') switch (argv[i][1]) {
-
- case 'S':
- sflag++;
- cflag++;
- continue;
- case 'o':
- if (++i < argc) {
- outfile = argv[i];
- switch (getsuf(outfile)) {
-
- case 'c':
- case 'o':
- error("-o would overwrite %s",
- outfile);
- exit(8);
- }
- }
- continue;
- case 'R':
- Rflag++;
- continue;
- case 'O':
- oflag++;
- continue;
- case 'p':
- proflag++;
- crt0 = "/lib/mcrt0.o";
- if (argv[i][2] == 'g')
- crt0 = "/usr/lib/gcrt0.o";
- continue;
- case 'g':
- if (argv[i][2] == 'o') {
- Gflag++; /* old format for -go */
- } else {
- gflag++; /* new format for -g */
- }
- continue;
- case 'w':
- wflag++;
- continue;
- case 'E':
- exflag++;
- case 'P':
- pflag++;
- if (argv[i][1]=='P')
- fprintf(stderr,
- "cc: warning: -P option obsolete; you should use -E instead\n");
- plist[np++] = argv[i];
- case 'c':
- cflag++;
- continue;
- case 'D':
- case 'I':
- case 'U':
- case 'C':
- plist[np++] = argv[i];
- continue;
- case 't':
- if (passes)
- error("-t overwrites earlier option", 0);
- passes = argv[i]+2;
- if (passes[0]==0)
- passes = "012p";
- continue;
- case 'f':
- fprintf(stderr,
- "cc: warning: -f option obsolete (unnecessary)\n");
- continue;
- case 'B':
- if (npassname)
- error("-B overwrites earlier option", 0);
- npassname = argv[i]+2;
- if (npassname[0]==0)
- npassname = "/usr/c/o";
- continue;
- case 'd':
- dflag = argv[i];
- continue;
- }
- t = argv[i];
- c = getsuf(t);
- if (c=='c' || c=='s' || exflag) {
- clist[nc++] = t;
- t = setsuf(t, 'o');
- }
- if (nodup(llist, t)) {
- llist[nl++] = t;
- if (getsuf(t)=='o')
- nxo++;
- }
- }
- if (gflag || Gflag) {
- if (oflag)
- fprintf(stderr, "cc: warning: -g disables -O\n");
- oflag = 0;
- }
- if (npassname && passes ==0)
- passes = "012p";
- if (passes && npassname==0)
- npassname = "/usr/new";
- if (passes)
- for (t=passes; *t; t++) {
- switch (*t) {
-
- case '0':
- ccom = strspl(npassname, "ccom");
- continue;
- case '2':
- c2 = strspl(npassname, "c2");
- continue;
- case 'p':
- cpp = strspl(npassname, "cpp");
- continue;
- }
- }
- if (nc==0)
- goto nocom;
- if (signal(SIGINT, SIG_IGN) != SIG_IGN)
- signal(SIGINT, idexit);
- if (signal(SIGTERM, SIG_IGN) != SIG_IGN)
- signal(SIGTERM, idexit);
- if (pflag==0)
- sprintf(tmp0, "/tmp/ctm%05.5d", getpid());
- tmp1 = strspl(tmp0, "1");
- tmp2 = strspl(tmp0, "2");
- tmp3 = strspl(tmp0, "3");
- if (pflag==0)
- tmp4 = strspl(tmp0, "4");
- if (oflag)
- tmp5 = strspl(tmp0, "5");
- for (i=0; i<nc; i++) {
- if (nc > 1) {
- printf("%s:\n", clist[i]);
- fflush(stdout);
- }
- if (getsuf(clist[i]) == 's') {
- assource = clist[i];
- goto assemble;
- } else
- assource = tmp3;
- if (pflag)
- tmp4 = setsuf(clist[i], 'i');
- av[0] = "cpp"; av[1] = clist[i]; av[2] = exflag ? "-" : tmp4;
- na = 3;
- for (j = 0; j < np; j++)
- av[na++] = plist[j];
- av[na++] = 0;
- if (callsys(cpp, av)) {
- exfail++;
- eflag++;
- }
- if (pflag || exfail) {
- cflag++;
- continue;
- }
- if (sflag)
- assource = tmp3 = setsuf(clist[i], 's');
- av[0] = "ccom"; av[1] = tmp4; av[2] = oflag?tmp5:tmp3; na = 3;
- if (proflag)
- av[na++] = "-XP";
- if (gflag) {
- av[na++] = "-Xg";
- } else if (Gflag) {
- av[na++] = "-XG";
- }
- if (wflag)
- av[na++] = "-w";
- av[na] = 0;
- if (callsys(ccom, av)) {
- cflag++;
- eflag++;
- continue;
- }
- if (oflag) {
- av[0] = "c2"; av[1] = tmp5; av[2] = tmp3; av[3] = 0;
- if (callsys(c2, av)) {
- unlink(tmp3);
- tmp3 = assource = tmp5;
- } else
- unlink(tmp5);
- }
- if (sflag)
- continue;
- assemble:
- cunlink(tmp1); cunlink(tmp2); cunlink(tmp4);
- av[0] = "as"; av[1] = "-o"; av[2] = setsuf(clist[i], 'o');
- na = 3;
- if (Rflag)
- av[na++] = "-R";
- if (dflag)
- av[na++] = dflag;
- av[na++] = assource;
- av[na] = 0;
- if (callsys(as, av) > 1) {
- cflag++;
- eflag++;
- continue;
- }
- }
-nocom:
- if (cflag==0 && nl!=0) {
- i = 0;
- av[0] = "ld"; av[1] = "-X"; av[2] = crt0; na = 3;
- if (outfile) {
- av[na++] = "-o";
- av[na++] = outfile;
- }
- while (i < nl)
- av[na++] = llist[i++];
- if (gflag || Gflag)
- av[na++] = "-lg";
- if (proflag)
- av[na++] = "-lc_p";
- else
- av[na++] = "-lc";
- av[na++] = 0;
- eflag |= callsys(ld, av);
- if (nc==1 && nxo==1 && eflag==0)
- unlink(setsuf(clist[0], 'o'));
- }
- dexit();
-}
-
-SIGHAND_T
-idexit()
-{
-
- eflag = 100;
- dexit();
-}
-
-dexit()
-{
-
- if (!pflag) {
- cunlink(tmp1);
- cunlink(tmp2);
- if (sflag==0)
- cunlink(tmp3);
- cunlink(tmp4);
- cunlink(tmp5);
- }
- exit(eflag);
-}
-
-error(s, x)
- char *s, *x;
-{
- FILE *diag = exflag ? stderr : stdout;
-
- fprintf(diag, "cc: ");
- fprintf(diag, s, x);
- putc('\n', diag);
- exfail++;
- cflag++;
- eflag++;
-}
-
-getsuf(as)
-char as[];
-{
- register int c;
- register char *s;
- register int t;
-
- s = as;
- c = 0;
- while (t = *s++)
- if (t=='/')
- c = 0;
- else
- c++;
- s -= 3;
- if (c <= MAXNAMLEN && c > 2 && *s++ == '.')
- return (*s);
- return (0);
-}
-
-char *
-setsuf(as, ch)
- char *as;
-{
- register char *s, *s1;
-
- s = s1 = savestr(as);
- while (*s)
- if (*s++ == '/')
- s1 = s;
- s[-1] = ch;
- return (s1);
-}
-
-callsys(f, v)
- char *f, **v;
-{
- int t, status;
-
- t = fork();
- if (t == -1) {
- printf("No more processes\n");
- return (100);
- }
- if (t == 0) {
- execv(f, v);
- printf("Can't find %s\n", f);
- fflush(stdout);
- _exit(100);
- }
- while (t != wait(&status))
- ;
- if ((t=(status&0377)) != 0 && t!=14) {
- if (t!=2) {
- printf("Fatal error in %s\n", f);
- eflag = 8;
- }
- dexit();
- }
- return ((status>>8) & 0377);
-}
-
-nodup(l, os)
- char **l, *os;
-{
- register char *t, *s;
- register int c;
-
- s = os;
- if (getsuf(s) != 'o')
- return (1);
- while (t = *l++) {
- while (c = *s++)
- if (c != *t++)
- break;
- if (*t==0 && c==0)
- return (0);
- s = os;
- }
- return (1);
-}
-
-#define NSAVETAB 1024
-char *savetab;
-int saveleft;
-
-char *
-savestr(cp)
- register char *cp;
-{
- register int len;
-
- len = strlen(cp) + 1;
- if (len > saveleft) {
- saveleft = NSAVETAB;
- if (len > saveleft)
- saveleft = len;
- savetab = (char *)malloc(saveleft);
- if (savetab == 0) {
- fprintf(stderr, "ran out of memory (savestr)\n");
- exit(1);
- }
- }
- strncpy(savetab, cp, len);
- cp = savetab;
- savetab += len;
- saveleft -= len;
- return (cp);
-}
-
-char *
-strspl(left, right)
- char *left, *right;
-{
- char buf[BUFSIZ];
-
- strcpy(buf, left);
- strcat(buf, right);
- return (savestr(buf));
-}
diff --git a/general/large2.c b/general/large2.c
deleted file mode 100644
index 5dd2950..0000000
--- a/general/large2.c
+++ /dev/null
@@ -1,443 +0,0 @@
-/* @(#)large.c 1.3 2002/12/13 Connectathon Testsuite */
-/*
- * cc - front end for C compiler
- */
-#include <sys/param.h>
-#ifndef major
-#include <sys/types.h>
-#endif
-#include <stdio.h>
-#include <ctype.h>
-#include <signal.h>
-#ifdef SVR4
-#include <dirent.h>
-#else
-#include <sys/dir.h>
-#endif
-
-#undef MAXNAMLEN
-#define MAXNAMLEN 256
-
-/* return type for signal handlers */
-#if defined(SVR4) || defined (TRU64)
-#define SIGHAND_T void
-#else
-#define SIGHAND_T int
-#endif
-
-char *cpp = "/lib/cpp";
-char *ccom = "/lib/ccom";
-char *c2 = "/lib/c2";
-char *as = "/bin/as";
-char *ld = "/bin/ld";
-char *crt0 = "/lib/crt0.o";
-
-char tmp0[30]; /* big enough for /tmp/ctm%05.5d */
-char *tmp1, *tmp2, *tmp3, *tmp4, *tmp5;
-char *outfile;
-char *savestr(), *strspl(), *setsuf();
-SIGHAND_T idexit();
-char **av, **clist, **llist, **plist;
-int cflag, eflag, oflag, pflag, sflag, wflag, Rflag, exflag, proflag;
-int gflag, Gflag;
-char *dflag;
-int exfail;
-char *passes;
-char *npassname;
-
-int nc, nl, np, nxo, na;
-
-#define cunlink(s) if (s) unlink(s)
-
-main(argc, argv)
- char **argv;
-{
- char *t;
- char *assource;
- int i, j, c;
-
- /* ld currently adds upto 5 args; 10 is room to spare */
- av = (char **)calloc(argc+10, sizeof (char **));
- clist = (char **)calloc(argc, sizeof (char **));
- llist = (char **)calloc(argc, sizeof (char **));
- plist = (char **)calloc(argc, sizeof (char **));
- for (i = 1; i < argc; i++) {
- if (*argv[i] == '-') switch (argv[i][1]) {
-
- case 'S':
- sflag++;
- cflag++;
- continue;
- case 'o':
- if (++i < argc) {
- outfile = argv[i];
- switch (getsuf(outfile)) {
-
- case 'c':
- case 'o':
- error("-o would overwrite %s",
- outfile);
- exit(8);
- }
- }
- continue;
- case 'R':
- Rflag++;
- continue;
- case 'O':
- oflag++;
- continue;
- case 'p':
- proflag++;
- crt0 = "/lib/mcrt0.o";
- if (argv[i][2] == 'g')
- crt0 = "/usr/lib/gcrt0.o";
- continue;
- case 'g':
- if (argv[i][2] == 'o') {
- Gflag++; /* old format for -go */
- } else {
- gflag++; /* new format for -g */
- }
- continue;
- case 'w':
- wflag++;
- continue;
- case 'E':
- exflag++;
- case 'P':
- pflag++;
- if (argv[i][1]=='P')
- fprintf(stderr,
- "cc: warning: -P option obsolete; you should use -E instead\n");
- plist[np++] = argv[i];
- case 'c':
- cflag++;
- continue;
- case 'D':
- case 'I':
- case 'U':
- case 'C':
- plist[np++] = argv[i];
- continue;
- case 't':
- if (passes)
- error("-t overwrites earlier option", 0);
- passes = argv[i]+2;
- if (passes[0]==0)
- passes = "012p";
- continue;
- case 'f':
- fprintf(stderr,
- "cc: warning: -f option obsolete (unnecessary)\n");
- continue;
- case 'B':
- if (npassname)
- error("-B overwrites earlier option", 0);
- npassname = argv[i]+2;
- if (npassname[0]==0)
- npassname = "/usr/c/o";
- continue;
- case 'd':
- dflag = argv[i];
- continue;
- }
- t = argv[i];
- c = getsuf(t);
- if (c=='c' || c=='s' || exflag) {
- clist[nc++] = t;
- t = setsuf(t, 'o');
- }
- if (nodup(llist, t)) {
- llist[nl++] = t;
- if (getsuf(t)=='o')
- nxo++;
- }
- }
- if (gflag || Gflag) {
- if (oflag)
- fprintf(stderr, "cc: warning: -g disables -O\n");
- oflag = 0;
- }
- if (npassname && passes ==0)
- passes = "012p";
- if (passes && npassname==0)
- npassname = "/usr/new";
- if (passes)
- for (t=passes; *t; t++) {
- switch (*t) {
-
- case '0':
- ccom = strspl(npassname, "ccom");
- continue;
- case '2':
- c2 = strspl(npassname, "c2");
- continue;
- case 'p':
- cpp = strspl(npassname, "cpp");
- continue;
- }
- }
- if (nc==0)
- goto nocom;
- if (signal(SIGINT, SIG_IGN) != SIG_IGN)
- signal(SIGINT, idexit);
- if (signal(SIGTERM, SIG_IGN) != SIG_IGN)
- signal(SIGTERM, idexit);
- if (pflag==0)
- sprintf(tmp0, "/tmp/ctm%05.5d", getpid());
- tmp1 = strspl(tmp0, "1");
- tmp2 = strspl(tmp0, "2");
- tmp3 = strspl(tmp0, "3");
- if (pflag==0)
- tmp4 = strspl(tmp0, "4");
- if (oflag)
- tmp5 = strspl(tmp0, "5");
- for (i=0; i<nc; i++) {
- if (nc > 1) {
- printf("%s:\n", clist[i]);
- fflush(stdout);
- }
- if (getsuf(clist[i]) == 's') {
- assource = clist[i];
- goto assemble;
- } else
- assource = tmp3;
- if (pflag)
- tmp4 = setsuf(clist[i], 'i');
- av[0] = "cpp"; av[1] = clist[i]; av[2] = exflag ? "-" : tmp4;
- na = 3;
- for (j = 0; j < np; j++)
- av[na++] = plist[j];
- av[na++] = 0;
- if (callsys(cpp, av)) {
- exfail++;
- eflag++;
- }
- if (pflag || exfail) {
- cflag++;
- continue;
- }
- if (sflag)
- assource = tmp3 = setsuf(clist[i], 's');
- av[0] = "ccom"; av[1] = tmp4; av[2] = oflag?tmp5:tmp3; na = 3;
- if (proflag)
- av[na++] = "-XP";
- if (gflag) {
- av[na++] = "-Xg";
- } else if (Gflag) {
- av[na++] = "-XG";
- }
- if (wflag)
- av[na++] = "-w";
- av[na] = 0;
- if (callsys(ccom, av)) {
- cflag++;
- eflag++;
- continue;
- }
- if (oflag) {
- av[0] = "c2"; av[1] = tmp5; av[2] = tmp3; av[3] = 0;
- if (callsys(c2, av)) {
- unlink(tmp3);
- tmp3 = assource = tmp5;
- } else
- unlink(tmp5);
- }
- if (sflag)
- continue;
- assemble:
- cunlink(tmp1); cunlink(tmp2); cunlink(tmp4);
- av[0] = "as"; av[1] = "-o"; av[2] = setsuf(clist[i], 'o');
- na = 3;
- if (Rflag)
- av[na++] = "-R";
- if (dflag)
- av[na++] = dflag;
- av[na++] = assource;
- av[na] = 0;
- if (callsys(as, av) > 1) {
- cflag++;
- eflag++;
- continue;
- }
- }
-nocom:
- if (cflag==0 && nl!=0) {
- i = 0;
- av[0] = "ld"; av[1] = "-X"; av[2] = crt0; na = 3;
- if (outfile) {
- av[na++] = "-o";
- av[na++] = outfile;
- }
- while (i < nl)
- av[na++] = llist[i++];
- if (gflag || Gflag)
- av[na++] = "-lg";
- if (proflag)
- av[na++] = "-lc_p";
- else
- av[na++] = "-lc";
- av[na++] = 0;
- eflag |= callsys(ld, av);
- if (nc==1 && nxo==1 && eflag==0)
- unlink(setsuf(clist[0], 'o'));
- }
- dexit();
-}
-
-SIGHAND_T
-idexit()
-{
-
- eflag = 100;
- dexit();
-}
-
-dexit()
-{
-
- if (!pflag) {
- cunlink(tmp1);
- cunlink(tmp2);
- if (sflag==0)
- cunlink(tmp3);
- cunlink(tmp4);
- cunlink(tmp5);
- }
- exit(eflag);
-}
-
-error(s, x)
- char *s, *x;
-{
- FILE *diag = exflag ? stderr : stdout;
-
- fprintf(diag, "cc: ");
- fprintf(diag, s, x);
- putc('\n', diag);
- exfail++;
- cflag++;
- eflag++;
-}
-
-getsuf(as)
-char as[];
-{
- register int c;
- register char *s;
- register int t;
-
- s = as;
- c = 0;
- while (t = *s++)
- if (t=='/')
- c = 0;
- else
- c++;
- s -= 3;
- if (c <= MAXNAMLEN && c > 2 && *s++ == '.')
- return (*s);
- return (0);
-}
-
-char *
-setsuf(as, ch)
- char *as;
-{
- register char *s, *s1;
-
- s = s1 = savestr(as);
- while (*s)
- if (*s++ == '/')
- s1 = s;
- s[-1] = ch;
- return (s1);
-}
-
-callsys(f, v)
- char *f, **v;
-{
- int t, status;
-
- t = fork();
- if (t == -1) {
- printf("No more processes\n");
- return (100);
- }
- if (t == 0) {
- execv(f, v);
- printf("Can't find %s\n", f);
- fflush(stdout);
- _exit(100);
- }
- while (t != wait(&status))
- ;
- if ((t=(status&0377)) != 0 && t!=14) {
- if (t!=2) {
- printf("Fatal error in %s\n", f);
- eflag = 8;
- }
- dexit();
- }
- return ((status>>8) & 0377);
-}
-
-nodup(l, os)
- char **l, *os;
-{
- register char *t, *s;
- register int c;
-
- s = os;
- if (getsuf(s) != 'o')
- return (1);
- while (t = *l++) {
- while (c = *s++)
- if (c != *t++)
- break;
- if (*t==0 && c==0)
- return (0);
- s = os;
- }
- return (1);
-}
-
-#define NSAVETAB 1024
-char *savetab;
-int saveleft;
-
-char *
-savestr(cp)
- register char *cp;
-{
- register int len;
-
- len = strlen(cp) + 1;
- if (len > saveleft) {
- saveleft = NSAVETAB;
- if (len > saveleft)
- saveleft = len;
- savetab = (char *)malloc(saveleft);
- if (savetab == 0) {
- fprintf(stderr, "ran out of memory (savestr)\n");
- exit(1);
- }
- }
- strncpy(savetab, cp, len);
- cp = savetab;
- savetab += len;
- saveleft -= len;
- return (cp);
-}
-
-char *
-strspl(left, right)
- char *left, *right;
-{
- char buf[BUFSIZ];
-
- strcpy(buf, left);
- strcat(buf, right);
- return (savestr(buf));
-}
diff --git a/general/large3.c b/general/large3.c
deleted file mode 100644
index 5dd2950..0000000
--- a/general/large3.c
+++ /dev/null
@@ -1,443 +0,0 @@
-/* @(#)large.c 1.3 2002/12/13 Connectathon Testsuite */
-/*
- * cc - front end for C compiler
- */
-#include <sys/param.h>
-#ifndef major
-#include <sys/types.h>
-#endif
-#include <stdio.h>
-#include <ctype.h>
-#include <signal.h>
-#ifdef SVR4
-#include <dirent.h>
-#else
-#include <sys/dir.h>
-#endif
-
-#undef MAXNAMLEN
-#define MAXNAMLEN 256
-
-/* return type for signal handlers */
-#if defined(SVR4) || defined (TRU64)
-#define SIGHAND_T void
-#else
-#define SIGHAND_T int
-#endif
-
-char *cpp = "/lib/cpp";
-char *ccom = "/lib/ccom";
-char *c2 = "/lib/c2";
-char *as = "/bin/as";
-char *ld = "/bin/ld";
-char *crt0 = "/lib/crt0.o";
-
-char tmp0[30]; /* big enough for /tmp/ctm%05.5d */
-char *tmp1, *tmp2, *tmp3, *tmp4, *tmp5;
-char *outfile;
-char *savestr(), *strspl(), *setsuf();
-SIGHAND_T idexit();
-char **av, **clist, **llist, **plist;
-int cflag, eflag, oflag, pflag, sflag, wflag, Rflag, exflag, proflag;
-int gflag, Gflag;
-char *dflag;
-int exfail;
-char *passes;
-char *npassname;
-
-int nc, nl, np, nxo, na;
-
-#define cunlink(s) if (s) unlink(s)
-
-main(argc, argv)
- char **argv;
-{
- char *t;
- char *assource;
- int i, j, c;
-
- /* ld currently adds upto 5 args; 10 is room to spare */
- av = (char **)calloc(argc+10, sizeof (char **));
- clist = (char **)calloc(argc, sizeof (char **));
- llist = (char **)calloc(argc, sizeof (char **));
- plist = (char **)calloc(argc, sizeof (char **));
- for (i = 1; i < argc; i++) {
- if (*argv[i] == '-') switch (argv[i][1]) {
-
- case 'S':
- sflag++;
- cflag++;
- continue;
- case 'o':
- if (++i < argc) {
- outfile = argv[i];
- switch (getsuf(outfile)) {
-
- case 'c':
- case 'o':
- error("-o would overwrite %s",
- outfile);
- exit(8);
- }
- }
- continue;
- case 'R':
- Rflag++;
- continue;
- case 'O':
- oflag++;
- continue;
- case 'p':
- proflag++;
- crt0 = "/lib/mcrt0.o";
- if (argv[i][2] == 'g')
- crt0 = "/usr/lib/gcrt0.o";
- continue;
- case 'g':
- if (argv[i][2] == 'o') {
- Gflag++; /* old format for -go */
- } else {
- gflag++; /* new format for -g */
- }
- continue;
- case 'w':
- wflag++;
- continue;
- case 'E':
- exflag++;
- case 'P':
- pflag++;
- if (argv[i][1]=='P')
- fprintf(stderr,
- "cc: warning: -P option obsolete; you should use -E instead\n");
- plist[np++] = argv[i];
- case 'c':
- cflag++;
- continue;
- case 'D':
- case 'I':
- case 'U':
- case 'C':
- plist[np++] = argv[i];
- continue;
- case 't':
- if (passes)
- error("-t overwrites earlier option", 0);
- passes = argv[i]+2;
- if (passes[0]==0)
- passes = "012p";
- continue;
- case 'f':
- fprintf(stderr,
- "cc: warning: -f option obsolete (unnecessary)\n");
- continue;
- case 'B':
- if (npassname)
- error("-B overwrites earlier option", 0);
- npassname = argv[i]+2;
- if (npassname[0]==0)
- npassname = "/usr/c/o";
- continue;
- case 'd':
- dflag = argv[i];
- continue;
- }
- t = argv[i];
- c = getsuf(t);
- if (c=='c' || c=='s' || exflag) {
- clist[nc++] = t;
- t = setsuf(t, 'o');
- }
- if (nodup(llist, t)) {
- llist[nl++] = t;
- if (getsuf(t)=='o')
- nxo++;
- }
- }
- if (gflag || Gflag) {
- if (oflag)
- fprintf(stderr, "cc: warning: -g disables -O\n");
- oflag = 0;
- }
- if (npassname && passes ==0)
- passes = "012p";
- if (passes && npassname==0)
- npassname = "/usr/new";
- if (passes)
- for (t=passes; *t; t++) {
- switch (*t) {
-
- case '0':
- ccom = strspl(npassname, "ccom");
- continue;
- case '2':
- c2 = strspl(npassname, "c2");
- continue;
- case 'p':
- cpp = strspl(npassname, "cpp");
- continue;
- }
- }
- if (nc==0)
- goto nocom;
- if (signal(SIGINT, SIG_IGN) != SIG_IGN)
- signal(SIGINT, idexit);
- if (signal(SIGTERM, SIG_IGN) != SIG_IGN)
- signal(SIGTERM, idexit);
- if (pflag==0)
- sprintf(tmp0, "/tmp/ctm%05.5d", getpid());
- tmp1 = strspl(tmp0, "1");
- tmp2 = strspl(tmp0, "2");
- tmp3 = strspl(tmp0, "3");
- if (pflag==0)
- tmp4 = strspl(tmp0, "4");
- if (oflag)
- tmp5 = strspl(tmp0, "5");
- for (i=0; i<nc; i++) {
- if (nc > 1) {
- printf("%s:\n", clist[i]);
- fflush(stdout);
- }
- if (getsuf(clist[i]) == 's') {
- assource = clist[i];
- goto assemble;
- } else
- assource = tmp3;
- if (pflag)
- tmp4 = setsuf(clist[i], 'i');
- av[0] = "cpp"; av[1] = clist[i]; av[2] = exflag ? "-" : tmp4;
- na = 3;
- for (j = 0; j < np; j++)
- av[na++] = plist[j];
- av[na++] = 0;
- if (callsys(cpp, av)) {
- exfail++;
- eflag++;
- }
- if (pflag || exfail) {
- cflag++;
- continue;
- }
- if (sflag)
- assource = tmp3 = setsuf(clist[i], 's');
- av[0] = "ccom"; av[1] = tmp4; av[2] = oflag?tmp5:tmp3; na = 3;
- if (proflag)
- av[na++] = "-XP";
- if (gflag) {
- av[na++] = "-Xg";
- } else if (Gflag) {
- av[na++] = "-XG";
- }
- if (wflag)
- av[na++] = "-w";
- av[na] = 0;
- if (callsys(ccom, av)) {
- cflag++;
- eflag++;
- continue;
- }
- if (oflag) {
- av[0] = "c2"; av[1] = tmp5; av[2] = tmp3; av[3] = 0;
- if (callsys(c2, av)) {
- unlink(tmp3);
- tmp3 = assource = tmp5;
- } else
- unlink(tmp5);
- }
- if (sflag)
- continue;
- assemble:
- cunlink(tmp1); cunlink(tmp2); cunlink(tmp4);
- av[0] = "as"; av[1] = "-o"; av[2] = setsuf(clist[i], 'o');
- na = 3;
- if (Rflag)
- av[na++] = "-R";
- if (dflag)
- av[na++] = dflag;
- av[na++] = assource;
- av[na] = 0;
- if (callsys(as, av) > 1) {
- cflag++;
- eflag++;
- continue;
- }
- }
-nocom:
- if (cflag==0 && nl!=0) {
- i = 0;
- av[0] = "ld"; av[1] = "-X"; av[2] = crt0; na = 3;
- if (outfile) {
- av[na++] = "-o";
- av[na++] = outfile;
- }
- while (i < nl)
- av[na++] = llist[i++];
- if (gflag || Gflag)
- av[na++] = "-lg";
- if (proflag)
- av[na++] = "-lc_p";
- else
- av[na++] = "-lc";
- av[na++] = 0;
- eflag |= callsys(ld, av);
- if (nc==1 && nxo==1 && eflag==0)
- unlink(setsuf(clist[0], 'o'));
- }
- dexit();
-}
-
-SIGHAND_T
-idexit()
-{
-
- eflag = 100;
- dexit();
-}
-
-dexit()
-{
-
- if (!pflag) {
- cunlink(tmp1);
- cunlink(tmp2);
- if (sflag==0)
- cunlink(tmp3);
- cunlink(tmp4);
- cunlink(tmp5);
- }
- exit(eflag);
-}
-
-error(s, x)
- char *s, *x;
-{
- FILE *diag = exflag ? stderr : stdout;
-
- fprintf(diag, "cc: ");
- fprintf(diag, s, x);
- putc('\n', diag);
- exfail++;
- cflag++;
- eflag++;
-}
-
-getsuf(as)
-char as[];
-{
- register int c;
- register char *s;
- register int t;
-
- s = as;
- c = 0;
- while (t = *s++)
- if (t=='/')
- c = 0;
- else
- c++;
- s -= 3;
- if (c <= MAXNAMLEN && c > 2 && *s++ == '.')
- return (*s);
- return (0);
-}
-
-char *
-setsuf(as, ch)
- char *as;
-{
- register char *s, *s1;
-
- s = s1 = savestr(as);
- while (*s)
- if (*s++ == '/')
- s1 = s;
- s[-1] = ch;
- return (s1);
-}
-
-callsys(f, v)
- char *f, **v;
-{
- int t, status;
-
- t = fork();
- if (t == -1) {
- printf("No more processes\n");
- return (100);
- }
- if (t == 0) {
- execv(f, v);
- printf("Can't find %s\n", f);
- fflush(stdout);
- _exit(100);
- }
- while (t != wait(&status))
- ;
- if ((t=(status&0377)) != 0 && t!=14) {
- if (t!=2) {
- printf("Fatal error in %s\n", f);
- eflag = 8;
- }
- dexit();
- }
- return ((status>>8) & 0377);
-}
-
-nodup(l, os)
- char **l, *os;
-{
- register char *t, *s;
- register int c;
-
- s = os;
- if (getsuf(s) != 'o')
- return (1);
- while (t = *l++) {
- while (c = *s++)
- if (c != *t++)
- break;
- if (*t==0 && c==0)
- return (0);
- s = os;
- }
- return (1);
-}
-
-#define NSAVETAB 1024
-char *savetab;
-int saveleft;
-
-char *
-savestr(cp)
- register char *cp;
-{
- register int len;
-
- len = strlen(cp) + 1;
- if (len > saveleft) {
- saveleft = NSAVETAB;
- if (len > saveleft)
- saveleft = len;
- savetab = (char *)malloc(saveleft);
- if (savetab == 0) {
- fprintf(stderr, "ran out of memory (savestr)\n");
- exit(1);
- }
- }
- strncpy(savetab, cp, len);
- cp = savetab;
- savetab += len;
- saveleft -= len;
- return (cp);
-}
-
-char *
-strspl(left, right)
- char *left, *right;
-{
- char buf[BUFSIZ];
-
- strcpy(buf, left);
- strcat(buf, right);
- return (savestr(buf));
-}
--
1.7.1
^ permalink raw reply related
* [patch] mac80211: remove unneeded check
From: Dan Carpenter @ 2011-02-07 19:03 UTC (permalink / raw)
To: Johannes Berg; +Cc: John W. Linville, linux-wireless, kernel-janitors
"ap" is the address of sdata->u.ap so it can never be NULL here. Also
we dereferenced it on the previous line. I removed the check.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index f305835..ce01bee 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2242,7 +2242,7 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
if (sdata->vif.type == NL80211_IFTYPE_AP) {
ap = &sdata->u.ap;
beacon = rcu_dereference(ap->beacon);
- if (ap && beacon) {
+ if (beacon) {
/*
* headroom, head length,
* tail length and maximum TIM length
^ permalink raw reply related
* [patch] mac80211: remove unneeded check
From: Dan Carpenter @ 2011-02-07 19:03 UTC (permalink / raw)
To: Johannes Berg; +Cc: John W. Linville, linux-wireless, kernel-janitors
"ap" is the address of sdata->u.ap so it can never be NULL here. Also
we dereferenced it on the previous line. I removed the check.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index f305835..ce01bee 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2242,7 +2242,7 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
if (sdata->vif.type = NL80211_IFTYPE_AP) {
ap = &sdata->u.ap;
beacon = rcu_dereference(ap->beacon);
- if (ap && beacon) {
+ if (beacon) {
/*
* headroom, head length,
* tail length and maximum TIM length
^ permalink raw reply related
* Re: Numonyx NOR and chip->mutex bug?
From: Michael Cashwell @ 2011-02-07 19:04 UTC (permalink / raw)
To: stefan.bigler; +Cc: linux-mtd, Holger brunck, Joakim Tjernlund
In-Reply-To: <4D502727.5010208@keymile.com>
On Feb 7, 2011, at 12:08 PM, Stefan Bigler wrote:
> Hi Mike
>
> I attached a patch for you adding some printk, with those already the creation of the first ubivolume goes wrong.
> Is this also the case in your setup?
Greetings and thanks,
Unfortunately, as I've seen before, adding printks tends to make my problem go away, particularly right after the 0xd0 erase resume command. That's the same place that I also found calls like udelay(20) and (void) map_read() of status also hide the failure. (On a lark, I just tried doing that print just before the resume command but it made no difference.)
To avoid masking the failure I think I need to collect information into a static buffer and printk the buffered data only on the error path. That way, the timing of the code hopefully won't change enough to hide the problem. That's more complicated to do, of course.
More as I find it.
-Mike
> Subject: [PATCH 2/2] MTD: cfi_cmdset_0001 driver add tracing
>
> This tracing force in my case a race condition. When I create
> a ubivolume.
>
> Signed-off-by: Stefan Bigler <stefan.bigler@keymile.com>
> ---
> drivers/mtd/chips/cfi_cmdset_0001.c | 15 +++++++++++++++
> 1 files changed, 15 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
> index d3b2cd3..ea59726 100644
> --- a/drivers/mtd/chips/cfi_cmdset_0001.c
> +++ b/drivers/mtd/chips/cfi_cmdset_0001.c
> @@ -37,6 +37,8 @@
> #include <linux/mtd/compatmac.h>
> #include <linux/mtd/cfi.h>
>
> +#include <linux/syscalls.h>
> +
> /* #define CMDSET0001_DISABLE_ERASE_SUSPEND_ON_WRITE */
> /* #define CMDSET0001_DISABLE_WRITE_SUSPEND */
>
> @@ -799,6 +801,8 @@ static int chip_ready (struct map_info *map, struct flchip *chip, unsigned long
>
> /* Erase suspend */
> map_write(map, CMD(0xB0), adr);
> + printk("[%10u][%04ld] erase suspend 1 adr=0x%08lx\n",
> + jiffies_to_usecs(jiffies)/1000, sys_gettid(), adr);
>
> /* If the flash has finished erasing, then 'erase suspend'
> * appears to make some (28F320) flash devices switch to
> @@ -1012,6 +1016,10 @@ static void put_chip(struct map_info *map, struct flchip *chip, unsigned long ad
> do. */
> map_write(map, CMD(0xd0), adr);
> map_write(map, CMD(0x70), adr);
> +
> + printk("[%10u][%04ld] erase resumed 2b adr=0x%08lx\n",
> + jiffies_to_usecs(jiffies)/1000, sys_gettid(), adr);
> +
> chip->oldstate = FL_READY;
> chip->state = FL_ERASING;
> break;
> @@ -1884,6 +1892,10 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip,
> retry:
> mutex_lock(&chip->mutex);
> ret = get_chip(map, chip, adr, FL_ERASING);
> +
> + printk("[%10u][%04ld] do_erase_oneblock start adr=0x%08lx len=0x%x\n",
> + jiffies_to_usecs(jiffies)/1000, sys_gettid(), adr, len);
> +
> if (ret) {
> mutex_unlock(&chip->mutex);
> return ret;
> @@ -1953,6 +1965,9 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip,
>
> xip_enable(map, chip, adr);
> out: put_chip(map, chip, adr);
> + printk("[%10u][%04ld] do_erase_oneblock end adr=0x%08lx len=0x%x \n",
> + jiffies_to_usecs(jiffies)/1000, sys_gettid(), adr, len);
> +
> mutex_unlock(&chip->mutex);
> return ret;
> }
> --
> 1.7.0.5
>
> Am 02/07/2011 05:46 PM, schrieb Michael Cashwell:
>> On Feb 7, 2011, at 11:22 AM, Joakim Tjernlund wrote:
>>
>>> Michael Cashwell<mboards@prograde.net> wrote on 2011/02/07 16:46:22:
>>>
>>>> My current workaround from my problem is to do a throw-away status read "(void) map_read(map, addr);" after that 0x50, 0xd0, 0x70 sequence. Since no one else is seeing my problem I expect it's some issue with my specific batch of chips. Ugh.
>>>
>>> Possibly, or an accident waiting to happen to the rest of us.
>>
>> That does worry me too.
>>
>>> The map_read will probably force some HW completion. Perhaps some sync() op. will do the same? Just to nail it down.
>>
>> Once your patch is handled I will continue to try to fully explain my issue. I'm not giving up yet.
>>
>>> BTW, do you have CONFIG_MTD_COMPLEX_MAPPINGS=y ? I do
>>
>> Interesting. I have used that on a different platform where some of the high-order address lines were GPIOs.
>>
>> But no, I'm not using that in this case. Just a simple linear mapping of the whole part.
>>
>> -Mike
>>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply
* Re: [Xenomai-help] Exception handlers in primary domain / user-space signals
From: Henri Roosen @ 2011-02-07 19:02 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
In-Reply-To: <4D5039AD.2070205@domain.hid>
On Mon, Feb 7, 2011 at 7:27 PM, Gilles Chanteperdrix
<gilles.chanteperdrix@xenomai.org> wrote:
> Henri Roosen wrote:
>> We are using signal handlers for catching exceptions which our
>> application is allowed to make and which we know how to handle.
>>
>> The current Xenomai implementation is to switch to the secondary
>> domain and call the handlers from there.
>> Unfortunately this takes too much time for our application and we
>> would like to handle the exception without the switch to the secondary
>> domain, in primary domain.
>>
>> Can anyone give some advice how to implement that?
>> Will "user-space signals" which was planned for Xenomai 2.6 fulfill this need?
>> Is there already code available for user-space signals?
>
> In the 2.5 series, we added some code to support signals. The signals
> are multiplexed per-skin in kernel-space, and demultiplexed in
> user-space, upon exit of system calls. We implemented a unit test of
> this functionality with the "sigtest" skin and user-space test, but they
> only work upon return from system calls.
>
> Then we added support for the "mayday" page, which made us realize, that
> maybe implementing signals handling at any time, not only when returning
> from system calls, was possible. But then came the realization that in
> order to implement that, we would have to fiddle with the FPU, which is
> an area where we have a certain tradition for not getting the things
> right at the first attempt. So, we kind of stopped here.
>
> So, if you want some ad-hoc signals upon return from system call, the
> task is pretty easy. If you want the full posix signals interface, then
> things are going to be a bit harder.
>
I am afraid it's going to be a bit harder; we would need it when the
exception occurs and that is in most cases not at a place in the code
where there is a system call :-(.
I was thinking of adding a hook in Xenomai's exception handler before
it makes the switch to the secondary domain... but that would of
course be a very ugly hack and I don't know if it can be done. Do you
have a suggestion?
What are the plans with the full posix signals interface?
Thanks,
> --
> Gilles.
>
^ permalink raw reply
* [patch] ALSA: soc-cache: dereferencing before checking
From: Dan Carpenter @ 2011-02-07 19:01 UTC (permalink / raw)
To: Liam Girdwood; +Cc: Takashi Iwai, alsa-devel, Mark Brown, kernel-janitors
The patch c358e640a66 "ASoC: soc-cache: Add trace event for
snd_soc_cache_sync()" introduced a dereference of "codec->cache_ops"
before we had checked it for NULL.
I pulled the check forward, and then pulled everything in an indent
level.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c
index db66dc4..5d76da4 100644
--- a/sound/soc/soc-cache.c
+++ b/sound/soc/soc-cache.c
@@ -1609,24 +1609,23 @@ int snd_soc_cache_sync(struct snd_soc_codec *codec)
return 0;
}
+ if (!codec->cache_ops || !codec->cache_ops->sync)
+ return -EINVAL;
+
if (codec->cache_ops->name)
name = codec->cache_ops->name;
else
name = "unknown";
- if (codec->cache_ops && codec->cache_ops->sync) {
- if (codec->cache_ops->name)
- dev_dbg(codec->dev, "Syncing %s cache for %s codec\n",
- codec->cache_ops->name, codec->name);
- trace_snd_soc_cache_sync(codec, name, "start");
- ret = codec->cache_ops->sync(codec);
- if (!ret)
- codec->cache_sync = 0;
- trace_snd_soc_cache_sync(codec, name, "end");
- return ret;
- }
-
- return -EINVAL;
+ if (codec->cache_ops->name)
+ dev_dbg(codec->dev, "Syncing %s cache for %s codec\n",
+ codec->cache_ops->name, codec->name);
+ trace_snd_soc_cache_sync(codec, name, "start");
+ ret = codec->cache_ops->sync(codec);
+ if (!ret)
+ codec->cache_sync = 0;
+ trace_snd_soc_cache_sync(codec, name, "end");
+ return ret;
}
EXPORT_SYMBOL_GPL(snd_soc_cache_sync);
^ permalink raw reply related
* Re: [PATCH] x86/mm/init: respect memblock reserved regions when destroying mappings
From: Yinghai Lu @ 2011-02-07 19:00 UTC (permalink / raw)
To: Stefano Stabellini
Cc: H. Peter Anvin, Jeremy Fitzhardinge, linux-kernel@vger.kernel.org,
tglx@linutronix.de, x86@kernel.org, Konrad Rzeszutek Wilk,
Jan Beulich
In-Reply-To: <alpine.DEB.2.00.1102071839060.7277@kaball-desktop>
On 02/07/2011 10:58 AM, Stefano Stabellini wrote:
> On Mon, 7 Feb 2011, Yinghai Lu wrote:
>> On 02/07/2011 08:50 AM, Stefano Stabellini wrote:
>>> On Sun, 6 Feb 2011, Yinghai Lu wrote:
>>>> On 02/05/2011 11:30 PM, H. Peter Anvin wrote:
>>>>> On 02/05/2011 11:02 PM, Yinghai Lu wrote:
>>>>>> why not just move calling cleanup_highmap down?
>>>>>>
>>>>>> something like attached patch.
>>>>>
>>>>> This patch looks very clean and looks on the surface of it like it is
>>>>> removing some ugly ad hoc code, but (as always) it needs a description
>>>>> about the problem it solves and why it is correct.
>>>>
>>>> Sure.
>>>>
>>>>
>>>> Jeremy and xen guys, can you please check if it works well with xen ?
>>>>
>>>
>>> Actually this patch makes things worse on xen, because before
>>> cleanup_highmap() wasn't called at all on xen (on purpose) and now it
>>> is, fully destroying all the mappings we have at _end.
>>>
>>> Can we add a check on memblock reserved regions in cleanup_highmap()?
>>> Otherwise could we avoid calling cleanup_highmap() at all on xen?
>>
>> why DO xen need over-mapped kernel initial mapping?
>>
>> what is in that range after _end to 512M?
>
> The mfn list that is the list of machine frame numbers assigned to this
> domain; it is used across the kernel to convert pfns into mfns.
> It passed to us at that address by the domain builder.
is it possible for you to pass physical address, and then map it in kernel?
^ permalink raw reply
* [patch] ALSA: soc-cache: dereferencing before checking
From: Dan Carpenter @ 2011-02-07 19:01 UTC (permalink / raw)
To: Liam Girdwood; +Cc: Takashi Iwai, alsa-devel, Mark Brown, kernel-janitors
The patch c358e640a66 "ASoC: soc-cache: Add trace event for
snd_soc_cache_sync()" introduced a dereference of "codec->cache_ops"
before we had checked it for NULL.
I pulled the check forward, and then pulled everything in an indent
level.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c
index db66dc4..5d76da4 100644
--- a/sound/soc/soc-cache.c
+++ b/sound/soc/soc-cache.c
@@ -1609,24 +1609,23 @@ int snd_soc_cache_sync(struct snd_soc_codec *codec)
return 0;
}
+ if (!codec->cache_ops || !codec->cache_ops->sync)
+ return -EINVAL;
+
if (codec->cache_ops->name)
name = codec->cache_ops->name;
else
name = "unknown";
- if (codec->cache_ops && codec->cache_ops->sync) {
- if (codec->cache_ops->name)
- dev_dbg(codec->dev, "Syncing %s cache for %s codec\n",
- codec->cache_ops->name, codec->name);
- trace_snd_soc_cache_sync(codec, name, "start");
- ret = codec->cache_ops->sync(codec);
- if (!ret)
- codec->cache_sync = 0;
- trace_snd_soc_cache_sync(codec, name, "end");
- return ret;
- }
-
- return -EINVAL;
+ if (codec->cache_ops->name)
+ dev_dbg(codec->dev, "Syncing %s cache for %s codec\n",
+ codec->cache_ops->name, codec->name);
+ trace_snd_soc_cache_sync(codec, name, "start");
+ ret = codec->cache_ops->sync(codec);
+ if (!ret)
+ codec->cache_sync = 0;
+ trace_snd_soc_cache_sync(codec, name, "end");
+ return ret;
}
EXPORT_SYMBOL_GPL(snd_soc_cache_sync);
^ permalink raw reply related
* Re: [PATCH 3/4] nettime: Documentation
From: Marcel Holtmann @ 2011-02-07 19:00 UTC (permalink / raw)
To: ofono
In-Reply-To: <1296571771-26513-4-git-send-email-antti.paila@nokia.com>
[-- Attachment #1: Type: text/plain, Size: 769 bytes --]
Hi Antti,
> doc/network-time-api.txt | 36 ++++++++++++++++++++++++++++++++++++
> 1 files changed, 36 insertions(+), 0 deletions(-)
> create mode 100644 doc/network-time-api.txt
>
> diff --git a/doc/network-time-api.txt b/doc/network-time-api.txt
> new file mode 100644
> index 0000000..9133a73
> --- /dev/null
> +++ b/doc/network-time-api.txt
> @@ -0,0 +1,36 @@
> +Network time hierarchy
> +======================
> +
> +Interface com.meego.NetworkTime
> +Object path [variable]
the object path is not really variable. However this part of the
documentation should be really inside timed. Since timed is exposing
this interface in the first place.
And we are moving from com.nokia.timed towards com.meego.timed?
Regards
Marcel
^ permalink raw reply
* Re: [PATCH 1/4] nettime: Network time plugin implementation
From: Marcel Holtmann @ 2011-02-07 18:58 UTC (permalink / raw)
To: ofono
In-Reply-To: <1296571771-26513-2-git-send-email-antti.paila@nokia.com>
[-- Attachment #1: Type: text/plain, Size: 9078 bytes --]
Hi Antti,
> plugins/nettime.c | 326 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 326 insertions(+), 0 deletions(-)
> create mode 100644 plugins/nettime.c
I would prefer if we call this nokia-timed.c or in case this actually
becomes default part of MeeGo, them maybe meego-timed.c. I would be also
fine with {nokia,meego}-nettime.c.
Just calling it nettime.c is too generic. It needs to be clear what this
is for.
> +#define TIMED_PATH "/com/meego/time"
> +#define TIMED_SERVICE "com.meego.time"
So the intention is to convert the Nokia timed into a MeeGo specific
daemon? I would have expected to see com.nokia.timed here.
> +struct nt_data {
> + gboolean time_available;
> + gboolean time_pending;
> + time_t nw_time_utc;
> + time_t received;
> + int dst;
> + int time_zone;
> + const char *mcc;
> + const char *mnc;
Why do you bother with these here. You might better just reference the
netreg atom. The memory is only valid if netreg atom is present.
> + unsigned int timed_watch;
> + gboolean timed_present;
> + struct ofono_netreg *netreg;
> + unsigned int netreg_st_watch;
> +
> +};
> +
> +static void nettime_register(struct ofono_nettime_context *);
> +
> +static gboolean encode_time_format(struct ofono_network_time *time,
> + struct tm *tm)
> +{
> +
> + tm->tm_gmtoff = time->utcoff;
> + tm->tm_isdst = time->dst;
> +
> + if (time->year < 0)
> + return FALSE;
> +
> + tm->tm_year = time->year - 1900;
> + tm->tm_mon = time->mon - 1;
> + tm->tm_mday = time->mday;
> + tm->tm_hour = time->hour;
> + tm->tm_min = time->min;
> + tm->tm_sec = time->sec;
> +
> + return TRUE;
> +}
> +
> +static time_t get_monotonic_time()
> +{
> + struct timespec ts;
> + clock_gettime(CLOCK_MONOTONIC, &ts);
> + return ts.tv_sec;
> +}
> +
> +static int fill_time_notification(DBusMessage *msg,
> + struct nt_data *ntd)
> +{
> + DBusMessageIter iter, iter_array;
> + int64_t utc;
> +
> + dbus_message_iter_init_append(msg, &iter);
> + dbus_message_iter_open_container(&iter,
> + DBUS_TYPE_ARRAY,
> + "{sv}",
> + &iter_array);
> +
> + if (ntd->time_pending) {
> + if (ntd->time_available) {
> + utc = ntd->nw_time_utc - ntd->received;
> + ofono_dbus_dict_append(&iter_array,
> + "UTC",
> + DBUS_TYPE_INT64,
> + &utc);
> + }
> +
> + ofono_dbus_dict_append(&iter_array,
> + "DST",
> + DBUS_TYPE_INT32,
> + &ntd->dst);
> + ofono_dbus_dict_append(&iter_array,
> + "Timezone",
> + DBUS_TYPE_INT32,
> + &ntd->time_zone);
> + }
> +
> + ofono_dbus_dict_append(&iter_array,
> + "MobileCountryCode",
> + DBUS_TYPE_STRING,
> + &ntd->mcc);
> + ofono_dbus_dict_append(&iter_array,
> + "MobileNetworkCode",
> + DBUS_TYPE_STRING,
> + &ntd->mnc);
> +
> + dbus_message_iter_close_container(&iter, &iter_array);
> + return 0;
> +}
> +
> +static DBusMessage *create_time_notification(
> + struct ofono_nettime_context *context)
> +{
> + DBusMessage *message;
> + struct nt_data *ntd = context->data;
> + const char *path = ofono_modem_get_path(context->modem);
> +
> + if (path == NULL) {
> + ofono_error("Fetching path for modem failed");
> + return NULL;
> + }
> +
> + message = dbus_message_new_method_call(TIMED_SERVICE, TIMED_PATH,
> + "com.meego.NetworkTime", "Notify");
> + if (message == NULL)
> + return NULL;
> +
> + dbus_message_set_no_reply(message, TRUE);
> + fill_time_notification(message, ntd);
> +
> + return message;
> +}
> +
> +static void init_time(struct ofono_nettime_context *context)
> +{
> + struct nt_data *nt_data = g_new0(struct nt_data, 1);
> +
> + nt_data->time_available = FALSE;
> + nt_data->time_pending = FALSE;
> + nt_data->dst = 0;
> + nt_data->time_zone = 0;
> +
> + context->data = nt_data;
> +}
> +
> +static int nettime_probe(struct ofono_nettime_context *context)
> +{
> + DBG("Network Time Probe for modem: %p", context->modem);
> +
> + init_time(context);
Please just don't bother with putting this in separate function. It only
has one caller and I prefer the context->data allocation being in the
probe() callback directly.
> + nettime_register(context);
Same for this one. Also I don't see the point of the forward
declaration.
> +static void nettime_remove(struct ofono_nettime_context *context)
> +{
> + struct nt_data *ntd = context->data;
> +
> + DBG("Network Time Remove for modem: %p", context->modem);
> + g_dbus_remove_watch(ofono_dbus_get_connection(),
> + ntd->timed_watch);
> + g_free(ntd);
> +}
You can avoid certain checks here, but then you need to have clear error
handling in probe() callback.
> +static void notify(int status, int lac, int ci, int tech, const char *mcc,
> + const char *mnc, void *data)
> +{
> + struct ofono_nettime_context *context = data;
> + struct nt_data *ntd = context->data;
> + DBusMessage *message;
> +
> + if (mcc == NULL || mnc == NULL)
> + return;
> +
> + ntd->mcc = mcc;
> + ntd->mnc = mnc;
> +
> + if (ntd->timed_present == FALSE) {
> + DBG("Timed not present. Caching time info");
> + return;
> + }
> +
> + message = create_time_notification(context);
> + if (message == NULL) {
> + ofono_error("Failed to create Notification message");
> + return;
> + }
> +
> + g_dbus_send_message(ofono_dbus_get_connection(), message);
> + ntd->time_pending = FALSE;
> +}
> +
> +static void nr_st_watch_destroy(void *data)
> +{
> + struct ofono_nettime_context *context = data;
> + struct nt_data *ntd = context->data;
> + DBG("");
> +
> + ntd->netreg_st_watch = 0;
> +}
> +
> +static void nettime_info_received(struct ofono_nettime_context *context,
> + struct ofono_network_time *info)
> +{
> + struct tm t;
> + struct nt_data *ntd = context->data;
> + const char *mcc, *mnc;
> +
> + DBG("Network time notification received, modem: %p",
> + context->modem);
> +
> + if (info == NULL)
> + return;
> +
> + ntd->received = get_monotonic_time();
> + ntd->time_pending = TRUE;
> +
> + ntd->time_available = encode_time_format(info, &t);
> + if (ntd->time_available == TRUE)
> + ntd->nw_time_utc = timegm(&t);
> +
> + ntd->dst = info->dst;
> + ntd->time_zone = info->utcoff;
> +
> + ntd->netreg = __ofono_atom_get_data(__ofono_modem_find_atom(
> + context->modem, OFONO_ATOM_TYPE_NETREG));
> +
> + mcc = ofono_netreg_get_mcc(ntd->netreg);
> + mnc = ofono_netreg_get_mnc(ntd->netreg);
> + if ((mcc == NULL) || (mnc == NULL)) {
> + DBG("Mobile country/network code missing");
> +
> + if (ntd->netreg_st_watch != 0)
> + return;
> +
> + ntd->netreg_st_watch = __ofono_netreg_add_status_watch(
> + ntd->netreg, notify,
> + context, nr_st_watch_destroy);
> + } else {
> + notify(0, 0, 0, 0, mcc, mnc, context);
> + }
> +
> +}
> +
> +static struct ofono_nettime_driver nettime_driver = {
> + .name = "Network Time",
> + .probe = nettime_probe,
> + .remove = nettime_remove,
> + .info_received = nettime_info_received,
> +};
> +
> +static int nettime_init(void)
> +{
> + return ofono_nettime_driver_register(&nettime_driver);
> +}
> +
> +static void nettime_exit(void)
> +{
> + ofono_nettime_driver_unregister(&nettime_driver);
> +}
So in general the plugin init/exit functions should be last in the
source code. Just above the OFONO_PLUGIN_DEFINE. That way it is
consistent and a lot easier to read.
Also the generic nettime_* namespacing might be better done as
nokia_timed_* or just short timed_*.
> +static void timed_connect(DBusConnection *connection, void *user_data)
> +{
> + struct ofono_nettime_context *context = user_data;
> + struct nt_data *ntd = context->data;
> + const char *mcc, *mnc;
> +
> + DBG("");
> +
> + ntd->timed_present = TRUE;
> + mcc = ofono_netreg_get_mcc(ntd->netreg);
> + mnc = ofono_netreg_get_mnc(ntd->netreg);
> +
> + notify(0, 0, 0, 0, mcc, mnc, context);
> +}
> +
> +static void timed_disconnect(DBusConnection *connection, void *user_data)
> +{
> + struct ofono_nettime_context *context = user_data;
> + struct nt_data *ntd = context->data;
> +
> + DBG("");
> +
> + ntd->timed_present = FALSE;
> +}
> +
> +static void nettime_register(struct ofono_nettime_context *context)
> +{
> + DBusConnection *conn;
> + struct nt_data *ntd = context->data;
> +
> + DBG("Registering Network time for modem %s" ,
> + ofono_modem_get_path(context->modem));
> +
> + conn = ofono_dbus_get_connection();
> +
> + ntd->timed_watch = g_dbus_add_service_watch(conn, TIMED_SERVICE,
> + timed_connect, timed_disconnect,
> + context, NULL);
> +}
Please reorder the functions a bit better. That makes the whole code
more readable and gives us a lot more benefit in the long term.
I only wanna see forward declaration if they are 100% unavoidable.
> +
> +OFONO_PLUGIN_DEFINE(nettime, "Network Time Plugin",
> + VERSION, OFONO_PLUGIN_PRIORITY_DEFAULT,
> + nettime_init, nettime_exit)
> +
Regards
Marcel
^ permalink raw reply
* Re: [PATCH] x86/mm/init: respect memblock reserved regions when destroying mappings
From: Stefano Stabellini @ 2011-02-07 19:00 UTC (permalink / raw)
To: Stefano Stabellini
Cc: Yinghai Lu, H. Peter Anvin, Jeremy Fitzhardinge,
linux-kernel@vger.kernel.org, tglx@linutronix.de, x86@kernel.org,
Konrad Rzeszutek Wilk, Jan Beulich
In-Reply-To: <alpine.DEB.2.00.1102071524140.7277@kaball-desktop>
On Mon, 7 Feb 2011, Stefano Stabellini wrote:
> On Sun, 6 Feb 2011, Yinghai Lu wrote:
> > On 02/05/2011 11:30 PM, H. Peter Anvin wrote:
> > > On 02/05/2011 11:02 PM, Yinghai Lu wrote:
> > >> why not just move calling cleanup_highmap down?
> > >>
> > >> something like attached patch.
> > >
> > > This patch looks very clean and looks on the surface of it like it is
> > > removing some ugly ad hoc code, but (as always) it needs a description
> > > about the problem it solves and why it is correct.
> >
> > Sure.
> >
> >
> > Jeremy and xen guys, can you please check if it works well with xen ?
> >
>
> Actually this patch makes things worse on xen, because before
> cleanup_highmap() wasn't called at all on xen (on purpose) and now it
> is, fully destroying all the mappings we have at _end.
>
> Can we add a check on memblock reserved regions in cleanup_highmap()?
In case you are wondering how Yinghai Lu's patch would look like with
the added check, here it is:
diff --git a/arch/x86/include/asm/memblock.h b/arch/x86/include/asm/memblock.h
index 19ae14b..184f778 100644
--- a/arch/x86/include/asm/memblock.h
+++ b/arch/x86/include/asm/memblock.h
@@ -3,6 +3,7 @@
#define ARCH_DISCARD_MEMBLOCK
+bool memblock_check_reserved_size(u64 *addrp, u64 *sizep, u64 align);
u64 memblock_x86_find_in_range_size(u64 start, u64 *sizep, u64 align);
void memblock_x86_to_bootmem(u64 start, u64 end);
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
index 975f709..28686b6 100644
--- a/arch/x86/include/asm/pgtable_64.h
+++ b/arch/x86/include/asm/pgtable_64.h
@@ -165,7 +165,7 @@ static inline int pgd_large(pgd_t pgd) { return 0; }
#define __swp_entry_to_pte(x) ((pte_t) { .pte = (x).val })
extern int kern_addr_valid(unsigned long addr);
-extern void cleanup_highmap(void);
+extern void cleanup_highmap(unsigned long end);
#define HAVE_ARCH_UNMAPPED_AREA
#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index 2d2673c..5655c22 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -77,9 +77,6 @@ void __init x86_64_start_kernel(char * real_mode_data)
/* Make NULL pointers segfault */
zap_identity_mappings();
- /* Cleanup the over mapped high alias */
- cleanup_highmap();
-
max_pfn_mapped = KERNEL_IMAGE_SIZE >> PAGE_SHIFT;
for (i = 0; i < NUM_EXCEPTION_VECTORS; i++) {
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index d3cfe26..91afde6 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -297,6 +297,9 @@ static void __init init_gbpages(void)
static inline void init_gbpages(void)
{
}
+static void __init cleanup_highmap(unsigned long end)
+{
+}
#endif
static void __init reserve_brk(void)
@@ -922,6 +925,9 @@ void __init setup_arch(char **cmdline_p)
*/
reserve_brk();
+ /* Cleanup the over mapped high alias after _brk_end*/
+ cleanup_highmap(_brk_end);
+
memblock.current_limit = get_max_mapped();
memblock_x86_fill();
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 947f42a..f13ff3a 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -279,25 +279,6 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
load_cr3(swapper_pg_dir);
#endif
-#ifdef CONFIG_X86_64
- if (!after_bootmem && !start) {
- pud_t *pud;
- pmd_t *pmd;
-
- mmu_cr4_features = read_cr4();
-
- /*
- * _brk_end cannot change anymore, but it and _end may be
- * located on different 2M pages. cleanup_highmap(), however,
- * can only consider _end when it runs, so destroy any
- * mappings beyond _brk_end here.
- */
- pud = pud_offset(pgd_offset_k(_brk_end), _brk_end);
- pmd = pmd_offset(pud, _brk_end - 1);
- while (++pmd <= pmd_offset(pud, (unsigned long)_end - 1))
- pmd_clear(pmd);
- }
-#endif
__flush_tlb_all();
if (!after_bootmem && e820_table_end > e820_table_start)
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 71a5929..028c49e 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -297,18 +297,26 @@ void __init init_extra_mapping_uc(unsigned long phys, unsigned long size)
* rounded up to the 2MB boundary. This catches the invalid pmds as
* well, as they are located before _text:
*/
-void __init cleanup_highmap(void)
+void __init cleanup_highmap(unsigned long end)
{
unsigned long vaddr = __START_KERNEL_map;
- unsigned long end = roundup((unsigned long)_end, PMD_SIZE) - 1;
pmd_t *pmd = level2_kernel_pgt;
pmd_t *last_pmd = pmd + PTRS_PER_PMD;
+ u64 size, addrp;
+ bool changed;
+
+ end = roundup(end, PMD_SIZE) - 1;
for (; pmd < last_pmd; pmd++, vaddr += PMD_SIZE) {
if (pmd_none(*pmd))
continue;
- if (vaddr < (unsigned long) _text || vaddr > end)
- set_pmd(pmd, __pmd(0));
+ if (vaddr < (unsigned long) _text || vaddr > end) {
+ addrp = __pa(vaddr);
+ size = PMD_SIZE;
+ changed = memblock_check_reserved_size(&addrp, &size, PMD_SIZE);
+ if (!changed && size)
+ set_pmd(pmd, __pmd(0));
+ }
}
}
diff --git a/arch/x86/mm/memblock.c b/arch/x86/mm/memblock.c
index aa11693..fac21d4 100644
--- a/arch/x86/mm/memblock.c
+++ b/arch/x86/mm/memblock.c
@@ -8,7 +8,7 @@
#include <linux/range.h>
/* Check for already reserved areas */
-static bool __init check_with_memblock_reserved_size(u64 *addrp, u64 *sizep, u64 align)
+bool __init memblock_check_reserved_size(u64 *addrp, u64 *sizep, u64 align)
{
struct memblock_region *r;
u64 addr = *addrp, last;
@@ -59,7 +59,7 @@ u64 __init memblock_x86_find_in_range_size(u64 start, u64 *sizep, u64 align)
if (addr >= ei_last)
continue;
*sizep = ei_last - addr;
- while (check_with_memblock_reserved_size(&addr, sizep, align))
+ while (memblock_check_reserved_size(&addr, sizep, align))
;
if (*sizep)
^ permalink raw reply related
* Re: sparc32 linux SMP
From: Sam Ravnborg @ 2011-02-07 18:57 UTC (permalink / raw)
To: sparclinux
In-Reply-To: <4D4C0193.2020900@gaisler.com>
On Mon, Feb 07, 2011 at 07:26:23PM +0100, Daniel Hellstrom wrote:
> David Miller wrote:
>
>> From: Daniel Hellstrom <daniel@gaisler.com>
>> Date: Fri, 04 Feb 2011 14:39:31 +0100
>>
>>
>>
>>> I just want to report that we have been able to run the SPEC2000
>>> integer tests successfully on Linux SMP 2.6.38-rc1. After 2-3 days of
>>> running the tests (users=2) on a dual core LEON@70MHz on Debian Etch,
>>> the results were correct. Two months ago I was able to run for 1-2
>>> minutes before the system crashed in different ways or hanged.
This is very good news! Then we know a way forward how to fix
SS1000 / and likel some of the sun4m systems with > 1 processor too.
>>>
>>>
>>
>> I assume this is with the smp_call_function changes added to your tree,
>> right?
>>
>>
> Yes, with the patches I sent to the list. At gaisler.com distribute a
> "LEON Linux 2.6.36.3" package with all the patches I used.
>
>> It would be nice to get the sun4m/sun4d bits written so I can integrate
>> that fix. :-)
I have added this to my TODO list. But as I do not have any SMP system yet...
[Working on that]
> I agree, it's a pity I'm not so good with sun sparcs. If I find some
> free time perhaps I could do an experimental implementation.. free time
> has been a rarity lately, so don't expect it to happen... :)
If I take a stab on it later at least I hope you find time to review the stuff.
Sam
^ permalink raw reply
* Re: ext4: Fix data corruption with multi-block writepages support
From: Matt @ 2011-02-07 18:56 UTC (permalink / raw)
To: Ted Ts'o; +Cc: Linux Kernel, linux-ext4
In-Reply-To: <20110207174552.GC3457@thunk.org>
On Mon, Feb 7, 2011 at 5:45 PM, Ted Ts'o <tytso@mit.edu> wrote:
> On Fri, Feb 04, 2011 at 10:40:47PM +0000, Matt wrote:
>>
>> So that means that the file-corruption which existed until 2.6.37-rc6
>> and got triggered (for me) more easily via "dm crypt: scale to
>> multiple CPUs"
>> is fixed now ?
>
> Well, a patch exists for it that will be merged into 2.6.38.
>
>> That should give ext4 a nice speedup for >=2.6.38 :)
>
> I'm not going to make it be the default for 2.6.38, since it's fairly
> late in the -rc features. People who want it can explicitly enable it
> using the mount option mblk_io_submit, though. (And let me know your
> success stories! :-) I will be enabling it as the default in
> 2.6.39-rc1.
>
Hi Ted,
I guess it should be save to enable it with 2.6.37, dm-crypt multi-cpu
patch and the following patch ?
"ext4: Fix data corruption with multi-block writepages support"
(of course that's the minimum - it would be better to pull in the ext4
changes for 2.6.38)
For a short time I had it activated (via additional) mblk_io_submit
mount-command on my portage-partition (where the portage-ball of my
Gentoo system is).
I was curious to see what messages I would get and wondered why there
was nothing about mballoc mentioned
If I recall correctly there were always messages in the past, like:
EXT4-fs: delayed allocation enabled
EXT4-fs: file extents enabled
EXT4-fs: mballoc enabled
these are from 2.6.28 -
I'm only getting:
EXT4-fs (dm-3): mounted filesystem with ordered data mode.
or
EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts:
commit=60,barrier=1
(I like to set the barriers / flushes explicitly).
Sorry if I didn't follow development but these messages were kind of
more and more silenced ?
Thanks !
>> Reported-by: Matthias Bayer <jackdachef <at> gmail <dot> com >
>
> Sure!
Thanks !
>
> - Ted
>
Regards
Matt
^ permalink raw reply
* Re: ext4: Fix data corruption with multi-block writepages support
From: Matt @ 2011-02-07 18:56 UTC (permalink / raw)
To: Ted Ts'o; +Cc: Linux Kernel, linux-ext4
In-Reply-To: <20110207174552.GC3457@thunk.org>
On Mon, Feb 7, 2011 at 5:45 PM, Ted Ts'o <tytso@mit.edu> wrote:
> On Fri, Feb 04, 2011 at 10:40:47PM +0000, Matt wrote:
>>
>> So that means that the file-corruption which existed until 2.6.37-rc6
>> and got triggered (for me) more easily via "dm crypt: scale to
>> multiple CPUs"
>> is fixed now ?
>
> Well, a patch exists for it that will be merged into 2.6.38.
>
>> That should give ext4 a nice speedup for >=2.6.38 :)
>
> I'm not going to make it be the default for 2.6.38, since it's fairly
> late in the -rc features. People who want it can explicitly enable it
> using the mount option mblk_io_submit, though. (And let me know your
> success stories! :-) I will be enabling it as the default in
> 2.6.39-rc1.
>
Hi Ted,
I guess it should be save to enable it with 2.6.37, dm-crypt multi-cpu
patch and the following patch ?
"ext4: Fix data corruption with multi-block writepages support"
(of course that's the minimum - it would be better to pull in the ext4
changes for 2.6.38)
For a short time I had it activated (via additional) mblk_io_submit
mount-command on my portage-partition (where the portage-ball of my
Gentoo system is).
I was curious to see what messages I would get and wondered why there
was nothing about mballoc mentioned
If I recall correctly there were always messages in the past, like:
EXT4-fs: delayed allocation enabled
EXT4-fs: file extents enabled
EXT4-fs: mballoc enabled
these are from 2.6.28 -
I'm only getting:
EXT4-fs (dm-3): mounted filesystem with ordered data mode.
or
EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts:
commit=60,barrier=1
(I like to set the barriers / flushes explicitly).
Sorry if I didn't follow development but these messages were kind of
more and more silenced ?
Thanks !
>> Reported-by: Matthias Bayer <jackdachef <at> gmail <dot> com >
>
> Sure!
Thanks !
>
> - Ted
>
Regards
Matt
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] x86/mm/init: respect memblock reserved regions when destroying mappings
From: Stefano Stabellini @ 2011-02-07 18:58 UTC (permalink / raw)
To: Yinghai Lu
Cc: Stefano Stabellini, H. Peter Anvin, Jeremy Fitzhardinge,
linux-kernel@vger.kernel.org, tglx@linutronix.de, x86@kernel.org,
Konrad Rzeszutek Wilk, Jan Beulich
In-Reply-To: <4D50343E.1020906@kernel.org>
On Mon, 7 Feb 2011, Yinghai Lu wrote:
> On 02/07/2011 08:50 AM, Stefano Stabellini wrote:
> > On Sun, 6 Feb 2011, Yinghai Lu wrote:
> >> On 02/05/2011 11:30 PM, H. Peter Anvin wrote:
> >>> On 02/05/2011 11:02 PM, Yinghai Lu wrote:
> >>>> why not just move calling cleanup_highmap down?
> >>>>
> >>>> something like attached patch.
> >>>
> >>> This patch looks very clean and looks on the surface of it like it is
> >>> removing some ugly ad hoc code, but (as always) it needs a description
> >>> about the problem it solves and why it is correct.
> >>
> >> Sure.
> >>
> >>
> >> Jeremy and xen guys, can you please check if it works well with xen ?
> >>
> >
> > Actually this patch makes things worse on xen, because before
> > cleanup_highmap() wasn't called at all on xen (on purpose) and now it
> > is, fully destroying all the mappings we have at _end.
> >
> > Can we add a check on memblock reserved regions in cleanup_highmap()?
> > Otherwise could we avoid calling cleanup_highmap() at all on xen?
>
> why DO xen need over-mapped kernel initial mapping?
>
> what is in that range after _end to 512M?
The mfn list that is the list of machine frame numbers assigned to this
domain; it is used across the kernel to convert pfns into mfns.
It passed to us at that address by the domain builder.
^ permalink raw reply
* RE: [PATCH V8 04/10] USB/ppc4xx: Add Synopsys DWC OTG HCD function
From: Tirumala Marri @ 2011-02-07 18:53 UTC (permalink / raw)
To: Alexander Gordeev
Cc: greg, linux-usb, linuxppc-dev, Fushen Chen, Mark Miesfeld
In-Reply-To: <20110126192743.646af6d2@desktopvm.lvknet>
}
dev_set_drvdata(_dev, dwc_otg_device);
hcd->regs = otg_dev->base;
+ hcd->rsrc_start = otg_dev->phys_addr;
+ hcd->rsrc_len = otg_dev->base_len;
hcd->self.otg_port = 1;
[Marri] Sure
^ permalink raw reply
* RE: [PATCH V8 03/10] USB/ppc4xx: Add Synopsys DWC OTG Core Interface Layer
From: Tirumala Marri @ 2011-02-07 18:53 UTC (permalink / raw)
To: Alexander Gordeev
Cc: greg, linux-usb, linuxppc-dev, Fushen Chen, Mark Miesfeld
In-Reply-To: <20110126191734.5dff9641@desktopvm.lvknet>
dwc_read_reg32 is used nowhere throughout the code. One of dwc_read32 and
dwc_read_reg32 should be removed IMO. There was once only dwc_read_reg32. In
version 5 of your patchset I believe. Why did you add another function?
AFAIK it is not correct to store pointers in u32 because they need 8 bytes
on 64-bit archs. So it was ok with the old dwc_read_reg32.
[Marri] If u32 is 8bytes isn't pointer type would be 8bytes as well. I had
change the API to avoid type castings to register addresses.
^ permalink raw reply
* ext4 problems with external RAID array via SAS connection
From: bryan.coleman @ 2011-02-07 18:53 UTC (permalink / raw)
To: linux-ext4
I am experiencing problems with an ext4 file system.
At first, the drive seemed to work fine. I was primarily copying things
to the drive migrating data from another server. After many GBs of data,
that seemingly successfully were done being transferred, I started seeing
ext4 errors in /var/log/messages. I then unmounted the drive and ran fsck
on it (which took multiple hours to run). I then ls'ed around and one of
the areas caused the system to again throw ext4 errors.
I did run memtest through one complete pass and it found no problems.
I then went looking for help on the fedora forum and it was suggested that
I increase my journal size. So I recreated the ext4 partition (with
larger journal) and started the migration process again. After several
days of copying, the errors started again.
Here are some of the errors from /var/log/messages:
Feb 2 04:48:30 mdct-00fs kernel: [672021.519914] EXT4-fs error (device
dm-2): ext4_mb_generate_buddy: EXT4-fs: group 22307: 460 blocks in bitmap,
0 in gd
Feb 2 04:48:30 mdct-00fs kernel: [672021.520429] EXT4-fs error (device
dm-2): ext4_mb_generate_buddy: EXT4-fs: group 22308: 1339 blocks in
bitmap, 0 in gd
Feb 2 04:48:30 mdct-00fs kernel: [672021.520927] EXT4-fs error (device
dm-2): ext4_mb_generate_buddy: EXT4-fs: group 22309: 3204 blocks in
bitmap, 0 in gd
Feb 2 04:48:30 mdct-00fs kernel: [672021.521409] EXT4-fs error (device
dm-2): ext4_mb_generate_buddy: EXT4-fs: group 22310: 2117 blocks in
bitmap, 0 in gd
Feb 4 05:08:29 mdct-00fs kernel: [845547.724807] EXT4-fs error (device
dm-2): ext4_dx_find_entry: inode #311951364: (comm scp) bad entry in
directory: directory entry across blocks -
block=1257308156offset=0(9166848), inode=3143403788, rec_len=80864,
name_len=168
Feb 4 05:08:29 mdct-00fs kernel: [845547.733034] EXT4-fs error (device
dm-2): ext4_add_entry: inode #311951364: (comm scp) bad entry in
directory: directory entry across blocks - block=1257308156offset=0(0),
inode=3143403788, rec_len=80864, name_len=168
Feb 4 05:19:41 mdct-00fs kernel: [846217.922351] EXT4-fs error (device
dm-2): ext4_dx_find_entry: inode #311951364: (comm scp) bad entry in
directory: directory entry across blocks -
block=1257308156offset=0(9166848), inode=3143403788, rec_len=80864,
name_len=168
Feb 4 05:19:41 mdct-00fs kernel: [846217.928922] EXT4-fs error (device
dm-2): ext4_add_entry: inode #311951364: (comm scp) bad entry in
directory: directory entry across blocks - block=1257308156offset=0(0),
inode=3143403788, rec_len=80864, name_len=168
Here is my setup:
Promise Vtrak RAID array with 12 drives in a RAID 6 configuration
(over 5TB).
The promise array is connected to my server using a external SAS
connection.
OS: Fedora 14
One logical volume on the promise.
One logical volume at the external SAS level.
One logical volume at the OS level.
So from my OS, I see one logical volume depicting one big drive.
I then setup the ext4 system using the following command:
'mkfs.ext4 -v -m 1 -J size=1024 -E stride=16,stripe-width=160
/dev/vg_storage/lv_storage'
Any thoughts/tips on how to track down the problem?
My thought now is to try using ext3; however, my fear is that I will just
run into the problem with it. Is ext4 production ready?
Thoughts?
^ permalink raw reply
* Re: RFC: New API for PPC for vcpu mmu access
From: Scott Wood @ 2011-02-07 18:52 UTC (permalink / raw)
To: Alexander Graf
Cc: Yoder Stuart-B08248, Wood Scott-B07421, kvm-ppc@vger.kernel.org,
kvm@vger.kernel.org, qemu-devel@nongnu.org
In-Reply-To: <E32F37BC-71EF-44A9-825D-50F61B675463@suse.de>
On Mon, 7 Feb 2011 17:49:51 +0100
Alexander Graf <agraf@suse.de> wrote:
>
> On 07.02.2011, at 17:40, Yoder Stuart-B08248 wrote:
>
> > Suggested change to this would be to have Qemu set tlb_type as
> > an _input_ argument. If KVM supports it, that type gets used,
> > else an error is returned. This would allow Qemu to tell
> > the kernel what type of MMU it is prepared to support. Without
> > this Qemu would just have to error out if the type returned is
> > unknown.
>
> Yes, we could use the same struct for get and set. On set, it could transfer the mmu type, on get it could tell userspace the mmu type.
What happens if a get is done before the first set, and there are
multiple MMU type options for this hardware, with differing entry sizes?
Qemu would have to know beforehand how large to make the buffer.
We could say that going forward, it's expected that qemu will do a
TLB set (either a full one, or a lightweight alternative) after
creating a vcpu. For compatibility, if this doesn't happen before the
vcpu is run, the TLB is created and initialized as it is today, but
no new Qemu-visible features will be enabled that way.
If Qemu does a get without ever doing some set operation, it should
get an error, since the requirement to do a set is added at the same
time as the get API.
-Scott
^ 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.