Commit 2b77158f authored by Alexander Shiyan's avatar Alexander Shiyan Committed by Ulf Hansson

mmc: mxcmmc: "Revert mmc: mxcmmc: handle highmem pages"

This reverts commit b189e758.

Unable to handle kernel paging request at virtual address c8358000
pgd = efa405c3
[c8358000] *pgd=00000000
Internal error: Oops: 805 [#1] PREEMPT ARM
CPU: 0 PID: 711 Comm: kworker/0:2 Not tainted 4.20.0+ #30
Hardware name: Freescale i.MX27 (Device Tree Support)
Workqueue: events mxcmci_datawork
PC is at mxcmci_datawork+0xbc/0x2ac
LR is at mxcmci_datawork+0xac/0x2ac
pc : [<c04e33c8>]    lr : [<c04e33b8>]    psr: 60000013
sp : c6c93f08  ip : 24004180  fp : 00000008
r10: c8358000  r9 : c78b3e24  r8 : c6c92000
r7 : 00000000  r6 : c7bb8680  r5 : c7bb86d4  r4 : c78b3de0
r3 : 00002502  r2 : c090b2e0  r1 : 00000880  r0 : 00000000
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 0005317f  Table: a68a8000  DAC: 00000055
Process kworker/0:2 (pid: 711, stack limit = 0x389543bc)
Stack: (0xc6c93f08 to 0xc6c94000)
3f00:                   c7bb86d4 00000000 00000000 c6cbfde0 c7bb86d4 c7ee4200
3f20: 00000000 c0907ea8 00000000 c7bb86d8 c0907ea8 c012077c c6cbfde0 c7bb86d4
3f40: c6cbfde0 c6c92000 c6cbfdf4 c09280ba c0907ea8 c090b2e0 c0907ebc c0120c18
3f60: c6cbfde0 00000000 00000000 c6cbb580 c7ba7c40 c7837edc c6cbb598 00000000
3f80: c6cbfde0 c01208f8 00000000 c01254fc c7ba7c40 c0125400 00000000 00000000
3fa0: 00000000 00000000 00000000 c01010d0 00000000 00000000 00000000 00000000
3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[<c04e33c8>] (mxcmci_datawork) from [<c012077c>] (process_one_work+0x1f0/0x338)
[<c012077c>] (process_one_work) from [<c0120c18>] (worker_thread+0x320/0x474)
[<c0120c18>] (worker_thread) from [<c01254fc>] (kthread+0xfc/0x118)
[<c01254fc>] (kthread) from [<c01010d0>] (ret_from_fork+0x14/0x24)
Exception stack(0xc6c93fb0 to 0xc6c93ff8)
3fa0:                                     00000000 00000000 00000000 00000000
3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
Code: e3500000 1a000059 e5153050 e5933038 (e48a3004)
---[ end trace 54ca629b75f0e737 ]---
note: kworker/0:2[711] exited with preempt_count 1
Signed-off-by: default avatarAlexander Shiyan <shc_work@mail.ru>
Fixes: b189e758 ("mmc: mxcmmc: handle highmem pages")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 9ce58dd7
...@@ -290,11 +290,8 @@ static void mxcmci_swap_buffers(struct mmc_data *data) ...@@ -290,11 +290,8 @@ static void mxcmci_swap_buffers(struct mmc_data *data)
struct scatterlist *sg; struct scatterlist *sg;
int i; int i;
for_each_sg(data->sg, sg, data->sg_len, i) { for_each_sg(data->sg, sg, data->sg_len, i)
void *buf = kmap_atomic(sg_page(sg) + sg->offset); buffer_swap32(sg_virt(sg), sg->length);
buffer_swap32(buf, sg->length);
kunmap_atomic(buf);
}
} }
#else #else
static inline void mxcmci_swap_buffers(struct mmc_data *data) {} static inline void mxcmci_swap_buffers(struct mmc_data *data) {}
...@@ -611,7 +608,6 @@ static int mxcmci_transfer_data(struct mxcmci_host *host) ...@@ -611,7 +608,6 @@ static int mxcmci_transfer_data(struct mxcmci_host *host)
{ {
struct mmc_data *data = host->req->data; struct mmc_data *data = host->req->data;
struct scatterlist *sg; struct scatterlist *sg;
void *buf;
int stat, i; int stat, i;
host->data = data; host->data = data;
...@@ -619,18 +615,14 @@ static int mxcmci_transfer_data(struct mxcmci_host *host) ...@@ -619,18 +615,14 @@ static int mxcmci_transfer_data(struct mxcmci_host *host)
if (data->flags & MMC_DATA_READ) { if (data->flags & MMC_DATA_READ) {
for_each_sg(data->sg, sg, data->sg_len, i) { for_each_sg(data->sg, sg, data->sg_len, i) {
buf = kmap_atomic(sg_page(sg) + sg->offset); stat = mxcmci_pull(host, sg_virt(sg), sg->length);
stat = mxcmci_pull(host, buf, sg->length);
kunmap(buf);
if (stat) if (stat)
return stat; return stat;
host->datasize += sg->length; host->datasize += sg->length;
} }
} else { } else {
for_each_sg(data->sg, sg, data->sg_len, i) { for_each_sg(data->sg, sg, data->sg_len, i) {
buf = kmap_atomic(sg_page(sg) + sg->offset); stat = mxcmci_push(host, sg_virt(sg), sg->length);
stat = mxcmci_push(host, buf, sg->length);
kunmap(buf);
if (stat) if (stat)
return stat; return stat;
host->datasize += sg->length; host->datasize += sg->length;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment