Pull char/misc fixes from Greg KH: "Here are some small char/misc driver fixes, along with some documentation updates, for 3.14-rc3. Nothing major, just a number of fixes for reported issues" * tag 'char-misc-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: Revert "misc: eeprom: sunxi: Add new compatibles" Revert "ARM: sunxi: dt: Convert to the new SID compatibles" misc: mic: fix possible signed underflow (undefined behavior) in userspace API ARM: sunxi: dt: Convert to the new SID compatibles misc: eeprom: sunxi: Add new compatibles misc: genwqe: Fix potential memory leak when pinning memory Documentation:Update Documentation/zh_CN/arm64/memory.txt Documentation:Update Documentation/zh_CN/arm64/booting.txt Documentation:Chinese translation of Documentation/arm64/tagged-pointers.txt raw: set range for MAX_RAW_DEVS raw: test against runtime value of max_raw_minors Drivers: hv: vmbus: Don't timeout during the initial connection with host Drivers: hv: vmbus: Specify the target CPU that should receive notification VME: Correct read/write alignment algorithm mei: don't unset read cb ptr on reset mei: clear write cb from waiting list on reset
Unified · Split
| @@ -7,7 +7,7 @@ help. Contact the Chinese maintainer if this translation is outdated · 6 unmodified lines | ||
| 7 | 7 | or if there is a problem with the translation. |
| 8 | 8 | |
| 9 | 9 | Maintainer: Will Deacon <will.deacon@arm.com> |
| 10 | −Chinese maintainer: Fu Wei <tekkamanninja@gmail.com> | |
| 10 | +Chinese maintainer: Fu Wei <wefu@redhat.com> | |
| 11 | 11 | --------------------------------------------------------------------- |
| 12 | 12 | Documentation/arm64/booting.txt 的中文翻译 |
| 13 | 13 | |
| @@ -16,9 +16,9 @@ Documentation/arm64/booting.txt 的中文翻译 · 2 unmodified lines | ||
| 16 | 16 | 译存在问题,请联系中文版维护者。 |
| 17 | 17 | |
| 18 | 18 | 英文版维护者: Will Deacon <will.deacon@arm.com> |
| 19 | −中文版维护者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | |
| 20 | −中文版翻译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | |
| 21 | −中文版校译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | |
| 19 | +中文版维护者: 傅炜 Fu Wei <wefu@redhat.com> | |
| 20 | +中文版翻译者: 傅炜 Fu Wei <wefu@redhat.com> | |
| 21 | +中文版校译者: 傅炜 Fu Wei <wefu@redhat.com> | |
| 22 | 22 | |
| 23 | 23 | 以下为正文 |
| 24 | 24 | --------------------------------------------------------------------- |
| @@ -64,8 +64,8 @@ RAM,或可能使用对这个设备已知的 RAM 信息,还可能使用任何 · 39 unmodified lines | ||
| 64 | 64 | |
| 65 | 65 | 必要性: 强制 |
| 66 | 66 | |
| 67 | −设备树数据块(dtb)大小必须不大于 2 MB,且位于从内核映像起始算起第一个 | |
| 68 | −512MB 内的 2MB 边界上。这使得内核可以通过初始页表中的单个节描述符来 | |
| 67 | +设备树数据块(dtb)必须 8 字节对齐,并位于从内核映像起始算起第一个 512MB | |
| 68 | +内,且不得跨越 2MB 对齐边界。这使得内核可以通过初始页表中的单个节描述符来 | |
| 69 | 69 | 映射此数据块。 |
| 70 | 70 | |
| 71 | 71 | |
| @@ -84,13 +84,23 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内 · 12 unmodified lines | ||
| 84 | 84 | |
| 85 | 85 | 必要性: 强制 |
| 86 | 86 | |
| 87 | −已解压的内核映像包含一个 32 字节的头,内容如下: | |
| 87 | +已解压的内核映像包含一个 64 字节的头,内容如下: | |
| 88 | 88 | |
| 89 | − u32 magic = 0x14000008; /* 跳转到 stext, 小端 */ | |
| 90 | − u32 res0 = 0; /* 保留 */ | |
| 89 | + u32 code0; /* 可执行代码 */ | |
| 90 | + u32 code1; /* 可执行代码 */ | |
| 91 | 91 | u64 text_offset; /* 映像装载偏移 */ |
| 92 | + u64 res0 = 0; /* 保留 */ | |
| 92 | 93 | u64 res1 = 0; /* 保留 */ |
| 93 | 94 | u64 res2 = 0; /* 保留 */ |
| 95 | + u64 res3 = 0; /* 保留 */ | |
| 96 | + u64 res4 = 0; /* 保留 */ | |
| 97 | + u32 magic = 0x644d5241; /* 魔数, 小端, "ARM\x64" */ | |
| 98 | + u32 res5 = 0; /* 保留 */ | |
| 99 | + | |
| 100 | + | |
| 101 | +映像头注释: | |
| 102 | + | |
| 103 | +- code0/code1 负责跳转到 stext. | |
| 94 | 104 | |
| 95 | 105 | 映像必须位于系统 RAM 起始处的特定偏移(当前是 0x80000)。系统 RAM |
| 96 | 106 | 的起始地址必须是以 2MB 对齐的。 |
| @@ -118,9 +128,9 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内 · 21 unmodified lines | ||
| 118 | 128 | 外部高速缓存(如果存在)必须配置并禁用。 |
| 119 | 129 | |
| 120 | 130 | - 架构计时器 |
| 121 | − CNTFRQ 必须设定为计时器的频率。 | |
| 122 | − 如果在 EL1 模式下进入内核,则 CNTHCTL_EL2 中的 EL1PCTEN (bit 0) | |
| 123 | − 必须置位。 | |
| 131 | + CNTFRQ 必须设定为计时器的频率,且 CNTVOFF 必须设定为对所有 CPU | |
| 132 | + 都一致的值。如果在 EL1 模式下进入内核,则 CNTHCTL_EL2 中的 | |
| 133 | + EL1PCTEN (bit 0) 必须置位。 | |
| 124 | 134 | |
| 125 | 135 | - 一致性 |
| 126 | 136 | 通过内核启动的所有 CPU 在内核入口地址上必须处于相同的一致性域中。 |
| @@ -131,23 +141,40 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内 · 4 unmodified lines | ||
| 131 | 141 | 在进入内核映像的异常级中,所有构架中可写的系统寄存器必须通过软件 |
| 132 | 142 | 在一个更高的异常级别下初始化,以防止在 未知 状态下运行。 |
| 133 | 143 | |
| 144 | +以上对于 CPU 模式、高速缓存、MMU、架构计时器、一致性、系统寄存器的 | |
| 145 | +必要条件描述适用于所有 CPU。所有 CPU 必须在同一异常级别跳入内核。 | |
| 146 | + | |
| 134 | 147 | 引导装载程序必须在每个 CPU 处于以下状态时跳入内核入口: |
| 135 | 148 | |
| 136 | 149 | - 主 CPU 必须直接跳入内核映像的第一条指令。通过此 CPU 传递的设备树 |
| 137 | − 数据块必须在每个 CPU 节点中包含以下内容: | |
| 138 | − | |
| 139 | − 1、‘enable-method’属性。目前,此字段支持的值仅为字符串“spin-table”。 | |
| 140 | − | |
| 141 | − 2、‘cpu-release-addr’标识一个 64-bit、初始化为零的内存位置。 | |
| 150 | + 数据块必须在每个 CPU 节点中包含一个 ‘enable-method’ 属性,所 | |
| 151 | + 支持的 enable-method 请见下文。 | |
| 142 | 152 | |
| 143 | 153 | 引导装载程序必须生成这些设备树属性,并在跳入内核入口之前将其插入 |
| 144 | 154 | 数据块。 |
| 145 | 155 | |
| 146 | −- 任何辅助 CPU 必须在内存保留区(通过设备树中的 /memreserve/ 域传递 | |
| 156 | +- enable-method 为 “spin-table” 的 CPU 必须在它们的 CPU | |
| 157 | + 节点中包含一个 ‘cpu-release-addr’ 属性。这个属性标识了一个 | |
| 158 | + 64 位自然对齐且初始化为零的内存位置。 | |
| 159 | + | |
| 160 | + 这些 CPU 必须在内存保留区(通过设备树中的 /memreserve/ 域传递 | |
| 147 | 161 | 给内核)中自旋于内核之外,轮询它们的 cpu-release-addr 位置(必须 |
| 148 | 162 | 包含在保留区中)。可通过插入 wfe 指令来降低忙循环开销,而主 CPU 将 |
| 149 | 163 | 发出 sev 指令。当对 cpu-release-addr 所指位置的读取操作返回非零值 |
| 150 | − 时,CPU 必须直接跳入此值所指向的地址。 | |
| 164 | + 时,CPU 必须跳入此值所指向的地址。此值为一个单独的 64 位小端值, | |
| 165 | + 因此 CPU 须在跳转前将所读取的值转换为其本身的端模式。 | |
| 166 | + | |
| 167 | +- enable-method 为 “psci” 的 CPU 保持在内核外(比如,在 | |
| 168 | + memory 节点中描述为内核空间的内存区外,或在通过设备树 /memreserve/ | |
| 169 | + 域中描述为内核保留区的空间中)。内核将会发起在 ARM 文档(编号 | |
| 170 | + ARM DEN 0022A:用于 ARM 上的电源状态协调接口系统软件)中描述的 | |
| 171 | + CPU_ON 调用来将 CPU 带入内核。 | |
| 172 | + | |
| 173 | + *译者注:到文档翻译时,此文档已更新为 ARM DEN 0022B。 | |
| 174 | + | |
| 175 | + 设备树必须包含一个 ‘psci’ 节点,请参考以下文档: | |
| 176 | + Documentation/devicetree/bindings/arm/psci.txt | |
| 177 | + | |
| 151 | 178 | |
| 152 | 179 | - 辅助 CPU 通用寄存器设置 |
| 153 | 180 | x0 = 0 (保留,将来可能使用) |
| @@ -7,7 +7,7 @@ help. Contact the Chinese maintainer if this translation is outdated · 6 unmodified lines | ||
| 7 | 7 | or if there is a problem with the translation. |
| 8 | 8 | |
| 9 | 9 | Maintainer: Catalin Marinas <catalin.marinas@arm.com> |
| 10 | −Chinese maintainer: Fu Wei <tekkamanninja@gmail.com> | |
| 10 | +Chinese maintainer: Fu Wei <wefu@redhat.com> | |
| 11 | 11 | --------------------------------------------------------------------- |
| 12 | 12 | Documentation/arm64/memory.txt 的中文翻译 |
| 13 | 13 | |
| @@ -16,9 +16,9 @@ Documentation/arm64/memory.txt 的中文翻译 · 2 unmodified lines | ||
| 16 | 16 | 译存在问题,请联系中文版维护者。 |
| 17 | 17 | |
| 18 | 18 | 英文版维护者: Catalin Marinas <catalin.marinas@arm.com> |
| 19 | −中文版维护者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | |
| 20 | −中文版翻译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | |
| 21 | −中文版校译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | |
| 19 | +中文版维护者: 傅炜 Fu Wei <wefu@redhat.com> | |
| 20 | +中文版翻译者: 傅炜 Fu Wei <wefu@redhat.com> | |
| 21 | +中文版校译者: 傅炜 Fu Wei <wefu@redhat.com> | |
| 22 | 22 | |
| 23 | 23 | 以下为正文 |
| 24 | 24 | --------------------------------------------------------------------- |
| @@ -41,7 +41,7 @@ AArch64 Linux 使用页大小为 4KB 的 3 级转换表配置,对于用户和 · 16 unmodified lines | ||
| 41 | 41 | TTBR1 中,且从不写入 TTBR0。 |
| 42 | 42 | |
| 43 | 43 | |
| 44 | −AArch64 Linux 内存布局: | |
| 44 | +AArch64 Linux 在页大小为 4KB 时的内存布局: | |
| 45 | 45 | |
| 46 | 46 | 起始地址 结束地址 大小 用途 |
| 47 | 47 | ----------------------------------------------------------------------- |
| @@ -55,15 +55,42 @@ ffffffbc00000000 ffffffbdffffffff 8GB vmemmap · 7 unmodified lines | ||
| 55 | 55 | |
| 56 | 56 | ffffffbe00000000 ffffffbffbbfffff ~8GB [防护页,未来用于 vmmemap] |
| 57 | 57 | |
| 58 | +ffffffbffbc00000 ffffffbffbdfffff 2MB earlyprintk 设备 | |
| 59 | + | |
| 58 | 60 | ffffffbffbe00000 ffffffbffbe0ffff 64KB PCI I/O 空间 |
| 59 | 61 | |
| 60 | −ffffffbbffff0000 ffffffbcffffffff ~2MB [防护页] | |
| 62 | +ffffffbffbe10000 ffffffbcffffffff ~2MB [防护页] | |
| 61 | 63 | |
| 62 | 64 | ffffffbffc000000 ffffffbfffffffff 64MB 模块 |
| 63 | 65 | |
| 64 | 66 | ffffffc000000000 ffffffffffffffff 256GB 内核逻辑内存映射 |
| 65 | 67 | |
| 66 | 68 | |
| 69 | +AArch64 Linux 在页大小为 64KB 时的内存布局: | |
| 70 | + | |
| 71 | +起始地址 结束地址 大小 用途 | |
| 72 | +----------------------------------------------------------------------- | |
| 73 | +0000000000000000 000003ffffffffff 4TB 用户空间 | |
| 74 | + | |
| 75 | +fffffc0000000000 fffffdfbfffeffff ~2TB vmalloc | |
| 76 | + | |
| 77 | +fffffdfbffff0000 fffffdfbffffffff 64KB [防护页] | |
| 78 | + | |
| 79 | +fffffdfc00000000 fffffdfdffffffff 8GB vmemmap | |
| 80 | + | |
| 81 | +fffffdfe00000000 fffffdfffbbfffff ~8GB [防护页,未来用于 vmmemap] | |
| 82 | + | |
| 83 | +fffffdfffbc00000 fffffdfffbdfffff 2MB earlyprintk 设备 | |
| 84 | + | |
| 85 | +fffffdfffbe00000 fffffdfffbe0ffff 64KB PCI I/O 空间 | |
| 86 | + | |
| 87 | +fffffdfffbe10000 fffffdfffbffffff ~2MB [防护页] | |
| 88 | + | |
| 89 | +fffffdfffc000000 fffffdffffffffff 64MB 模块 | |
| 90 | + | |
| 91 | +fffffe0000000000 ffffffffffffffff 2TB 内核逻辑内存映射 | |
| 92 | + | |
| 93 | + | |
| 67 | 94 | 4KB 页大小的转换表查找: |
| 68 | 95 | |
| 69 | 96 | +--------+--------+--------+--------+--------+--------+--------+--------+ |
| @@ -91,3 +118,10 @@ ffffffc000000000 ffffffffffffffff 256GB 内核逻辑内存映射 · 21 unmodified lines | ||
| 91 | 118 | | | +--------------------------> [41:29] L2 索引 (仅使用 38:29 ) |
| 92 | 119 | | +-------------------------------> [47:42] L1 索引 (未使用) |
| 93 | 120 | +-------------------------------------------------> [63] TTBR0/1 |
| 121 | + | |
| 122 | +当使用 KVM 时, 管理程序(hypervisor)在 EL2 中通过相对内核虚拟地址的 | |
| 123 | +一个固定偏移来映射内核页(内核虚拟地址的高 24 位设为零): | |
| 124 | + | |
| 125 | +起始地址 结束地址 大小 用途 | |
| 126 | +----------------------------------------------------------------------- | |
| 127 | +0000004000000000 0000007fffffffff 256GB 在 HYP 中映射的内核对象 | |
| @@ -0,0 +1,52 @@ | ||
| 1 | +Chinese translated version of Documentation/arm64/tagged-pointers.txt | |
| 2 | + | |
| 3 | +If you have any comment or update to the content, please contact the | |
| 4 | +original document maintainer directly. However, if you have a problem | |
| 5 | +communicating in English you can also ask the Chinese maintainer for | |
| 6 | +help. Contact the Chinese maintainer if this translation is outdated | |
| 7 | +or if there is a problem with the translation. | |
| 8 | + | |
| 9 | +Maintainer: Will Deacon <will.deacon@arm.com> | |
| 10 | +Chinese maintainer: Fu Wei <wefu@redhat.com> | |
| 11 | +--------------------------------------------------------------------- | |
| 12 | +Documentation/arm64/tagged-pointers.txt 的中文翻译 | |
| 13 | + | |
| 14 | +如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文 | |
| 15 | +交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻 | |
| 16 | +译存在问题,请联系中文版维护者。 | |
| 17 | + | |
| 18 | +英文版维护者: Will Deacon <will.deacon@arm.com> | |
| 19 | +中文版维护者: 傅炜 Fu Wei <wefu@redhat.com> | |
| 20 | +中文版翻译者: 傅炜 Fu Wei <wefu@redhat.com> | |
| 21 | +中文版校译者: 傅炜 Fu Wei <wefu@redhat.com> | |
| 22 | + | |
| 23 | +以下为正文 | |
| 24 | +--------------------------------------------------------------------- | |
| 25 | + Linux 在 AArch64 中带标记的虚拟地址 | |
| 26 | + ================================= | |
| 27 | + | |
| 28 | +作者: Will Deacon <will.deacon@arm.com> | |
| 29 | +日期: 2013 年 06 月 12 日 | |
| 30 | + | |
| 31 | +本文档简述了在 AArch64 地址转换系统中提供的带标记的虚拟地址及其在 | |
| 32 | +AArch64 Linux 中的潜在用途。 | |
| 33 | + | |
| 34 | +内核提供的地址转换表配置使通过 TTBR0 完成的虚拟地址转换(即用户空间 | |
| 35 | +映射),其虚拟地址的最高 8 位(63:56)会被转换硬件所忽略。这种机制 | |
| 36 | +让这些位可供应用程序自由使用,其注意事项如下: | |
| 37 | + | |
| 38 | + (1) 内核要求所有传递到 EL1 的用户空间地址带有 0x00 标记。 | |
| 39 | + 这意味着任何携带用户空间虚拟地址的系统调用(syscall) | |
| 40 | + 参数 *必须* 在陷入内核前使它们的最高字节被清零。 | |
| 41 | + | |
| 42 | + (2) 非零标记在传递信号时不被保存。这意味着在应用程序中利用了 | |
| 43 | + 标记的信号处理函数无法依赖 siginfo_t 的用户空间虚拟 | |
| 44 | + 地址所携带的包含其内部域信息的标记。此规则的一个例外是 | |
| 45 | + 当信号是在调试观察点的异常处理程序中产生的,此时标记的 | |
| 46 | + 信息将被保存。 | |
| 47 | + | |
| 48 | + (3) 当使用带标记的指针时需特别留心,因为仅对两个虚拟地址 | |
| 49 | + 的高字节,C 编译器很可能无法判断它们是不同的。 | |
| 50 | + | |
| 51 | +此构架会阻止对带标记的 PC 指针的利用,因此在异常返回时,其高字节 | |
| 52 | +将被设置成一个为 “55” 的扩展符。 | |
| @@ -499,6 +499,7 @@ config RAW_DRIVER · 498 unmodified lines | ||
| 499 | 499 | config MAX_RAW_DEVS |
| 500 | 500 | int "Maximum number of RAW devices to support (1-65536)" |
| 501 | 501 | depends on RAW_DRIVER |
| 502 | + range 1 65536 | |
| 502 | 503 | default "256" |
| 503 | 504 | help |
| 504 | 505 | The maximum number of RAW devices that are supported. |
| @@ -190,7 +190,7 @@ static int bind_get(int number, dev_t *dev) · 189 unmodified lines | ||
| 190 | 190 | struct raw_device_data *rawdev; |
| 191 | 191 | struct block_device *bdev; |
| 192 | 192 | |
| 193 | − if (number <= 0 || number >= MAX_RAW_MINORS) | |
| 193 | + if (number <= 0 || number >= max_raw_minors) | |
| 194 | 194 | return -EINVAL; |
| 195 | 195 | |
| 196 | 196 | rawdev = &raw_devices[number]; |
| @@ -67,7 +67,6 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo, · 66 unmodified lines | ||
| 67 | 67 | int ret = 0; |
| 68 | 68 | struct vmbus_channel_initiate_contact *msg; |
| 69 | 69 | unsigned long flags; |
| 70 | − int t; | |
| 71 | 70 | |
| 72 | 71 | init_completion(&msginfo->waitevent); |
| 73 | 72 | |
| @@ -78,6 +77,8 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo, · 4 unmodified lines | ||
| 78 | 77 | msg->interrupt_page = virt_to_phys(vmbus_connection.int_page); |
| 79 | 78 | msg->monitor_page1 = virt_to_phys(vmbus_connection.monitor_pages[0]); |
| 80 | 79 | msg->monitor_page2 = virt_to_phys(vmbus_connection.monitor_pages[1]); |
| 80 | + if (version == VERSION_WIN8) | |
| 81 | + msg->target_vcpu = hv_context.vp_index[smp_processor_id()]; | |
| 81 | 82 | |
| 82 | 83 | /* |
| 83 | 84 | * Add to list before we send the request since we may |
| @@ -100,15 +101,7 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo, · 16 unmodified lines | ||
| 100 | 101 | } |
| 101 | 102 | |
| 102 | 103 | /* Wait for the connection response */ |
| 103 | − t = wait_for_completion_timeout(&msginfo->waitevent, 5*HZ); | |
| 104 | − if (t == 0) { | |
| 105 | − spin_lock_irqsave(&vmbus_connection.channelmsg_lock, | |
| 106 | − flags); | |
| 107 | − list_del(&msginfo->msglistentry); | |
| 108 | − spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, | |
| 109 | − flags); | |
| 110 | − return -ETIMEDOUT; | |
| 111 | − } | |
| 104 | + wait_for_completion(&msginfo->waitevent); | |
| 112 | 105 | |
| 113 | 106 | spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags); |
| 114 | 107 | list_del(&msginfo->msglistentry); |
| @@ -787,6 +787,7 @@ static int genwqe_pin_mem(struct genwqe_file *cfile, struct genwqe_mem *m) · 786 unmodified lines | ||
| 787 | 787 | if (rc != 0) { |
| 788 | 788 | dev_err(&pci_dev->dev, |
| 789 | 789 | "[%s] genwqe_user_vmap rc=%d\n", __func__, rc); |
| 790 | + kfree(dma_map); | |
| 790 | 791 | return rc; |
| 791 | 792 | } |
| 792 | 793 | |
| @@ -908,7 +908,6 @@ void mei_cl_all_disconnect(struct mei_device *dev) · 907 unmodified lines | ||
| 908 | 908 | list_for_each_entry_safe(cl, next, &dev->file_list, link) { |
| 909 | 909 | cl->state = MEI_FILE_DISCONNECTED; |
| 910 | 910 | cl->mei_flow_ctrl_creds = 0; |
| 911 | − cl->read_cb = NULL; | |
| 912 | 911 | cl->timer_count = 0; |
| 913 | 912 | } |
| 914 | 913 | } |
| @@ -942,8 +941,16 @@ void mei_cl_all_wakeup(struct mei_device *dev) · 27 unmodified lines | ||
| 942 | 941 | void mei_cl_all_write_clear(struct mei_device *dev) |
| 943 | 942 | { |
| 944 | 943 | struct mei_cl_cb *cb, *next; |
| 944 | + struct list_head *list; | |
| 945 | 945 | |
| 946 | − list_for_each_entry_safe(cb, next, &dev->write_list.list, list) { | |
| 946 | + list = &dev->write_list.list; | |
| 947 | + list_for_each_entry_safe(cb, next, list, list) { | |
| 948 | + list_del(&cb->list); | |
| 949 | + mei_io_cb_free(cb); | |
| 950 | + } | |
| 951 | + | |
| 952 | + list = &dev->write_waiting_list.list; | |
| 953 | + list_for_each_entry_safe(cb, next, list, list) { | |
| 947 | 954 | list_del(&cb->list); |
| 948 | 955 | mei_io_cb_free(cb); |
| 949 | 956 | } |
| @@ -156,7 +156,8 @@ static int mic_vringh_copy(struct mic_vdev *mvdev, struct vringh_kiov *iov, · 155 unmodified lines | ||
| 156 | 156 | static int _mic_virtio_copy(struct mic_vdev *mvdev, |
| 157 | 157 | struct mic_copy_desc *copy) |
| 158 | 158 | { |
| 159 | − int ret = 0, iovcnt = copy->iovcnt; | |
| 159 | + int ret = 0; | |
| 160 | + u32 iovcnt = copy->iovcnt; | |
| 160 | 161 | struct iovec iov; |
| 161 | 162 | struct iovec __user *u_iov = copy->iov; |
| 162 | 163 | void __user *ubuf = NULL; |
| @@ -884,7 +884,7 @@ static ssize_t ca91cx42_master_read(struct vme_master_resource *image, · 883 unmodified lines | ||
| 884 | 884 | if (done == count) |
| 885 | 885 | goto out; |
| 886 | 886 | } |
| 887 | − if ((uintptr_t)addr & 0x2) { | |
| 887 | + if ((uintptr_t)(addr + done) & 0x2) { | |
| 888 | 888 | if ((count - done) < 2) { |
| 889 | 889 | *(u8 *)(buf + done) = ioread8(addr + done); |
| 890 | 890 | done += 1; |
| @@ -938,7 +938,7 @@ static ssize_t ca91cx42_master_write(struct vme_master_resource *image, · 47 unmodified lines | ||
| 938 | 938 | if (done == count) |
| 939 | 939 | goto out; |
| 940 | 940 | } |
| 941 | − if ((uintptr_t)addr & 0x2) { | |
| 941 | + if ((uintptr_t)(addr + done) & 0x2) { | |
| 942 | 942 | if ((count - done) < 2) { |
| 943 | 943 | iowrite8(*(u8 *)(buf + done), addr + done); |
| 944 | 944 | done += 1; |
| @@ -1289,7 +1289,7 @@ static ssize_t tsi148_master_read(struct vme_master_resource *image, void *buf, · 1288 unmodified lines | ||
| 1289 | 1289 | if (done == count) |
| 1290 | 1290 | goto out; |
| 1291 | 1291 | } |
| 1292 | − if ((uintptr_t)addr & 0x2) { | |
| 1292 | + if ((uintptr_t)(addr + done) & 0x2) { | |
| 1293 | 1293 | if ((count - done) < 2) { |
| 1294 | 1294 | *(u8 *)(buf + done) = ioread8(addr + done); |
| 1295 | 1295 | done += 1; |
| @@ -1371,7 +1371,7 @@ static ssize_t tsi148_master_write(struct vme_master_resource *image, void *buf, · 75 unmodified lines | ||
| 1371 | 1371 | if (done == count) |
| 1372 | 1372 | goto out; |
| 1373 | 1373 | } |
| 1374 | − if ((uintptr_t)addr & 0x2) { | |
| 1374 | + if ((uintptr_t)(addr + done) & 0x2) { | |
| 1375 | 1375 | if ((count - done) < 2) { |
| 1376 | 1376 | iowrite8(*(u8 *)(buf + done), addr + done); |
| 1377 | 1377 | done += 1; |
| @@ -875,7 +875,7 @@ struct vmbus_channel_relid_released { · 874 unmodified lines | ||
| 875 | 875 | struct vmbus_channel_initiate_contact { |
| 876 | 876 | struct vmbus_channel_message_header header; |
| 877 | 877 | u32 vmbus_version_requested; |
| 878 | − u32 padding2; | |
| 878 | + u32 target_vcpu; /* The VCPU the host should respond to */ | |
| 879 | 879 | u64 interrupt_page; |
| 880 | 880 | u64 monitor_page1; |
| 881 | 881 | u64 monitor_page2; |
| @@ -39,7 +39,7 @@ struct mic_copy_desc { · 38 unmodified lines | ||
| 39 | 39 | #else |
| 40 | 40 | struct iovec *iov; |
| 41 | 41 | #endif |
| 42 | − int iovcnt; | |
| 42 | + __u32 iovcnt; | |
| 43 | 43 | __u8 vr_idx; |
| 44 | 44 | __u8 update_used; |
| 45 | 45 | __u32 out_len; |