From: Hirofumi Fujita <h-fujita@ebina.hitachi.co.jp>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] Re: SW IO TLB buffer management in kernel test10
Date: Fri, 17 Nov 2000 02:48:17 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590678205738@msgid-missing> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1252", Size: 2048 bytes --]
Thanks. I understand the problem.
I tried the patch but swiotlb92 option is needed to successfully
format 4GB ext2 partition, otherwise kernel panics.
I don't know why such huge buffer is needed.
Hirofumi Fujita
Hitachi, Ltd.
>
> Hello,
> From: Hirofumi Fujita <h-fujita@ebina.hitachi.co.jp>
> Subject: [Linux-ia64] SW IO TLB buffer management in kernel test10
> Date: Wed, 15 Nov 2000 17:15:52 +0900
>
>> there seems to be a problem on buffer management of SW IO TLB.
>> The contents of io_tlb_list[] become broken.
> ...
>> I applied the attached patch and kernel panic when mke2fs /dev/sda4.
>> (QLogic BIOS setting: >4GB addressing is disabled)
>> Kernel panic: __pci_map_single: could not allocate software IO TLB (16384 bytes)
>> At this time, io_tlb_list[] are almost 0.
> ...
>> With swiotlb92 option, mke2fs successes,
>> but 60% of io_tlb_list[] remain 0 after mke2fs finished.
>> This is because pci_unmap is not called correctly ?
>
> I think it's because your patch makes pci_unmap do nothing on io_tlb_list[].
> In __pci_unmap_single, making 2 steps apart has its meaning.
>
> The patch should be something like this?
--- arch/ia64/kernel/pci-dma.c 2000/11/07 06:49:39 1.1.1.4.2.1
+++ arch/ia64/kernel/pci-dma.c 2000/11/15 13:50:28
@@ -109,7 +109,8 @@
{
unsigned long flags;
char *dma_addr;
- unsigned int i, nslots, stride, index, wrap;
+ unsigned int nslots, stride, index, wrap, count;
+ int i;
/*
* For mappings greater than a page size, we limit the stride (and hence alignment)
@@ -133,7 +134,7 @@
wrap = index = ALIGN(io_tlb_index, stride);
if (index >= io_tlb_nslabs)
- index = 0;
+ wrap = index = 0;
do {
/*
@@ -144,6 +145,9 @@
if (io_tlb_list[index] >= nslots) {
for (i = index; i < index + nslots; i++)
io_tlb_list[i] = 0;
+ count = 0;
+ for (i = index - 1; (i >= 0) && io_tlb_list[i]; i--)
+ io_tlb_list[i] = ++count;
dma_addr = io_tlb_start + (index << IO_TLB_SHIFT);
/*
reply other threads:[~2000-11-17 2:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=marc-linux-ia64-105590678205738@msgid-missing \
--to=h-fujita@ebina.hitachi.co.jp \
--cc=linux-ia64@vger.kernel.org \
/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