<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/pci/hotplug/ibmphp_ebda.c, branch v3.8</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-07-24T10:59:30Z</updated>
<entry>
<title>pci: hotplug: Fix typo in pci</title>
<updated>2012-07-24T10:59:30Z</updated>
<author>
<name>Masanari Iida</name>
<email>standby24x7@gmail.com</email>
</author>
<published>2012-07-23T13:39:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=367fa9821af9897ec0592fd15b23e38227f4bcc5'/>
<id>urn:sha1:367fa9821af9897ec0592fd15b23e38227f4bcc5</id>
<content type='text'>
Correct spelling typo in drivers/pci/hotplug.

Signed-off-by: Masanari Iida &lt;standby24x7@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>PCI: drivers/pci/hotplug/ibmphp_ebda.c: add missing iounmap</title>
<updated>2012-02-14T16:44:47Z</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2012-01-12T09:55:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8f0cdddcd3f270901765fc909c3aee37a2091e78'/>
<id>urn:sha1:8f0cdddcd3f270901765fc909c3aee37a2091e78</id>
<content type='text'>
Add missing iounmap in error handling code, in a case where the function
already preforms iounmap on some other execution path.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@@
expression e;
statement S,S1;
int ret;
@@
e = \(ioremap\|ioremap_nocache\)(...)
... when != iounmap(e)
if (&lt;+...e...+&gt;) S
... when any
    when != iounmap(e)
*if (...)
   { ... when != iounmap(e)
     return ...; }
... when any
iounmap(e);
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI hotplug: ibmphp: Add check to prevent reading beyond mapped area</title>
<updated>2010-11-11T17:34:31Z</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2010-11-09T04:20:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ac3abf2c37a9b0be604ea9825705a8510a9a6ba3'/>
<id>urn:sha1:ac3abf2c37a9b0be604ea9825705a8510a9a6ba3</id>
<content type='text'>
While testing various randconfigs with ktest.pl, I hit the following panic:

BUG: unable to handle kernel paging request at f7e54b03
IP: [&lt;c0d63409&gt;] ibmphp_access_ebda+0x101/0x19bb

Adding printks, I found that the loop that reads the ebda blocks
can move out of the mapped section.

ibmphp_access_ebda: start=f7e44c00 size=5120 end=f7e46000
ibmphp_access_ebda: io_mem=f7e44d80 offset=384
ibmphp_access_ebda: io_mem=f7e54b03 offset=65283

The start of the iomap was at f7e44c00 and had a size of 5120,
making the end f7e46000. We start with an offset of 0x180 or
384, giving the first read at 0xf7e44d80. Reading that location
yields 65283, which is much bigger than the 5120 that was allocated
and makes the next read at f7e54b03 which is outside the mapped area.

Perhaps this is a bug in the driver, or buggy hardware, but this patch
is more about not crashing my box on start up and just giving a warning
if it detects this error.

This patch at least lets my box boot with just a warning.

Cc: Chandru Siddalingappa &lt;chandru@linux.vnet.ibm.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI hotplug: check ioremap() return value in ibmphp_ebda.c</title>
<updated>2010-02-23T00:17:19Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2010-02-02T22:45:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ba02b242bbf8e4e1bc63d62e8ccec33b4e5ea132'/>
<id>urn:sha1:ba02b242bbf8e4e1bc63d62e8ccec33b4e5ea132</id>
<content type='text'>
check ioremap() return value.

Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI hotplug: ibmphp: read the length of ebda and map entire ebda region</title>
<updated>2010-02-23T00:16:58Z</updated>
<author>
<name>Chandru</name>
<email>chandru@in.ibm.com</email>
</author>
<published>2010-01-11T06:19:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b0fc889c4311835ae7d02f433154bc20cad9ee11'/>
<id>urn:sha1:b0fc889c4311835ae7d02f433154bc20cad9ee11</id>
<content type='text'>
ibmphp driver currently maps only 1KB of ebda memory area into kernel address
space during driver initialization. This causes kernel oops when the driver is
modprobe'd and it accesses memory beyond 1KB within ebda segment. The first
byte of ebda segment actually stores the length of the ebda region in
Kilobytes. Hence make use of the length parameter and map the entire ebda
region.

Signed-off-by: Chandru Siddalingappa &lt;chandru@linux.vnet.ibm.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: ibmphp: stop managing hotplug_slot-&gt;name</title>
<updated>2008-10-22T23:42:41Z</updated>
<author>
<name>Alex Chiang</name>
<email>achiang@hp.com</email>
</author>
<published>2008-10-20T23:41:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a32615a1a661f83661e8a26c3bc7763f716da8f3'/>
<id>urn:sha1:a32615a1a661f83661e8a26c3bc7763f716da8f3</id>
<content type='text'>
We no longer need to manage our version of hotplug_slot-&gt;name
since the PCI and hotplug core manage it on our behalf.

Now, we simply advise the PCI core of the name that we would
like, and let the core take care of the rest.

Additionally, slightly rearrange the members of struct slot
so they are naturally aligned to eliminate holes.

Cc: jbarnes@virtuousgeek.org
Cc: kristen.c.accardi@intel.com
Acked-by: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Signed-off-by: Alex Chiang &lt;achiang@hp.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI Hotplug core: add 'name' param pci_hp_register interface</title>
<updated>2008-10-22T23:42:37Z</updated>
<author>
<name>Alex Chiang</name>
<email>achiang@hp.com</email>
</author>
<published>2008-10-20T23:40:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1359f2701b96abd9bb69c1273fb995a093b6409a'/>
<id>urn:sha1:1359f2701b96abd9bb69c1273fb995a093b6409a</id>
<content type='text'>
Update pci_hp_register() to take a const char *name parameter.

The motivation for this is to clean up the individual hotplug
drivers so that each one does not have to manage its own name.
The PCI core should be the place where we manage the name.

We update the interface and all callsites first, in a
"no functional change" manner, and clean up the drivers later.

Cc: kristen.c.accardi@intel.com
Acked-by: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Reviewed-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Signed-off-by: Alex Chiang &lt;achiang@hp.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: ibmphp: list_for_each to list_for_each_entry-checkpatch cleanups</title>
<updated>2008-10-20T17:53:45Z</updated>
<author>
<name>akpm@linux-foundation.org</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2008-08-22T20:30:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2fd39aa7c2f3d696814abb3e8962c759eee484f3'/>
<id>urn:sha1:2fd39aa7c2f3d696814abb3e8962c759eee484f3</id>
<content type='text'>
Please run checkpatch prior to sending patches, this one fixes several style
issues with the list_for_each conversion patch.

Cc: Cordelia Sam &lt;cordesam@gmail.com&gt;
Cc: Cordelia Sam &lt;cordsam@linux.vnet.ibm.com&gt;
Cc: Kristen Carlson Accardi &lt;kristen.c.accardi@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: ibmphp: list_for_each to list_for_each_entry</title>
<updated>2008-10-20T17:53:44Z</updated>
<author>
<name>akpm@linux-foundation.org</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2008-08-22T20:28:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a8d2dbd38481e0c35c6bdd8196dd38a42ae45d02'/>
<id>urn:sha1:a8d2dbd38481e0c35c6bdd8196dd38a42ae45d02</id>
<content type='text'>
Make code more readable with list_for_each_entry().

Signed-off-by: Cordelia Sam &lt;cordesam@gmail.com&gt;
Cc: Kristen Carlson Accardi &lt;kristen.c.accardi@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>x86, pci-hotplug, calgary / rio: fix EBDA ioremap()</title>
<updated>2008-09-26T11:25:04Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2008-09-26T09:40:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=15160716eea5591eb31f40fd4dba56d83bea4209'/>
<id>urn:sha1:15160716eea5591eb31f40fd4dba56d83bea4209</id>
<content type='text'>
IO resource and ioremap debugging uncovered this ioremap() done
by drivers/pci/hotplug/ibmphp_ebda.c:

initcall pci_hotplug_init+0x0/0x41 returned 0 after 3 msecs
calling  ibmphp_init+0x0/0x360 @ 1
ibmphpd: IBM Hot Plug PCI Controller Driver version: 0.6
resource map sanity check conflict: 0x9f800 0xaf5e7 0x9f800 0x9ffff reserved
------------[ cut here ]------------
WARNING: at arch/x86/mm/ioremap.c:175 __ioremap_caller+0x5c/0x226()
Pid: 1, comm: swapper Not tainted 2.6.27-rc7-tip-00914-g347b10f-dirty #36038
 [&lt;c013a72d&gt;] warn_on_slowpath+0x41/0x68
 [&lt;c0156f00&gt;] ? __lock_acquire+0x9ba/0xa7f
 [&lt;c012158c&gt;] ? do_flush_tlb_all+0x0/0x59
 [&lt;c015ac31&gt;] ? smp_call_function_mask+0x74/0x17d
 [&lt;c012158c&gt;] ? do_flush_tlb_all+0x0/0x59
 [&lt;c013b228&gt;] ? printk+0x1a/0x1c
 [&lt;c013f302&gt;] ? iomem_map_sanity_check+0x82/0x8c
 [&lt;c0a773e8&gt;] ? _read_unlock+0x22/0x25
 [&lt;c013f302&gt;] ? iomem_map_sanity_check+0x82/0x8c
 [&lt;c0154e17&gt;] ? trace_hardirqs_off+0xb/0xd
 [&lt;c0127731&gt;] __ioremap_caller+0x5c/0x226
 [&lt;c0156158&gt;] ? trace_hardirqs_on+0xb/0xd
 [&lt;c012767d&gt;] ? iounmap+0x9d/0xa5
 [&lt;c01279dd&gt;] ioremap_nocache+0x15/0x17
 [&lt;c0403c42&gt;] ? ioremap+0xd/0xf
 [&lt;c0403c42&gt;] ioremap+0xd/0xf
 [&lt;c0f1928f&gt;] ibmphp_access_ebda+0x60/0xa0e
 [&lt;c0f17f64&gt;] ibmphp_init+0xb5/0x360
 [&lt;c0101057&gt;] do_one_initcall+0x57/0x138
 [&lt;c0f17eaf&gt;] ? ibmphp_init+0x0/0x360
 [&lt;c0156158&gt;] ? trace_hardirqs_on+0xb/0xd
 [&lt;c0148d75&gt;] ? __queue_work+0x2b/0x30
 [&lt;c0f17eaf&gt;] ? ibmphp_init+0x0/0x360
 [&lt;c0f015a0&gt;] kernel_init+0x17b/0x1e2
 [&lt;c0f01425&gt;] ? kernel_init+0x0/0x1e2
 [&lt;c01178b3&gt;] kernel_thread_helper+0x7/0x10
 =======================
---[ end trace a7919e7f17c0a725 ]---
initcall ibmphp_init+0x0/0x360 returned -19 after 144 msecs
calling  zt5550_init+0x0/0x6a @ 1

the problem is this code:

        io_mem = ioremap (ebda_seg&lt;&lt;4, 65000);

it assumes that the EBDA is 65000 bytes. But BIOS EBDA pointers are
at most 1K large.

_if_ the Rio code truly extends upon the customary EBDA size it needs
to iounmap() this memory and ioremap() it larger, once it knows it from
the generic descriptors that a Rio system is around.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
</feed>
