From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: Justin Forbes <jmforbes@linuxtx.org>,
Zwane Mwaikambo <zwane@arm.linux.org.uk>,
"Theodore Ts'o" <tytso@mit.edu>,
Randy Dunlap <rdunlap@xenotime.net>,
Dave Jones <davej@redhat.com>,
Chuck Wolber <chuckw@quantumlinux.com>,
Chris Wedgwood <reviews@ml.cw.f00f.org>,
Michael Krufky <mkrufky@linuxtv.org>,
Chuck Ebbert <cebbert@redhat.com>,
Domenico Andreoli <cavokz@gmail.com>,
torvalds@linux-foundation.org, akpm@linux-foundation.org,
alan@lxorguk.ukuu.org.uk, Jan-Bernd Themann <themann@de.ibm.com>,
Jeff Garzik <jeff@garzik.org>
Subject: [patch 03/16] ehea: 64K page kernel support fix
Date: Wed, 14 Nov 2007 22:40:02 -0800 [thread overview]
Message-ID: <20071115064002.GC18951@kroah.com> (raw)
In-Reply-To: <20071115063921.GA18827@kroah.com>
[-- Attachment #1: ehea-64k-page-kernel-support-fix.patch --]
[-- Type: text/plain, Size: 2987 bytes --]
-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jan-Bernd Themann <ossthema@de.ibm.com>
based on 2c69448bbcedebeb8409ddb05fbc7d3fe1cfbda7 in mainline.
The current eHEA module compiled for 64K page kernels can not
be loaded with insmod due to bad hypervisor call parameters.
The patch is a subset of the follwing patch which has been applied
for 2.6.24 upstream:
http://www.spinics.net/lists/netdev/msg42814.html
Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/ehea/ehea_qmr.c | 20 ++++++++------------
drivers/net/ehea/ehea_qmr.h | 2 +-
2 files changed, 9 insertions(+), 13 deletions(-)
--- a/drivers/net/ehea/ehea_qmr.c
+++ b/drivers/net/ehea/ehea_qmr.c
@@ -563,8 +563,7 @@ int ehea_destroy_qp(struct ehea_qp *qp)
int ehea_create_busmap( void )
{
u64 vaddr = EHEA_BUSMAP_START;
- unsigned long abs_max_pfn = 0;
- unsigned long sec_max_pfn;
+ unsigned long high_section_index = 0;
int i;
/*
@@ -574,14 +573,10 @@ int ehea_create_busmap( void )
ehea_bmap.valid_sections = 0;
for (i = 0; i < NR_MEM_SECTIONS; i++)
- if (valid_section_nr(i)) {
- sec_max_pfn = section_nr_to_pfn(i);
- if (sec_max_pfn > abs_max_pfn)
- abs_max_pfn = sec_max_pfn;
- ehea_bmap.valid_sections++;
- }
+ if (valid_section_nr(i))
+ high_section_index = i;
- ehea_bmap.entries = abs_max_pfn / EHEA_PAGES_PER_SECTION + 1;
+ ehea_bmap.entries = high_section_index + 1;
ehea_bmap.vaddr = vmalloc(ehea_bmap.entries * sizeof(*ehea_bmap.vaddr));
if (!ehea_bmap.vaddr)
@@ -593,6 +588,7 @@ int ehea_create_busmap( void )
if (pfn_valid(pfn)) {
ehea_bmap.vaddr[i] = vaddr;
vaddr += EHEA_SECTSIZE;
+ ehea_bmap.valid_sections++;
} else
ehea_bmap.vaddr[i] = 0;
}
@@ -637,7 +633,7 @@ int ehea_reg_kernel_mr(struct ehea_adapt
mr_len = ehea_bmap.valid_sections * EHEA_SECTSIZE;
- pt = kzalloc(EHEA_MAX_RPAGE * sizeof(u64), GFP_KERNEL);
+ pt = kzalloc(PAGE_SIZE, GFP_KERNEL);
if (!pt) {
ehea_error("no mem");
ret = -ENOMEM;
@@ -660,8 +656,8 @@ int ehea_reg_kernel_mr(struct ehea_adapt
void *sectbase = __va(i << SECTION_SIZE_BITS);
unsigned long k = 0;
- for (j = 0; j < (PAGES_PER_SECTION / EHEA_MAX_RPAGE);
- j++) {
+ for (j = 0; j < (EHEA_PAGES_PER_SECTION /
+ EHEA_MAX_RPAGE); j++) {
for (m = 0; m < EHEA_MAX_RPAGE; m++) {
pg = sectbase + ((k++) * EHEA_PAGESIZE);
--- a/drivers/net/ehea/ehea_qmr.h
+++ b/drivers/net/ehea/ehea_qmr.h
@@ -39,7 +39,7 @@
#define EHEA_PAGESHIFT 12
#define EHEA_PAGESIZE (1UL << EHEA_PAGESHIFT)
#define EHEA_SECTSIZE (1UL << 24)
-#define EHEA_PAGES_PER_SECTION (EHEA_SECTSIZE >> PAGE_SHIFT)
+#define EHEA_PAGES_PER_SECTION (EHEA_SECTSIZE >> EHEA_PAGESHIFT)
#if (1UL << SECTION_SIZE_BITS) < EHEA_SECTSIZE
#error eHEA module can't work if kernel sectionsize < ehea sectionsize
--
next prev parent reply other threads:[~2007-11-15 6:46 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071115060353.071060513@mini.kroah.org>
2007-11-15 6:39 ` [patch 00/16] 2.6.23-stable review, network driver changes Greg KH
2007-11-15 6:39 ` [patch 01/16] libertas: more endianness breakage Greg KH
2007-11-15 6:39 ` [patch 02/16] libertas: fix " Greg KH
2007-11-15 6:40 ` Greg KH [this message]
2007-11-15 6:40 ` [patch 04/16] forcedeth msi bugfix Greg KH
2007-11-15 6:40 ` [patch 05/16] forcedeth: add MCP77 device IDs Greg KH
2007-11-15 6:40 ` [patch 06/16] TG3: Fix performance regression on 5705 Greg KH
2007-11-15 6:40 ` [patch 07/16] Fix L2TP oopses Greg KH
2007-11-15 6:40 ` [patch 08/16] skge: fix ram buffer size calculation Greg KH
2007-11-15 16:11 ` Linus Torvalds
2007-11-15 16:27 ` Stephen Hemminger
2007-11-15 16:50 ` Linus Torvalds
2007-11-15 21:57 ` Heikki Orsila
2007-11-15 16:32 ` Greg KH
2007-11-15 16:48 ` Linus Torvalds
2007-11-15 17:57 ` Greg KH
2007-11-16 21:03 ` Heikki Orsila
2007-11-15 6:40 ` [patch 09/16] skge: XM PHY handling fixes Greg KH
2007-11-15 6:40 ` [patch 10/16] sky2: status ring race fix Greg KH
2007-11-15 6:40 ` [patch 11/16] sky2: ethtool register reserved area blackout Greg KH
2007-11-15 6:41 ` [patch 12/16] sky2: fix power settings on Yukon XL Greg KH
2007-11-15 6:41 ` [patch 13/16] zd1201: avoid null ptr access of skb->dev Greg KH
2007-11-15 6:41 ` [patch 14/16] ipw2100: send WEXT scan events Greg KH
2007-11-15 6:41 ` [patch 15/16] rtl8187: Fix more frag bit checking, rts duration calc Greg KH
2007-11-15 6:41 ` [patch 16/16] zd1211rw, fix oops when ejecting install media Greg KH
2007-11-15 12:24 ` [patch 00/16] 2.6.23-stable review, network driver changes Heikki Orsila
2007-11-15 18:34 ` [stable] " Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071115064002.GC18951@kroah.com \
--to=gregkh@suse.de \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=cavokz@gmail.com \
--cc=cebbert@redhat.com \
--cc=chuckw@quantumlinux.com \
--cc=davej@redhat.com \
--cc=jeff@garzik.org \
--cc=jmforbes@linuxtx.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkrufky@linuxtv.org \
--cc=rdunlap@xenotime.net \
--cc=reviews@ml.cw.f00f.org \
--cc=stable@kernel.org \
--cc=themann@de.ibm.com \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
--cc=zwane@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox