Topic for #qi-hardware is now Copyleft hardware - http://qi-hardware.com | hardware hackers join here to discuss Ben NanoNote, atben / atusb 802.15.4 wireless, and other community driven hw projects | public logging at http://en.qi-hardware.com/irclogs
Textmode has joined #qi-hardware
Textmode has quit [Remote host closed the connection]
Textmode has joined #qi-hardware
freespace has quit [Ping timeout: 240 seconds]
<DocScrutinizer51> wpwrak: if you're interested: http://mg.pov.lt/maemo-ssu-irclog/search?q=silicon http://mg.pov.lt/maemo-ssu-irclog/search?q=errat http://mg.pov.lt/maemo-irclog/search?q=errat -- and the two errata: http://cache.freescale.com/files/32bit/doc/errata/IMX50CE.pdf >>freemangordonDocScrutinizer, the errata which we are told is mutually exclusive (and its number is stated in logs on #beagle dm8tbr is talking about) is 687067<< and
<DocScrutinizer51> THe PRIMARY issue: http://cateee.net/lkddb/web-lkddb/ARM_ERRATA_430973.html
freespace has joined #qi-hardware
phirsch has quit [Read error: Operation timed out]
lekernel has quit [Read error: Operation timed out]
DocScrutinizer51 has quit [Read error: Operation timed out]
DocAvalanche has joined #qi-hardware
DocAvalanche has quit [Changing host]
DocAvalanche has joined #qi-hardware
DocAvalanche is now known as DocScrutinizer51
phirsch has joined #qi-hardware
lekernel has joined #qi-hardware
<DocScrutinizer51> >>...operations may not work as intended. Instead of writing zeros to the valid bit of the BTB entry matching the MVA provided, the CP15 “Invalidate Branch Predictor by MVA” operation writes the value currently in the “Instruction L1 System Array Debug Register 0.” << nice, isn't it?
<kristianpaul> WHAT 149 usd?? ;-)
<kristianpaul> includes some wireless upgrade or such? ;-)
<DocScrutinizer51> kristianpaul: hmm?
<wpwrak> that's wolfgang rewriting the book on marketing :)
<wpwrak> it's actually a good idea. if it doesn't work, the loss is minimal. if it works, he gets the nobel price in economy
<kristianpaul> ;-)
<wolfspraul> what now? :-) wait have to restart my machine...
wolfspraul has quit [Quit: leaving]
zear has quit [*.net *.split]
wolfspraul has joined #qi-hardware
<wpwrak> wolfspraul: we're contemplating the metaphysical dimensions of the price increase :)
zear has joined #qi-hardware
<wolfspraul> increased happiness
<wolfspraul> I am *seriously* considering to put a little multiple-choice test before the online shop, where people have to answer questions that show that they understand what they will buy with the Ben & M1 :-)
<wolfspraul> only because it's too difficult technically (or I'm too lazy) have I not done that yet
<wolfspraul> good morning everybody btw
<wpwrak> if you want to add such a test, make it optional
<wolfspraul> won't do it anyway, just a thought
<wpwrak> a link "DO YOU HAVE ENOUGH STAMINA FOR THE MILKYMIST ? >>>"
<wolfspraul> beautiful questions that will make people think about what they buy
<wpwrak> naw, that's too long
<wpwrak> "ARE YOU READY FOR THE MILKYMIST ?"
<wpwrak> for those who have odd associations already, this should enhance the experience :)
<wpwrak> actually ... make a youtube spot with "ARE YOU READY TO DO THE MILKYMIST ?"
<wpwrak> then enjoy the video responses :)
<wolfspraul> I became more interested in the innards of an fpga recently, so I am starting a little educate-myself project here https://github.com/Wolfgang-Spraul/fpgatools
<wolfspraul> my first goal is very simple, I want to dig into the .bit bitstream and be able to read it better in text form
<wolfspraul> let's see how that goe
<wolfspraul> goes
<wpwrak> "plain C, no C++" yes !! ;-)
<wolfspraul> see. I wrote those design goals to make you happy! :-)
<wpwrak> indeed :)
<wolfspraul> nothing works yet though. next step: go through commands.
<wpwrak> very good design goals
<wpwrak> or, rather, design principles
<DocScrutinizer51> (OMAP silicon errata) http://mg.pov.lt/maemo-irclog/%23maemo.2012-05-21.log.html#t2012-05-21T20:19:58 is where a lengthy but comprehensive discussion starts between freemangordon, me (docscrutinizer), and a few words from javispedro. If you bother to read it, just ignore estel_ posts as they are distracting, to use an euphemism
<DocScrutinizer51> it goes for almost 2 hours, and I think it sums up the basic issues of the whole topic
<wpwrak> phew. maybe for the next time when i;ll have to wait at security in an US airport :)
<wpwrak> i'm sure all involved are grown up enough to not make fools of themselves on linux-arm ;-)
<wolfspraul> wpwrak: btw, I have to say I love the effect of -Wall during development
<wolfspraul> I didn't use it before, so I was in the typical struggle circle
<wolfspraul> write thousands of lines, then a heroic battle with warnings later
<wolfspraul> often fought with mass casts or simply turning warnings off :-)
<wolfspraul> but if it's on when first writing something, it's a breeze to fix right at the spot
* kristianpaul uses pendantic as well
* DocScrutinizer51 even uses lint at work
<DocScrutinizer51> mandatory procedure according to company policy
<DocScrutinizer51> plus recently another tool called coverity or similar, I haven't had a look into that one yet
<DocScrutinizer51> seems lint and coverity are complementary
<wpwrak> for me, -Wall -Wextra -Wshadow -Wmissing-prototypes -Wmissing-declarations
<wpwrak> and then valgrind :)
wej has quit [Ping timeout: 272 seconds]
<DocScrutinizer51> ooh sure
<wpwrak> -Wshadow can be a tad annoying but catches rather nasty bugs
<wpwrak> e.g., int foo; ... void bar(int fo) { do_something(foo); }
<wpwrak> or int items; void bar(int item) { do_something(item); do_something_else(items); }
<wpwrak> in the 2nd case, you won't get a warning about the unused "item" argument. this sort of name error happens quite easily when you're a bit tired or distracted
wej has joined #qi-hardware
<DocScrutinizer51> still, if you're facing code as fsckdup as http://lxr.free-electrons.com/source/net/caif/caif_socket.c#L377 ff... :-S
<wpwrak> this code wants a function for the "skb == NULL" case :)
<DocScrutinizer51> this code wants a refactoring done by a devel with a brain
<DocScrutinizer51> anyway >> * Copied from unix_stream_recvmsg, but removed credit checks,<<
<wpwrak> yeah, preferably one without previous experience with the italian kitchen :)
<DocScrutinizer51> makes me think it'
<DocScrutinizer51> s not been my colleagues that thought it's a nice idea to test compiler optimization
<DocScrutinizer51> look at all the useless unconditional assignments to err
<wpwrak> they're a common pattern in the linux kernel. nothing wrong there.
<wpwrak> the only issue is see is that the jumps are quite complicated
<DocScrutinizer51> if (err = sock_error(sk) ) goto unlock; if (sk->sk_shutdown & RCV_SHUTDOWN) { err = -ECONNRESET; goto unlock;};
<DocScrutinizer51> the first if() maybe style question, the second if case mere common sense
<DocScrutinizer51> you don't pull out assignemnts out of the if branch for no good reason - even when compiler usually will optimize it
<DocScrutinizer51> try to trace such code in Lauterbach and get a severe headache, as compiler was feeling nausea and decided to completely rewrite your code
<wpwrak> your first if will get you a warning
<DocScrutinizer51> quite possibly
<wpwrak> and you can safely leave that sort of low-level optimization to the compiler
<DocScrutinizer51> nonsense
<DocScrutinizer51> (unless you talk about first if() )
<wpwrak> focus on code clarity, not what was hard for compilers 30 years ago ;-)
<DocScrutinizer51> my major consern was exactly about code clarity
<wpwrak> well, since it seems to be from linux, why not clean it up and send a patch ?
<DocScrutinizer51> pulling out the err= -ECONNRESET from the if branch is all anti-code-clarity
<DocScrutinizer51> there (s)he did it right
<DocScrutinizer51> while a do { } while() spanning over ~80 lines is a nogo in itself
<DocScrutinizer51> actually one style rule at work is: functions mustn't span more than a screenfull of lines
<wpwrak> keeping functions short is a good concept
<DocScrutinizer51> indeed
<DocScrutinizer51> and instead of if (sk->sk_state == CAIF_CONNECTING) you can use if (CAIF_CONNECTING == sk->sk_state)
<DocScrutinizer51> as if (CAIF_CONNECTING = sk->sk_state) for sure gives a warning/error
<wpwrak> both yield a diagnostic
<DocScrutinizer51> both?
<wpwrak> try it :)
<DocScrutinizer51> ???
<wpwrak> gcc complains if you if (var = value) ...
<DocScrutinizer51> sure
<DocScrutinizer51> but if probably goes mad when you if (const = var)
<DocScrutinizer51> and for your case the warning will depend on -Wxxx
<wpwrak> *shrug* don't f* around without protection :)
<DocScrutinizer51> hm?
<wpwrak> you'll have that warning enabled unless you're very careless already
<wpwrak> (i.e., -Wall enables it)
<DocScrutinizer51> but yeah, you also tried to teach me not to use parantheses in complex conditions, as you claimed that's what operators precedence is for. Company policy is we *shall* use them
<wpwrak> and you want to keep it on. else, you'll still trip over a typo in if (var1 == var2)
<wpwrak> you can solve that by firing all the pascal programmers ;-)
<DocScrutinizer51> lol
<wpwrak> and maybe print a few copies of the C operator precedence table. it's very well thought out and, believe it or not, the compiler knows it too ;-)
<wpwrak> i think i ran into some crappy "C" compiler for CP/M once that did have some precedence bugs. but that was a pretty long time ago
<DocScrutinizer51> well, that guy solved it his way: http://lxr.free-electrons.com/source/net/caif/caif_socket.c#L398 +5
<DocScrutinizer51> ;-P
<wpwrak> well, not the worst way to deal with it
<DocScrutinizer51> you must be kidding
<wpwrak> once you get past being proud of yourself because you managed to write a 500 character expression that actually seems to work, the inner drive for writing complicated if statement drops dramatically
<DocScrutinizer51> the whole friggin code in that do loop cries out loud for a case switch
<wpwrak> hmm, let's call the language with a case statement that can handle that "J" ;-)
<DocScrutinizer51> hmm, maybe not
<DocScrutinizer51> nah, call it shell script
<DocScrutinizer51> or maybe qbasic
<DocScrutinizer51> but honestly I don't suggest to do THAT
<DocScrutinizer51> I didn't realize the error checks were all from different sources
<wpwrak> that code has to do some quite tricky stuff. also note that errors only yield an error code if no data has been moved yet
xwalk has quit [Quit: Leaving]
<DocScrutinizer51> sure
<DocScrutinizer51> (<wpwrak> this code wants a function for the "skb == NULL" case) isn't that simple to do either, regarding all the explicit and implicit (break, continue) gotos
<wpwrak> yes, i know :)
<wpwrak> but if you spend a few hours on it, maybe you find a nice simplification :)
<DocScrutinizer51> the whole function caif_stream_recvmsg() already qualifies for a bad example of spaghetti code
xwalk has joined #qi-hardware
xwalk has quit [Ping timeout: 245 seconds]
Textmode has quit [Ping timeout: 255 seconds]
Textmode has joined #qi-hardware
sucotronic has quit [Ping timeout: 245 seconds]
Textmode has quit [Ping timeout: 255 seconds]
sucotronic has joined #qi-hardware
xwalk has joined #qi-hardware
Ayla has quit [Ping timeout: 245 seconds]
Ayla has joined #qi-hardware
rejon has joined #qi-hardware
rejon_ has joined #qi-hardware
rejon_ has quit [Client Quit]
rejon has quit [Client Quit]
<qi-bot> [commit] Werner Almesberger: b2/boom.c (main): run queries also if no variables are set (master) http://qi-hw.com/p/eda-tools/e919b16
<qi-bot> [commit] Werner Almesberger: b2/subst.c (dump_chunks): closing } was missing when dumping variable expansion (master) http://qi-hw.com/p/eda-tools/cae92bb
<qi-bot> [commit] Werner Almesberger: b2/: move implicit initialization of FN, F1, ... to explicit function subex_init (master) http://qi-hw.com/p/eda-tools/c6e3944
<qi-bot> [commit] Werner Almesberger: b2/: resolve FN in subst_init and don't consider an FN match evidence of existance (master) http://qi-hw.com/p/eda-tools/c2414a5
<qi-bot> [commit] Werner Almesberger: b2/: disallow assigning to FN (master) http://qi-hw.com/p/eda-tools/b35b6e2
<qi-bot> [commit] Werner Almesberger: b2/test/: add first set of substitution tests (master) http://qi-hw.com/p/eda-tools/fb7b246
rejon has joined #qi-hardware
jekhor has joined #qi-hardware
valhalla has joined #qi-hardware
phirsch_ has joined #qi-hardware
phirsch has quit [Ping timeout: 244 seconds]
phirsch_ is now known as phirsch
<valhalla> in the italian increasing the nanonote price looks like a suicidal move (but then it wasn't a big market anyway, and without an EU shop it was probably going do get smaller anyway)
kristoffer has joined #qi-hardware
kilae has joined #qi-hardware
lekernel has quit [Ping timeout: 245 seconds]
lekernel has joined #qi-hardware
rejon has quit [Ping timeout: 240 seconds]
rejon has joined #qi-hardware
rejon has quit [Ping timeout: 256 seconds]
<lekernel> wolfspraul: (fpgatools) the tool you want to write exists already, it's called xdl. it's proprietary ofc.
kristianpaul has quit [Ping timeout: 272 seconds]
kristianpaul has joined #qi-hardware
xiangfu has joined #qi-hardware
<qi-bot> [commit] Paul Cercueil: MMC: JZ4740: Remove duplicated code. (jz-3.4) http://qi-hw.com/p/qi-kernel/92ca0b9
xiangfu has quit [Ping timeout: 245 seconds]
<Ayla> larsc: hi, could you review that patch? http://pastebin.com/EALuMB0r
<Ayla> larsc: I'd like to know if that code was missing on purpose (so that I'm not adding a bug instead of removing one)
xiangfu has joined #qi-hardware
<larsc> Ayla: looks good
<Ayla> ok, thank you
xwalk has quit [Ping timeout: 265 seconds]
<qi-bot> [commit] Paul Cercueil: MMC: JZ4740: Fix handling of read errors. (jz-3.4) http://qi-hw.com/p/qi-kernel/c36b5d5
rejon has joined #qi-hardware
Ayla has quit [Quit: brb]
Ayla has joined #qi-hardware
DocScrutinizer has quit [Disconnected by services]
DocScrutinizer has joined #qi-hardware
<Ayla> mth, larsc: I found something interesting about the MMC bug
<Ayla> mth, larsc: http://pastebin.com/yPrJqRKk <= this patch should not change the behaviour of the driver, do you agree?
<larsc> why not?
<Ayla> because JZ_MMC_IRQ_RXFIFO_RD_REQ should already be inside irq_reg
<larsc> but you mask out all other irqs
<Ayla> no, inside jz4740_mmc_set_irq_enabled the value is OR'd inside host->irq_mask
<Ayla> and host->irq_mask is written to the register
<Ayla> so the other IRQs are not modified
<larsc> yea, but for example JZ_MMC_IRQ_RXFIFO_WR_REQ is never disabled with your patch
<Ayla> of course it is disabled with the patch
<Ayla> oh
<Ayla> you mean JZ_MMC_IRQ_TXFIFO_WR_REQ (the write one?)
<larsc> uhm, yes
xiangfu has quit [Remote host closed the connection]
<larsc> if we hit a timeout when polling for the irq it is enabled
<larsc> and disabled again after the interrupt
<Ayla> yes, but it has to be cleared before starting the interrupt thread
<Ayla> and it's not
<larsc> doesn't jz4740_mmc_set_irq_enabled(host, irq_reg, false); disable it?
<larsc> if irq_reg = JZ_MMC_IRQ_TXFIFO_WR_REQ
<Ayla> yes
<larsc> which means if you and irq_reg with the rxfifo irq you won't disable it anymore
<Ayla> why not?
<Ayla> ah crap
<Ayla> x_x
<Ayla> n00b error
<Ayla> larsc: however, the jz_mmc_irq writes the JZ_REG_MMC_IREG twice
<Ayla> the second one obviously overriding the first
<larsc> IREG is write-one-to-clear
<Ayla> yes
<larsc> writing a '1' to a bit will clear that bit, writing a '0' will leave it unchanged
<Ayla> meh, the docs are on my other PC :s
<Ayla> larsc: but perhaps the two writes occur too rapidly for the hardware? :)
<Ayla> well I believe writing a '1' two times has no effect anyway
<larsc> you can change the code to have only one write to IREG
<Ayla> but why did it need two writes to IREG at the first place?
<larsc> you don't need them, but it was more convenient that way, that chance that both writes will be exectured in the same irq handler run is pretty low anyway
<Ayla> why wouldn't they be executed in the same IRQ handler? ...
<Ayla> they are in the same function
<larsc> because both writes are conditional
<Ayla> why do you read the IREG register btw? Does it contain something useful?
<Ayla> IIRC the interrupt status is located inside another register
<Ayla> (I really need the doc ...)
<larsc> The MSC_IREG register shows the currently requested interrupt. The FIFO request interrupts,
<larsc> TXFIFO_WR_REQ, and RXFIFO_RD_REQ are masked off with the DMA_EN bit in the MSC_CMDAT
<larsc> register. The software is responsible for monitoring these bit in program I/O mode.
<Ayla> ok, I think I start to understand the code
<Ayla> the first write to IREG is there to acknowledge unwanted interrupts
<larsc> yes
<lekernel> wpwrak: I already etched some PCBs with HCl + peroxide (and 30%, not 3%). I'm still alive :) though that thing definitely releases chlorine gas you don't want to breathe.
<DocScrutinizer51> lekernel: real fun starts when you mix some acetone (or other solvent) into this etching liquid
<lekernel> but I wouldn't call chlorine "very poisonous". think of stuff like dimethylmercury, arsine, germane, etc...
<DocScrutinizer51> well, it's been called greencross in WW-II iirc
<wpwrak> chlorine usually doesn't kill you on the spot, but it can cause lasting damage
<Ayla> larsc: the IREG is written inside the worker thread
<DocScrutinizer51> very nasty lasting damage
<Ayla> which does not execute in an interrupt context
<DocScrutinizer51> got it's own name in medicine
<Ayla> larsc: what's the behaviour of writing that bit when the interrupt has yet to appear?
<DocScrutinizer51> chlorine acne
<wpwrak> and HCl+30% peroxide (without diluting it) is way too fast to get useful results. sure, the etching takes only seconds, but it will be very uneven
<lekernel> chlorine was only used for a short while, before they found more toxic stuff
<DocScrutinizer51> undercuts getting a severe problem
<wpwrak> lekernel: a knife will kill you just as dead as a musket or a modern armor-piercing projectile ;-)
<lekernel> chloracne is actually not caused by chlorine, but organic compounds
<lekernel> some containing chlorine atoms in the molecule (thus the name)
<lekernel> but Cl2 doesn't cause chloracne
<DocScrutinizer51> hmmm
<DocScrutinizer51> I'd not bet on that
<larsc> Ayla: nothing should happen
<lekernel> only lung damage
<wpwrak> given an ideal diode of size zero, ...
<DocScrutinizer51> how's that damage working, chemically?
<wpwrak> who needs lungs anyway ;-)
<lekernel> I can imagine there are many reactions. chlorine is a very reactive compound.
<lekernel> eats through most materials
<DocScrutinizer51> so what's the result of Cl2 reacting with the organic material in your lungs?
<lekernel> lung goo
<wpwrak> the problem isn't the original "pure" gas you inhale. it's the blood you spit later :)
<DocScrutinizer51> and chloro-organnic compounds, no?
<lekernel> no, I think that's a different toxicity
<lekernel> try putting some piece of meat in a bottle of chlorine for a while :)
<larsc> wpwrak: ah, thats overrated, i've been spitting blood for the last 4 days and i'm still alive ;)
<DocScrutinizer51> I seem to recall a teacher who poisoned half the class of pupils with chlor gas, and most of them got chlor acne
<wpwrak> larsc: been in a bar fight again ? :)
<DocScrutinizer51> but I might be wrong, as that's been a news of 30 years ago
<wpwrak> was that in chemistry or history ?
<larsc> wpwrak: I at least look like as if I had been. Had my wisdomtooth removed...
<DocScrutinizer51> in newspaper?
<DocScrutinizer51> aaah, in chemistry
<wpwrak> larsc: ah, dental bliss. always the most exquisite of pains.
<Ayla> larsc: after a data transfer, the DATA_TRAN_DONE bit is set on the IREG, which is correct, but the doc states that the "stop" command should be sent first
<Ayla> larsc: and the code first writes the IREG then sends the "stop" command
<larsc> Ayla: might be an issue, but i doubt it
<Ayla> if it was not, it wouldn't be written on the doc to do so, no? :)
<whitequark> oh, Cl2 in lungs is easy: Cl2 + H2O = HCl + HOCl
<whitequark> it's like drowning in acid
<larsc> Ayla: which page?
viric has quit [Read error: Connection reset by peer]
<Ayla> page 477
<larsc> which file?
<Ayla> jz4740_pm.pdf
<lekernel> whitequark: hmm, Cl2 doesn't do that with water on itself
<lekernel> by itself
<lekernel> it needs some catalyst or energy source... sunlight works for that (that's why you can remove the chlorine taste of tap water by putting it under daylight for a while... acid has a less potent taste)
viric has joined #qi-hardware
<whitequark> lekernel: maybe one of 1000s of biological compounds in lungs acts as a catalyst?
<whitequark> well anyway, I'm pretty sure that Cl2 would attack them on itself, too
<whitequark> but from my chemistry class I recall that chlorine danger is from its dissolution in water
<lekernel> sure, if it stays in the air, it won't attack your body which is made mostly of water... unfortunately, chlorine is also very soluble in water
<whitequark> ah, so you mean that Cl2 can dissolve in water just as any other gas would
<lekernel> it's _particularly_ soluble in water
<whitequark> yeah, that's plausible
<whitequark> interesting
<lekernel> iirc you can dissolve dozens of liters of Cl2 in a liter of water
<lekernel> at room temperature and atmospheric pressure
<whitequark> Hydrolysis
<Ayla> larsc: that's not a big problem, that interrupt is never un-masked
<whitequark> and let me find the ratio of that reaction
<lekernel> hm, no, that's only 1 liter. still a lot.
<whitequark> looks like unless you have a real lot of chlorine in water, it's mostly hydrolysed
<whitequark> (which is somewhat expected)
<whitequark> yeah, that's why I said "a lot"
<whitequark> generally, pH of lungs is near to neutral
<lekernel> and... chlorine hydrolysis itself changes the pH, as it generates H+
<whitequark> exactly
<whitequark> so that'll come to an equilibrium somewhere on the left side
<wpwrak> conclusion: if you smell chlorine, try to inhale as much of it as possible, to avoid lung damage
<whitequark> besides which, as the lungs are damaged by low pH, the more chlorine you have (an thus more elemental chlorine), the more pH-generated damage you'll have too
<wpwrak> i think there may be an opening in the argentina ministry for public health. they need people who think like that ;-)
<whitequark> wpwrak: you seem to be proud of your government :)
<wpwrak> whitequark: oh yes, everybody here is proud of it. there were protest marches against it thursday and friday, with more predicted for next week
<whitequark> huh. and here, the "occupy" movement has finally came from the overseas
<wpwrak> whitequark: it's all those ungrateful people who don't understand that you don't need a stable currency, an economy, let alone a halfway credible juridical system
<wpwrak> vive la revolucion mondial ! :)
<wpwrak> s/al/ale
<qi-bot> wpwrak meant: "vive la revolucion mondiale ! :)"
<Ayla> révolution*
<lekernel> wpwrak: heard of the Shadoks? :)
<wpwrak> no accents here :)
<wpwrak> not yet
<lekernel> "When one tries continuously, one ends up succeeding. Thus, the more one fails, the greater the chance that it will work." etc. :)
<Ayla> wpwrak: I thought that was french :)
<wpwrak> i'm just reading wikipedia ... interesting. that's pretty much exactly how our government chooses to do things
<wpwrak> what caused the latest protests was a rather baffling marie antoinette moment: the government has been trying for a while to get hold of every dollar they can reach. so they decreed import bans, currency exchange restrictions, recently something that looks like travel restrictions, and so on
<wpwrak> they also lectured the people that it was morally wrong to "bet on dollars" when the national currency is the peso. (which devalues at about 25% per year, making it ideal for long-term savings.)
<wpwrak> they also told people that it was risky for them to save in dollars, and so on. for months. then, wednesday, the newspapers published in what currencies the various ministers keep their savings, fresh from the latest tax declarations.
<larsc> hehe
<larsc> wpwrak: what's the interest for loans?
<wpwrak> lo and behold, all that had declared more than pocket money had substantial savings in dollars. (one minister, i think of economy, declared to be destitute - zero cash or bank accounts)
<wpwrak> wait, it gets better
<wpwrak> then, on thursday morning, head of the senate anibal fernandez, who has been the government's spokesperson for all that sort of nonsense advice, admonitions, and insults against the "evil rich", was questioned by journalists why he had all those dollars when he himself had kept on saying all the time it was morally wrong and a bad idea.
<wpwrak> his response, for once, was perfectly honest and didn't lack clarity: he said that was none of their business, he got his dollars as it was convenient, there was nothing wrong with that, and he's free to do as he pleases.
<wpwrak> that night, people were in the streets, voicing their disagreement
<Ayla> you're on Buenos Aires?
compcube has joined #qi-hardware
compcube has quit [Changing host]
compcube has joined #qi-hardware
<wpwrak> maybe i should clarify exchange restrictions: to buy dollars in argentina, since a few months, you first have to get the purchase greenlighted by the tax authority. then they set a maximum amount, based on your declared income. surprisingly often, this amount turned out to be zero, even for people who earned quite well and who obediently declared their income.
<wpwrak> a few weeks ago, they tightened the restrictions. now the result is always zero for a whole class of taxpayers. (all that are in a simplified tax regime for lower incomes) and even more often for the rest as well. one retiree tried to buy ten dollars and was refused.
<wpwrak> Ayla: yup
<wpwrak> a consequence of the restriction on dollar purchases was that the black market dollar took off like a rocket. it's usually around 10% above the official dollar. now it's about 30% higher.
<wpwrak> of course, the government then started a witch hunt on exchange offices and all that. and they have dogs sniffing for money at border crossings. (many people take their pesos to neighbouring countries to exchange them there to dollars)
<wpwrak> and after months of all that sort of chicanery, that government spokesman simply brushes it all away, telling people HE is free to do what he wants to do (but of course, the plebs isn't)
kuribas has joined #qi-hardware
<wpwrak> to compound this, the vice president is involved in a corruption scandal. of course, he denies everything, even knowing all the other folks involved. despite all sorts of evidence popping up, including one of those folks he claims to never even have seen living in an apartment he owns.
<wpwrak> when it got too annoying, the government set out to solve the problem for good and they removed the state attorney, the judge, and the attorney general.
<wpwrak> to add insult to injury, the guy they want to install as new attorney general, besides being a good friend of that ruling group, has a CV littered with false claims
<Ayla> :)
<wpwrak> tuesday, he'll have an interview by the senate, which will then decide whether they'll accept him or not. this will be rather interesting.
<Ayla> larsc: I have some comments about the jz4740_mmc_read_data
<Ayla> what's the "i" variable refering to exactly?
<Ayla> it gets the value "miter->length" but doesn't seem to be used as such
<wpwrak> larsc: loans ... with a credit card, nominal 41% p.a., effective 50%, total cost of financing (with fees and such) 63%
<Ayla> larsc: forget about it :)
<larsc> Ayla: i is the number of .... ok
<wpwrak> non-card loans are also in the 40-70% segment
<larsc> if a read operation takes to long to complete jz4740_mmc_read_data will stop reading/writing and when the next interrupt occurs it will be called again
<Ayla> yes I got that,
<Ayla> but how will it resume exactly?
<larsc> it will be called in the irq worker thread
<Ayla> I mean, if i != 0, and the second mmc_poll_irq() times out, some bytes are lost
<larsc> sg_miter_next will continue where sg_miter_stop has been called
<larsc> see the the poll_timeout label
<larsc> miter->consumed is updated
<Ayla> what about the while(j) loop then?
<wpwrak> (that's for loans in pesos)
<Ayla> it checks 32 times for the IRQ flag, what if it times out at the 31st time?
<Ayla> the content of "buf" will be lost, because the miter variable is not updated
<Ayla> and you can't read those bits again, because of the FIFO
<larsc> why is it not updated?
<Ayla> I don't know
<Ayla> it should be,
<Ayla> but it is not: http://pastebin.com/6br7bGTr
<larsc> hm? if there is an timeout it will jump to poll_timeout, which will update it
<Ayla> which does not know how many bytes you actually read
<larsc> why not?
<Ayla> how could it?
<larsc> we increase the address of buf whenever we read data
<Ayla> ok. I give up.
<Ayla> larsc: the IRQ will be un-masked before the jump to poll_timeout, there might be a race there
<Ayla> now I'm seriously out of ideas
<larsc> the thread won't be restarted, before the previous run has finished
<Ayla> ok
<larsc> one thing you can try though is to call request_threaded_irq with IRQF_ONESHOT
<larsc> because there might be a race afterall
<larsc> yes, the thread won't be restarted if it is currently running
<larsc> you could test whether this ever happens by modifing kernel/irq/handle.c and insert a printk in line 68
<larsc> ayla, you said the problem was only occuring when you reclocked the cpu freq?
<Ayla> no, it's unrelated to the CPU clock
<larsc> ok
<Ayla> but it happens more often at a high clock
<larsc> makes sense
<larsc> because it polls faster
<larsc> the timeout in jz4740_mmc_poll_irq shouldn't count the number of polls, but rather uses jiffies
<larsc> to make it immune to frequency changes
<Ayla> it's not a problem if it polls faster
<Ayla> I mean it's not related to the current problem
<larsc> why?
<Ayla> the bug I'm trying to fix occurs when there is a timeout, having the kernel poll faster just trigger more timeouts
<larsc> yes
<Ayla> on both cases the bug is there, that's what I mean
<larsc> it's that it polls faster is another issue
<larsc> /it's//
<Ayla> yes
<larsc> the fix should be IRQF_ONESHOT, this will ensure that the primary handler won't be called as long as the threaded handler is running
<Ayla> heh, you really think it's that simple? ;)
<Ayla> IRQF_ONESHOT fixes nothing
<larsc> did you try the printk?
<Ayla> I did, but I'm having a hard time seeing this, as when the bug appears the kernel crashes and my dingoo reboots
<larsc> hm
<Ayla> note that if I un-plug the SD, the watchdog kicker in user-space will still work, and the device won't power off
<larsc> so it is a crash in kernel space?
<Ayla> yes, and I think that's what mth said too
<larsc> hm
<larsc> and you have no backtrace?
<Ayla> IIRC he said that the execution was stuck in the jz_mmc_irq handler
<Ayla> which was re-starting as soon as it exits
<larsc> hm
<Ayla> which sounds like a non-masked and non-cleared interrupt
<larsc> do you have a serial?
<Ayla> I do
<larsc> can you try to printk the non expected interrupts?
<Ayla> I need mth's code that forces timeouts, I downloaded it some days ago but now I'm on my netbook ...
<Ayla> do you have it on your log perhaps? He wrote the link in #dingoonity
<Ayla> if I don't use that patch, the bug never appears, because the serial line introduces enough delay
<larsc> it's not in the log anymore
<Ayla> correction: it does enter the worker thread
GNUtoo-desktop has joined #qi-hardware
B_Lizzard has joined #qi-hardware
<qi-bot> [commit] Werner Almesberger: b2/subst.c (prepare_re): recognize % in union pattern (master) http://qi-hw.com/p/eda-tools/e93ff0e
<qi-bot> [commit] Werner Almesberger: b2/: introduce unit pattern (##), for dimensionless values (master) http://qi-hw.com/p/eda-tools/cc895fe
<qi-bot> [commit] Werner Almesberger: b2/test/: more substitution tests (master) http://qi-hw.com/p/eda-tools/12b21f0
<qi-bot> [commit] Werner Almesberger: b2/: add regular expression conversion debugging (option -R) (master) http://qi-hw.com/p/eda-tools/da1010f
<qi-bot> [commit] Werner Almesberger: b2/test/Common: also provide empty hierarchy if the input is empty; name the file (master) http://qi-hw.com/p/eda-tools/4a586fc
<qi-bot> [commit] Werner Almesberger: b2/test/subesc: test regexp escaping in substitutions (master) http://qi-hw.com/p/eda-tools/3f4a068
<qi-bot> [commit] Werner Almesberger: b2/: add "print VAR" command in substitutions (for debugging/tracing) (master) http://qi-hw.com/p/eda-tools/ee0a2a4
<qi-bot> [commit] Werner Almesberger: b2/subex.c (compose): search "out" variables before "in" variables (master) http://qi-hw.com/p/eda-tools/31c1c58
<qi-bot> [commit] Werner Almesberger: b2/test/subcont: test "continue" in substitutions (master) http://qi-hw.com/p/eda-tools/e56a71e
<Ayla> larsc: when one read times out, the JZ_MMC_IRQ_RXFIFO_RD_REQ interrupt is enabled
<Ayla> that interrupt is handled by jz_mmc_irq, which starts the jz_mmc_irq_worker thread
<Ayla> and re-starts a data transfer
<Ayla> but the JZ_MMC_IRQ_RXFIFO_RD_REQ is never cleared
<Ayla> errr
<Ayla> so the transfer should work, as it polls for that flag
<Ayla> ...
<Ayla> it times out on the first try, so it doesn't read a single byte
abushcrafter has joined #qi-hardware
<Ayla> larsc: so the jz_mmc_irq pops up because the JZ_MMC_IRQ_RXFIFO_RD_REQ interrupt happens,
<Ayla> but the transfer times out because the JZ_MMC_IRQ_RXFIFO_RD_REQ flag on IREQ is missing.
<Ayla> how good is that?
jurting has joined #qi-hardware
<larsc> that actually makes some sense
<larsc> can you confirm that it will timeout?
<larsc> is it really the rd_req timeout?
<larsc> Receive FIFO read request. Set if data FIFO becomes half full (the number of words is >= 8) or the entries in data FIFO are the last read data.
<larsc> from the datasheet
<larsc> since we haven't read anything from the fifo it should still be set
<Ayla> yes, it is JZ_MMC_IRQ_RXFIFO_RD_REQ
<Ayla> I read 0x20 on the IREG when the interrupt happens
<larsc> i suppose removing the last jz4740_mmc_set_irq_enabled in the hardirq handler will fix it
<Ayla> larsc: it should still be set, yes
<Ayla> but it's not
<Ayla> otherwise it would not time out
<larsc> yep
<larsc> not acking the interrupts in the hardirq handler seems to be the right fix, because for example we have the same issue for the DATA_TRANSFER_DONE interrupt
<larsc> uhm and forget about what i said about jz4740_mmc_set_irq_enabled, i meant the writel to IREG
<Ayla> we're not acking the rd_req interrupt, because it's not possible
<Ayla> that bit in IREG is read-only
<larsc> so it is cleared after it has been masked?
<larsc> in hw?
<Ayla> it is cleared by the hardware, I believe
<larsc> yes, but why?
<larsc> that's what we want to find out
<Ayla> the first question is why is it cleared, while we can't write it
<Ayla> the second question, is why is the interrupt reappearing?
<larsc> one possibility is that it ANDs the irq mask with the pending interrupts in hardware
<larsc> because we unmask the interrupt again
<larsc> it's actually easy to test. add a second read to IREG right after the jz4740_mmc_set_irq_enabled in the hardirq handler
<Ayla> no, I still read 0x20
<Ayla> after the mask is written
<larsc> and after writing to ireg?
<Ayla> same value
<larsc> uhm, with mth's patch won't poll_irq always timeout?
<larsc> should this 'if (--timeout_next)' be 'if (--timeout_next == 0)'?
<Ayla> heh... good point
xwalk has joined #qi-hardware
<Ayla> ok, now it times out a lot, but it still manages to load the root filesystem
<Ayla> which means that timeouts are not involved in the bug that occurs during resume
<larsc> you can't be sure of that
<Ayla> well, the timeout mechanism seems fine
lekernel has quit [Quit: Konversation terminated!]
<larsc> it works fine during normal operation
<larsc> that's all you know
<Ayla> well, yes
abushcrafter has quit [Ping timeout: 245 seconds]
xwalk has quit [Ping timeout: 245 seconds]
xwalk_ has quit [Ping timeout: 248 seconds]
xwalk_ has joined #qi-hardware
xwalk has joined #qi-hardware
viric has quit [Ping timeout: 244 seconds]
viric has joined #qi-hardware
emeb has joined #qi-hardware
rejon has quit [Ping timeout: 245 seconds]
phirsch_ has joined #qi-hardware
Maroni has joined #qi-hardware
phirsch has quit [Ping timeout: 252 seconds]
phirsch_ is now known as phirsch
compcube has quit [Quit: Leaving]
kristoffer has quit [Quit: Leaving]
kilae has quit [Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120420145725]]
compcube has joined #qi-hardware
compcube has quit [Changing host]
compcube has joined #qi-hardware
Maroni has quit [Ping timeout: 260 seconds]
kuribas has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
lekernel has joined #qi-hardware
Textmode has joined #qi-hardware
<mth> larsc: you're right about the timeouts
jekhor has quit [Ping timeout: 252 seconds]
<mth> is it expected that if everything is done on interrupts it won't mount the rootfs on time, or is there still an issue there?
<mth> mounting a vfat partition shouldn't require all that much data to be read
<Ayla> mth, it's min-init job to mount the rootfs
<Ayla> and it already waits for the SD card to appear
<mth> is it the squashfs mount that times out then?
<Ayla> what timeout are you speaking about exactly?
<Ayla> what I know is that min-init tries to mount the VFAT partition until it eventually succeeds
<Ayla> which is weird, if you ask me, as the SD card should be ready as soon as it appears on /dev
<Ayla> I mean, the kernel should not allow it to appear in /dev if it's not yet ready
<mth> at some point the kernel says it cannot start init and will reboot in 5 seconds
<Ayla> it does so when min-init gives up mounting the VFAT partition or the rootfs
<mth> so it doesn't try until it succeeds then; it gives up after a while if it doesn't succeed
<Ayla> it tries 20 times, each try separated by 100ms
<Ayla> usually it fails a couple of times, that's why you can see errors on dmesg on OD
<Ayla> it would be better, IMHO, to make all calls return -ETIMEDOUT on the kernel, until the card marks itself as reseted
<Ayla> well it probably does that already
B_Lizzard has quit [Remote host closed the connection]
panda has joined #qi-hardware
panda is now known as Guest90701
panda|x201 has quit [Ping timeout: 256 seconds]
rejon has joined #qi-hardware