* [PATCH] powerpc/mpic: improve interrupt handling performance
From: Kumar Gala @ 2009-05-08 22:08 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
Before when we were setting up the irq host map for mpic we passed in
just isu_size for the size of the linear map. However, for a number of
mpic implementations we have no isu (thus pass in 0) and will end up
with a no linear map (size = 0). This causes us to always call
irq_find_mapping() from mpic_get_irq().
By moving the allocation of the host map to after we've determined the
number of sources we can actually benefit from having a linear map for
the non-isu users that covers all the interrupt sources.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
Ben,
I leave it up to you if you want to put this in for 2.6.30. We see about a 1us
reduction in time spent in mpic_get_irq() based on ftrace.
- k
arch/powerpc/sysdev/mpic.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 21b9567..0efc12d 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1057,13 +1057,6 @@ struct mpic * __init mpic_alloc(struct device_node *node,
memset(mpic, 0, sizeof(struct mpic));
mpic->name = name;
- mpic->irqhost = irq_alloc_host(node, IRQ_HOST_MAP_LINEAR,
- isu_size, &mpic_host_ops,
- flags & MPIC_LARGE_VECTORS ? 2048 : 256);
- if (mpic->irqhost == NULL)
- return NULL;
-
- mpic->irqhost->host_data = mpic;
mpic->hc_irq = mpic_irq_chip;
mpic->hc_irq.typename = name;
if (flags & MPIC_PRIMARY)
@@ -1213,6 +1206,15 @@ struct mpic * __init mpic_alloc(struct device_node *node,
mpic->isu_shift = 1 + __ilog2(mpic->isu_size - 1);
mpic->isu_mask = (1 << mpic->isu_shift) - 1;
+ mpic->irqhost = irq_alloc_host(node, IRQ_HOST_MAP_LINEAR,
+ isu_size ? isu_size : mpic->num_sources,
+ &mpic_host_ops,
+ flags & MPIC_LARGE_VECTORS ? 2048 : 256);
+ if (mpic->irqhost == NULL)
+ return NULL;
+
+ mpic->irqhost->host_data = mpic;
+
/* Display version */
switch (greg_feature & MPIC_GREG_FEATURE_VERSION_MASK) {
case 1:
--
1.6.0.6
^ permalink raw reply related
* question about fs_enet driver
From: Ken Huisman @ 2009-05-08 21:36 UTC (permalink / raw)
To: linuxppc-dev
Is there a way to configure the fs_enet driver to use rmii mode for one
of the ethernet devices in
my device tree? I know other drivers support a keyword in the device
tree (such as phy-connection-type = "rmii")
but the following line of code in fs_enet-main.c (fs_init_phy())
suggests to me that mii mode is hard-coded for this driver:
phydev = phy_connect(dev, fep->fpi->bus_id, &fs_adjust_link, 0,
PHY_INTERFACE_MODE_MII);
am I correct in my understanding, or is this set up a different way for
the fs_enet driver?
thanks
Ken
^ permalink raw reply
* Please pull from 'merge' branch for 2.6.30
From: Kumar Gala @ 2009-05-08 21:34 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
Please pull from 'merge' branch of
master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git merge
to receive the following updates:
arch/powerpc/sysdev/fsl_soc.c | 46 ------------------------------------------
1 file changed, 46 deletions(-)
Anton Vorontsov (1):
powerpc/fsl_soc: Remove mpc83xx_wdt_init, again
^ permalink raw reply
* Re: [PATCH] powerpc/fsl_soc: Remove mpc83xx_wdt_init, again
From: Kumar Gala @ 2009-05-08 21:31 UTC (permalink / raw)
To: Anton Vorontsov; +Cc: linuxppc-dev
In-Reply-To: <20090430222745.GA10985@oksana.dev.rtsoft.ru>
On Apr 30, 2009, at 5:27 PM, Anton Vorontsov wrote:
> commit b31a1d8b41513b96e9c7ec2f68c5734cef0b26a4 ("gianfar: Convert
> gianfar to an of_platform_driver"), possibly due merge issues,
> reintroduced completely unneded mpc83xx_wdt_init call, which
> I removed some time ago in commit 20d38e01d48019c578ab0ec1464454c0
> ("powerpc/fsl_soc: remove mpc83xx_wdt code").
>
> Remove it once again.
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
> arch/powerpc/sysdev/fsl_soc.c | 46
> -----------------------------------------
> 1 files changed, 0 insertions(+), 46 deletions(-)
applied to merge
- k
^ permalink raw reply
* Re: initramfs with lzma compression
From: Mirek23 @ 2009-05-08 20:15 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <23446869.post@talk.nabble.com>
Thank you for the quick answer.
I am using the kernel version 2.6.23 with many other patches which require
sometime to port to the latest kernel. I understand the it is possible to
find the lzma patch also for older kernels in the git tree. Where can I find
than the linuxppc git tree with the lzma patch.
Thanks
M.
Mirek23 wrote:
>
> Dear All,
>
> I am looking for a patch which introduces lzma compression or suppresses
> the standard gzip compression for the initramfs.
>
> I would be grateful for any hint.
>
> M.
>
--
View this message in context: http://www.nabble.com/initramfs-with-lzma-compression-tp23446869p23452009.html
Sent from the linuxppc-dev mailing list archive at Nabble.com.
^ permalink raw reply
* Re: [PowerPC] Next May 8 boot failure: OOPS during ibmveth module init
From: David Miller @ 2009-05-08 19:57 UTC (permalink / raw)
To: sachinp; +Cc: jpirko, linuxppc-dev, linux-next, netdev, sfr
In-Reply-To: <4A042B20.4090903@in.ibm.com>
From: Sachin Sant <sachinp@in.ibm.com>
Date: Fri, 08 May 2009 18:22:48 +0530
> Todays Next failed to boot on a Power6 JS22 blade with following oops.
Jiri, I suspect this might be your address list changes.
Although that's just a guess. But please take a look.
> Unable to handle kernel paging request for data at address
> 0x654af306c04b990
> Faulting instruction address: 0xc00000000003a740
> Oops: Kernel access of bad area, sig: 11 [#1]
> SMP NR_CPUS=1024 NUMA pSeries
> Modules linked in: ibmveth(+) sg sd_mod crc_t10dif ibmvscsic
> scsi_transport_srp scsi_tgt scsi_mod
> NIP: c00000000003a740 LR: c000000000361e20 CTR: 0000000000000000
> REGS: c000000042af6e80 TRAP: 0300 Not tainted
> (2.6.30-rc4-next-20090508)
> MSR: 8000000000009032 <EE,ME,IR,DR> CR: 28222286 XER: 20000001
> DAR: 0654af306c04b990, DSISR: 0000000040000000
> TASK = c0000000428084d0[590] 'modprobe' THREAD: c000000042af4000 CPU:
> 0
> GPR00: c000000000361e10 c000000042af7100 c000000000eb8190
> c00000004427cc80
> GPR04: 0654af306c04b990 0000000000000006 0000000000000000
> 0000000000000002
> GPR08: c00000004427cc00 0000000000000088 0000000000000280
> 000000000000007c
> GPR12: 0000000084222284 c000000000f92400 0000000000000000
> 0000000000000000
> GPR16: 0000000000000000 0000000000000000 d000000000ed4346
> d000000000ed3aa0
> GPR20: d000000000ed6358 c00000004427cc00 00000000ffffffff
> 0000000000000000
> GPR24: 0000000000000000 c0000000402d0000 0000000000000010
> c00000004194b400
> GPR28: 0000000000000006 0654af306c04b990 c000000000e44f18
> 0000000000000000
> NIP [c00000000003a740] .memcpy+0x240/0x278
> LR [c000000000361e20] .__nla_put+0x30/0x4c
> Call Trace:
> [c000000042af7100] [c000000000361e10] .__nla_put+0x20/0x4c
> (unreliable)
> [c000000042af7190] [c000000000361e88] .nla_put+0x4c/0x60
> [c000000042af7200] [c00000000053993c] .rtnl_fill_ifinfo+0x308/0x614
> [c000000042af7300] [c00000000053a118] .rtmsg_ifinfo+0x104/0x198
> [c000000042af73b0] [c00000000053a244] .rtnetlink_event+0x98/0xb0
> [c000000042af7430] [c0000000005c8330] .notifier_call_chain+0x68/0xdc
> [c000000042af74d0] [c000000000530488] .register_netdevice+0x390/0x418
> [c000000042af75a0] [c000000000530568] .register_netdev+0x58/0x80
> [c000000042af7630] [d000000000ed2da4] .ibmveth_probe+0x2c8/0x3a4
> [ibmveth]
> [c000000042af7730] [c000000000023208] .vio_bus_probe+0x2f0/0x358
> [c000000042af77f0] [c000000000462be0] .driver_probe_device+0xd4/0x1bc
> [c000000042af7890] [c000000000462d5c] .__driver_attach+0x94/0xd8
> [c000000042af7920] [c000000000462164] .bus_for_each_dev+0x80/0xe8
> [c000000042af79d0] [c0000000004629b0] .driver_attach+0x28/0x40
> [c000000042af7a50] [c000000000461808] .bus_add_driver+0xdc/0x27c
> [c000000042af7af0] [c0000000004631d0] .driver_register+0xf0/0x1b0
> [c000000042af7b90] [c000000000025178] .vio_register_driver+0x44/0x60
> [c000000042af7c20] [d000000000ed2ed4] .ibmveth_module_init+0x54/0xa60
> [ibmveth]
> [c000000042af7ca0] [c0000000000092c0] .do_one_initcall+0x80/0x19c
> [c000000042af7d90] [c0000000000bf884] .SyS_init_module+0xe0/0x248
> [c000000042af7e30] [c000000000008534] syscall_exit+0x0/0x40
> Instruction dump:
> 7cb01120 7c862214 7c661a14 4bfffe04 409c001c 80040000 81240004
> 38840008
> 90030000 91230004 38630008 409d0014 <80040000> 38840004 90030000
> 38630004
> ---[ end trace 695e9dc0c5a9da2f ]---
>
> udevd-event[587]: '/sbin/modprobe' abnormal exit
>
> Unable to handle kernel paging request for data at address
> 0x654af306c04b990
> Faulting instruction address: 0xc000000000543ce0
> Oops: Kernel access of bad area, sig: 11 [#2]
> SMP NR_CPUS=1024 NUMA pSeries
> Modules linked in: ibmveth(+) sg sd_mod crc_t10dif ibmvscsic
> scsi_transport_srp scsi_tgt scsi_mod
> NIP: c000000000543ce0 LR: c000000000543dcc CTR: c00000000053dd98
> REGS: c0000000408b3740 TRAP: 0300 Tainted: G D
> (2.6.30-rc4-next-20090508)
> MSR: 8000000000009032 <EE,ME,IR,DR> CR: 24042428 XER: 00000001
> DAR: 0654af306c04b990, DSISR: 0000000040000000
> TASK = c00000004053d880[752] 'udevd' THREAD: c0000000408b0000 CPU: 3
> GPR00: c000000000543dcc c0000000408b39c0 c000000000eb8190
> c0000000448e0000
> GPR04: 0000000000010000 c000000000796dec 0000000000000006
> 0000000000000000
> GPR08: c00000004265cf34 c000000000ea7250 c00000004265cf34
> 0000000000000000
> GPR12: 0000000044042488 c000000000f92a00 0000000000000001
> 0000000000000001
> GPR16: 00000000100372dc 00000000100374e0 00000000100376f8
> 0000000000000000
> GPR20: 0000000010036ec8 0000000000000000 00000fffdb3a6618
> 0000000000000200
> GPR24: 0000000000000006 0000000000000005 c0000000448f0000
> c0000000448e0000
> GPR28: 0654af306c04b990 0000000000000000 c000000000e45318
> c0000000448e0000
> NIP [c000000000543ce0] ._format_mac_addr+0x54/0xd4
> LR [c000000000543dcc] .sysfs_format_mac+0x30/0x6c
> Call Trace:
> [c0000000408b39c0] [c00000000010c9a4]
> .__alloc_pages_internal+0x1b8/0x590 (unreliable)
> [c0000000408b3a70] [c000000000543dcc] .sysfs_format_mac+0x30/0x6c
> [c0000000408b3b00] [c00000000053dde8] .show_address+0x50/0x88
> [c0000000408b3b90] [c00000000045ead4] .dev_attr_show+0x4c/0x94
> [c0000000408b3c20] [c0000000001bce48] .sysfs_read_file+0x10c/0x1d0
> [c0000000408b3ce0] [c00000000014c9a0] .vfs_read+0xd0/0x1bc
> [c0000000408b3d80] [c00000000014cb94] .SyS_read+0x58/0xa0
> [c0000000408b3e30] [c000000000008534] syscall_exit+0x0/0x40
> Instruction dump:
> f8010010 ebc2cc58 f821ff51 7c7b1b78 7cd83378 7cbc2b78 7f432214
> 7c7f1b78
> 3ba00000 3b26ffff 48000044 e8be8000 <88dc0000> 3b9c0001 4be0ff89
> 60000000
> ---[ end trace 695e9dc0c5a9da30 ]---
>
> attempt to access beyond end of device
>
> Next May 7 with same config boots fine.
>
> Thanks
> -Sachin
>
> --
>
> ---------------------------------
> Sachin Sant
> IBM Linux Technology Center
> India Systems and Technology Labs
> Bangalore, India
> ---------------------------------
>
^ permalink raw reply
* Re: [PATCH 2/2] x86-64: seccomp: fix 32/64 syscall hole
From: Andi Kleen @ 2009-05-08 19:18 UTC (permalink / raw)
To: Markus Gutschke (ÜÒÐ)
Cc: linux-mips, x86, linux-kernel, stable, linuxppc-dev, sparclinux,
Ingo Molnar, Linus Torvalds, Andrew Morton, Roland McGrath
In-Reply-To: <904b25810905061508n6d9cb8dbg71de5b1e0332ede7@mail.gmail.com>
"Markus Gutschke (ÜÒÐ)" <markus@google.com> writes:
>
> There are a large number of system calls that "normal" C/C++ code uses
> quite frequently, and that are not security sensitive. A typical
> example would be gettimeofday().
At least on x86-64 gettimeofday() (and time(2)) work inside seccomp because
they're vsyscalls that run in ring 3 only.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
^ permalink raw reply
* Re: INET_LRO as tristate and use from modules
From: David Miller @ 2009-05-08 19:43 UTC (permalink / raw)
To: olof
Cc: sachinp, sfr, themann, netdev, linux-kernel, Linuxppc-dev,
linux-next, subrata
In-Reply-To: <20090422.021218.92737677.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Wed, 22 Apr 2009 02:12:18 -0700 (PDT)
> From: Olof Johansson <olof@lixom.net>
> Date: Tue, 21 Apr 2009 14:33:19 -0500
>
>> On Wed, Apr 22, 2009 at 12:23:03AM +0530, Subrata Modak wrote:
>>> MODPOST 338 modules
>>> ERROR: ".lro_receive_skb" [drivers/net/pasemi_mac_driver.ko] undefined!
>>> ERROR: ".lro_flush_all" [drivers/net/pasemi_mac_driver.ko] undefined!
>>> WARNING: modpost: Found 1 section mismatch(es).
>>> To see full details build your kernel with:
>>> 'make CONFIG_DEBUG_SECTION_MISMATCH=y'
>>> make[1]: *** [__modpost] Error 1
>>> make: *** [modules] Error 2
>>
>> This seems to be a problem with all tristate-capable drivers that use
>> LRO (and uses select INET_LRO in their Kconfig): INET_LRO is a tristate
>> and can thus be a module. Looks like it needs to be a bool instead?
>
> Yes, making this a bool would be the easiest fix.
>
> By why don't we get the same problem for PHYLIB? It's also
> tristate and "select"'d by a whole slew of networking drivers.
I guess nobody has any idea...
I'll just make INET_LRO a bool to fix this.
^ permalink raw reply
* Re: [rtc-linux] Re: [PATCH 10/12] mpc5121: Add MPC5121 Real time clock driver.
From: Wolfgang Denk @ 2009-05-08 19:18 UTC (permalink / raw)
To: Alessandro Zummo; +Cc: linuxppc-dev, Piotr Ziecik, rtc-linux
In-Reply-To: <20090508180944.1304a8b7@i1501.lan.towertech.it>
Dear Alessandro Zummo,
In message <20090508180944.1304a8b7@i1501.lan.towertech.it> you wrote:
> On Fri, 8 May 2009 09:53:20 -0600
> Grant Likely <grant.likely@secretlab.ca> wrote:
>
> > That is fine by me, but since it is known that it will eventually
> > support both, I'd like it to be renamed to 5xxx before it is merged to
> > avoid a later rename patch.
>
> or 52xx ?
No, because the current version is for MPC5>1<2x
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Misquotation is, in fact, the pride and privilege of the learned. A
widely-read man never quotes accurately, for the rather obvious
reason that he has read too widely.
- Hesketh Pearson _Common Misquotations_ introduction
^ permalink raw reply
* Re: device trees.
From: Kumar Gala @ 2009-05-08 18:43 UTC (permalink / raw)
To: dhlii; +Cc: linuxppc-dev
In-Reply-To: <4A0457BC.3040408@dlasys.net>
you can look at the source to SLOF or u-boot to see cases of building
nodes on the fly.
- k
On May 8, 2009, at 11:03 AM, David H. Lynch Jr. wrote:
> Is there an example somewhere that shows building a device tree on
> the fly ?
>
> As our products move forward it becomes increasingly clear that
> static configurations are not going to work.
>
>
>
>
> --
> Dave Lynch DLA Systems
> Software Development: Embedded Linux
> 717.627.3770 dhlii@dlasys.net http://www.dlasys.net
> fax: 1.253.369.9244 Cell: 1.717.587.7774
> Over 25 years' experience in platforms, languages, and technologies
> too numerous to list.
>
> "Any intelligent fool can make things bigger and more complex... It
> takes a touch of genius - and a lot of courage to move in the
> opposite direction."
> Albert Einstein
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply
* Re: device trees.
From: Timur Tabi @ 2009-05-08 17:15 UTC (permalink / raw)
To: dhlii; +Cc: linuxppc-dev
In-Reply-To: <4A0457BC.3040408@dlasys.net>
On Fri, May 8, 2009 at 11:03 AM, David H. Lynch Jr. <dhlii@dlasys.net> wrot=
e:
> =A0 =A0Is there an example somewhere that shows building a device tree on
> the fly ?
A whole device tree? I don't think so. U-Boot does manipulate quite
a few properties, but it assume that the DTS lists all the devices.
Remember, one of the primary purposes of the DTS is to list devices
that cannot be probed.
--=20
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply
* Re: [rtc-linux] Re: [PATCH 10/12] mpc5121: Add MPC5121 Real time clock driver.
From: Alessandro Zummo @ 2009-05-08 16:09 UTC (permalink / raw)
To: rtc-linux; +Cc: linuxppc-dev, Piotr Ziecik, Wolfgang Denk
In-Reply-To: <fa686aa40905080853q2156ba46w3d56d0285271ce43@mail.gmail.com>
On Fri, 8 May 2009 09:53:20 -0600
Grant Likely <grant.likely@secretlab.ca> wrote:
> That is fine by me, but since it is known that it will eventually
> support both, I'd like it to be renamed to 5xxx before it is merged to
> avoid a later rename patch.
or 52xx ?
--
Best regards,
Alessandro Zummo,
Tower Technologies - Torino, Italy
http://www.towertech.it
^ permalink raw reply
* Re: [rtc-linux] Re: [PATCH 10/12] mpc5121: Add MPC5121 Real time clock driver.
From: Alessandro Zummo @ 2009-05-08 16:10 UTC (permalink / raw)
To: rtc-linux; +Cc: linuxppc-dev, Piotr Ziecik, Wolfgang Denk
In-Reply-To: <fa686aa40905080853q2156ba46w3d56d0285271ce43@mail.gmail.com>
On Fri, 8 May 2009 09:53:20 -0600
Grant Likely <grant.likely@secretlab.ca> wrote:
> That is fine by me, but since it is known that it will eventually
> support both, I'd like it to be renamed to 5xxx before it is merged to
> avoid a later rename patch.
sorry, forget my last email, I misread the codes.
--
Best regards,
Alessandro Zummo,
Tower Technologies - Torino, Italy
http://www.towertech.it
^ permalink raw reply
* device trees.
From: David H. Lynch Jr. @ 2009-05-08 16:03 UTC (permalink / raw)
To: linuxppc-dev
Is there an example somewhere that shows building a device tree on
the fly ?
As our products move forward it becomes increasingly clear that
static configurations are not going to work.
--
Dave Lynch DLA Systems
Software Development: Embedded Linux
717.627.3770 dhlii@dlasys.net http://www.dlasys.net
fax: 1.253.369.9244 Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too numerous to list.
"Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Albert Einstein
^ permalink raw reply
* Re: [PATCH] net/fs_enet/mii-fec: Use PHY_POLL instead of hard coded '-1'
From: Wolfram Sang @ 2009-05-08 16:06 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, netdev, Vitaly Bordug
In-Reply-To: <fa686aa40905080855g1b24b9f4s7a78ccb75b5be8b1@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 307 bytes --]
> This code no longer exists in net-next.
EPIC FAIL! :/ I checked the powerpc-tree, but not linux-next. I'm sorry
for the noise, will improve!
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply
* Re: [PATCH] net/fs_enet/mii-fec: Use PHY_POLL instead of hard coded '-1'
From: Grant Likely @ 2009-05-08 15:55 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linuxppc-dev, netdev, Vitaly Bordug
In-Reply-To: <1241791201-23960-1-git-send-email-w.sang@pengutronix.de>
On Fri, May 8, 2009 at 8:00 AM, Wolfram Sang <w.sang@pengutronix.de> wrote:
> Initialize the irq-table with PHY_POLL. '-1' means the same now, but is
> hardly maintainable.
>
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> Cc: Vitaly Bordug <vbordug@ru.mvista.com>
> Cc: Pantelis Antoniou <pantelis.antoniou@gmail.com>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Cc: netdev@vger.kernel.org
> Cc: linuxppc-dev@ozlabs.org
> ---
> =A0drivers/net/fs_enet/mii-fec.c | =A0 =A02 +-
> =A01 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.=
c
> index 28077cc..9eb5480 100644
> --- a/drivers/net/fs_enet/mii-fec.c
> +++ b/drivers/net/fs_enet/mii-fec.c
> @@ -166,7 +166,7 @@ static int __devinit fs_enet_mdio_probe(struct of_dev=
ice *ofdev,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto out_unmap_regs;
>
> =A0 =A0 =A0 =A0for (i =3D 0; i < PHY_MAX_ADDR; i++)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 new_bus->irq[i] =3D -1;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 new_bus->irq[i] =3D PHY_POLL;
This code no longer exists in net-next.
g.
--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply
* Re: [rtc-linux] Re: [PATCH 10/12] mpc5121: Add MPC5121 Real time clock driver.
From: Grant Likely @ 2009-05-08 15:53 UTC (permalink / raw)
To: John Rigby; +Cc: linuxppc-dev, Piotr Ziecik, rtc-linux, Wolfgang Denk
In-Reply-To: <4b73d43f0905071941xaa78e4dj41f7396ff227af31@mail.gmail.com>
On Thu, May 7, 2009 at 8:41 PM, John Rigby <jcrigby@gmail.com> wrote:
> Can we get 5121 support in and add 5200 support later?=A0 They are not
> identical.
That is fine by me, but since it is known that it will eventually
support both, I'd like it to be renamed to 5xxx before it is merged to
avoid a later rename patch.
g.
> On Wed, May 6, 2009 at 4:40 PM, Grant Likely <grant.likely@secretlab.ca>
> wrote:
>>
>> On Wed, May 6, 2009 at 3:06 PM, Wolfram Sang <w.sang@pengutronix.de>
>> wrote:
>> > On Wed, May 06, 2009 at 10:15:17PM +0200, Wolfgang Denk wrote:
>> >> From: John Rigby <jrigby@freescale.com>
>> >>
>> >> Based on Domen Puncer's rtc driver for 5200 posted to
>> >> the ppclinux mailing list:
>> >> =A0 =A0 =A0 http://patchwork.ozlabs.org/linuxppc-embedded/patch?id=3D=
11675
>> >> but never commited anywhere.
>> >>
>> >> Changes to Domen's original:
>> >>
>> >> =A0 =A0 Changed filenames/routine names from mpc5200* to mpc5121*
>> >
>> > Why not changing it to mpc5xxx? From a glimpse, it should still work o=
n
>> > MPC5200, too.
>>
>> If this is true, the I heartily agree with Wolfram. =A0:-)
>>
>> g.
>>
>> --
>> Grant Likely, B.Sc., P.Eng.
>> Secret Lab Technologies Ltd.
>>
>> --~--~---------~--~----~------------~-------~--~----~
>> You received this message because you are subscribed to "rtc-linux".
>> Membership options at http://groups.google.com/group/rtc-linux .
>> Please read http://groups.google.com/group/rtc-linux/web/checklist
>> before submitting a driver.
>> -~----------~----~----~----~------~----~------~--~---
>>
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply
* Re: [PATCH] mpc5121/clocks: make debug output more readable
From: Grant Likely @ 2009-05-08 15:40 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linuxppc-dev
In-Reply-To: <20090508123413.GC3100@pengutronix.de>
On Fri, May 8, 2009 at 6:34 AM, Wolfram Sang <w.sang@pengutronix.de> wrote:
>
> - Drop KERN_ levels for printks which print to the same line
> - use '=3D' in output to connect key/value pairs
Personally, I'd rather see the printks converted to pr_info()/pr_cont().
g.
>
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> Cc: John Rigby <jcrigby@gmail.com>
> Cc: Grant Likely <grant.likely@secretlab.ca>
>
> ---
> =A0arch/powerpc/platforms/512x/clock.c | =A0 =A07 +++----
> =A01 file changed, 3 insertions(+), 4 deletions(-)
>
> Index: .kernel/arch/powerpc/platforms/512x/clock.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- .kernel.orig/arch/powerpc/platforms/512x/clock.c
> +++ .kernel/arch/powerpc/platforms/512x/clock.c
> @@ -83,12 +83,11 @@ static void dump_clocks(void)
> =A0 =A0 =A0 =A0mutex_lock(&clocks_mutex);
> =A0 =A0 =A0 =A0printk(KERN_INFO "CLOCKS:\n");
> =A0 =A0 =A0 =A0list_for_each_entry(p, &clocks, node) {
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 printk(KERN_INFO " =A0%s %ld", p->name, p->=
rate);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 printk(KERN_INFO " =A0%s=3D%ld", p->name, p=
->rate);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (p->parent)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 printk(KERN_INFO " %s %ld",=
p->parent->name,
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0p->parent->r=
ate);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 printk(" %s=3D%ld", p->pare=
nt->name, p->parent->rate);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (p->flags & CLK_HAS_CTRL)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 printk(KERN_INFO " reg/bit =
%d/%d", p->reg, p->bit);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 printk(" reg/bit=3D%d/%d", =
p->reg, p->bit);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0printk("\n");
> =A0 =A0 =A0 =A0}
> =A0 =A0 =A0 =A0mutex_unlock(&clocks_mutex);
>
> --
> Pengutronix e.K. =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | Wo=
lfram Sang =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0|
> Industrial Linux Solutions =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | http://www.p=
engutronix.de/ =A0|
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkoEJsUACgkQD27XaX1/VRuQggCgm7auPJpCpTVleUD30B86X/jW
> lZsAnR91XB0YVCBp95aGyEqUU8+LXaHv
> =3D6IcQ
> -----END PGP SIGNATURE-----
>
>
--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply
* Re: initramfs with lzma compression
From: Geert Uytterhoeven @ 2009-05-08 14:27 UTC (permalink / raw)
To: Mirek23; +Cc: linuxppc-dev
In-Reply-To: <23446869.post@talk.nabble.com>
On Fri, 8 May 2009, Mirek23 wrote:
> I am looking for a patch which introduces lzma compression or suppresses the
> standard gzip compression for the initramfs.
It's already in the mainline kernel, e.g.:
commit 30d65dbfe3add7f010a075991dc0bfeaebb7d9e1
Author: Alain Knaff <alain@knaff.lu>
Date: Sun Jan 4 22:46:17 2009 +0100
bzip2/lzma: config and initramfs support for bzip2/lzma decompression
Impact: New code for initramfs decompression, new features
This is the second part of the bzip2/lzma patch
The bzip patch is based on an idea by Christian Ludwig, includes support for
compressing the kernel with bzip2 or lzma rather than gzip. Both
compressors give smaller sizes than gzip. Lzma's decompresses faster
than bzip2.
It also supports ramdisks and initramfs' compressed using these two
compressors.
The functionality has been successfully used for a couple of years by
the udpcast project
This version applies to "tip" kernel 2.6.28
This part contains:
- support for new compressions (bzip2 and lzma) in initramfs and
old-style ramdisk
- config dialog for kernel compression (but new kernel compressions
not yet supported)
Signed-off-by: Alain Knaff <alain@knaff.lu>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
For older kernel versions, you can backport it by git cherry-picking the
commits you need.
With kind regards,
Geert Uytterhoeven
Software Architect
Techsoft Centre
Technology and Software Centre 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/
A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
^ permalink raw reply
* Re: [PATCH 6/6] powerpc/85xx: Add STMicro M25P40 serial flash support for MPC8569E-MDS
From: Kumar Gala @ 2009-05-08 14:13 UTC (permalink / raw)
To: Anton Vorontsov; +Cc: linuxppc-dev, Haiying Wang
In-Reply-To: <20090502021659.GF18281@oksana.dev.rtsoft.ru>
On May 1, 2009, at 9:16 PM, Anton Vorontsov wrote:
> For serial flash support we need to:
>
> - Add QE Par IO Bank E device tree node, a GPIO from this bank is
> used for SPI chip-select line;
> - Add serial-flash node;
> - Add proper module alias into of/base.c.
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
> arch/powerpc/boot/dts/mpc8569mds.dts | 26 +++++++++++++++++++++++---
> drivers/of/base.c | 1 +
> 2 files changed, 24 insertions(+), 3 deletions(-)
applied to next
- k
^ permalink raw reply
* Re: [PATCH] mpc5121/clocks: make debug output more readable
From: Geert Uytterhoeven @ 2009-05-08 14:17 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linuxppc-dev
In-Reply-To: <20090508123413.GC3100@pengutronix.de>
On Fri, 8 May 2009, Wolfram Sang wrote:
> - Drop KERN_ levels for printks which print to the same line
Those should use KERN_CONT nowadays.
> - use '=' in output to connect key/value pairs
>
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> Cc: John Rigby <jcrigby@gmail.com>
> Cc: Grant Likely <grant.likely@secretlab.ca>
>
> ---
> arch/powerpc/platforms/512x/clock.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> Index: .kernel/arch/powerpc/platforms/512x/clock.c
> ===================================================================
> --- .kernel.orig/arch/powerpc/platforms/512x/clock.c
> +++ .kernel/arch/powerpc/platforms/512x/clock.c
> @@ -83,12 +83,11 @@ static void dump_clocks(void)
> mutex_lock(&clocks_mutex);
> printk(KERN_INFO "CLOCKS:\n");
> list_for_each_entry(p, &clocks, node) {
> - printk(KERN_INFO " %s %ld", p->name, p->rate);
> + printk(KERN_INFO " %s=%ld", p->name, p->rate);
> if (p->parent)
> - printk(KERN_INFO " %s %ld", p->parent->name,
> - p->parent->rate);
> + printk(" %s=%ld", p->parent->name, p->parent->rate);
> if (p->flags & CLK_HAS_CTRL)
> - printk(KERN_INFO " reg/bit %d/%d", p->reg, p->bit);
> + printk(" reg/bit=%d/%d", p->reg, p->bit);
^
KERN_CONT
> printk("\n");
> }
> mutex_unlock(&clocks_mutex);
With kind regards,
Geert Uytterhoeven
Software Architect
Techsoft Centre
Technology and Software Centre 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/
A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
^ permalink raw reply
* initramfs with lzma compression
From: Mirek23 @ 2009-05-08 14:17 UTC (permalink / raw)
To: linuxppc-dev
Dear All,
I am looking for a patch which introduces lzma compression or suppresses the
standard gzip compression for the initramfs.
I would be grateful for any hint.
M.
--
View this message in context: http://www.nabble.com/initramfs-with-lzma-compression-tp23446869p23446869.html
Sent from the linuxppc-dev mailing list archive at Nabble.com.
^ permalink raw reply
* Re: [PATCH 4/6] powerpc/85xx: Add eSDHC support for MPC8569E-MDS boards
From: Kumar Gala @ 2009-05-08 14:14 UTC (permalink / raw)
To: Anton Vorontsov; +Cc: linuxppc-dev, Haiying Wang
In-Reply-To: <20090502021653.GD18281@oksana.dev.rtsoft.ru>
On May 1, 2009, at 9:16 PM, Anton Vorontsov wrote:
> Note that eSDHC and DUART0 are mutually exclusive on MPC8569E-MDS
> boards. Default option is DUART0, so eSDHC is disabled by default.
> U-Boot will fixup device tree if eSDHC should be used instead of
> DUART0.
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
> arch/powerpc/boot/dts/mpc8569mds.dts | 10 ++++++++++
> 1 files changed, 10 insertions(+), 0 deletions(-)
tweaked the .dts to use fsl,esdhc
applied to next
- k
^ permalink raw reply
* Re: [PATCH 5/6] powerpc/85xx: Enable Serial RapidIO for MPC85xx MDS boards
From: Kumar Gala @ 2009-05-08 14:14 UTC (permalink / raw)
To: Anton Vorontsov; +Cc: linuxppc-dev, Haiying Wang
In-Reply-To: <20090502021656.GE18281@oksana.dev.rtsoft.ru>
On May 1, 2009, at 9:16 PM, Anton Vorontsov wrote:
> Select HAS_RAPIDIO symbol and add rio nodes for MPC8568E-MDS
> and MPC8569E-MDS boards.
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
> arch/powerpc/boot/dts/mpc8568mds.dts | 17 +++++++++++++++++
> arch/powerpc/boot/dts/mpc8569mds.dts | 17 +++++++++++++++++
> arch/powerpc/platforms/85xx/Kconfig | 1 +
> 3 files changed, 35 insertions(+), 0 deletions(-)
applied to next
- k
^ permalink raw reply
* [PATCH v3] powerpc: Keep track of emulated instructions if debugfs is enabled
From: Geert Uytterhoeven @ 2009-05-08 14:15 UTC (permalink / raw)
To: Linux/PPC Development
Counters for the various classes of emulated instructions are available under
/sys/kernel/debug/powerpc/emulated_instructions (assumed debugfs is mounted on
/sys/kernel/debug). Optionally (controlled by
/sys/kernel/debug/powerpc/emulated_instructions/do_warn), rate-limited warnings
can be printed to the console when instructions are emulated.
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
Tested on ppc64 (ps3) and ppc32 (sequoia) using mfpvr.
v3:
- add generic unaligned
- switch from sysfs + sysctl to debugfs. All virtual files now show up under
/sys/kernel/debug/powerpc/emulated_instructions (assumed debugfs mounted on
/sys/kernel/debug)
- enable the printing of rate-limited warnings by writing a non-zero value to
/sys/kernel/debug/powerpc/emulated_instructions/do_warn
- switch from per-CPU to system-wide counters
- always use 32-bit counters (was 64-bit on ppc64)
- counters are writable, i.e. can be reset (by root)
v2:
- arch/powerpc/kernel/sysfs.c is now compiled on ppc32, so we can provide
counters in sysfs on ppc32, too,
- WARN_EMULATED() is a no-op if CONFIG_SYSCTL is disabled,
- Add warnings for altivec,
- Add warnings for recently introduced emulation of vsx and isel
instructions.
arch/powerpc/include/asm/emulated_ops.h | 73 +++++++++++++++++++++++
arch/powerpc/kernel/align.c | 20 +++++-
arch/powerpc/kernel/traps.c | 96 ++++++++++++++++++++++++++++++-
3 files changed, 183 insertions(+), 6 deletions(-)
create mode 100644 arch/powerpc/include/asm/emulated_ops.h
diff --git a/arch/powerpc/include/asm/emulated_ops.h b/arch/powerpc/include/asm/emulated_ops.h
new file mode 100644
index 0000000..a1fdb0a
--- /dev/null
+++ b/arch/powerpc/include/asm/emulated_ops.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2007 Sony Corp.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _ASM_POWERPC_EMULATED_OPS_H
+#define _ASM_POWERPC_EMULATED_OPS_H
+
+#include <asm/atomic.h>
+
+
+#ifdef CONFIG_DEBUG_FS
+
+struct ppc_emulated_entry {
+ const char *name;
+ atomic_t val;
+};
+
+extern struct ppc_emulated {
+#ifdef CONFIG_ALTIVEC
+ struct ppc_emulated_entry altivec;
+#endif
+ struct ppc_emulated_entry dcba;
+ struct ppc_emulated_entry dcbz;
+ struct ppc_emulated_entry fp_pair;
+ struct ppc_emulated_entry isel;
+ struct ppc_emulated_entry mcrxr;
+ struct ppc_emulated_entry mfpvr;
+ struct ppc_emulated_entry multiple;
+ struct ppc_emulated_entry popcntb;
+ struct ppc_emulated_entry spe;
+ struct ppc_emulated_entry string;
+ struct ppc_emulated_entry unaligned;
+#ifdef CONFIG_MATH_EMULATION
+ struct ppc_emulated_entry math;
+#elif defined(CONFIG_8XX_MINIMAL_FPEMU)
+ struct ppc_emulated_entry 8xx;
+#endif
+#ifdef CONFIG_VSX
+ struct ppc_emulated_entry vsx;
+#endif
+} ppc_emulated;
+
+extern u32 ppc_warn_emulated;
+
+extern void ppc_warn_emulated_print(const char *type);
+
+#define PPC_WARN_EMULATED(type) \
+ do { \
+ atomic_inc(&ppc_emulated.type.val); \
+ if (ppc_warn_emulated) \
+ ppc_warn_emulated_print(ppc_emulated.type.name); \
+ } while (0)
+
+#else /* !CONFIG_DEBUG_FS */
+
+#define PPC_WARN_EMULATED(type) do { } while (0)
+
+#endif /* !CONFIG_DEBUG_FS */
+
+#endif /* _ASM_POWERPC_EMULATED_OPS_H */
diff --git a/arch/powerpc/kernel/align.c b/arch/powerpc/kernel/align.c
index 5ffcfaa..a5b632e 100644
--- a/arch/powerpc/kernel/align.c
+++ b/arch/powerpc/kernel/align.c
@@ -24,6 +24,7 @@
#include <asm/system.h>
#include <asm/cache.h>
#include <asm/cputable.h>
+#include <asm/emulated_ops.h>
struct aligninfo {
unsigned char len;
@@ -730,8 +731,10 @@ int fix_alignment(struct pt_regs *regs)
areg = dsisr & 0x1f; /* register to update */
#ifdef CONFIG_SPE
- if ((instr >> 26) == 0x4)
+ if ((instr >> 26) == 0x4) {
+ PPC_WARN_EMULATED(spe);
return emulate_spe(regs, reg, instr);
+ }
#endif
instr = (dsisr >> 10) & 0x7f;
@@ -783,23 +786,28 @@ int fix_alignment(struct pt_regs *regs)
flags |= SPLT;
nb = 8;
}
+ PPC_WARN_EMULATED(vsx);
return emulate_vsx(addr, reg, areg, regs, flags, nb);
}
#endif
/* A size of 0 indicates an instruction we don't support, with
* the exception of DCBZ which is handled as a special case here
*/
- if (instr == DCBZ)
+ if (instr == DCBZ) {
+ PPC_WARN_EMULATED(dcbz);
return emulate_dcbz(regs, addr);
+ }
if (unlikely(nb == 0))
return 0;
/* Load/Store Multiple instructions are handled in their own
* function
*/
- if (flags & M)
+ if (flags & M) {
+ PPC_WARN_EMULATED(multiple);
return emulate_multiple(regs, addr, reg, nb,
flags, instr, swiz);
+ }
/* Verify the address of the operand */
if (unlikely(user_mode(regs) &&
@@ -816,8 +824,12 @@ int fix_alignment(struct pt_regs *regs)
}
/* Special case for 16-byte FP loads and stores */
- if (nb == 16)
+ if (nb == 16) {
+ PPC_WARN_EMULATED(fp_pair);
return emulate_fp_pair(addr, reg, flags);
+ }
+
+ PPC_WARN_EMULATED(unaligned);
/* If we are loading, get the data from user space, else
* get it from register values
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 678fbff..1e88109 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -33,7 +33,9 @@
#include <linux/backlight.h>
#include <linux/bug.h>
#include <linux/kdebug.h>
+#include <linux/debugfs.h>
+#include <asm/emulated_ops.h>
#include <asm/pgtable.h>
#include <asm/uaccess.h>
#include <asm/system.h>
@@ -757,36 +759,44 @@ static int emulate_instruction(struct pt_regs *regs)
/* Emulate the mfspr rD, PVR. */
if ((instword & PPC_INST_MFSPR_PVR_MASK) == PPC_INST_MFSPR_PVR) {
+ PPC_WARN_EMULATED(mfpvr);
rd = (instword >> 21) & 0x1f;
regs->gpr[rd] = mfspr(SPRN_PVR);
return 0;
}
/* Emulating the dcba insn is just a no-op. */
- if ((instword & PPC_INST_DCBA_MASK) == PPC_INST_DCBA)
+ if ((instword & PPC_INST_DCBA_MASK) == PPC_INST_DCBA) {
+ PPC_WARN_EMULATED(dcba);
return 0;
+ }
/* Emulate the mcrxr insn. */
if ((instword & PPC_INST_MCRXR_MASK) == PPC_INST_MCRXR) {
int shift = (instword >> 21) & 0x1c;
unsigned long msk = 0xf0000000UL >> shift;
+ PPC_WARN_EMULATED(mcrxr);
regs->ccr = (regs->ccr & ~msk) | ((regs->xer >> shift) & msk);
regs->xer &= ~0xf0000000UL;
return 0;
}
/* Emulate load/store string insn. */
- if ((instword & PPC_INST_STRING_GEN_MASK) == PPC_INST_STRING)
+ if ((instword & PPC_INST_STRING_GEN_MASK) == PPC_INST_STRING) {
+ PPC_WARN_EMULATED(string);
return emulate_string_inst(regs, instword);
+ }
/* Emulate the popcntb (Population Count Bytes) instruction. */
if ((instword & PPC_INST_POPCNTB_MASK) == PPC_INST_POPCNTB) {
+ PPC_WARN_EMULATED(popcntb);
return emulate_popcntb_inst(regs, instword);
}
/* Emulate isel (Integer Select) instruction */
if ((instword & PPC_INST_ISEL_MASK) == PPC_INST_ISEL) {
+ PPC_WARN_EMULATED(isel);
return emulate_isel(regs, instword);
}
@@ -984,6 +994,8 @@ void SoftwareEmulation(struct pt_regs *regs)
#ifdef CONFIG_MATH_EMULATION
errcode = do_mathemu(regs);
+ if (errcode >= 0)
+ PPC_WARN_EMULATED(math);
switch (errcode) {
case 0:
@@ -1005,6 +1017,9 @@ void SoftwareEmulation(struct pt_regs *regs)
#elif defined(CONFIG_8XX_MINIMAL_FPEMU)
errcode = Soft_emulate_8xx(regs);
+ if (errcode >= 0)
+ PPC_WARN_EMULATED(8xx);
+
switch (errcode) {
case 0:
emulate_single_step(regs);
@@ -1088,6 +1103,7 @@ void altivec_assist_exception(struct pt_regs *regs)
flush_altivec_to_thread(current);
+ PPC_WARN_EMULATED(altivec);
err = emulate_altivec(regs);
if (err == 0) {
regs->nip += 4; /* skip emulated instruction */
@@ -1286,3 +1302,79 @@ void kernel_bad_stack(struct pt_regs *regs)
void __init trap_init(void)
{
}
+
+
+#ifdef CONFIG_DEBUG_FS
+
+#define WARN_EMULATED_SETUP(type) .type = { .name = #type }
+
+struct ppc_emulated ppc_emulated = {
+#ifdef CONFIG_ALTIVEC
+ WARN_EMULATED_SETUP(altivec),
+#endif
+ WARN_EMULATED_SETUP(dcba),
+ WARN_EMULATED_SETUP(dcbz),
+ WARN_EMULATED_SETUP(fp_pair),
+ WARN_EMULATED_SETUP(isel),
+ WARN_EMULATED_SETUP(mcrxr),
+ WARN_EMULATED_SETUP(mfpvr),
+ WARN_EMULATED_SETUP(multiple),
+ WARN_EMULATED_SETUP(popcntb),
+ WARN_EMULATED_SETUP(spe),
+ WARN_EMULATED_SETUP(string),
+ WARN_EMULATED_SETUP(unaligned),
+#ifdef CONFIG_MATH_EMULATION
+ WARN_EMULATED_SETUP(math),
+#elif defined(CONFIG_8XX_MINIMAL_FPEMU)
+ WARN_EMULATED_SETUP(8xx),
+#endif
+#ifdef CONFIG_VSX
+ WARN_EMULATED_SETUP(vsx),
+#endif
+};
+
+u32 ppc_warn_emulated;
+
+void ppc_warn_emulated_print(const char *type)
+{
+ if (printk_ratelimit())
+ pr_warning("%s used emulated %s instruction\n", current->comm,
+ type);
+}
+
+static int __init ppc_warn_emulated_init(void)
+{
+ struct dentry *dir, *d;
+ unsigned int i;
+ struct ppc_emulated_entry *entries = (void *)&ppc_emulated;
+
+ if (!powerpc_debugfs_root)
+ return -ENODEV;
+
+ dir = debugfs_create_dir("emulated_instructions",
+ powerpc_debugfs_root);
+ if (!dir)
+ return -ENOMEM;
+
+ d = debugfs_create_u32("do_warn", S_IRUGO | S_IWUSR, dir,
+ &ppc_warn_emulated);
+ if (!d)
+ goto fail;
+
+ for (i = 0; i < sizeof(ppc_emulated)/sizeof(*entries); i++) {
+ d = debugfs_create_u32(entries[i].name, S_IRUGO | S_IWUSR, dir,
+ (u32 *)&entries[i].val.counter);
+ if (!d)
+ goto fail;
+ }
+
+ return 0;
+
+fail:
+ debugfs_remove_recursive(dir);
+ return -ENOMEM;
+}
+
+device_initcall(ppc_warn_emulated_init);
+
+#endif /* !CONFIG_DEBUG_FS */
--
1.6.2.4
With kind regards,
Geert Uytterhoeven
Software Architect
Techsoft Centre
Technology and Software Centre 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/
A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
^ permalink raw reply related
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