Skip to content

Commit 2b77158

Browse files
shcgitstorulf
authored andcommitted
mmc: mxcmmc: "Revert mmc: mxcmmc: handle highmem pages"
This reverts commit b189e75. 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: Alexander Shiyan <[email protected]> Fixes: b189e75 ("mmc: mxcmmc: handle highmem pages") Cc: [email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 9ce58dd commit 2b77158

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

drivers/mmc/host/mxcmmc.c

+4-12
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,8 @@ static void mxcmci_swap_buffers(struct mmc_data *data)
290290
struct scatterlist *sg;
291291
int i;
292292

293-
for_each_sg(data->sg, sg, data->sg_len, i) {
294-
void *buf = kmap_atomic(sg_page(sg) + sg->offset);
295-
buffer_swap32(buf, sg->length);
296-
kunmap_atomic(buf);
297-
}
293+
for_each_sg(data->sg, sg, data->sg_len, i)
294+
buffer_swap32(sg_virt(sg), sg->length);
298295
}
299296
#else
300297
static inline void mxcmci_swap_buffers(struct mmc_data *data) {}
@@ -611,26 +608,21 @@ static int mxcmci_transfer_data(struct mxcmci_host *host)
611608
{
612609
struct mmc_data *data = host->req->data;
613610
struct scatterlist *sg;
614-
void *buf;
615611
int stat, i;
616612

617613
host->data = data;
618614
host->datasize = 0;
619615

620616
if (data->flags & MMC_DATA_READ) {
621617
for_each_sg(data->sg, sg, data->sg_len, i) {
622-
buf = kmap_atomic(sg_page(sg) + sg->offset);
623-
stat = mxcmci_pull(host, buf, sg->length);
624-
kunmap(buf);
618+
stat = mxcmci_pull(host, sg_virt(sg), sg->length);
625619
if (stat)
626620
return stat;
627621
host->datasize += sg->length;
628622
}
629623
} else {
630624
for_each_sg(data->sg, sg, data->sg_len, i) {
631-
buf = kmap_atomic(sg_page(sg) + sg->offset);
632-
stat = mxcmci_push(host, buf, sg->length);
633-
kunmap(buf);
625+
stat = mxcmci_push(host, sg_virt(sg), sg->length);
634626
if (stat)
635627
return stat;
636628
host->datasize += sg->length;

0 commit comments

Comments
 (0)