* Re: [PATCH v2] pcmcia: Remove replace kio_addr_t with unsigned int everywhere
From: Olof Johansson @ 2007-10-29 0:16 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Matthew Wilcox, linux-pcmcia, linux-kernel, linuxppc-dev, Alan,
Andrew Morton, Christoph Hellwig, Cox
In-Reply-To: <20071029105005.d85e212e.sfr@canb.auug.org.au>
On Mon, Oct 29, 2007 at 10:50:05AM +1100, Stephen Rothwell wrote:
> Hi Olof,
>
> diffstat output is very useful - especially for patches like this that
> touch lots of files. It makes it easier for potential reviewers to see
> if they should be potential reviewers. :-)
Hi,
Good point. I'll include it next time if I end up re-posting it. I hope
I won't have to. :-)
This is the diffstat from the posted patch:
Documentation/pcmcia/driver-changes.txt | 4 +-
drivers/bluetooth/bt3c_cs.c | 2 -
drivers/bluetooth/btuart_cs.c | 2 -
drivers/net/pcmcia/3c574_cs.c | 49 ++++++++++++-------------
drivers/net/pcmcia/3c589_cs.c | 30 +++++++--------
drivers/net/pcmcia/axnet_cs.c | 26 ++++++-------
drivers/net/pcmcia/fmvj18x_cs.c | 23 ++++++-----
drivers/net/pcmcia/nmclan_cs.c | 24 ++++++------
drivers/net/pcmcia/pcnet_cs.c | 36 +++++++++---------
drivers/net/pcmcia/smc91c92_cs.c | 62 ++++++++++++++++----------------
drivers/net/pcmcia/xirc2ps_cs.c | 51 +++++++++++++-------------
drivers/net/wireless/netwave_cs.c | 24 ++++++------
drivers/net/wireless/wavelan_cs.c | 56 ++++++++++++++--------------
drivers/pcmcia/i82092.c | 2 -
drivers/pcmcia/i82365.c | 14 +++----
drivers/pcmcia/m32r_cfc.c | 7 ++-
drivers/pcmcia/m32r_pcc.c | 5 +-
drivers/pcmcia/rsrc_nonstatic.c | 5 +-
drivers/serial/serial_cs.c | 6 +--
include/pcmcia/cs_types.h | 1
include/pcmcia/ss.h | 6 +--
21 files changed, 220 insertions(+), 215 deletions(-)
-Olof
^ permalink raw reply
* [PATCH] powerpc: Fix demotion of segments to 4K pages
From: Benjamin Herrenschmidt @ 2007-10-29 1:05 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev list
When demoting a process to use 4K HW pages (instead of 64K), which happens
under various circumstances such as doing cache inhibited mappings on
machines that do not support 64K CI pages, the assembly hash code calls
back into the C function flush_hash_page(). This function prototype was
recently changed to accomodate for 1T segments but the assembly call site
was not updated, causing applications that do demotion to hang. In addition,
when updating the per-CPU PACA for the new sizes, we didn't properly
update the slice "map", thus causing the SLB miss code to re-insert
segments for the wrong size.
This fixes both and adds a warning comment next to the C implementation to
try to avoid it next time someone changes it.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
Note that the PACA update bug is also present in 2.6.23, I'll do a patch
for -stable separately, once this one is upstream.
Index: linux-work/arch/powerpc/mm/hash_low_64.S
===================================================================
--- linux-work.orig/arch/powerpc/mm/hash_low_64.S 2007-10-29 10:15:48.000000000 +1100
+++ linux-work/arch/powerpc/mm/hash_low_64.S 2007-10-29 10:22:10.000000000 +1100
@@ -331,7 +331,7 @@ htab_pte_insert_failure:
*****************************************************************************/
/* _hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid,
- * pte_t *ptep, unsigned long trap, int local)
+ * pte_t *ptep, unsigned long trap, int local, int ssize)
*/
/*
@@ -557,7 +557,8 @@ htab_inval_old_hpte:
mr r4,r31 /* PTE.pte */
li r5,0 /* PTE.hidx */
li r6,MMU_PAGE_64K /* psize */
- ld r7,STK_PARM(r8)(r1) /* local */
+ ld r7,STK_PARM(r9)(r1) /* ssize */
+ ld r8,STK_PARM(r8)(r1) /* local */
bl .flush_hash_page
b htab_insert_pte
Index: linux-work/arch/powerpc/mm/hash_utils_64.c
===================================================================
--- linux-work.orig/arch/powerpc/mm/hash_utils_64.c 2007-10-29 10:21:55.000000000 +1100
+++ linux-work/arch/powerpc/mm/hash_utils_64.c 2007-10-29 11:57:06.000000000 +1100
@@ -793,8 +793,7 @@ int hash_page(unsigned long ea, unsigned
}
if (user_region) {
if (psize != get_paca()->context.user_psize) {
- get_paca()->context.user_psize =
- mm->context.user_psize;
+ get_paca()->context = mm->context;
slb_flush_and_rebolt();
}
} else if (get_paca()->vmalloc_sllp !=
@@ -887,6 +886,9 @@ void hash_preload(struct mm_struct *mm,
local_irq_restore(flags);
}
+/* WARNING: This is called from hash_low_64.S, if you change this prototype,
+ * do not forget to update the assembly call site !
+ */
void flush_hash_page(unsigned long va, real_pte_t pte, int psize, int ssize,
int local)
{
^ permalink raw reply
* Re: [PATCH] powerpc: Fix demotion of segments to 4K pages
From: Olof Johansson @ 2007-10-29 1:50 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, Paul Mackerras
In-Reply-To: <1193619918.9928.0.camel@pasglop>
Hi Ben,
On Mon, Oct 29, 2007 at 12:05:18PM +1100, Benjamin Herrenschmidt wrote:
> @@ -887,6 +886,9 @@ void hash_preload(struct mm_struct *mm,
> local_irq_restore(flags);
> }
>
> +/* WARNING: This is called from hash_low_64.S, if you change this prototype,
> + * do not forget to update the assembly call site !
> + */
Since we're already policing whitespace on this list today: We're normally
not using spaces before exclamation marks.
-Olof
^ permalink raw reply
* Re: [PATCH] powerpc: Fix demotion of segments to 4K pages
From: Benjamin Herrenschmidt @ 2007-10-29 2:00 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev list, Paul Mackerras
In-Reply-To: <20071029015014.GA13687@lixom.net>
On Sun, 2007-10-28 at 20:50 -0500, Olof Johansson wrote:
> Hi Ben,
>
> On Mon, Oct 29, 2007 at 12:05:18PM +1100, Benjamin Herrenschmidt wrote:
> > @@ -887,6 +886,9 @@ void hash_preload(struct mm_struct *mm,
> > local_irq_restore(flags);
> > }
> >
> > +/* WARNING: This is called from hash_low_64.S, if you change this prototype,
> > + * do not forget to update the assembly call site !
> > + */
>
> Since we're already policing whitespace on this list today: We're normally
> not using spaces before exclamation marks.
And I don't care, I will continue adding them because the opposite is
fugly :-)
There is a limit to what I accept from the style police, it's not like
Linux has to look like it's written by a single person either.
Ben.
^ permalink raw reply
* Re: [PATCH] powerpc: Fix demotion of segments to 4K pages
From: Stephen Rothwell @ 2007-10-29 2:18 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev list, Paul Mackerras
In-Reply-To: <1193619918.9928.0.camel@pasglop>
[-- Attachment #1: Type: text/plain, Size: 255 bytes --]
On Mon, 29 Oct 2007 12:05:18 +1100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
Just to be fair to Olof, "diffstats are good" ...
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH] Prevent appletouch message log spam on 17" PB
From: Dmitry Torokhov @ 2007-10-29 2:21 UTC (permalink / raw)
To: Joseph Jezak; +Cc: linuxppc-dev, valderman, Johannes Berg
In-Reply-To: <20071028235319.GB16301@woodpecker.gentoo.org>
Hi Joseph,
On Sunday 28 October 2007 19:53, Joseph Jezak wrote:
> Perhaps this was a debugging message? In any case, this printk
> causes lots of message log spam on my PB G4 1.67" (PowerBook5,9).
>
> This removes the printk.
>
I don't think we want do delete this message outright, we just need
to make sure we don't go through size detection when we re-initialize
the device. After all it is unlikely that touchpad will change its
size :)
BTW, could you tell me what product ID your touchpad has?
> Signed-off by: Joseph Jezak <josejx@gentoo.org>
> ---
>
> diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
> index f132702..6c47641 100644
> --- a/drivers/input/mouse/appletouch.c
> +++ b/drivers/input/mouse/appletouch.c
> @@ -433,7 +433,6 @@ static void atp_complete(struct urb* urb)
> for (i = (atp_is_geyser_2(dev)?15:16); i < ATP_XSENSORS; i++) {
> if (!dev->xy_cur[i]) continue;
>
> - printk("appletouch: 17\" model detected.\n");
> if(atp_is_geyser_2(dev))
> input_set_abs_params(dev->input, ABS_X, 0,
> (20 - 1) *
>
--
Dmitry
^ permalink raw reply
* Re: [PATCH] Prevent appletouch message log spam on 17" PB
From: Joseph Jezak @ 2007-10-29 2:34 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Johannes Berg, linuxppc-dev, Joseph Jezak, valderman
In-Reply-To: <200710282221.26241.dtor@insightbb.com>
Dmitry Torokhov wrote:
> Hi Joseph,
>
> On Sunday 28 October 2007 19:53, Joseph Jezak wrote:
>> Perhaps this was a debugging message? In any case, this printk
>> causes lots of message log spam on my PB G4 1.67" (PowerBook5,9).
>>
>> This removes the printk.
>>
>
> I don't think we want do delete this message outright, we just need
> to make sure we don't go through size detection when we re-initialize
> the device. After all it is unlikely that touchpad will change its
> size :)
>
> BTW, could you tell me what product ID your touchpad has?
>
>> Signed-off by: Joseph Jezak <josejx@gentoo.org>
>> ---
>>
>> diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
>> index f132702..6c47641 100644
>> --- a/drivers/input/mouse/appletouch.c
>> +++ b/drivers/input/mouse/appletouch.c
>> @@ -433,7 +433,6 @@ static void atp_complete(struct urb* urb)
>> for (i = (atp_is_geyser_2(dev)?15:16); i < ATP_XSENSORS; i++) {
>> if (!dev->xy_cur[i]) continue;
>>
>> - printk("appletouch: 17\" model detected.\n");
>> if(atp_is_geyser_2(dev))
>> input_set_abs_params(dev->input, ABS_X, 0,
>> (20 - 1) *
>>
>
Sure, that's probably better. My touchpad is an 0x0214.
-Joe
^ permalink raw reply
* [POWERPC] Fix duplicate time accounting
From: Paul Mackerras @ 2007-10-29 2:50 UTC (permalink / raw)
To: linuxppc-dev
Currently, process user and system times are advancing twice as fast
as they should because they are being accounted in two places - in the
generic code and in timer_interrupt. This fixes it by removing the
call to account_process_time in timer_interrupt.
Signed-off-by: Paul Mackerras <paulus@samba.org>
---
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 9eb3284..5e253d6 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -599,16 +599,6 @@ void timer_interrupt(struct pt_regs * regs)
get_lppaca()->int_dword.fields.decr_int = 0;
#endif
- /*
- * We cannot disable the decrementer, so in the period
- * between this cpu's being marked offline in cpu_online_map
- * and calling stop-self, it is taking timer interrupts.
- * Avoid calling into the scheduler rebalancing code if this
- * is the case.
- */
- if (!cpu_is_offline(cpu))
- account_process_time(regs);
-
if (evt->event_handler)
evt->event_handler(evt);
else
^ permalink raw reply related
* [POWERPC] Fix off-by-one error in setting decrementer on Book E
From: Paul Mackerras @ 2007-10-29 2:57 UTC (permalink / raw)
To: linuxppc-dev
The decrementer in Book E and 4xx processors interrupts on the
transition from 1 to 0, rather than on the 0 to -1 transition as on
64-bit server and 32-bit "classic" (6xx/7xx/7xxx) processors.
This fixes the problem by making set_dec subtract 1 from the count for
server and classic processors. Since set_dec already had a bunch of
ifdefs to handle different processor types, there is no net increase
in ugliness. :)
This also removes a redundant call to set the decrementer to
0x7fffffff - it was already set to that earlier in timer_interrupt.
Signed-off-by: Paul Mackerras <paulus@samba.org>
---
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 9eb3284..5e253d6 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -586,7 +586,7 @@ void timer_interrupt(struct pt_regs * regs)
/* not time for this event yet */
now = per_cpu(decrementer_next_tb, cpu) - now;
if (now <= DECREMENTER_MAX)
- set_dec((unsigned int)now - 1);
+ set_dec((int)now);
return;
}
old_regs = set_irq_regs(regs);
@@ -601,10 +601,8 @@ void timer_interrupt(struct pt_regs * regs)
if (evt->event_handler)
evt->event_handler(evt);
- else
- evt->set_next_event(DECREMENTER_MAX, evt);
#ifdef CONFIG_PPC_ISERIES
if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending())
@@ -826,9 +824,6 @@ static int decrementer_set_next_event(unsigned long evt,
struct clock_event_device *dev)
{
__get_cpu_var(decrementer_next_tb) = get_tb_or_rtc() + evt;
- /* The decrementer interrupts on the 0 -> -1 transition */
- if (evt)
- --evt;
set_dec(evt);
return 0;
}
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h
index f058955..eed64bd 100644
--- a/include/asm-powerpc/time.h
+++ b/include/asm-powerpc/time.h
@@ -183,6 +183,7 @@ static inline void set_dec(int val)
#elif defined(CONFIG_8xx_CPU6)
set_dec_cpu6(val);
#else
+ --val; /* classic decrementer interrupts when dec goes negative */
#ifdef CONFIG_PPC_ISERIES
int cur_dec;
^ permalink raw reply related
* Re: [PATCH] powerpc: Fix demotion of segments to 4K pages
From: Olof Johansson @ 2007-10-29 3:06 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, Paul Mackerras
In-Reply-To: <1193623229.9928.2.camel@pasglop>
On Mon, Oct 29, 2007 at 01:00:29PM +1100, Benjamin Herrenschmidt wrote:
> On Sun, 2007-10-28 at 20:50 -0500, Olof Johansson wrote:
> > Hi Ben,
> >
> > On Mon, Oct 29, 2007 at 12:05:18PM +1100, Benjamin Herrenschmidt wrote:
> > > @@ -887,6 +886,9 @@ void hash_preload(struct mm_struct *mm,
> > > local_irq_restore(flags);
> > > }
> > >
> > > +/* WARNING: This is called from hash_low_64.S, if you change this prototype,
> > > + * do not forget to update the assembly call site !
> > > + */
> >
> > Since we're already policing whitespace on this list today: We're normally
> > not using spaces before exclamation marks.
>
> And I don't care, I will continue adding them because the opposite is
> fugly :-)
Yeah , I know what you mean . This looks so much more natural .
> There is a limit to what I accept from the style police, it's not like
> Linux has to look like it's written by a single person either.
Good one ! That one goes to the bookmark list . :-)
I agree though , whitespace policing tends to be counter-productive ,
together with (minor) grammar and spelling errors in comments . Still,
people love to point them out so I figured I would do it too .
- Olof
^ permalink raw reply
* Re: [POWERPC] Fix off-by-one error in setting decrementer on Book E
From: Olof Johansson @ 2007-10-29 3:16 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <18213.19469.827909.663373@cargo.ozlabs.ibm.com>
Hi Paul,
On Mon, Oct 29, 2007 at 01:57:17PM +1100, Paul Mackerras wrote:
> diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h
> index f058955..eed64bd 100644
> --- a/include/asm-powerpc/time.h
> +++ b/include/asm-powerpc/time.h
> @@ -183,6 +183,7 @@ static inline void set_dec(int val)
> #elif defined(CONFIG_8xx_CPU6)
> set_dec_cpu6(val);
> #else
> + --val; /* classic decrementer interrupts when dec goes negative */
> #ifdef CONFIG_PPC_ISERIES
> int cur_dec;
This will mix code and declarations, I think some toolchains complain
about that?
It doesn't look like cur_dec is really needed, the call can be inlined
directly where it's used.
-Olof
^ permalink raw reply
* Re: [POWERPC] Fix duplicate time accounting
From: Olof Johansson @ 2007-10-29 3:16 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <18213.19066.134475.220466@cargo.ozlabs.ibm.com>
On Mon, Oct 29, 2007 at 01:50:34PM +1100, Paul Mackerras wrote:
> Currently, process user and system times are advancing twice as fast
> as they should because they are being accounted in two places - in the
> generic code and in timer_interrupt. This fixes it by removing the
> call to account_process_time in timer_interrupt.
>
> Signed-off-by: Paul Mackerras <paulus@samba.org>
Tested-by: Olof Johansson <olof@lixom.net>
Thanks for fixing it!
-Olof
^ permalink raw reply
* Re: [POWERPC] Fix off-by-one error in setting decrementer on Book E
From: Paul Mackerras @ 2007-10-29 3:10 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <18213.19469.827909.663373@cargo.ozlabs.ibm.com>
I wrote:
> @@ -601,10 +601,8 @@ void timer_interrupt(struct pt_regs * regs)
That should be
@@ -601,8 +601,6 @@ void timer_interrupt(struct pt_regs * regs)
of course.
Paul.
^ permalink raw reply
* Re: [PATCH] powerpc: Fix demotion of segments to 4K pages
From: Benjamin Herrenschmidt @ 2007-10-29 3:24 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev list, Paul Mackerras
In-Reply-To: <20071029030648.GA14199@lixom.net>
On Sun, 2007-10-28 at 22:06 -0500, Olof Johansson wrote:
> > And I don't care, I will continue adding them because the opposite
> is
> > fugly :-)
>
> Yeah , I know what you mean . This looks so much more natural .
Who said it has to be consistent ? :-)
I use spaces before ? and ! mostly. In fact, it might even be the rule
in french, I'm not too sure :-)
Ben.
^ permalink raw reply
* Re: [PATCH 11/16] Use of_get_next_child() in eeh_restore_bars()
From: Michael Ellerman @ 2007-10-29 3:46 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev, David S.Miller
In-Reply-To: <20071026172909.f7a085e9.sfr@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 1284 bytes --]
On Fri, 2007-10-26 at 17:29 +1000, Stephen Rothwell wrote:
> On Fri, 26 Oct 2007 16:54:43 +1000 (EST) Michael Ellerman <michael@ellerman.id.au> wrote:
> >
> > +++ b/arch/powerpc/platforms/pseries/eeh.c
> > @@ -841,11 +841,8 @@ void eeh_restore_bars(struct pci_dn *pdn)
> > if ((pdn->eeh_mode & EEH_MODE_SUPPORTED) && !IS_BRIDGE(pdn->class_code))
> > __restore_bars (pdn);
> >
> > - dn = pdn->node->child;
> > - while (dn) {
> > + for (dn = NULL; (dn = of_get_next_child(pdn->node, dn));)
>
> Just wondering if we need
>
> #define for_each_child_node(dn, parent) \
> for (dn = of_get_next_child(parent, NULL); dn; \
> dn = of_get_next_child(parent, dn))
Hmm, perhaps. I count ~30 places we could use it under arch/powerpc, and
about another ~20 in drivers/.
If no one objects, I guess I'll get to it, sigh ... another Yak.
Should we perhaps make it for_each_child_device_node() ?
Otherwise it's slightly non obvious what kind of node it's talking
about, especially in driver code.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH] fix appletouch geyser 1 breakage
From: Dmitry Torokhov @ 2007-10-29 5:09 UTC (permalink / raw)
To: Johannes Berg
Cc: linuxppc-dev list, Benjamin Berg, Anton Ekblad, Joseph Jezak
In-Reply-To: <1193584081.5197.17.camel@johannes.berg>
On Sunday 28 October 2007 11:08, Johannes Berg wrote:
>
> > I was hoping that FOUNTAIN_TP_ONLY_PRODUCT_ID (0x30A) behaves similar
> > to Geyser in this regard. If you know that this assumption is incorrect
> > then we need to rename atp_is_older_fountain() to atp_is_fountain()
> > anf add this product ID to it.
>
> Ah ok, I forgot about that one. If I were to venture a guess I'd say
> that they renamed it to geyser because of this idle behaviour
> "technology upgrade", but I can't say, nor do I know anybody with such a
> version, sorry.
OK then let's play safe and don't touch fountains at all. How about the
patch below?
--
Dmitry
Input: appletouch - idle reset logic broke older Fountains
Fountains do not support change mode request and therefore
should be excluded from idle reset attempts.
Also:
- do not re-submit URB when we decide that toucvhpad needs to be
reinicialized
- do not repeat size detection when reinitializing the touchpad
- Add missing KERN_* prefixes to messages
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
drivers/input/mouse/appletouch.c | 125 ++++++++++++++++++++++++---------------
1 file changed, 77 insertions(+), 48 deletions(-)
Index: work/drivers/input/mouse/appletouch.c
===================================================================
--- work.orig/drivers/input/mouse/appletouch.c
+++ work/drivers/input/mouse/appletouch.c
@@ -129,12 +129,12 @@ MODULE_DEVICE_TABLE (usb, atp_table);
*/
#define ATP_THRESHOLD 5
-/* MacBook Pro (Geyser 3 & 4) initialization constants */
-#define ATP_GEYSER3_MODE_READ_REQUEST_ID 1
-#define ATP_GEYSER3_MODE_WRITE_REQUEST_ID 9
-#define ATP_GEYSER3_MODE_REQUEST_VALUE 0x300
-#define ATP_GEYSER3_MODE_REQUEST_INDEX 0
-#define ATP_GEYSER3_MODE_VENDOR_VALUE 0x04
+/* Geyser initialization constants */
+#define ATP_GEYSER_MODE_READ_REQUEST_ID 1
+#define ATP_GEYSER_MODE_WRITE_REQUEST_ID 9
+#define ATP_GEYSER_MODE_REQUEST_VALUE 0x300
+#define ATP_GEYSER_MODE_REQUEST_INDEX 0
+#define ATP_GEYSER_MODE_VENDOR_VALUE 0x04
/* Structure to hold all of our device specific stuff */
struct atp {
@@ -142,9 +142,11 @@ struct atp {
struct usb_device * udev; /* usb device */
struct urb * urb; /* usb request block */
signed char * data; /* transferred data */
- int open; /* non-zero if opened */
- struct input_dev *input; /* input dev */
- int valid; /* are the sensors valid ? */
+ struct input_dev * input; /* input dev */
+ unsigned char open; /* non-zero if opened */
+ unsigned char valid; /* are the sensors valid ? */
+ unsigned char size_detect_done;
+ unsigned char overflowwarn; /* overflow warning printed? */
int x_old; /* last reported x/y, */
int y_old; /* used for smoothing */
/* current value of the sensors */
@@ -153,7 +155,6 @@ struct atp {
signed char xy_old[ATP_XSENSORS + ATP_YSENSORS];
/* accumulated sensors */
int xy_acc[ATP_XSENSORS + ATP_YSENSORS];
- int overflowwarn; /* overflow warning printed? */
int datalen; /* size of an USB urb transfer */
int idlecount; /* number of empty packets */
struct work_struct work;
@@ -170,7 +171,7 @@ struct atp {
#define dprintk(format, a...) \
do { \
- if (debug) printk(format, ##a); \
+ if (debug) printk(KERN_DEBUG format, ##a); \
} while (0)
MODULE_AUTHOR("Johannes Berg, Stelian Pop, Frank Arnold, Michael Hanselmann");
@@ -188,6 +189,15 @@ static int debug = 1;
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Activate debugging output");
+static inline int atp_is_fountain(struct atp *dev)
+{
+ u16 productId = le16_to_cpu(dev->udev->descriptor.idProduct);
+
+ return productId == FOUNTAIN_ANSI_PRODUCT_ID ||
+ productId == FOUNTAIN_ISO_PRODUCT_ID ||
+ productId == FOUNTAIN_TP_ONLY_PRODUCT_ID;
+}
+
/* Checks if the device a Geyser 2 (ANSI, ISO, JIS) */
static inline int atp_is_geyser_2(struct atp *dev)
{
@@ -211,52 +221,63 @@ static inline int atp_is_geyser_3(struct
}
/*
- * By default Geyser 3 device sends standard USB HID mouse
+ * By default newer Geyser devices send standard USB HID mouse
* packets (Report ID 2). This code changes device mode, so it
* sends raw sensor reports (Report ID 5).
*/
-static int atp_geyser3_init(struct usb_device *udev)
+static int atp_geyser_init(struct usb_device *udev)
{
char data[8];
int size;
size = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
- ATP_GEYSER3_MODE_READ_REQUEST_ID,
+ ATP_GEYSER_MODE_READ_REQUEST_ID,
USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
- ATP_GEYSER3_MODE_REQUEST_VALUE,
- ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000);
+ ATP_GEYSER_MODE_REQUEST_VALUE,
+ ATP_GEYSER_MODE_REQUEST_INDEX, &data, 8, 5000);
if (size != 8) {
err("Could not do mode read request from device"
- " (Geyser 3 mode)");
+ " (Geyser Raw mode)");
return -EIO;
}
/* Apply the mode switch */
- data[0] = ATP_GEYSER3_MODE_VENDOR_VALUE;
+ data[0] = ATP_GEYSER_MODE_VENDOR_VALUE;
size = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
- ATP_GEYSER3_MODE_WRITE_REQUEST_ID,
+ ATP_GEYSER_MODE_WRITE_REQUEST_ID,
USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
- ATP_GEYSER3_MODE_REQUEST_VALUE,
- ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000);
+ ATP_GEYSER_MODE_REQUEST_VALUE,
+ ATP_GEYSER_MODE_REQUEST_INDEX, &data, 8, 5000);
if (size != 8) {
err("Could not do mode write request to device"
- " (Geyser 3 mode)");
+ " (Geyser Raw mode)");
return -EIO;
}
return 0;
}
-/* Reinitialise the device if it's a geyser 3 */
+/*
+ * Reinitialise the device. This usually stops stream of empty packets
+ * coming from it.
+ */
static void atp_reinit(struct work_struct *work)
{
struct atp *dev = container_of(work, struct atp, work);
struct usb_device *udev = dev->udev;
+ int retval;
dev->idlecount = 0;
- atp_geyser3_init(udev);
+
+ atp_geyser_init(udev);
+
+ retval = usb_submit_urb(dev->urb, GFP_ATOMIC);
+ if (retval) {
+ err("%s - usb_submit_urb failed with result %d",
+ __FUNCTION__, retval);
+ }
}
static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact,
@@ -337,7 +358,7 @@ static void atp_complete(struct urb* urb
break;
case -EOVERFLOW:
if(!dev->overflowwarn) {
- printk("appletouch: OVERFLOW with data "
+ printk(KERN_WARNING "appletouch: OVERFLOW with data "
"length %d, actual length is %d\n",
dev->datalen, dev->urb->actual_length);
dev->overflowwarn = 1;
@@ -426,15 +447,17 @@ static void atp_complete(struct urb* urb
dev->x_old = dev->y_old = -1;
memcpy(dev->xy_old, dev->xy_cur, sizeof(dev->xy_old));
- if (atp_is_geyser_3(dev)) /* No 17" Macbooks (yet) */
+ if (dev->size_detect_done ||
+ atp_is_geyser_3(dev)) /* No 17" Macbooks (yet) */
goto exit;
/* 17" Powerbooks have extra X sensors */
- for (i = (atp_is_geyser_2(dev)?15:16); i < ATP_XSENSORS; i++) {
- if (!dev->xy_cur[i]) continue;
+ for (i = (atp_is_geyser_2(dev) ? 15 : 16); i < ATP_XSENSORS; i++) {
+ if (!dev->xy_cur[i])
+ continue;
- printk("appletouch: 17\" model detected.\n");
- if(atp_is_geyser_2(dev))
+ printk(KERN_INFO "appletouch: 17\" model detected.\n");
+ if (atp_is_geyser_2(dev))
input_set_abs_params(dev->input, ABS_X, 0,
(20 - 1) *
ATP_XFACT - 1,
@@ -444,10 +467,10 @@ static void atp_complete(struct urb* urb
(ATP_XSENSORS - 1) *
ATP_XFACT - 1,
ATP_FUZZ, 0);
-
break;
}
+ dev->size_detect_done = 1;
goto exit;
}
@@ -479,7 +502,7 @@ static void atp_complete(struct urb* urb
dev->y_old = y;
if (debug > 1)
- printk("appletouch: X: %3d Y: %3d "
+ printk(KERN_DEBUG "appletouch: X: %3d Y: %3d "
"Xz: %3d Yz: %3d\n",
x, y, x_z, y_z);
@@ -507,19 +530,25 @@ static void atp_complete(struct urb* urb
input_report_key(dev->input, BTN_LEFT, key);
input_sync(dev->input);
- /* Many Geysers will continue to send packets continually after
- the first touch unless reinitialised. Do so if it's been
- idle for a while in order to avoid waking the kernel up
- several hundred times a second */
-
- if (!x && !y && !key) {
- dev->idlecount++;
- if (dev->idlecount == 10) {
- dev->valid = 0;
- schedule_work(&dev->work);
- }
- } else
- dev->idlecount = 0;
+ /*
+ * Many Geysers will continue to send packets continually after
+ * the first touch unless reinitialised. Do so if it's been
+ * idle for a while in order to avoid waking the kernel up
+ * several hundred times a second. Re-initialization does not
+ * work on Fountain touchpads.
+ */
+ if (!atp_is_fountain(dev)) {
+ if (!x && !y && !key) {
+ dev->idlecount++;
+ if (dev->idlecount == 10) {
+ dev->valid = 0;
+ schedule_work(&dev->work);
+ /* Don't resubmit urb here, wait for reinit */
+ return;
+ }
+ } else
+ dev->idlecount = 0;
+ }
exit:
retval = usb_submit_urb(dev->urb, GFP_ATOMIC);
@@ -593,12 +622,12 @@ static int atp_probe(struct usb_interfac
else
dev->datalen = 81;
- if (atp_is_geyser_3(dev)) {
+ if (!atp_is_fountain(dev)) {
/* switch to raw sensor mode */
- if (atp_geyser3_init(udev))
+ if (atp_geyser_init(udev))
goto err_free_devs;
- printk("appletouch Geyser 3 inited.\n");
+ printk(KERN_INFO "appletouch: Geyser mode initialized.\n");
}
dev->urb = usb_alloc_urb(0, GFP_KERNEL);
^ permalink raw reply
* RE: [PATCH] ucc_geth: add support for netpoll
From: Li Yang-r58472 @ 2007-10-29 6:12 UTC (permalink / raw)
To: cbou, Sergei Shtylyov; +Cc: netdev, linux-kernel, linuxppc-dev
In-Reply-To: <20071027143731.GA2616@zarina>
> -----Original Message-----
> From: Anton Vorontsov [mailto:cbou@mail.ru]=20
> Sent: Saturday, October 27, 2007 10:38 PM
> To: Sergei Shtylyov
> Cc: Anton Vorontsov; netdev@vger.kernel.org; Li Yang-r58472;=20
> linux-kernel@vger.kernel.org; linuxppc-dev@ozlabs.org
> Subject: Re: [PATCH] ucc_geth: add support for netpoll
>=20
> On Sat, Oct 27, 2007 at 05:09:51PM +0400, Sergei Shtylyov wrote:
> > Hello.
> >=20
> > Anton Vorontsov wrote:
> >=20
> > > This patch adds netpoll support for the QE UCC Gigabit Ethernet=20
> > > driver. The approach is very similar to the gianfar driver.
> >=20
> > It's rather contrarywise -- this is standard approach=20
> and gianfar=20
> > with its
> > 3 TSEC IRQs has a quite non-standard poll_controller()=20
> implementation.
>=20
> Oh.. well, right -- gianfar a bit more comlex in that regard.
>=20
> >=20
> > > Tested using netconsole.
> >=20
> > KGDBoE is considered a better test (I hope you've also=20
> tested with it).
>=20
> At the time of posting it was tested using netconsole only, a=20
> few days later it's was tested using KGDBoE also. So, it works indeed.
>=20
> > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>=20
> diff --git=20
> > > a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index=20
> > > 18a6f48..06807ce 100644
> > > --- a/drivers/net/ucc_geth.c
> > > +++ b/drivers/net/ucc_geth.c
> > > @@ -3691,6 +3691,22 @@ static irqreturn_t=20
> ucc_geth_irq_handler(int irq, void *info)
> > > return IRQ_HANDLED;
> > > }
> > > =20
> > > +#ifdef CONFIG_NET_POLL_CONTROLLER
> > > +/*
> > > + * Polling 'interrupt' - used by things like netconsole to send=20
> > > +skbs
> > > + * without having to re-enable interrupts. It's not called while
> > > + * the interrupt routine is executing.
> > > + */
> > > +static void ucc_netpoll(struct net_device *dev) {
> > > + struct ucc_geth_private *ugeth =3D netdev_priv(dev);
> > > +
> > > + disable_irq(ugeth->ug_info->uf_info.irq);
> > > + ucc_geth_irq_handler(ugeth->ug_info->uf_info.irq, dev);
> > > + enable_irq(ugeth->ug_info->uf_info.irq);
> >=20
> > Why not make it less complex (for a reader and gcc too :-) ?
>=20
> Yup, I'm agree here but it's too late. Again. ;-)
>=20
> This patch already accepted into the -mm (a week or so after=20
> the silence), so.. now I'd rather not bother Andrew with such=20
> really cosmetic changes. But if Jeff would directly apply=20
> modfied patch, I'll send it. ;-)
Oops. The original patch happened to hit the Junk mail box. :( I think
the patch is good to merge after the cosmetic change. I can do it in
next pull request to Jeff.
Thanks
- Leo
^ permalink raw reply
* Re: [PATCH] fix appletouch geyser 1 breakage
From: Johannes Berg @ 2007-10-29 8:12 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: linuxppc-dev list, Benjamin Berg, Anton Ekblad, Joseph Jezak
In-Reply-To: <200710290109.49604.dtor@insightbb.com>
[-- Attachment #1: Type: text/plain, Size: 845 bytes --]
> OK then let's play safe and don't touch fountains at all. How about the
> patch below?
Looks fine to me, works with my fountain touchpad and should fix
Joseph's error too.
> Input: appletouch - idle reset logic broke older Fountains
>
> Fountains do not support change mode request and therefore
> should be excluded from idle reset attempts.
>
> Also:
> - do not re-submit URB when we decide that toucvhpad needs to be
> reinicialized
> - do not repeat size detection when reinitializing the touchpad
> - Add missing KERN_* prefixes to messages
>
> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
> ---
> drivers/input/mouse/appletouch.c | 125 ++++++++++++++++++++++++---------------
> 1 file changed, 77 insertions(+), 48 deletions(-)
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* Re: [PATCH] powerpc: Fix demotion of segments to 4K pages
From: Geert Uytterhoeven @ 2007-10-29 8:32 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Olof Johansson, linuxppc-dev list, Paul Mackerras
In-Reply-To: <1193628268.9928.16.camel@pasglop>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1148 bytes --]
On Mon, 29 Oct 2007, Benjamin Herrenschmidt wrote:
> On Sun, 2007-10-28 at 22:06 -0500, Olof Johansson wrote:
> > > And I don't care, I will continue adding them because the opposite
> > is
> > > fugly :-)
> >
> > Yeah , I know what you mean . This looks so much more natural .
>
> Who said it has to be consistent ? :-)
>
> I use spaces before ? and ! mostly. In fact, it might even be the rule
> in french, I'm not too sure :-)
Yes it is http://en.wikipedia.org/wiki/Punctuation_in_French ;-)
C'est permis, mais seulement en Français ;-)
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
^ permalink raw reply
* Re: [PATCH] ehea: add kexec support
From: Jeff Garzik @ 2007-10-29 9:47 UTC (permalink / raw)
To: Jan-Bernd Themann
Cc: Thomas Klein, Jan-Bernd Themann, netdev, linux-kernel, linux-ppc,
Christoph Raisch, Marcus Eder, Stefan Roscher
In-Reply-To: <200710261437.29117.ossthema@de.ibm.com>
Jan-Bernd Themann wrote:
> eHEA resources that are allocated via H_CALLs have a unique identifier each.
> These identifiers are necessary to free the resources. A reboot notifier
> is used to free all eHEA resources before the indentifiers get lost, i.e
> before kexec starts a new kernel.
>
> Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
applied to #upstream-fixes
^ permalink raw reply
* Re: [PATCH v4.3] FEC - fast ethernet controller for mpc52xx
From: Jeff Garzik @ 2007-10-29 9:59 UTC (permalink / raw)
To: Domen Puncer; +Cc: linuxppc-dev, netdev
In-Reply-To: <20071026160749.GA21374@nd47.coderock.org>
Domen Puncer wrote:
> On 26/10/07 07:18 -0700, Dale Farnsworth wrote:
>> On Fri, Oct 26, 2007 at 01:59:09PM +0200, Domen Puncer wrote:
>>> +static irqreturn_t mpc52xx_fec_tx_interrupt(int irq, void *dev_id)
>>> +{
>>> + struct net_device *dev = dev_id;
>>> + struct mpc52xx_fec_priv *priv = netdev_priv(dev);
>>> +
>>> + spin_lock(&priv->lock);
>>> +
>>> + while (bcom_buffer_done(priv->tx_dmatsk)) {
>>> + struct sk_buff *skb;
>>> + struct bcom_fec_bd *bd;
>>> + skb = bcom_retrieve_buffer(priv->tx_dmatsk, NULL,
>>> + (struct bcom_bd **)&bd);
>>> + /* Here (and in rx routines) would be a good place for
>>> + * dma_unmap_single(), but bcom doesn't return bcom_bd of the
>>> + * finished transfer, and _unmap is empty on this platfrom.
>>> + */
>> Oops, you forgot to remove the above comment. :)
>
> Argh!
>
> Repost w/o the comment.
> Sorry for receiving all this almost-spam.
>
>
>> Otherwise,
>> Acked-by: Dale Farnsworth <dale@farnsworth.org>
>>
>> Domen, thanks for all your work on this. It's good to see it finally go in.
>>
>> -Dale
>
> --- again, use your scisors here ;-) ---
>
>
> Driver for ethernet on mpc5200/mpc5200b SoCs (FEC).
>
>
> Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
> Acked-by: Dale Farnsworth <dale@farnsworth.org>
>
> ---
> drivers/net/Kconfig | 24
> drivers/net/Makefile | 4
> drivers/net/fec_mpc52xx.c | 1112 ++++++++++++++++++++++++++++++++++++++++++
> drivers/net/fec_mpc52xx.h | 313 +++++++++++
> drivers/net/fec_mpc52xx_phy.c | 198 +++++++
> 5 files changed, 1651 insertions(+)
applied to #upstream-fixes
it's not strictly a fix, but I did not want to hold this back until
2.6.25 either
^ permalink raw reply
* Re: [PATCH/RFC] powerpc: Pass PID argument to _tlbie (WAS: Apparent kernel bug with GDB on ppc405)
From: Josh Boyer @ 2007-10-29 12:08 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev list, linuxppc-embedded, Kumar Gala, Matt Mackall
In-Reply-To: <1193470322.18243.63.camel@pasglop>
On Sat, 27 Oct 2007 17:32:02 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> Allright, so Matt, let me know if that fixes your problem with gdb, and
> I'll clean the patch up a bit and submit it. I want to double check if
> something similar may be needed for freescale booke.
>
> Basically, the problem is that things like get_user_pages() can cause
> COW operations which in turn call _tlbie() to be called for translations
> that aren't in the current address space.
>
> The current 40x and 44x implementation of _tlbie doesn't handle that
> properly as it only invalidates entries in the current PID.
>
> This is an attempt at fixing it. Untested, I just checked it builds for
> arch/powerpc and arch/ppc. I also haven't looked whether the freescale
> BookE _tlbie needs similar treatement (it will get passed the pid in r4
> with that patch, so if it needs to do something with it, it can). Kumar,
> can you have a look ?
This looks pretty good at first glance. I'll try to test it out today,
but I'd still like to hear if it solves Matt's problem as I doubt I'll
be able to duplicate it.
josh
^ permalink raw reply
* Re: [PATCH] ucc_geth: add support for netpoll
From: Anton Vorontsov @ 2007-10-29 12:17 UTC (permalink / raw)
To: Li Yang-r58472; +Cc: netdev, linux-kernel, linuxppc-dev
In-Reply-To: <989B956029373F45A0B8AF0297081890019B61BF@zch01exm26.fsl.freescale.net>
On Mon, Oct 29, 2007 at 02:12:07PM +0800, Li Yang-r58472 wrote:
[...]
> > > > +#ifdef CONFIG_NET_POLL_CONTROLLER
> > > > +/*
> > > > + * Polling 'interrupt' - used by things like netconsole to send
> > > > +skbs
> > > > + * without having to re-enable interrupts. It's not called while
> > > > + * the interrupt routine is executing.
> > > > + */
> > > > +static void ucc_netpoll(struct net_device *dev) {
> > > > + struct ucc_geth_private *ugeth = netdev_priv(dev);
> > > > +
> > > > + disable_irq(ugeth->ug_info->uf_info.irq);
> > > > + ucc_geth_irq_handler(ugeth->ug_info->uf_info.irq, dev);
> > > > + enable_irq(ugeth->ug_info->uf_info.irq);
> > >
> > > Why not make it less complex (for a reader and gcc too :-) ?
> >
> > Yup, I'm agree here but it's too late. Again. ;-)
> >
> > This patch already accepted into the -mm (a week or so after
> > the silence), so.. now I'd rather not bother Andrew with such
> > really cosmetic changes. But if Jeff would directly apply
> > modfied patch, I'll send it. ;-)
>
> Oops. The original patch happened to hit the Junk mail box. :(
That one as well? http://lkml.org/lkml/2007/10/11/128
> I think
> the patch is good to merge after the cosmetic change. I can do it in
> next pull request to Jeff.
Ok, great. Thanks.
Here it is:
- - - -
From: Anton Vorontsov <avorontsov@ru.mvista.com>
Subject: [PATCH] ucc_geth: add support for netpoll
This patch adds netpoll support for the QE UCC Gigabit Ethernet
driver. Tested using netconsole and KGDBoE.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
drivers/net/ucc_geth.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index bec413b..94e78d8 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3678,6 +3678,23 @@ static irqreturn_t ucc_geth_irq_handler(int irq, void *info)
return IRQ_HANDLED;
}
+#ifdef CONFIG_NET_POLL_CONTROLLER
+/*
+ * Polling 'interrupt' - used by things like netconsole to send skbs
+ * without having to re-enable interrupts. It's not called while
+ * the interrupt routine is executing.
+ */
+static void ucc_netpoll(struct net_device *dev)
+{
+ struct ucc_geth_private *ugeth = netdev_priv(dev);
+ int irq = ugeth->ug_info->uf_info.irq;
+
+ disable_irq(irq);
+ ucc_geth_irq_handler(irq, dev);
+ enable_irq(irq);
+}
+#endif /* CONFIG_NET_POLL_CONTROLLER */
+
/* Called when something needs to use the ethernet device */
/* Returns 0 for success. */
static int ucc_geth_open(struct net_device *dev)
@@ -3963,6 +3980,9 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
#ifdef CONFIG_UGETH_NAPI
netif_napi_add(dev, &ugeth->napi, ucc_geth_poll, UCC_GETH_DEV_WEIGHT);
#endif /* CONFIG_UGETH_NAPI */
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ dev->poll_controller = ucc_netpoll;
+#endif
dev->stop = ucc_geth_close;
// dev->change_mtu = ucc_geth_change_mtu;
dev->mtu = 1500;
--
1.5.2.2
^ permalink raw reply related
* Re: [POWERPC] Fix duplicate time accounting
From: Sergei Shtylyov @ 2007-10-29 13:56 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <18213.19066.134475.220466@cargo.ozlabs.ibm.com>
Hello.
Paul Mackerras wrote:
> Currently, process user and system times are advancing twice as fast
> as they should because they are being accounted in two places - in the
> generic code and in timer_interrupt. This fixes it by removing the
> call to account_process_time in timer_interrupt.
But will the deterministic accounting option continue to work with such fix?
> Signed-off-by: Paul Mackerras <paulus@samba.org>
> ---
> diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
> index 9eb3284..5e253d6 100644
> --- a/arch/powerpc/kernel/time.c
> +++ b/arch/powerpc/kernel/time.c
> @@ -599,16 +599,6 @@ void timer_interrupt(struct pt_regs * regs)
> get_lppaca()->int_dword.fields.decr_int = 0;
> #endif
>
> - /*
> - * We cannot disable the decrementer, so in the period
> - * between this cpu's being marked offline in cpu_online_map
> - * and calling stop-self, it is taking timer interrupts.
> - * Avoid calling into the scheduler rebalancing code if this
> - * is the case.
> - */
> - if (!cpu_is_offline(cpu))
> - account_process_time(regs);
> -
> if (evt->event_handler)
> evt->event_handler(evt);
> else
WBR, Sergei
^ permalink raw reply
* boot/wrap assumes a biarch toolchain?
From: Anton Blanchard @ 2007-10-29 14:07 UTC (permalink / raw)
To: linuxppc-dev; +Cc: jdittmer
Hi,
Jan is seeing the following fail:
WRAP arch/powerpc/boot/zImage.pmac
powerpc-linux-objcopy: vmlinux: File format not recognized
He is using a cross compile toolchain invoked with the following command
line:
# make HOSTCC=gcc-4.0 ARCH=powerpc CROSS_COMPILE=powerpc64-linux- CROSS32_COMPILE=powerpc-linux-
It seems like boot/wrap wants to use both 64bit and 32bit tools, however
it only receives the 32bit path:
ifneq ($(CROSS32_COMPILE),)
CROSSWRAP := -C "$(CROSS32_COMPILE)"
else
ifneq ($(CROSS_COMPILE),)
CROSSWRAP := -C "$(CROSS_COMPILE)"
endif
endif
Thoughts? I guess we have to pass in both cross compile targets.
One way to make this go away would be to build binutils as biarch:
# configure --target=powerpc-linux --enable-targets=powerpc64-linux ...
Anton
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox