* Re: [PATCH v2 0/2] Add GPIO level-sensitive interrupt support
From: Alexandre Torgue @ 2020-02-20 13:09 UTC (permalink / raw)
To: Marek Vasut, Thomas Gleixner, Jason Cooper, Marc Zyngier,
Linus Walleij
Cc: linux-arm-kernel, linux-kernel, linux-gpio
In-Reply-To: <38e7cf57-2f89-7615-0841-316355a9102f@denx.de>
Hi Marek
On 2/19/20 6:24 PM, Marek Vasut wrote:
> On 2/19/20 10:20 AM, Alexandre Torgue wrote:
> Hi,
> [...]
>>>>>> This series adds the possibility to handle gpio interrupts on level.
>>>>>>
>>>>>> GPIO hardware block is directly linked to EXTI block but EXTI handles
>>>>>> external interrupts only on edge. To be able to handle GPIO
>>>>>> interrupt on
>>>>>> level a "hack" is done in gpio irq chip: parent interrupt (exti irq
>>>>>> chip)
>>>>>> is retriggered following interrupt type and gpio line value.
>>>>>>
>>>>>> In exti irq chip, retrigger ops function is added.
>>>>>
>>>>> btw. this might be unrelated, but is it possible to have e.g. gpioC2
>>>>> set
>>>>> as trigger-level-low and gpioD2 set as trigger-edge-falling ? It seems
>>>>> 8eb2dfee9fb1 ("pinctrl: stm32: add lock mechanism for irqmux
>>>>> selection")
>>>>> prevents that.
>>>>>
>>>>
>>>> No it's not possible. Each gpio line doesn't have a dedicated Exti line
>>>> Each Exti line is muxing between gpio banks.
>>>
>>> OK, that confirms my assumption.
>>>
>>>> Mapping is done as following:
>>>>
>>>> EXTI0 = A0 or B0 or C0 .... or Z0 : selected by Mux
>>>> EXTI1 = A1 or B1 or C1 ....or Z1 : selected by Mux
>>>> EXTI2 = A2 or B2 or C2 ....or Z2 : selected by Mux
>>>> ...
>>>
>>> Is it at least possible to have IRQs of the same type on the same exti
>>> line? E.g. gpioA2 of trigger-edge-falling and gpioB2
>>> trigger-edge-falling ?
>>>
>>
>> Sorry I don't catch your point. If you already succeed to get gpioA2,
>> then you will failed to get gpioB2 but looking at function call stack we
>> could get an other issue.
>
> Considering the EXTI line limitations, I'd like to know what kind of IRQ
> input configuration is allowed/valid and what kind of configuration is
> not valid.
As a mux is used to select which GPIO[A..Z]_X has to be mapped on exti_X
line, only one GPIO can be used on the EXTI line.
For example, on EXTI2 you could map either gpioa2 or gpiob2 or
....gpioz2 but not gpioa2 and gpiob2 in the same time.
>
>> Lets take example where you succeed to get gpioa2 as interrupt (using
>> interrupt bindings) and now you try to do the same for gpiob2, you will
>> have (roughly):
>>
>> stm32_gpio_irq_request_resources (for gpiob2) --> succeed
>>
>> stm32_gpio_set_type
>> |
>> |--> stm32_exti_set_type type -> change exti line 2 trigger registers
>> with gpiob2 binding.
>>
>> stm32_gpio_domain_activate --> failed as exti line2 is already used
>> by gpioa2.
>>
>> So as stm32_gpio_set_type is called before checking than exti line is
>> available, type could be changed and behavior of gpioa2 interrupt broken.
>>
>> Solution would be to move the exti line mux check from
>> stm32_gpio_domain_activate to stm32_gpio_irq_request_resources callback.
>
> So the hardware does support using both gpioA2 and gpioB2 as an
> interrupt source, for different drivers, if they are of the same
> interrupt type. Except the current implementation does not permit that.
>
No hardware doesn't allow it for reason explain above.
> If the interrupt types are different, that is not supported by the hardware.
>
> Correct ?
>
^ permalink raw reply
* Re: [PATCH v2 0/2] Add GPIO level-sensitive interrupt support
From: Alexandre Torgue @ 2020-02-20 13:09 UTC (permalink / raw)
To: Marek Vasut, Thomas Gleixner, Jason Cooper, Marc Zyngier,
Linus Walleij
Cc: linux-gpio, linux-kernel, linux-arm-kernel
In-Reply-To: <38e7cf57-2f89-7615-0841-316355a9102f@denx.de>
Hi Marek
On 2/19/20 6:24 PM, Marek Vasut wrote:
> On 2/19/20 10:20 AM, Alexandre Torgue wrote:
> Hi,
> [...]
>>>>>> This series adds the possibility to handle gpio interrupts on level.
>>>>>>
>>>>>> GPIO hardware block is directly linked to EXTI block but EXTI handles
>>>>>> external interrupts only on edge. To be able to handle GPIO
>>>>>> interrupt on
>>>>>> level a "hack" is done in gpio irq chip: parent interrupt (exti irq
>>>>>> chip)
>>>>>> is retriggered following interrupt type and gpio line value.
>>>>>>
>>>>>> In exti irq chip, retrigger ops function is added.
>>>>>
>>>>> btw. this might be unrelated, but is it possible to have e.g. gpioC2
>>>>> set
>>>>> as trigger-level-low and gpioD2 set as trigger-edge-falling ? It seems
>>>>> 8eb2dfee9fb1 ("pinctrl: stm32: add lock mechanism for irqmux
>>>>> selection")
>>>>> prevents that.
>>>>>
>>>>
>>>> No it's not possible. Each gpio line doesn't have a dedicated Exti line
>>>> Each Exti line is muxing between gpio banks.
>>>
>>> OK, that confirms my assumption.
>>>
>>>> Mapping is done as following:
>>>>
>>>> EXTI0 = A0 or B0 or C0 .... or Z0 : selected by Mux
>>>> EXTI1 = A1 or B1 or C1 ....or Z1 : selected by Mux
>>>> EXTI2 = A2 or B2 or C2 ....or Z2 : selected by Mux
>>>> ...
>>>
>>> Is it at least possible to have IRQs of the same type on the same exti
>>> line? E.g. gpioA2 of trigger-edge-falling and gpioB2
>>> trigger-edge-falling ?
>>>
>>
>> Sorry I don't catch your point. If you already succeed to get gpioA2,
>> then you will failed to get gpioB2 but looking at function call stack we
>> could get an other issue.
>
> Considering the EXTI line limitations, I'd like to know what kind of IRQ
> input configuration is allowed/valid and what kind of configuration is
> not valid.
As a mux is used to select which GPIO[A..Z]_X has to be mapped on exti_X
line, only one GPIO can be used on the EXTI line.
For example, on EXTI2 you could map either gpioa2 or gpiob2 or
....gpioz2 but not gpioa2 and gpiob2 in the same time.
>
>> Lets take example where you succeed to get gpioa2 as interrupt (using
>> interrupt bindings) and now you try to do the same for gpiob2, you will
>> have (roughly):
>>
>> stm32_gpio_irq_request_resources (for gpiob2) --> succeed
>>
>> stm32_gpio_set_type
>> |
>> |--> stm32_exti_set_type type -> change exti line 2 trigger registers
>> with gpiob2 binding.
>>
>> stm32_gpio_domain_activate --> failed as exti line2 is already used
>> by gpioa2.
>>
>> So as stm32_gpio_set_type is called before checking than exti line is
>> available, type could be changed and behavior of gpioa2 interrupt broken.
>>
>> Solution would be to move the exti line mux check from
>> stm32_gpio_domain_activate to stm32_gpio_irq_request_resources callback.
>
> So the hardware does support using both gpioA2 and gpioB2 as an
> interrupt source, for different drivers, if they are of the same
> interrupt type. Except the current implementation does not permit that.
>
No hardware doesn't allow it for reason explain above.
> If the interrupt types are different, that is not supported by the hardware.
>
> Correct ?
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH v3 05/20] exec: Let flatview API take void pointer arguments
From: Philippe Mathieu-Daudé @ 2020-02-20 13:05 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
Cc: Fam Zheng, Dmitry Fleytman, kvm, Michael S. Tsirkin, Jason Wang,
Gerd Hoffmann, Edgar E. Iglesias, Stefano Stabellini,
Matthew Rosato, qemu-block, David Hildenbrand, Halil Pasic,
Christian Borntraeger, Hervé Poussineau, Anthony Perard,
xen-devel, Aleksandar Rikalo, Richard Henderson,
Philippe Mathieu-Daudé, Laurent Vivier, Thomas Huth,
Eduardo Habkost, Stefan Weil, Alistair Francis, Richard Henderson,
Paul Durrant, Eric Auger, qemu-s390x, qemu-arm,
Cédric Le Goater, John Snow, David Gibson, Igor Mitsyanko,
Cornelia Huck, Michael Walle, qemu-ppc, Paolo Bonzini
In-Reply-To: <20200220130548.29974-1-philmd@redhat.com>
Only flatview_[read/write]_continue use a byte pointer to increment
an offset. For the users, we are only dealing with a blob buffer.
Use a void pointer argument. This will let us simplify the
address_space API in the next commit.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
include/exec/memory.h | 2 +-
exec.c | 14 ++++++++------
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/include/exec/memory.h b/include/exec/memory.h
index e85b7de99a..6f8084f45e 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -2336,7 +2336,7 @@ void address_space_unmap(AddressSpace *as, void *buffer, hwaddr len,
MemTxResult address_space_read_full(AddressSpace *as, hwaddr addr,
MemTxAttrs attrs, uint8_t *buf, hwaddr len);
MemTxResult flatview_read_continue(FlatView *fv, hwaddr addr,
- MemTxAttrs attrs, uint8_t *buf,
+ MemTxAttrs attrs, void *buf,
hwaddr len, hwaddr addr1, hwaddr l,
MemoryRegion *mr);
void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr);
diff --git a/exec.c b/exec.c
index 06e386dc72..980cc0e2b2 100644
--- a/exec.c
+++ b/exec.c
@@ -2780,9 +2780,9 @@ void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len,
}
static MemTxResult flatview_read(FlatView *fv, hwaddr addr,
- MemTxAttrs attrs, uint8_t *buf, hwaddr len);
+ MemTxAttrs attrs, void *buf, hwaddr len);
static MemTxResult flatview_write(FlatView *fv, hwaddr addr, MemTxAttrs attrs,
- const uint8_t *buf, hwaddr len);
+ const void *buf, hwaddr len);
static bool flatview_access_valid(FlatView *fv, hwaddr addr, hwaddr len,
bool is_write, MemTxAttrs attrs);
@@ -3147,7 +3147,7 @@ static bool prepare_mmio_access(MemoryRegion *mr)
/* Called within RCU critical section. */
static MemTxResult flatview_write_continue(FlatView *fv, hwaddr addr,
MemTxAttrs attrs,
- const uint8_t *buf,
+ const void *ptr,
hwaddr len, hwaddr addr1,
hwaddr l, MemoryRegion *mr)
{
@@ -3155,6 +3155,7 @@ static MemTxResult flatview_write_continue(FlatView *fv, hwaddr addr,
uint64_t val;
MemTxResult result = MEMTX_OK;
bool release_lock = false;
+ const uint8_t *buf = ptr;
for (;;) {
if (!memory_access_is_direct(mr, true)) {
@@ -3194,7 +3195,7 @@ static MemTxResult flatview_write_continue(FlatView *fv, hwaddr addr,
/* Called from RCU critical section. */
static MemTxResult flatview_write(FlatView *fv, hwaddr addr, MemTxAttrs attrs,
- const uint8_t *buf, hwaddr len)
+ const void *buf, hwaddr len)
{
hwaddr l;
hwaddr addr1;
@@ -3211,7 +3212,7 @@ static MemTxResult flatview_write(FlatView *fv, hwaddr addr, MemTxAttrs attrs,
/* Called within RCU critical section. */
MemTxResult flatview_read_continue(FlatView *fv, hwaddr addr,
- MemTxAttrs attrs, uint8_t *buf,
+ MemTxAttrs attrs, void *ptr,
hwaddr len, hwaddr addr1, hwaddr l,
MemoryRegion *mr)
{
@@ -3219,6 +3220,7 @@ MemTxResult flatview_read_continue(FlatView *fv, hwaddr addr,
uint64_t val;
MemTxResult result = MEMTX_OK;
bool release_lock = false;
+ uint8_t *buf = ptr;
for (;;) {
if (!memory_access_is_direct(mr, false)) {
@@ -3256,7 +3258,7 @@ MemTxResult flatview_read_continue(FlatView *fv, hwaddr addr,
/* Called from RCU critical section. */
static MemTxResult flatview_read(FlatView *fv, hwaddr addr,
- MemTxAttrs attrs, uint8_t *buf, hwaddr len)
+ MemTxAttrs attrs, void *buf, hwaddr len)
{
hwaddr l;
hwaddr addr1;
--
2.21.1
^ permalink raw reply related
* [PATCH v3 06/20] exec: Let the address_space API use void pointer arguments
From: Philippe Mathieu-Daudé @ 2020-02-20 13:05 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
Cc: Fam Zheng, Dmitry Fleytman, kvm, Michael S. Tsirkin, Jason Wang,
Gerd Hoffmann, Edgar E. Iglesias, Stefano Stabellini,
Matthew Rosato, qemu-block, David Hildenbrand, Halil Pasic,
Christian Borntraeger, Hervé Poussineau, Anthony Perard,
xen-devel, Aleksandar Rikalo, Richard Henderson,
Philippe Mathieu-Daudé, Laurent Vivier, Thomas Huth,
Eduardo Habkost, Stefan Weil, Alistair Francis, Richard Henderson,
Paul Durrant, Eric Auger, qemu-s390x, qemu-arm,
Cédric Le Goater, John Snow, David Gibson, Igor Mitsyanko,
Cornelia Huck, Michael Walle, qemu-ppc, Paolo Bonzini
In-Reply-To: <20200220130548.29974-1-philmd@redhat.com>
As we are only dealing with a blob buffer, use a void pointer
argument. This will let us simplify other APIs.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
include/exec/memory.h | 12 ++++++------
exec.c | 11 ++++++-----
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 6f8084f45e..afee185eae 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -2052,7 +2052,7 @@ void address_space_remove_listeners(AddressSpace *as);
* @is_write: indicates the transfer direction
*/
MemTxResult address_space_rw(AddressSpace *as, hwaddr addr,
- MemTxAttrs attrs, uint8_t *buf,
+ MemTxAttrs attrs, void *buf,
hwaddr len, bool is_write);
/**
@@ -2070,7 +2070,7 @@ MemTxResult address_space_rw(AddressSpace *as, hwaddr addr,
*/
MemTxResult address_space_write(AddressSpace *as, hwaddr addr,
MemTxAttrs attrs,
- const uint8_t *buf, hwaddr len);
+ const void *buf, hwaddr len);
/**
* address_space_write_rom: write to address space, including ROM.
@@ -2096,7 +2096,7 @@ MemTxResult address_space_write(AddressSpace *as, hwaddr addr,
*/
MemTxResult address_space_write_rom(AddressSpace *as, hwaddr addr,
MemTxAttrs attrs,
- const uint8_t *buf, hwaddr len);
+ const void *buf, hwaddr len);
/* address_space_ld*: load from an address space
* address_space_st*: store to an address space
@@ -2334,7 +2334,7 @@ void address_space_unmap(AddressSpace *as, void *buffer, hwaddr len,
/* Internal functions, part of the implementation of address_space_read. */
MemTxResult address_space_read_full(AddressSpace *as, hwaddr addr,
- MemTxAttrs attrs, uint8_t *buf, hwaddr len);
+ MemTxAttrs attrs, void *buf, hwaddr len);
MemTxResult flatview_read_continue(FlatView *fv, hwaddr addr,
MemTxAttrs attrs, void *buf,
hwaddr len, hwaddr addr1, hwaddr l,
@@ -2374,7 +2374,7 @@ static inline bool memory_access_is_direct(MemoryRegion *mr, bool is_write)
*/
static inline __attribute__((__always_inline__))
MemTxResult address_space_read(AddressSpace *as, hwaddr addr,
- MemTxAttrs attrs, uint8_t *buf,
+ MemTxAttrs attrs, void *buf,
hwaddr len)
{
MemTxResult result = MEMTX_OK;
@@ -2433,7 +2433,7 @@ address_space_read_cached(MemoryRegionCache *cache, hwaddr addr,
*/
static inline void
address_space_write_cached(MemoryRegionCache *cache, hwaddr addr,
- void *buf, hwaddr len)
+ const void *buf, hwaddr len)
{
assert(addr < cache->len && len <= cache->len - addr);
if (likely(cache->ptr)) {
diff --git a/exec.c b/exec.c
index 980cc0e2b2..1a80159996 100644
--- a/exec.c
+++ b/exec.c
@@ -3271,7 +3271,7 @@ static MemTxResult flatview_read(FlatView *fv, hwaddr addr,
}
MemTxResult address_space_read_full(AddressSpace *as, hwaddr addr,
- MemTxAttrs attrs, uint8_t *buf, hwaddr len)
+ MemTxAttrs attrs, void *buf, hwaddr len)
{
MemTxResult result = MEMTX_OK;
FlatView *fv;
@@ -3287,7 +3287,7 @@ MemTxResult address_space_read_full(AddressSpace *as, hwaddr addr,
MemTxResult address_space_write(AddressSpace *as, hwaddr addr,
MemTxAttrs attrs,
- const uint8_t *buf, hwaddr len)
+ const void *buf, hwaddr len)
{
MemTxResult result = MEMTX_OK;
FlatView *fv;
@@ -3302,7 +3302,7 @@ MemTxResult address_space_write(AddressSpace *as, hwaddr addr,
}
MemTxResult address_space_rw(AddressSpace *as, hwaddr addr, MemTxAttrs attrs,
- uint8_t *buf, hwaddr len, bool is_write)
+ void *buf, hwaddr len, bool is_write)
{
if (is_write) {
return address_space_write(as, addr, attrs, buf, len);
@@ -3326,7 +3326,7 @@ enum write_rom_type {
static inline MemTxResult address_space_write_rom_internal(AddressSpace *as,
hwaddr addr,
MemTxAttrs attrs,
- const uint8_t *buf,
+ const void *ptr,
hwaddr len,
enum write_rom_type type)
{
@@ -3334,6 +3334,7 @@ static inline MemTxResult address_space_write_rom_internal(AddressSpace *as,
uint8_t *ram_ptr;
hwaddr addr1;
MemoryRegion *mr;
+ const uint8_t *buf = ptr;
RCU_READ_LOCK_GUARD();
while (len > 0) {
@@ -3366,7 +3367,7 @@ static inline MemTxResult address_space_write_rom_internal(AddressSpace *as,
/* used for ROM loading : can write in RAM and ROM */
MemTxResult address_space_write_rom(AddressSpace *as, hwaddr addr,
MemTxAttrs attrs,
- const uint8_t *buf, hwaddr len)
+ const void *buf, hwaddr len)
{
return address_space_write_rom_internal(as, addr, attrs,
buf, len, WRITE_DATA);
--
2.21.1
^ permalink raw reply related
* [Xen-devel] [linux-4.14 bisection] complete test-armhf-armhf-xl-vhd
From: osstest service owner @ 2020-02-20 13:10 UTC (permalink / raw)
To: xen-devel, osstest-admin
branch xen-unstable
xenbranch xen-unstable
job test-armhf-armhf-xl-vhd
testid xen-boot
Tree: linux git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git
Tree: ovmf git://xenbits.xen.org/osstest/ovmf.git
Tree: qemuu git://xenbits.xen.org/qemu-xen.git
Tree: seabios git://xenbits.xen.org/osstest/seabios.git
Tree: xen git://xenbits.xen.org/xen.git
*** Found and reproduced problem changeset ***
Bug is in tree: linux git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Bug introduced: 7b72dc2f100d1fe8e969d645050c8ee64b5dd301
Bug not present: 00843344c6871cde6b8c85bf88bd2197d6eb1da6
Last fail repro: http://logs.test-lab.xenproject.org/osstest/logs/147359/
commit 7b72dc2f100d1fe8e969d645050c8ee64b5dd301
Author: Marek Szyprowski <m.szyprowski@samsung.com>
Date: Thu Sep 6 17:41:35 2018 +0200
ARM: dts: exynos: Disable pull control for S5M8767 PMIC
[ Upstream commit ef2ecab9af5feae97c47b7f61cdd96f7f49b2c23 ]
S5M8767 PMIC interrupt line on Exynos5250-based Arndale board has
external pull-up resistors, so disable any pull control for it in
in controller node. This fixes support for S5M8767 interrupts and
enables operation of wakeup from S5M8767 RTC alarm.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
For bisection revision-tuple graph see:
http://logs.test-lab.xenproject.org/osstest/results/bisect/linux-4.14/test-armhf-armhf-xl-vhd.xen-boot.html
Revision IDs in each graph node refer, respectively, to the Trees above.
----------------------------------------
Running cs-bisection-step --graph-out=/home/logs/results/bisect/linux-4.14/test-armhf-armhf-xl-vhd.xen-boot --summary-out=tmp/147359.bisection-summary --basis-template=142849 --blessings=real,real-bisect linux-4.14 test-armhf-armhf-xl-vhd xen-boot
Searching for failure / basis pass:
147245 fail [host=arndale-lakeside] / 143911 [host=arndale-metrocentre] 143834 [host=arndale-metrocentre] 143610 [host=arndale-metrocentre] 143513 [host=arndale-metrocentre] 143409 [host=arndale-metrocentre] 143327 [host=arndale-metrocentre] 142849 [host=cubietruck-gleizes] 142690 ok.
Failure / basis pass flights: 147245 / 142690
Tree: linux git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git
Tree: ovmf git://xenbits.xen.org/osstest/ovmf.git
Tree: qemuu git://xenbits.xen.org/qemu-xen.git
Tree: seabios git://xenbits.xen.org/osstest/seabios.git
Tree: xen git://xenbits.xen.org/xen.git
Latest 98db2bf27b9ed2d5ed0b6c9c8a4bfcb127a19796 c530a75c1e6a472b0eb9558310b518f0dfcd8860 70911f1f4aee0366b6122f2b90d367ec0f066beb 933ebad2470a169504799a1d95b8e410bd9847ef 76551856b28d227cb0386a1ab0e774329b941f7d 707db77a380b96025bae8bc4322da0b64819d3b7
Basis pass e132c8d7b58d8dc2c1888f5768454550d1f3ea7b c530a75c1e6a472b0eb9558310b518f0dfcd8860 410c4d00d9f7e369d1ce183e9e8de98cb59c4d20 933ebad2470a169504799a1d95b8e410bd9847ef 43f5df79dad6738d52ea79d072de2b56eb96a91f fef8d99fbce1a5e7ddfd22b0f33940b8d6193ec8
Generating revisions with ./adhoc-revtuple-generator git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git#e132c8d7b58d8dc2c1888f5768454550d1f3ea7b-98db2bf27b9ed2d5ed0b6c9c8a4bfcb127a19796 git://xenbits.xen.org/osstest/linux-firmware.git#c530a75c1e6a472b0eb9558310b518f0dfcd8860-c530a75c1e6a472b0eb9558310b518f0dfcd8860 git://xenbits.xen.org/osstest/ovmf.git#410c4d00d9f7e369d1ce183e9e8de98cb59c4d20-70911f1f4aee0366b6122f2b90d367ec0f066beb git://xenbits.xen.org/qemu-xen.git#933ebad\
2470a169504799a1d95b8e410bd9847ef-933ebad2470a169504799a1d95b8e410bd9847ef git://xenbits.xen.org/osstest/seabios.git#43f5df79dad6738d52ea79d072de2b56eb96a91f-76551856b28d227cb0386a1ab0e774329b941f7d git://xenbits.xen.org/xen.git#fef8d99fbce1a5e7ddfd22b0f33940b8d6193ec8-707db77a380b96025bae8bc4322da0b64819d3b7
Use of uninitialized value $parents in array dereference at ./adhoc-revtuple-generator line 465.
Use of uninitialized value in concatenation (.) or string at ./adhoc-revtuple-generator line 465.
Loaded 17819 nodes in revision graph
Searching for test results:
142660 [host=arndale-metrocentre]
142690 pass e132c8d7b58d8dc2c1888f5768454550d1f3ea7b c530a75c1e6a472b0eb9558310b518f0dfcd8860 410c4d00d9f7e369d1ce183e9e8de98cb59c4d20 933ebad2470a169504799a1d95b8e410bd9847ef 43f5df79dad6738d52ea79d072de2b56eb96a91f fef8d99fbce1a5e7ddfd22b0f33940b8d6193ec8
142849 [host=cubietruck-gleizes]
143327 [host=arndale-metrocentre]
143409 [host=arndale-metrocentre]
143517 [host=arndale-metrocentre]
143513 [host=arndale-metrocentre]
143610 [host=arndale-metrocentre]
143834 [host=arndale-metrocentre]
143911 [host=arndale-metrocentre]
146857 fail e0f8b8a65a473a8baa439cf865a694bbeb83fe90 c530a75c1e6a472b0eb9558310b518f0dfcd8860 70911f1f4aee0366b6122f2b90d367ec0f066beb 933ebad2470a169504799a1d95b8e410bd9847ef 76551856b28d227cb0386a1ab0e774329b941f7d 72dbcf0c065037dddb591a072c4f8f16fe888ea8
146905 fail e0f8b8a65a473a8baa439cf865a694bbeb83fe90 c530a75c1e6a472b0eb9558310b518f0dfcd8860 70911f1f4aee0366b6122f2b90d367ec0f066beb 933ebad2470a169504799a1d95b8e410bd9847ef 76551856b28d227cb0386a1ab0e774329b941f7d 72dbcf0c065037dddb591a072c4f8f16fe888ea8
146981 fail e0f8b8a65a473a8baa439cf865a694bbeb83fe90 c530a75c1e6a472b0eb9558310b518f0dfcd8860 70911f1f4aee0366b6122f2b90d367ec0f066beb 933ebad2470a169504799a1d95b8e410bd9847ef 76551856b28d227cb0386a1ab0e774329b941f7d 6c47c37b9b40d6fe40bce8c8fd39135f6d549c8c
147094 fail irrelevant
147038 fail e0f8b8a65a473a8baa439cf865a694bbeb83fe90 c530a75c1e6a472b0eb9558310b518f0dfcd8860 70911f1f4aee0366b6122f2b90d367ec0f066beb 933ebad2470a169504799a1d95b8e410bd9847ef 76551856b28d227cb0386a1ab0e774329b941f7d 6c47c37b9b40d6fe40bce8c8fd39135f6d549c8c
147245 fail 98db2bf27b9ed2d5ed0b6c9c8a4bfcb127a19796 c530a75c1e6a472b0eb9558310b518f0dfcd8860 70911f1f4aee0366b6122f2b90d367ec0f066beb 933ebad2470a169504799a1d95b8e410bd9847ef 76551856b28d227cb0386a1ab0e774329b941f7d 707db77a380b96025bae8bc4322da0b64819d3b7
147166 fail 98db2bf27b9ed2d5ed0b6c9c8a4bfcb127a19796 c530a75c1e6a472b0eb9558310b518f0dfcd8860 70911f1f4aee0366b6122f2b90d367ec0f066beb 933ebad2470a169504799a1d95b8e410bd9847ef 76551856b28d227cb0386a1ab0e774329b941f7d 707db77a380b96025bae8bc4322da0b64819d3b7
147322 pass 15ac253adbeea9463bf3db8e0bbc533b3ec779e0 c530a75c1e6a472b0eb9558310b518f0dfcd8860 e92b155740cdbf10a85ed8f37f69da0991fc8275 933ebad2470a169504799a1d95b8e410bd9847ef 9caa19be0e534c687081fbdfcd301406e728c98c 8c4330818f6ee70cbf7428a40a28a73df1272d10
147313 fail 3cd8af57e0f57098c340657f6870f5614c1230c7 c530a75c1e6a472b0eb9558310b518f0dfcd8860 54a07f8fe088d1fe3b7a6fec76d64ab25cdba656 933ebad2470a169504799a1d95b8e410bd9847ef c9ba5276e3217ac6a1ec772dbebf568ba3a8a55d 7059afb202ff0d82a6fa94f7ef84e4bb3139914e
147268 pass e132c8d7b58d8dc2c1888f5768454550d1f3ea7b c530a75c1e6a472b0eb9558310b518f0dfcd8860 410c4d00d9f7e369d1ce183e9e8de98cb59c4d20 933ebad2470a169504799a1d95b8e410bd9847ef 43f5df79dad6738d52ea79d072de2b56eb96a91f fef8d99fbce1a5e7ddfd22b0f33940b8d6193ec8
147352 pass 00843344c6871cde6b8c85bf88bd2197d6eb1da6 c530a75c1e6a472b0eb9558310b518f0dfcd8860 54a07f8fe088d1fe3b7a6fec76d64ab25cdba656 933ebad2470a169504799a1d95b8e410bd9847ef c9ba5276e3217ac6a1ec772dbebf568ba3a8a55d 7059afb202ff0d82a6fa94f7ef84e4bb3139914e
147306 fail 98db2bf27b9ed2d5ed0b6c9c8a4bfcb127a19796 c530a75c1e6a472b0eb9558310b518f0dfcd8860 70911f1f4aee0366b6122f2b90d367ec0f066beb 933ebad2470a169504799a1d95b8e410bd9847ef 76551856b28d227cb0386a1ab0e774329b941f7d 707db77a380b96025bae8bc4322da0b64819d3b7
147327 pass 3c53714415f4c6cab9c91091c8290c10aac1327c c530a75c1e6a472b0eb9558310b518f0dfcd8860 54a07f8fe088d1fe3b7a6fec76d64ab25cdba656 933ebad2470a169504799a1d95b8e410bd9847ef c9ba5276e3217ac6a1ec772dbebf568ba3a8a55d 7059afb202ff0d82a6fa94f7ef84e4bb3139914e
147317 pass 79fd25943d0fcedd032c0a337c8ff3e01eda999d c530a75c1e6a472b0eb9558310b518f0dfcd8860 1a04951309f807958cf54d38c29796737718e65f 933ebad2470a169504799a1d95b8e410bd9847ef 9caa19be0e534c687081fbdfcd301406e728c98c a458d3bd0d2585275c128556ec0cbd818c6a7b0d
147310 fail bfb9e5c03076a446b1f4f6a523ddc8d723c907a6 c530a75c1e6a472b0eb9558310b518f0dfcd8860 665afccc52e1a02ee329147e02f04b8e9cf1d571 933ebad2470a169504799a1d95b8e410bd9847ef f21b5a4aeb020f2a5e2c6503f906a9349dd2f069 0cd791c499bdc698d14a24050ec56d60b45732e0
147332 fail 32fd94c6dbf7e634ab91818546e12ea7600e157d c530a75c1e6a472b0eb9558310b518f0dfcd8860 54a07f8fe088d1fe3b7a6fec76d64ab25cdba656 933ebad2470a169504799a1d95b8e410bd9847ef c9ba5276e3217ac6a1ec772dbebf568ba3a8a55d 7059afb202ff0d82a6fa94f7ef84e4bb3139914e
147357 pass 00843344c6871cde6b8c85bf88bd2197d6eb1da6 c530a75c1e6a472b0eb9558310b518f0dfcd8860 54a07f8fe088d1fe3b7a6fec76d64ab25cdba656 933ebad2470a169504799a1d95b8e410bd9847ef c9ba5276e3217ac6a1ec772dbebf568ba3a8a55d 7059afb202ff0d82a6fa94f7ef84e4bb3139914e
147329 fail 191e8c8865237fdebc8145a6778721b8696210b3 c530a75c1e6a472b0eb9558310b518f0dfcd8860 54a07f8fe088d1fe3b7a6fec76d64ab25cdba656 933ebad2470a169504799a1d95b8e410bd9847ef c9ba5276e3217ac6a1ec772dbebf568ba3a8a55d 7059afb202ff0d82a6fa94f7ef84e4bb3139914e
147344 pass 00843344c6871cde6b8c85bf88bd2197d6eb1da6 c530a75c1e6a472b0eb9558310b518f0dfcd8860 54a07f8fe088d1fe3b7a6fec76d64ab25cdba656 933ebad2470a169504799a1d95b8e410bd9847ef c9ba5276e3217ac6a1ec772dbebf568ba3a8a55d 7059afb202ff0d82a6fa94f7ef84e4bb3139914e
147336 fail 64590cfd49067ebefdf737ef5df0577aad79001e c530a75c1e6a472b0eb9558310b518f0dfcd8860 54a07f8fe088d1fe3b7a6fec76d64ab25cdba656 933ebad2470a169504799a1d95b8e410bd9847ef c9ba5276e3217ac6a1ec772dbebf568ba3a8a55d 7059afb202ff0d82a6fa94f7ef84e4bb3139914e
147341 fail c0e762da6b0ddaf9437e955faa28712a6f7df283 c530a75c1e6a472b0eb9558310b518f0dfcd8860 54a07f8fe088d1fe3b7a6fec76d64ab25cdba656 933ebad2470a169504799a1d95b8e410bd9847ef c9ba5276e3217ac6a1ec772dbebf568ba3a8a55d 7059afb202ff0d82a6fa94f7ef84e4bb3139914e
147346 fail 1b8331e7dbe2688b59c921a3bf53ec26b5cb2de6 c530a75c1e6a472b0eb9558310b518f0dfcd8860 54a07f8fe088d1fe3b7a6fec76d64ab25cdba656 933ebad2470a169504799a1d95b8e410bd9847ef c9ba5276e3217ac6a1ec772dbebf568ba3a8a55d 7059afb202ff0d82a6fa94f7ef84e4bb3139914e
147351 fail 7b72dc2f100d1fe8e969d645050c8ee64b5dd301 c530a75c1e6a472b0eb9558310b518f0dfcd8860 54a07f8fe088d1fe3b7a6fec76d64ab25cdba656 933ebad2470a169504799a1d95b8e410bd9847ef c9ba5276e3217ac6a1ec772dbebf568ba3a8a55d 7059afb202ff0d82a6fa94f7ef84e4bb3139914e
147353 fail 7b72dc2f100d1fe8e969d645050c8ee64b5dd301 c530a75c1e6a472b0eb9558310b518f0dfcd8860 54a07f8fe088d1fe3b7a6fec76d64ab25cdba656 933ebad2470a169504799a1d95b8e410bd9847ef c9ba5276e3217ac6a1ec772dbebf568ba3a8a55d 7059afb202ff0d82a6fa94f7ef84e4bb3139914e
147359 fail 7b72dc2f100d1fe8e969d645050c8ee64b5dd301 c530a75c1e6a472b0eb9558310b518f0dfcd8860 54a07f8fe088d1fe3b7a6fec76d64ab25cdba656 933ebad2470a169504799a1d95b8e410bd9847ef c9ba5276e3217ac6a1ec772dbebf568ba3a8a55d 7059afb202ff0d82a6fa94f7ef84e4bb3139914e
Searching for interesting versions
Result found: flight 142690 (pass), for basis pass
Result found: flight 147166 (fail), for basis failure
Repro found: flight 147268 (pass), for basis pass
Repro found: flight 147306 (fail), for basis failure
0 revisions at 00843344c6871cde6b8c85bf88bd2197d6eb1da6 c530a75c1e6a472b0eb9558310b518f0dfcd8860 54a07f8fe088d1fe3b7a6fec76d64ab25cdba656 933ebad2470a169504799a1d95b8e410bd9847ef c9ba5276e3217ac6a1ec772dbebf568ba3a8a55d 7059afb202ff0d82a6fa94f7ef84e4bb3139914e
No revisions left to test, checking graph state.
Result found: flight 147344 (pass), for last pass
Result found: flight 147351 (fail), for first failure
Repro found: flight 147352 (pass), for last pass
Repro found: flight 147353 (fail), for first failure
Repro found: flight 147357 (pass), for last pass
Repro found: flight 147359 (fail), for first failure
*** Found and reproduced problem changeset ***
Bug is in tree: linux git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Bug introduced: 7b72dc2f100d1fe8e969d645050c8ee64b5dd301
Bug not present: 00843344c6871cde6b8c85bf88bd2197d6eb1da6
Last fail repro: http://logs.test-lab.xenproject.org/osstest/logs/147359/
commit 7b72dc2f100d1fe8e969d645050c8ee64b5dd301
Author: Marek Szyprowski <m.szyprowski@samsung.com>
Date: Thu Sep 6 17:41:35 2018 +0200
ARM: dts: exynos: Disable pull control for S5M8767 PMIC
[ Upstream commit ef2ecab9af5feae97c47b7f61cdd96f7f49b2c23 ]
S5M8767 PMIC interrupt line on Exynos5250-based Arndale board has
external pull-up resistors, so disable any pull control for it in
in controller node. This fixes support for S5M8767 interrupts and
enables operation of wakeup from S5M8767 RTC alarm.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
dot: graph is too large for cairo-renderer bitmaps. Scaling by 0.148723 to fit
pnmtopng: 27 colors found
Revision graph left in /home/logs/results/bisect/linux-4.14/test-armhf-armhf-xl-vhd.xen-boot.{dot,ps,png,html,svg}.
----------------------------------------
147359: tolerable ALL FAIL
flight 147359 linux-4.14 real-bisect [real]
http://logs.test-lab.xenproject.org/osstest/logs/147359/
Failures :-/ but no regressions.
Tests which did not succeed,
including tests which could not be run:
test-armhf-armhf-xl-vhd 7 xen-boot fail baseline untested
jobs:
test-armhf-armhf-xl-vhd fail
------------------------------------------------------------
sg-report-flight on osstest.test-lab.xenproject.org
logs: /home/logs/logs
images: /home/logs/images
Logs, config files, etc. are available at
http://logs.test-lab.xenproject.org/osstest/logs
Explanation of these reports, and of osstest in general, is at
http://xenbits.xen.org/gitweb/?p=osstest.git;a=blob;f=README.email;hb=master
http://xenbits.xen.org/gitweb/?p=osstest.git;a=blob;f=README;hb=master
Test harness code can be found at
http://xenbits.xen.org/gitweb?p=osstest.git;a=summary
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply
* Re: [PATCH v3 01/20] scripts/git.orderfile: Display Cocci scripts before code modifications
From: Laurent Vivier @ 2020-02-20 13:10 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Peter Maydell, qemu-devel
Cc: Edgar E. Iglesias, Anthony Perard, Fam Zheng,
Hervé Poussineau, kvm, Thomas Huth, Stefan Weil, Eric Auger,
Halil Pasic, Marcel Apfelbaum, qemu-s390x, Aleksandar Rikalo,
David Gibson, Michael Walle, qemu-ppc, Gerd Hoffmann,
Cornelia Huck, qemu-arm, Alistair Francis, qemu-block,
Cédric Le Goater, Jason Wang, xen-devel,
Christian Borntraeger, Dmitry Fleytman, Matthew Rosato,
Eduardo Habkost, Richard Henderson, Michael S. Tsirkin,
David Hildenbrand, Paolo Bonzini, Stefano Stabellini,
Igor Mitsyanko, Paul Durrant, Richard Henderson, John Snow
In-Reply-To: <20200220130548.29974-2-philmd@redhat.com>
On 20/02/2020 14:05, Philippe Mathieu-Daudé wrote:
> When we use a Coccinelle semantic script to do automatic
> code modifications, it makes sense to look at the semantic
> patch first.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> scripts/git.orderfile | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/scripts/git.orderfile b/scripts/git.orderfile
> index 1f747b583a..7cf22e0bf5 100644
> --- a/scripts/git.orderfile
> +++ b/scripts/git.orderfile
> @@ -22,6 +22,9 @@ Makefile*
> qapi/*.json
> qga/*.json
>
> +# semantic patches
> +*.cocci
> +
> # headers
> *.h
>
>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
^ permalink raw reply
* [PATCH v3 08/20] Remove unnecessary cast when using the address_space API
From: Philippe Mathieu-Daudé @ 2020-02-20 13:05 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
Cc: Fam Zheng, Dmitry Fleytman, kvm, Michael S. Tsirkin, Jason Wang,
Gerd Hoffmann, Edgar E. Iglesias, Stefano Stabellini,
Matthew Rosato, qemu-block, David Hildenbrand, Halil Pasic,
Christian Borntraeger, Hervé Poussineau, Anthony Perard,
xen-devel, Aleksandar Rikalo, Richard Henderson,
Philippe Mathieu-Daudé, Laurent Vivier, Thomas Huth,
Eduardo Habkost, Stefan Weil, Alistair Francis, Richard Henderson,
Paul Durrant, Eric Auger, qemu-s390x, qemu-arm,
Cédric Le Goater, John Snow, David Gibson, Igor Mitsyanko,
Cornelia Huck, Michael Walle, qemu-ppc, Paolo Bonzini
In-Reply-To: <20200220130548.29974-1-philmd@redhat.com>
This commit was produced with the included Coccinelle script
scripts/coccinelle/exec_rw_const.
Two lines in hw/net/dp8393x.c that Coccinelle produced that
were over 80 characters were re-wrapped by hand.
Suggested-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
scripts/coccinelle/exec_rw_const.cocci | 15 +++++++++++++-
target/i386/hvf/vmx.h | 2 +-
hw/arm/boot.c | 6 ++----
hw/dma/rc4030.c | 4 ++--
hw/dma/xlnx-zdma.c | 2 +-
hw/net/cadence_gem.c | 21 +++++++++----------
hw/net/dp8393x.c | 28 +++++++++++++-------------
hw/s390x/css.c | 4 ++--
qtest.c | 12 +++++------
target/i386/hvf/x86_mmu.c | 2 +-
target/i386/whpx-all.c | 2 +-
target/s390x/mmu_helper.c | 2 +-
12 files changed, 54 insertions(+), 46 deletions(-)
diff --git a/scripts/coccinelle/exec_rw_const.cocci b/scripts/coccinelle/exec_rw_const.cocci
index 4e459d915b..5ed956a834 100644
--- a/scripts/coccinelle/exec_rw_const.cocci
+++ b/scripts/coccinelle/exec_rw_const.cocci
@@ -17,10 +17,23 @@ expression E1, E2, E3, E4;
// Remove useless cast
@@
-expression E1, E2, E3, E4;
+expression E1, E2, E3, E4, E5, E6;
type T;
@@
(
+- address_space_rw(E1, E2, E3, (T *)E4, E5, E6)
++ address_space_rw(E1, E2, E3, E4, E5, E6)
+|
+- address_space_read(E1, E2, E3, (T *)E4, E5)
++ address_space_read(E1, E2, E3, E4, E5)
+|
+- address_space_write(E1, E2, E3, (T *)E4, E5)
++ address_space_write(E1, E2, E3, E4, E5)
+|
+- address_space_write_rom(E1, E2, E3, (T *)E4, E5)
++ address_space_write_rom(E1, E2, E3, E4, E5)
+|
+
- dma_memory_read(E1, E2, (T *)E3, E4)
+ dma_memory_read(E1, E2, E3, E4)
|
diff --git a/target/i386/hvf/vmx.h b/target/i386/hvf/vmx.h
index eb8894cd58..a115ca1782 100644
--- a/target/i386/hvf/vmx.h
+++ b/target/i386/hvf/vmx.h
@@ -128,7 +128,7 @@ static inline void macvm_set_cr0(hv_vcpuid_t vcpu, uint64_t cr0)
address_space_rw(&address_space_memory,
rvmcs(vcpu, VMCS_GUEST_CR3) & ~0x1f,
MEMTXATTRS_UNSPECIFIED,
- (uint8_t *)pdpte, 32, 0);
+ pdpte, 32, 0);
/* Only set PDPTE when appropriate. */
for (i = 0; i < 4; i++) {
wvmcs(vcpu, VMCS_GUEST_PDPTE0 + i * 2, pdpte[i]);
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index 0c213ca627..fef4072db1 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -327,8 +327,7 @@ static void set_kernel_args(const struct arm_boot_info *info, AddressSpace *as)
cmdline_size = strlen(info->kernel_cmdline);
address_space_write(as, p + 8, MEMTXATTRS_UNSPECIFIED,
- (const uint8_t *)info->kernel_cmdline,
- cmdline_size + 1);
+ info->kernel_cmdline, cmdline_size + 1);
cmdline_size = (cmdline_size >> 2) + 1;
WRITE_WORD(p, cmdline_size + 2);
WRITE_WORD(p, 0x54410009);
@@ -420,8 +419,7 @@ static void set_kernel_args_old(const struct arm_boot_info *info,
}
s = info->kernel_cmdline;
if (s) {
- address_space_write(as, p, MEMTXATTRS_UNSPECIFIED,
- (const uint8_t *)s, strlen(s) + 1);
+ address_space_write(as, p, MEMTXATTRS_UNSPECIFIED, s, strlen(s) + 1);
} else {
WRITE_WORD(p, 0);
}
diff --git a/hw/dma/rc4030.c b/hw/dma/rc4030.c
index c4cf8236f4..ca0becd756 100644
--- a/hw/dma/rc4030.c
+++ b/hw/dma/rc4030.c
@@ -513,8 +513,8 @@ static IOMMUTLBEntry rc4030_dma_translate(IOMMUMemoryRegion *iommu, hwaddr addr,
if (i < s->dma_tl_limit / sizeof(entry)) {
entry_address = (s->dma_tl_base & 0x7fffffff) + i * sizeof(entry);
if (address_space_read(ret.target_as, entry_address,
- MEMTXATTRS_UNSPECIFIED, (unsigned char *)&entry,
- sizeof(entry)) == MEMTX_OK) {
+ MEMTXATTRS_UNSPECIFIED, &entry, sizeof(entry))
+ == MEMTX_OK) {
ret.translated_addr = entry.frame & ~(DMA_PAGESIZE - 1);
ret.perm = IOMMU_RW;
}
diff --git a/hw/dma/xlnx-zdma.c b/hw/dma/xlnx-zdma.c
index 8fb83f5b07..683abbe53f 100644
--- a/hw/dma/xlnx-zdma.c
+++ b/hw/dma/xlnx-zdma.c
@@ -364,7 +364,7 @@ static uint64_t zdma_update_descr_addr(XlnxZDMA *s, bool type,
} else {
addr = zdma_get_regaddr64(s, basereg);
addr += sizeof(s->dsc_dst);
- address_space_rw(s->dma_as, addr, s->attr, (void *) &next, 8, false);
+ address_space_rw(s->dma_as, addr, s->attr, &next, 8, false);
zdma_put_regaddr64(s, basereg, next);
}
return next;
diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c
index 871fcf2031..ddabdb3f90 100644
--- a/hw/net/cadence_gem.c
+++ b/hw/net/cadence_gem.c
@@ -871,7 +871,7 @@ static void gem_get_rx_desc(CadenceGEMState *s, int q)
/* read current descriptor */
address_space_read(&s->dma_as, desc_addr, MEMTXATTRS_UNSPECIFIED,
- (uint8_t *)s->rx_desc[q],
+ s->rx_desc[q],
sizeof(uint32_t) * gem_get_desc_len(s, true));
/* Descriptor owned by software ? */
@@ -1029,9 +1029,8 @@ static ssize_t gem_receive(NetClientState *nc, const uint8_t *buf, size_t size)
/* Descriptor write-back. */
desc_addr = gem_get_rx_desc_addr(s, q);
- address_space_write(&s->dma_as, desc_addr,
- MEMTXATTRS_UNSPECIFIED,
- (uint8_t *)s->rx_desc[q],
+ address_space_write(&s->dma_as, desc_addr, MEMTXATTRS_UNSPECIFIED,
+ s->rx_desc[q],
sizeof(uint32_t) * gem_get_desc_len(s, true));
/* Next descriptor */
@@ -1137,7 +1136,7 @@ static void gem_transmit(CadenceGEMState *s)
DB_PRINT("read descriptor 0x%" HWADDR_PRIx "\n", packet_desc_addr);
address_space_read(&s->dma_as, packet_desc_addr,
- MEMTXATTRS_UNSPECIFIED, (uint8_t *)desc,
+ MEMTXATTRS_UNSPECIFIED, desc,
sizeof(uint32_t) * gem_get_desc_len(s, false));
/* Handle all descriptors owned by hardware */
while (tx_desc_get_used(desc) == 0) {
@@ -1185,14 +1184,12 @@ static void gem_transmit(CadenceGEMState *s)
* the processor.
*/
address_space_read(&s->dma_as, desc_addr,
- MEMTXATTRS_UNSPECIFIED,
- (uint8_t *)desc_first,
+ MEMTXATTRS_UNSPECIFIED, desc_first,
sizeof(desc_first));
tx_desc_set_used(desc_first);
address_space_write(&s->dma_as, desc_addr,
- MEMTXATTRS_UNSPECIFIED,
- (uint8_t *)desc_first,
- sizeof(desc_first));
+ MEMTXATTRS_UNSPECIFIED, desc_first,
+ sizeof(desc_first));
/* Advance the hardware current descriptor past this packet */
if (tx_desc_get_wrap(desc)) {
s->tx_desc_addr[q] = s->regs[GEM_TXQBASE];
@@ -1246,8 +1243,8 @@ static void gem_transmit(CadenceGEMState *s)
}
DB_PRINT("read descriptor 0x%" HWADDR_PRIx "\n", packet_desc_addr);
address_space_read(&s->dma_as, packet_desc_addr,
- MEMTXATTRS_UNSPECIFIED, (uint8_t *)desc,
- sizeof(uint32_t) * gem_get_desc_len(s, false));
+ MEMTXATTRS_UNSPECIFIED, desc,
+ sizeof(uint32_t) * gem_get_desc_len(s, false));
}
if (tx_desc_get_used(desc)) {
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index 580ae4437e..b461101ceb 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -276,7 +276,7 @@ static void dp8393x_do_load_cam(dp8393xState *s)
while (s->regs[SONIC_CDC] & 0x1f) {
/* Fill current entry */
address_space_rw(&s->as, dp8393x_cdp(s),
- MEMTXATTRS_UNSPECIFIED, (uint8_t *)s->data, size, 0);
+ MEMTXATTRS_UNSPECIFIED, s->data, size, 0);
s->cam[index][0] = dp8393x_get(s, width, 1) & 0xff;
s->cam[index][1] = dp8393x_get(s, width, 1) >> 8;
s->cam[index][2] = dp8393x_get(s, width, 2) & 0xff;
@@ -294,7 +294,7 @@ static void dp8393x_do_load_cam(dp8393xState *s)
/* Read CAM enable */
address_space_rw(&s->as, dp8393x_cdp(s),
- MEMTXATTRS_UNSPECIFIED, (uint8_t *)s->data, size, 0);
+ MEMTXATTRS_UNSPECIFIED, s->data, size, 0);
s->regs[SONIC_CE] = dp8393x_get(s, width, 0);
DPRINTF("load cam done. cam enable mask 0x%04x\n", s->regs[SONIC_CE]);
@@ -312,7 +312,7 @@ static void dp8393x_do_read_rra(dp8393xState *s)
width = (s->regs[SONIC_DCR] & SONIC_DCR_DW) ? 2 : 1;
size = sizeof(uint16_t) * 4 * width;
address_space_rw(&s->as, dp8393x_rrp(s),
- MEMTXATTRS_UNSPECIFIED, (uint8_t *)s->data, size, 0);
+ MEMTXATTRS_UNSPECIFIED, s->data, size, 0);
/* Update SONIC registers */
s->regs[SONIC_CRBA0] = dp8393x_get(s, width, 0);
@@ -427,7 +427,7 @@ static void dp8393x_do_transmit_packets(dp8393xState *s)
s->regs[SONIC_TTDA] = s->regs[SONIC_CTDA];
DPRINTF("Transmit packet at %08x\n", dp8393x_ttda(s));
address_space_rw(&s->as, dp8393x_ttda(s) + sizeof(uint16_t) * width,
- MEMTXATTRS_UNSPECIFIED, (uint8_t *)s->data, size, 0);
+ MEMTXATTRS_UNSPECIFIED, s->data, size, 0);
tx_len = 0;
/* Update registers */
@@ -461,7 +461,7 @@ static void dp8393x_do_transmit_packets(dp8393xState *s)
size = sizeof(uint16_t) * 3 * width;
address_space_rw(&s->as,
dp8393x_ttda(s) + sizeof(uint16_t) * (4 + 3 * i) * width,
- MEMTXATTRS_UNSPECIFIED, (uint8_t *)s->data, size, 0);
+ MEMTXATTRS_UNSPECIFIED, s->data, size, 0);
s->regs[SONIC_TSA0] = dp8393x_get(s, width, 0);
s->regs[SONIC_TSA1] = dp8393x_get(s, width, 1);
s->regs[SONIC_TFS] = dp8393x_get(s, width, 2);
@@ -495,17 +495,17 @@ static void dp8393x_do_transmit_packets(dp8393xState *s)
s->regs[SONIC_TCR] & 0x0fff); /* status */
size = sizeof(uint16_t) * width;
address_space_rw(&s->as,
- dp8393x_ttda(s),
- MEMTXATTRS_UNSPECIFIED, (uint8_t *)s->data, size, 1);
+ dp8393x_ttda(s),
+ MEMTXATTRS_UNSPECIFIED, s->data, size, 1);
if (!(s->regs[SONIC_CR] & SONIC_CR_HTX)) {
/* Read footer of packet */
size = sizeof(uint16_t) * width;
address_space_rw(&s->as,
- dp8393x_ttda(s) +
+ dp8393x_ttda(s) +
sizeof(uint16_t) *
(4 + 3 * s->regs[SONIC_TFC]) * width,
- MEMTXATTRS_UNSPECIFIED, (uint8_t *)s->data, size, 0);
+ MEMTXATTRS_UNSPECIFIED, s->data, size, 0);
s->regs[SONIC_CTDA] = dp8393x_get(s, width, 0) & ~0x1;
if (dp8393x_get(s, width, 0) & 0x1) {
/* EOL detected */
@@ -768,7 +768,7 @@ static ssize_t dp8393x_receive(NetClientState *nc, const uint8_t * buf,
size = sizeof(uint16_t) * 1 * width;
address = dp8393x_crda(s) + sizeof(uint16_t) * 5 * width;
address_space_rw(&s->as, address, MEMTXATTRS_UNSPECIFIED,
- (uint8_t *)s->data, size, 0);
+ s->data, size, 0);
if (dp8393x_get(s, width, 0) & 0x1) {
/* Still EOL ; stop reception */
return -1;
@@ -790,7 +790,7 @@ static ssize_t dp8393x_receive(NetClientState *nc, const uint8_t * buf,
address_space_write(&s->as, address, MEMTXATTRS_UNSPECIFIED, buf, rx_len);
address += rx_len;
address_space_rw(&s->as, address,
- MEMTXATTRS_UNSPECIFIED, (uint8_t *)&checksum, 4, 1);
+ MEMTXATTRS_UNSPECIFIED, &checksum, 4, 1);
rx_len += 4;
s->regs[SONIC_CRBA1] = address >> 16;
s->regs[SONIC_CRBA0] = address & 0xffff;
@@ -819,12 +819,12 @@ static ssize_t dp8393x_receive(NetClientState *nc, const uint8_t * buf,
dp8393x_put(s, width, 4, s->regs[SONIC_RSC]); /* seq_no */
size = sizeof(uint16_t) * 5 * width;
address_space_rw(&s->as, dp8393x_crda(s),
- MEMTXATTRS_UNSPECIFIED, (uint8_t *)s->data, size, 1);
+ MEMTXATTRS_UNSPECIFIED, s->data, size, 1);
/* Move to next descriptor */
size = sizeof(uint16_t) * width;
address_space_rw(&s->as, dp8393x_crda(s) + sizeof(uint16_t) * 5 * width,
- MEMTXATTRS_UNSPECIFIED, (uint8_t *)s->data, size, 0);
+ MEMTXATTRS_UNSPECIFIED, s->data, size, 0);
s->regs[SONIC_LLFA] = dp8393x_get(s, width, 0);
if (s->regs[SONIC_LLFA] & 0x1) {
/* EOL detected */
@@ -838,7 +838,7 @@ static ssize_t dp8393x_receive(NetClientState *nc, const uint8_t * buf,
}
s->data[0] = 0;
address_space_rw(&s->as, offset, MEMTXATTRS_UNSPECIFIED,
- (uint8_t *)s->data, sizeof(uint16_t), 1);
+ s->data, sizeof(uint16_t), 1);
s->regs[SONIC_CRDA] = s->regs[SONIC_LLFA];
s->regs[SONIC_ISR] |= SONIC_ISR_PKTRX;
s->regs[SONIC_RSC] = (s->regs[SONIC_RSC] & 0xff00) | (((s->regs[SONIC_RSC] & 0x00ff) + 1) & 0x00ff);
diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index 844caab408..f27f8c45a5 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -875,7 +875,7 @@ static inline int ida_read_next_idaw(CcwDataStream *cds)
return -EINVAL; /* channel program check */
}
ret = address_space_rw(&address_space_memory, idaw_addr,
- MEMTXATTRS_UNSPECIFIED, (void *) &idaw.fmt2,
+ MEMTXATTRS_UNSPECIFIED, &idaw.fmt2,
sizeof(idaw.fmt2), false);
cds->cda = be64_to_cpu(idaw.fmt2);
} else {
@@ -884,7 +884,7 @@ static inline int ida_read_next_idaw(CcwDataStream *cds)
return -EINVAL; /* channel program check */
}
ret = address_space_rw(&address_space_memory, idaw_addr,
- MEMTXATTRS_UNSPECIFIED, (void *) &idaw.fmt1,
+ MEMTXATTRS_UNSPECIFIED, &idaw.fmt1,
sizeof(idaw.fmt1), false);
cds->cda = be64_to_cpu(idaw.fmt1);
if (cds->cda & 0x80000000) {
diff --git a/qtest.c b/qtest.c
index 12432f99cf..65e33b80e3 100644
--- a/qtest.c
+++ b/qtest.c
@@ -435,17 +435,17 @@ static void qtest_process_command(CharBackend *chr, gchar **words)
uint16_t data = value;
tswap16s(&data);
address_space_rw(first_cpu->as, addr, MEMTXATTRS_UNSPECIFIED,
- (uint8_t *) &data, 2, true);
+ &data, 2, true);
} else if (words[0][5] == 'l') {
uint32_t data = value;
tswap32s(&data);
address_space_rw(first_cpu->as, addr, MEMTXATTRS_UNSPECIFIED,
- (uint8_t *) &data, 4, true);
+ &data, 4, true);
} else if (words[0][5] == 'q') {
uint64_t data = value;
tswap64s(&data);
address_space_rw(first_cpu->as, addr, MEMTXATTRS_UNSPECIFIED,
- (uint8_t *) &data, 8, true);
+ &data, 8, true);
}
qtest_send_prefix(chr);
qtest_send(chr, "OK\n");
@@ -469,16 +469,16 @@ static void qtest_process_command(CharBackend *chr, gchar **words)
} else if (words[0][4] == 'w') {
uint16_t data;
address_space_rw(first_cpu->as, addr, MEMTXATTRS_UNSPECIFIED,
- (uint8_t *) &data, 2, false);
+ &data, 2, false);
value = tswap16(data);
} else if (words[0][4] == 'l') {
uint32_t data;
address_space_rw(first_cpu->as, addr, MEMTXATTRS_UNSPECIFIED,
- (uint8_t *) &data, 4, false);
+ &data, 4, false);
value = tswap32(data);
} else if (words[0][4] == 'q') {
address_space_rw(first_cpu->as, addr, MEMTXATTRS_UNSPECIFIED,
- (uint8_t *) &value, 8, false);
+ &value, 8, false);
tswap64s(&value);
}
qtest_send_prefix(chr);
diff --git a/target/i386/hvf/x86_mmu.c b/target/i386/hvf/x86_mmu.c
index d5a0efe718..6a620643c1 100644
--- a/target/i386/hvf/x86_mmu.c
+++ b/target/i386/hvf/x86_mmu.c
@@ -89,7 +89,7 @@ static bool get_pt_entry(struct CPUState *cpu, struct gpt_translation *pt,
index = gpt_entry(pt->gva, level, pae);
address_space_rw(&address_space_memory, gpa + index * pte_size(pae),
- MEMTXATTRS_UNSPECIFIED, (uint8_t *)&pte, pte_size(pae), 0);
+ MEMTXATTRS_UNSPECIFIED, &pte, pte_size(pae), 0);
pt->pte[level - 1] = pte;
diff --git a/target/i386/whpx-all.c b/target/i386/whpx-all.c
index 3ed2aa1892..0a1f244751 100644
--- a/target/i386/whpx-all.c
+++ b/target/i386/whpx-all.c
@@ -540,7 +540,7 @@ static HRESULT CALLBACK whpx_emu_ioport_callback(
{
MemTxAttrs attrs = { 0 };
address_space_rw(&address_space_io, IoAccess->Port, attrs,
- (uint8_t *)&IoAccess->Data, IoAccess->AccessSize,
+ &IoAccess->Data, IoAccess->AccessSize,
IoAccess->Direction);
return S_OK;
}
diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c
index c9f3f34750..0be2f300bb 100644
--- a/target/s390x/mmu_helper.c
+++ b/target/s390x/mmu_helper.c
@@ -106,7 +106,7 @@ static inline bool read_table_entry(CPUS390XState *env, hwaddr gaddr,
* We treat them as absolute addresses and don't wrap them.
*/
if (unlikely(address_space_read(cs->as, gaddr, MEMTXATTRS_UNSPECIFIED,
- (uint8_t *)entry, sizeof(*entry)) !=
+ entry, sizeof(*entry)) !=
MEMTX_OK)) {
return false;
}
--
2.21.1
^ permalink raw reply related
* Re: [patch 1/2] mm, shmem: add thp fault alloc and fallback stats
From: Kirill A. Shutemov @ 2020-02-20 13:12 UTC (permalink / raw)
To: Yang Shi
Cc: David Rientjes, Andrew Morton, Kirill A. Shutemov, Mike Rapoport,
Jeremy Cline, Linux Kernel Mailing List, Linux MM
In-Reply-To: <CAHbLzkq20hzLdYM-EMOfWRqPOr+OQF8uq5yWR=Yb6vQY51LKwg@mail.gmail.com>
On Wed, Feb 19, 2020 at 09:01:23AM -0800, Yang Shi wrote:
> On Tue, Feb 18, 2020 at 7:44 PM David Rientjes <rientjes@google.com> wrote:
> >
> > On Tue, 18 Feb 2020, Yang Shi wrote:
> >
> > > > diff --git a/mm/shmem.c b/mm/shmem.c
> > > > --- a/mm/shmem.c
> > > > +++ b/mm/shmem.c
> > > > @@ -1502,9 +1502,8 @@ static struct page *shmem_alloc_page(gfp_t gfp,
> > > > return page;
> > > > }
> > > >
> > > > -static struct page *shmem_alloc_and_acct_page(gfp_t gfp,
> > > > - struct inode *inode,
> > > > - pgoff_t index, bool huge)
> > > > +static struct page *shmem_alloc_and_acct_page(gfp_t gfp, struct inode *inode,
> > > > + pgoff_t index, bool fault, bool huge)
> > > > {
> > > > struct shmem_inode_info *info = SHMEM_I(inode);
> > > > struct page *page;
> > > > @@ -1518,9 +1517,11 @@ static struct page *shmem_alloc_and_acct_page(gfp_t gfp,
> > > > if (!shmem_inode_acct_block(inode, nr))
> > > > goto failed;
> > > >
> > > > - if (huge)
> > > > + if (huge) {
> > > > page = shmem_alloc_hugepage(gfp, info, index);
> > > > - else
> > > > + if (!page && fault)
> > > > + count_vm_event(THP_FAULT_FALLBACK);
> > > > + } else
> > > > page = shmem_alloc_page(gfp, info, index);
> > > > if (page) {
> > > > __SetPageLocked(page);
> > > > @@ -1832,11 +1833,10 @@ static int shmem_getpage_gfp(struct inode *inode, pgoff_t index,
> > > > }
> > > >
> > > > alloc_huge:
> > > > - page = shmem_alloc_and_acct_page(gfp, inode, index, true);
> > > > + page = shmem_alloc_and_acct_page(gfp, inode, index, vmf, true);
> > > > if (IS_ERR(page)) {
> > > > alloc_nohuge:
> > > > - page = shmem_alloc_and_acct_page(gfp, inode,
> > > > - index, false);
> > > > + page = shmem_alloc_and_acct_page(gfp, inode, index, vmf, false);
> > > > }
> > > > if (IS_ERR(page)) {
> > > > int retry = 5;
> > > > @@ -1871,8 +1871,11 @@ static int shmem_getpage_gfp(struct inode *inode, pgoff_t index,
> > > >
> > > > error = mem_cgroup_try_charge_delay(page, charge_mm, gfp, &memcg,
> > > > PageTransHuge(page));
> > > > - if (error)
> > > > + if (error) {
> > > > + if (vmf && PageTransHuge(page))
> > > > + count_vm_event(THP_FAULT_FALLBACK);
> > > > goto unacct;
> > > > + }
> > > > error = shmem_add_to_page_cache(page, mapping, hindex,
> > > > NULL, gfp & GFP_RECLAIM_MASK);
> > > > if (error) {
> > > > @@ -1883,6 +1886,8 @@ static int shmem_getpage_gfp(struct inode *inode, pgoff_t index,
> > > > mem_cgroup_commit_charge(page, memcg, false,
> > > > PageTransHuge(page));
> > > > lru_cache_add_anon(page);
> > > > + if (vmf && PageTransHuge(page))
> > > > + count_vm_event(THP_FAULT_ALLOC);
> > >
> > > I think shmem THP alloc is accounted to THP_FILE_ALLOC. And it has
> > > been accounted by shmem_add_to_page_cache(). So, it sounds like a
> > > double count.
> > >
> >
> > I think we can choose to either include file allocations into both
> > thp_fault_alloc and thp_fault_fallback or we can exclude them from both of
> > them. I don't think we can account for only one of them.
>
> How's about the 3rd option, adding THP_FILE_FALLBACK.
I like this option.
Problem with THP_FAULT_* is that shmem_getpage_gfp() is called not only
from fault path, but also from syscalls.
--
Kirill A. Shutemov
^ permalink raw reply
* [PATCH v3 12/20] hw/ide: Let the DMAIntFunc prototype use a boolean 'is_write' argument
From: Philippe Mathieu-Daudé @ 2020-02-20 13:05 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
Cc: Fam Zheng, Dmitry Fleytman, kvm, Michael S. Tsirkin, Jason Wang,
Gerd Hoffmann, Edgar E. Iglesias, Stefano Stabellini,
Matthew Rosato, qemu-block, David Hildenbrand, Halil Pasic,
Christian Borntraeger, Hervé Poussineau, Anthony Perard,
xen-devel, Aleksandar Rikalo, Richard Henderson,
Philippe Mathieu-Daudé, Laurent Vivier, Thomas Huth,
Eduardo Habkost, Stefan Weil, Alistair Francis, Richard Henderson,
Paul Durrant, Eric Auger, qemu-s390x, qemu-arm,
Cédric Le Goater, John Snow, David Gibson, Igor Mitsyanko,
Cornelia Huck, Michael Walle, qemu-ppc, Paolo Bonzini
In-Reply-To: <20200220130548.29974-1-philmd@redhat.com>
The 'is_write' argument is either 0 or 1.
Convert it to a boolean type.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
include/hw/ide/internal.h | 2 +-
hw/dma/rc4030.c | 6 +++---
hw/ide/ahci.c | 2 +-
hw/ide/core.c | 2 +-
hw/ide/macio.c | 2 +-
hw/ide/pci.c | 2 +-
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h
index ce766ac485..1bc1fc73e5 100644
--- a/include/hw/ide/internal.h
+++ b/include/hw/ide/internal.h
@@ -322,7 +322,7 @@ typedef void EndTransferFunc(IDEState *);
typedef void DMAStartFunc(IDEDMA *, IDEState *, BlockCompletionFunc *);
typedef void DMAVoidFunc(IDEDMA *);
-typedef int DMAIntFunc(IDEDMA *, int);
+typedef int DMAIntFunc(IDEDMA *, bool);
typedef int32_t DMAInt32Func(IDEDMA *, int32_t len);
typedef void DMAu32Func(IDEDMA *, uint32_t);
typedef void DMAStopFunc(IDEDMA *, bool);
diff --git a/hw/dma/rc4030.c b/hw/dma/rc4030.c
index ca0becd756..21e2c360ac 100644
--- a/hw/dma/rc4030.c
+++ b/hw/dma/rc4030.c
@@ -590,7 +590,7 @@ static const VMStateDescription vmstate_rc4030 = {
};
static void rc4030_do_dma(void *opaque, int n, uint8_t *buf,
- int len, int is_write)
+ int len, bool is_write)
{
rc4030State *s = opaque;
hwaddr dma_addr;
@@ -630,13 +630,13 @@ struct rc4030DMAState {
void rc4030_dma_read(void *dma, uint8_t *buf, int len)
{
rc4030_dma s = dma;
- rc4030_do_dma(s->opaque, s->n, buf, len, 0);
+ rc4030_do_dma(s->opaque, s->n, buf, len, false);
}
void rc4030_dma_write(void *dma, uint8_t *buf, int len)
{
rc4030_dma s = dma;
- rc4030_do_dma(s->opaque, s->n, buf, len, 1);
+ rc4030_do_dma(s->opaque, s->n, buf, len, true);
}
static rc4030_dma *rc4030_allocate_dmas(void *opaque, int n)
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 68264a22e8..13d91e109a 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -1461,7 +1461,7 @@ static void ahci_commit_buf(IDEDMA *dma, uint32_t tx_bytes)
ad->cur_cmd->status = cpu_to_le32(tx_bytes);
}
-static int ahci_dma_rw_buf(IDEDMA *dma, int is_write)
+static int ahci_dma_rw_buf(IDEDMA *dma, bool is_write)
{
AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma);
IDEState *s = &ad->port.ifs[0];
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 80000eb766..689bb36409 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -2570,7 +2570,7 @@ static void ide_init1(IDEBus *bus, int unit)
ide_sector_write_timer_cb, s);
}
-static int ide_nop_int(IDEDMA *dma, int x)
+static int ide_nop_int(IDEDMA *dma, bool is_write)
{
return 0;
}
diff --git a/hw/ide/macio.c b/hw/ide/macio.c
index 7a8470e921..a9f25e5d02 100644
--- a/hw/ide/macio.c
+++ b/hw/ide/macio.c
@@ -376,7 +376,7 @@ static void macio_ide_reset(DeviceState *dev)
ide_bus_reset(&d->bus);
}
-static int ide_nop_int(IDEDMA *dma, int x)
+static int ide_nop_int(IDEDMA *dma, bool is_write)
{
return 0;
}
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index cce1da804d..1a6a287e76 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -181,7 +181,7 @@ static int32_t bmdma_prepare_buf(IDEDMA *dma, int32_t limit)
}
/* return 0 if buffer completed */
-static int bmdma_rw_buf(IDEDMA *dma, int is_write)
+static int bmdma_rw_buf(IDEDMA *dma, bool is_write)
{
BMDMAState *bm = DO_UPCAST(BMDMAState, dma, dma);
IDEState *s = bmdma_active_if(bm);
--
2.21.1
^ permalink raw reply related
* Re: [PATCH v2] net: disable BRIDGE_NETFILTER by default
From: Florian Westphal @ 2020-02-20 13:11 UTC (permalink / raw)
To: rkir; +Cc: davem, kuba, rammuthiah, adelva, lfy, netdev
In-Reply-To: <20200219214006.175275-1-rkir@google.com>
rkir@google.com <rkir@google.com> wrote:
> From: Roman Kiryanov <rkir@google.com>
>
> The description says 'If unsure, say N.' but
> the module is built as M by default (once
> the dependencies are satisfied).
Acked-by: Florian Westphal <fw@strlen.de>
^ permalink raw reply
* [PATCH v3 04/20] exec: Rename ram_ptr variable
From: Philippe Mathieu-Daudé @ 2020-02-20 13:05 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
Cc: Fam Zheng, Dmitry Fleytman, kvm, Michael S. Tsirkin, Jason Wang,
Gerd Hoffmann, Edgar E. Iglesias, Stefano Stabellini,
Matthew Rosato, qemu-block, David Hildenbrand, Halil Pasic,
Christian Borntraeger, Hervé Poussineau, Anthony Perard,
xen-devel, Aleksandar Rikalo, Richard Henderson,
Philippe Mathieu-Daudé, Laurent Vivier, Thomas Huth,
Eduardo Habkost, Stefan Weil, Alistair Francis, Richard Henderson,
Paul Durrant, Eric Auger, qemu-s390x, qemu-arm,
Cédric Le Goater, John Snow, David Gibson, Igor Mitsyanko,
Cornelia Huck, Michael Walle, qemu-ppc, Paolo Bonzini
In-Reply-To: <20200220130548.29974-1-philmd@redhat.com>
As we are going to use a different 'ptr' variable, rename the 'ram
pointer' variable.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
exec.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/exec.c b/exec.c
index 02b4e6ea41..06e386dc72 100644
--- a/exec.c
+++ b/exec.c
@@ -3151,7 +3151,7 @@ static MemTxResult flatview_write_continue(FlatView *fv, hwaddr addr,
hwaddr len, hwaddr addr1,
hwaddr l, MemoryRegion *mr)
{
- uint8_t *ptr;
+ uint8_t *ram_ptr;
uint64_t val;
MemTxResult result = MEMTX_OK;
bool release_lock = false;
@@ -3167,8 +3167,8 @@ static MemTxResult flatview_write_continue(FlatView *fv, hwaddr addr,
size_memop(l), attrs);
} else {
/* RAM case */
- ptr = qemu_ram_ptr_length(mr->ram_block, addr1, &l, false);
- memcpy(ptr, buf, l);
+ ram_ptr = qemu_ram_ptr_length(mr->ram_block, addr1, &l, false);
+ memcpy(ram_ptr, buf, l);
invalidate_and_set_dirty(mr, addr1, l);
}
@@ -3215,7 +3215,7 @@ MemTxResult flatview_read_continue(FlatView *fv, hwaddr addr,
hwaddr len, hwaddr addr1, hwaddr l,
MemoryRegion *mr)
{
- uint8_t *ptr;
+ uint8_t *ram_ptr;
uint64_t val;
MemTxResult result = MEMTX_OK;
bool release_lock = false;
@@ -3230,8 +3230,8 @@ MemTxResult flatview_read_continue(FlatView *fv, hwaddr addr,
stn_he_p(buf, l, val);
} else {
/* RAM case */
- ptr = qemu_ram_ptr_length(mr->ram_block, addr1, &l, false);
- memcpy(buf, ptr, l);
+ ram_ptr = qemu_ram_ptr_length(mr->ram_block, addr1, &l, false);
+ memcpy(buf, ram_ptr, l);
}
if (release_lock) {
@@ -3329,7 +3329,7 @@ static inline MemTxResult address_space_write_rom_internal(AddressSpace *as,
enum write_rom_type type)
{
hwaddr l;
- uint8_t *ptr;
+ uint8_t *ram_ptr;
hwaddr addr1;
MemoryRegion *mr;
@@ -3343,14 +3343,14 @@ static inline MemTxResult address_space_write_rom_internal(AddressSpace *as,
l = memory_access_size(mr, l, addr1);
} else {
/* ROM/RAM case */
- ptr = qemu_map_ram_ptr(mr->ram_block, addr1);
+ ram_ptr = qemu_map_ram_ptr(mr->ram_block, addr1);
switch (type) {
case WRITE_DATA:
- memcpy(ptr, buf, l);
+ memcpy(ram_ptr, buf, l);
invalidate_and_set_dirty(mr, addr1, l);
break;
case FLUSH_CACHE:
- flush_icache_range((uintptr_t)ptr, (uintptr_t)ptr + l);
+ flush_icache_range((uintptr_t)ram_ptr, (uintptr_t)ram_ptr + l);
break;
}
}
--
2.21.1
^ permalink raw reply related
* [igt-dev] [PATCH i-g-t] tools/i915-perf: Fix compiler warning
From: Petri Latvala @ 2020-02-20 13:12 UTC (permalink / raw)
To: igt-dev; +Cc: Petri Latvala
Use flexible array member in the first struct instead of two structs
and a 0-length array so compiler knows we really meant to read and
write past it.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
tools/i915-perf/i915_perf_control.c | 24 +++++++------------
tools/i915-perf/i915_perf_recorder.c | 7 ++++--
tools/i915-perf/i915_perf_recorder_commands.h | 5 +---
3 files changed, 15 insertions(+), 21 deletions(-)
diff --git a/tools/i915-perf/i915_perf_control.c b/tools/i915-perf/i915_perf_control.c
index a8d0d30f..3722f2b1 100644
--- a/tools/i915-perf/i915_perf_control.c
+++ b/tools/i915-perf/i915_perf_control.c
@@ -91,28 +91,22 @@ main(int argc, char *argv[])
if (dump_file[0] == '/') {
uint32_t total_len =
sizeof(struct recorder_command_base) + strlen(dump_file) + 1;
- struct {
- struct recorder_command_base base;
- struct recorder_command_dump dump;
- } *data = malloc(total_len);
+ struct recorder_command_base *data = malloc(total_len);
- data->base.command = RECORDER_COMMAND_DUMP;
- data->base.size = total_len;
- snprintf((char *) data->dump.path, strlen(dump_file) + 1, "%s", dump_file);
+ data->command = RECORDER_COMMAND_DUMP;
+ data->size = total_len;
+ snprintf((char *) data->path, strlen(dump_file) + 1, "%s", dump_file);
fwrite(data, total_len, 1, command_fifo_file);
} else {
char *cwd = get_current_dir_name();
uint32_t path_len = strlen(cwd) + 1 + strlen(dump_file) + 1;
uint32_t total_len = sizeof(struct recorder_command_base) + path_len;
- struct {
- struct recorder_command_base base;
- struct recorder_command_dump dump;
- } *data = malloc(total_len);
-
- data->base.command = RECORDER_COMMAND_DUMP;
- data->base.size = total_len;
- snprintf((char *) data->dump.path, path_len, "%s/%s", cwd, dump_file);
+ struct recorder_command_base *data = malloc(total_len);
+
+ data->command = RECORDER_COMMAND_DUMP;
+ data->size = total_len;
+ snprintf((char *) data->path, path_len, "%s/%s", cwd, dump_file);
fwrite(data, total_len, 1, command_fifo_file);
}
diff --git a/tools/i915-perf/i915_perf_recorder.c b/tools/i915-perf/i915_perf_recorder.c
index 760cabf1..bd477746 100644
--- a/tools/i915-perf/i915_perf_recorder.c
+++ b/tools/i915-perf/i915_perf_recorder.c
@@ -605,12 +605,15 @@ read_command_file(struct recording_context *ctx)
switch (header.command) {
case RECORDER_COMMAND_DUMP: {
uint32_t len = header.size - sizeof(header), offset = 0;
- struct recorder_command_dump *dump = malloc(len);
+ struct recorder_command_base *dump = malloc(sizeof(header) + len);
FILE *file;
+ /* Not really needed since current code only accesses dump->path but for completeness... */
+ memcpy(dump, &header, sizeof(header));
+
while (offset < len &&
((ret = read(ctx->command_fifo_fd,
- (void *) dump + offset, len - offset)) > 0
+ (void *) dump->path + offset, len - offset)) > 0
|| errno == EAGAIN)) {
if (ret > 0)
offset += ret;
diff --git a/tools/i915-perf/i915_perf_recorder_commands.h b/tools/i915-perf/i915_perf_recorder_commands.h
index 4855d80f..5d84ca82 100644
--- a/tools/i915-perf/i915_perf_recorder_commands.h
+++ b/tools/i915-perf/i915_perf_recorder_commands.h
@@ -32,8 +32,5 @@ enum recorder_command {
struct recorder_command_base {
uint32_t command;
uint32_t size;
-};
-
-struct recorder_command_dump {
- uint8_t path[0];
+ uint8_t path[];
};
--
2.20.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related
* [PATCH v3 11/20] hw/ide/internal: Remove unused DMARestartFunc typedef
From: Philippe Mathieu-Daudé @ 2020-02-20 13:05 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
Cc: Fam Zheng, Dmitry Fleytman, kvm, Michael S. Tsirkin, Jason Wang,
Gerd Hoffmann, Edgar E. Iglesias, Stefano Stabellini,
Matthew Rosato, qemu-block, David Hildenbrand, Halil Pasic,
Christian Borntraeger, Hervé Poussineau, Anthony Perard,
xen-devel, Aleksandar Rikalo, Richard Henderson,
Philippe Mathieu-Daudé, Laurent Vivier, Thomas Huth,
Eduardo Habkost, Stefan Weil, Alistair Francis, Richard Henderson,
Paul Durrant, Eric Auger, qemu-s390x, qemu-arm,
Cédric Le Goater, John Snow, David Gibson, Igor Mitsyanko,
Cornelia Huck, Michael Walle, qemu-ppc, Paolo Bonzini
In-Reply-To: <20200220130548.29974-1-philmd@redhat.com>
The IDE DMA restart callback has been removed in commit fe09c7c9f0.
Fixes: fe09c7c9f0
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
include/hw/ide/internal.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h
index 52ec197da0..ce766ac485 100644
--- a/include/hw/ide/internal.h
+++ b/include/hw/ide/internal.h
@@ -326,7 +326,6 @@ typedef int DMAIntFunc(IDEDMA *, int);
typedef int32_t DMAInt32Func(IDEDMA *, int32_t len);
typedef void DMAu32Func(IDEDMA *, uint32_t);
typedef void DMAStopFunc(IDEDMA *, bool);
-typedef void DMARestartFunc(void *, int, RunState);
struct unreported_events {
bool eject_request;
--
2.21.1
^ permalink raw reply related
* Re: [PATCH] mm: Fix possible PMD dirty bit lost in set_pmd_migration_entry()
From: Kirill A. Shutemov @ 2020-02-20 13:13 UTC (permalink / raw)
To: Huang, Ying
Cc: Andrew Morton, linux-mm, linux-kernel, Zi Yan,
Kirill A . Shutemov, Andrea Arcangeli, Michal Hocko,
Vlastimil Babka
In-Reply-To: <20200220075220.2327056-1-ying.huang@intel.com>
On Thu, Feb 20, 2020 at 03:52:20PM +0800, Huang, Ying wrote:
> From: Huang Ying <ying.huang@intel.com>
>
> In set_pmd_migration_entry(), pmdp_invalidate() is used to change PMD
> atomically. But the PMD is read before that with an ordinary memory
> reading. If the THP (transparent huge page) is written between the
> PMD reading and pmdp_invalidate(), the PMD dirty bit may be lost, and
> cause data corruption. The race window is quite small, but still
> possible in theory, so need to be fixed.
>
> The race is fixed via using the return value of pmdp_invalidate() to
> get the original content of PMD, which is a read/modify/write atomic
> operation. So no THP writing can occur in between.
>
> The race has been introduced when the THP migration support is added
> in the commit 616b8371539a ("mm: thp: enable thp migration in generic
> path"). But this fix depends on the commit d52605d7cb30 ("mm: do not
> lose dirty and accessed bits in pmdp_invalidate()"). So it's easy to
> be backported after v4.16. But the race window is really small, so it
> may be fine not to backport the fix at all.
>
> Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
> Cc: Zi Yan <ziy@nvidia.com>
> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Cc: Andrea Arcangeli <aarcange@redhat.com>
> Cc: Michal Hocko <mhocko@kernel.org>
> Cc: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
--
Kirill A. Shutemov
^ permalink raw reply
* Re: [PATCH v3 01/20] scripts/git.orderfile: Display Cocci scripts before code modifications
From: Eric Blake @ 2020-02-20 13:12 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Peter Maydell, qemu-devel
Cc: Fam Zheng, Dmitry Fleytman, kvm, Michael S. Tsirkin, Jason Wang,
Gerd Hoffmann, Edgar E. Iglesias, Stefano Stabellini,
Matthew Rosato, qemu-block, David Hildenbrand, Halil Pasic,
Christian Borntraeger, Hervé Poussineau, Anthony Perard,
xen-devel, Aleksandar Rikalo, Richard Henderson, Laurent Vivier,
Thomas Huth, Eduardo Habkost, Stefan Weil, Alistair Francis,
Richard Henderson, Paul Durrant, Eric Auger, qemu-s390x, qemu-arm,
Cédric Le Goater, John Snow, David Gibson, Igor Mitsyanko,
Cornelia Huck, Michael Walle, qemu-ppc, Paolo Bonzini
In-Reply-To: <20200220130548.29974-2-philmd@redhat.com>
On 2/20/20 7:05 AM, Philippe Mathieu-Daudé wrote:
> When we use a Coccinelle semantic script to do automatic
> code modifications, it makes sense to look at the semantic
> patch first.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> scripts/git.orderfile | 3 +++
> 1 file changed, 3 insertions(+)
Reviewed-by: Eric Blake <eblake@redhat.com>
>
> diff --git a/scripts/git.orderfile b/scripts/git.orderfile
> index 1f747b583a..7cf22e0bf5 100644
> --- a/scripts/git.orderfile
> +++ b/scripts/git.orderfile
> @@ -22,6 +22,9 @@ Makefile*
> qapi/*.json
> qga/*.json
>
> +# semantic patches
> +*.cocci
> +
> # headers
> *.h
>
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
^ permalink raw reply
* Re: [for-next][PATCH 12/26] Documentation: bootconfig: Add a doc for extended boot config
From: Masami Hiramatsu @ 2020-02-20 13:13 UTC (permalink / raw)
To: Markus Elfring
Cc: Steven Rostedt, linux-doc, linux-fsdevel, kernel-janitors,
linux-kernel, Alexey Dobriyan, Andrew Morton,
Arnaldo Carvalho de Melo, Frank Rowand, Greg Kroah-Hartman,
Ingo Molnar, Jiri Olsa, Jonathan Corbet, Linus Torvalds,
Namhyung Kim, Randy Dunlap, Rob Herring, Thomas Gleixner,
Tim Bird, Tom Zanussi
In-Reply-To: <23e371ca-5df8-3ae3-c685-b01c07b55540@web.de>
Hi,
On Thu, 20 Feb 2020 10:10:20 +0100
Markus Elfring <Markus.Elfring@web.de> wrote:
> I wonder about a few details in the added text.
>
>
> …
> > +++ b/Documentation/admin-guide/bootconfig.rst
> …
> > +C onfig File Limitation
>
> How do you think about to omit a space character at the beginning
> of this line?
That was my mistake. I used restructured text extension for vim
which collapsed all sections and use "space" key to expand.
Accidentally, I run into edit mode and hit "space" to expand it.
(it actually expanded but also put a space there and I missed it...)
Anyway, it has been fixed (pointed by Rundy)
> > +Currently the maximum config size size is 32KB …
>
> Would you like to avoid a word duplication here?
Oops, still exist. Thanks!
> > +Note: this is not the number of entries but nodes, an entry must consume
> > +more than 2 nodes (a key-word and a value). …
>
> I find the relevance of the term “nodes” unclear at the moment.
Indeed, "node" is not well defined. What about this?
---
Each key consists of words separated by dot, and value also consists of
values separated by comma. Here, each word and each value is generally
called a "node".
---
>
> Could an other wording be nicer than the abbreviation “a doc for … config”
> in the commit subject?
OK, I'll try next time.
Thank you,
--
Masami Hiramatsu <mhiramat@kernel.org>
^ permalink raw reply
* Re: [Xen-devel] [PATCH v3 01/20] scripts/git.orderfile: Display Cocci scripts before code modifications
From: Eric Blake @ 2020-02-20 13:12 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Peter Maydell, qemu-devel
Cc: Fam Zheng, Dmitry Fleytman, Matthew Rosato, Michael S. Tsirkin,
Jason Wang, Gerd Hoffmann, Edgar E. Iglesias, Stefano Stabellini,
kvm, qemu-block, David Hildenbrand, Halil Pasic,
Christian Borntraeger, Hervé Poussineau, Anthony Perard,
xen-devel, Aleksandar Rikalo, David Gibson, Laurent Vivier,
Thomas Huth, Eduardo Habkost, Stefan Weil, Alistair Francis,
Richard Henderson, Paul Durrant, Eric Auger, qemu-s390x, qemu-arm,
Cédric Le Goater, John Snow, Richard Henderson,
Igor Mitsyanko, Cornelia Huck, Michael Walle, qemu-ppc,
Paolo Bonzini
In-Reply-To: <20200220130548.29974-2-philmd@redhat.com>
On 2/20/20 7:05 AM, Philippe Mathieu-Daudé wrote:
> When we use a Coccinelle semantic script to do automatic
> code modifications, it makes sense to look at the semantic
> patch first.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> scripts/git.orderfile | 3 +++
> 1 file changed, 3 insertions(+)
Reviewed-by: Eric Blake <eblake@redhat.com>
>
> diff --git a/scripts/git.orderfile b/scripts/git.orderfile
> index 1f747b583a..7cf22e0bf5 100644
> --- a/scripts/git.orderfile
> +++ b/scripts/git.orderfile
> @@ -22,6 +22,9 @@ Makefile*
> qapi/*.json
> qga/*.json
>
> +# semantic patches
> +*.cocci
> +
> # headers
> *.h
>
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply
* [PATCH v3 10/20] Remove unnecessary cast when using the cpu_[physical]_memory API
From: Philippe Mathieu-Daudé @ 2020-02-20 13:05 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
Cc: Fam Zheng, Dmitry Fleytman, kvm, Michael S. Tsirkin, Jason Wang,
Gerd Hoffmann, Edgar E. Iglesias, Stefano Stabellini,
Matthew Rosato, qemu-block, David Hildenbrand, Halil Pasic,
Christian Borntraeger, Hervé Poussineau, Anthony Perard,
xen-devel, Aleksandar Rikalo, Richard Henderson,
Philippe Mathieu-Daudé, Laurent Vivier, Thomas Huth,
Eduardo Habkost, Stefan Weil, Alistair Francis, Richard Henderson,
Paul Durrant, Eric Auger, qemu-s390x, qemu-arm,
Cédric Le Goater, John Snow, David Gibson, Igor Mitsyanko,
Cornelia Huck, Michael Walle, qemu-ppc, Paolo Bonzini
In-Reply-To: <20200220130548.29974-1-philmd@redhat.com>
This commit was produced with the included Coccinelle script
scripts/coccinelle/exec_rw_const.
Suggested-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
scripts/coccinelle/exec_rw_const.cocci | 10 ++++++++++
hw/display/omap_lcdc.c | 10 +++++-----
hw/dma/etraxfs_dma.c | 25 ++++++++++---------------
hw/scsi/vmw_pvscsi.c | 8 +++-----
target/i386/hax-all.c | 6 +++---
5 files changed, 31 insertions(+), 28 deletions(-)
diff --git a/scripts/coccinelle/exec_rw_const.cocci b/scripts/coccinelle/exec_rw_const.cocci
index 5ed956a834..70cf52d58e 100644
--- a/scripts/coccinelle/exec_rw_const.cocci
+++ b/scripts/coccinelle/exec_rw_const.cocci
@@ -34,6 +34,16 @@ type T;
+ address_space_write_rom(E1, E2, E3, E4, E5)
|
+- cpu_physical_memory_rw(E1, (T *)E2, E3, E4)
++ cpu_physical_memory_rw(E1, E2, E3, E4)
+|
+- cpu_physical_memory_read(E1, (T *)E2, E3)
++ cpu_physical_memory_read(E1, E2, E3)
+|
+- cpu_physical_memory_write(E1, (T *)E2, E3)
++ cpu_physical_memory_write(E1, E2, E3)
+|
+
- dma_memory_read(E1, E2, (T *)E3, E4)
+ dma_memory_read(E1, E2, E3, E4)
|
diff --git a/hw/display/omap_lcdc.c b/hw/display/omap_lcdc.c
index 6ad13f2e9e..fa4a381db6 100644
--- a/hw/display/omap_lcdc.c
+++ b/hw/display/omap_lcdc.c
@@ -91,9 +91,9 @@ static void omap_update_display(void *opaque)
frame_offset = 0;
if (omap_lcd->plm != 2) {
- cpu_physical_memory_read(omap_lcd->dma->phys_framebuffer[
- omap_lcd->dma->current_frame],
- (void *)omap_lcd->palette, 0x200);
+ cpu_physical_memory_read(
+ omap_lcd->dma->phys_framebuffer[omap_lcd->dma->current_frame],
+ omap_lcd->palette, 0x200);
switch (omap_lcd->palette[0] >> 12 & 7) {
case 3 ... 7:
frame_offset += 0x200;
@@ -244,8 +244,8 @@ static void omap_lcd_update(struct omap_lcd_panel_s *s) {
if (s->plm != 2 && !s->palette_done) {
cpu_physical_memory_read(
- s->dma->phys_framebuffer[s->dma->current_frame],
- (void *)s->palette, 0x200);
+ s->dma->phys_framebuffer[s->dma->current_frame],
+ s->palette, 0x200);
s->palette_done = 1;
omap_lcd_interrupts(s);
}
diff --git a/hw/dma/etraxfs_dma.c b/hw/dma/etraxfs_dma.c
index 47e1c6df12..c4334e87bf 100644
--- a/hw/dma/etraxfs_dma.c
+++ b/hw/dma/etraxfs_dma.c
@@ -225,9 +225,8 @@ static void channel_load_g(struct fs_dma_ctrl *ctrl, int c)
hwaddr addr = channel_reg(ctrl, c, RW_GROUP);
/* Load and decode. FIXME: handle endianness. */
- cpu_physical_memory_read (addr,
- (void *) &ctrl->channels[c].current_g,
- sizeof ctrl->channels[c].current_g);
+ cpu_physical_memory_read(addr, &ctrl->channels[c].current_g,
+ sizeof(ctrl->channels[c].current_g));
}
static void dump_c(int ch, struct dma_descr_context *c)
@@ -257,9 +256,8 @@ static void channel_load_c(struct fs_dma_ctrl *ctrl, int c)
hwaddr addr = channel_reg(ctrl, c, RW_GROUP_DOWN);
/* Load and decode. FIXME: handle endianness. */
- cpu_physical_memory_read (addr,
- (void *) &ctrl->channels[c].current_c,
- sizeof ctrl->channels[c].current_c);
+ cpu_physical_memory_read(addr, &ctrl->channels[c].current_c,
+ sizeof(ctrl->channels[c].current_c));
D(dump_c(c, &ctrl->channels[c].current_c));
/* I guess this should update the current pos. */
@@ -275,9 +273,8 @@ static void channel_load_d(struct fs_dma_ctrl *ctrl, int c)
/* Load and decode. FIXME: handle endianness. */
D(printf("%s ch=%d addr=" TARGET_FMT_plx "\n", __func__, c, addr));
- cpu_physical_memory_read (addr,
- (void *) &ctrl->channels[c].current_d,
- sizeof ctrl->channels[c].current_d);
+ cpu_physical_memory_read(addr, &ctrl->channels[c].current_d,
+ sizeof(ctrl->channels[c].current_d));
D(dump_d(c, &ctrl->channels[c].current_d));
ctrl->channels[c].regs[RW_DATA] = addr;
@@ -290,9 +287,8 @@ static void channel_store_c(struct fs_dma_ctrl *ctrl, int c)
/* Encode and store. FIXME: handle endianness. */
D(printf("%s ch=%d addr=" TARGET_FMT_plx "\n", __func__, c, addr));
D(dump_d(c, &ctrl->channels[c].current_d));
- cpu_physical_memory_write (addr,
- (void *) &ctrl->channels[c].current_c,
- sizeof ctrl->channels[c].current_c);
+ cpu_physical_memory_write(addr, &ctrl->channels[c].current_c,
+ sizeof(ctrl->channels[c].current_c));
}
static void channel_store_d(struct fs_dma_ctrl *ctrl, int c)
@@ -301,9 +297,8 @@ static void channel_store_d(struct fs_dma_ctrl *ctrl, int c)
/* Encode and store. FIXME: handle endianness. */
D(printf("%s ch=%d addr=" TARGET_FMT_plx "\n", __func__, c, addr));
- cpu_physical_memory_write (addr,
- (void *) &ctrl->channels[c].current_d,
- sizeof ctrl->channels[c].current_d);
+ cpu_physical_memory_write(addr, &ctrl->channels[c].current_d,
+ sizeof(ctrl->channels[c].current_d));
}
static inline void channel_stop(struct fs_dma_ctrl *ctrl, int c)
diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c
index e4ee2e6643..c91352cf46 100644
--- a/hw/scsi/vmw_pvscsi.c
+++ b/hw/scsi/vmw_pvscsi.c
@@ -404,8 +404,7 @@ pvscsi_cmp_ring_put(PVSCSIState *s, struct PVSCSIRingCmpDesc *cmp_desc)
cmp_descr_pa = pvscsi_ring_pop_cmp_descr(&s->rings);
trace_pvscsi_cmp_ring_put(cmp_descr_pa);
- cpu_physical_memory_write(cmp_descr_pa, (void *)cmp_desc,
- sizeof(*cmp_desc));
+ cpu_physical_memory_write(cmp_descr_pa, cmp_desc, sizeof(*cmp_desc));
}
static void
@@ -415,8 +414,7 @@ pvscsi_msg_ring_put(PVSCSIState *s, struct PVSCSIRingMsgDesc *msg_desc)
msg_descr_pa = pvscsi_ring_pop_msg_descr(&s->rings);
trace_pvscsi_msg_ring_put(msg_descr_pa);
- cpu_physical_memory_write(msg_descr_pa, (void *)msg_desc,
- sizeof(*msg_desc));
+ cpu_physical_memory_write(msg_descr_pa, msg_desc, sizeof(*msg_desc));
}
static void
@@ -491,7 +489,7 @@ pvscsi_get_next_sg_elem(PVSCSISGState *sg)
{
struct PVSCSISGElement elem;
- cpu_physical_memory_read(sg->elemAddr, (void *)&elem, sizeof(elem));
+ cpu_physical_memory_read(sg->elemAddr, &elem, sizeof(elem));
if ((elem.flags & ~PVSCSI_KNOWN_FLAGS) != 0) {
/*
* There is PVSCSI_SGE_FLAG_CHAIN_ELEMENT flag described in
diff --git a/target/i386/hax-all.c b/target/i386/hax-all.c
index a8b6e5aeb8..a9cc51e6ce 100644
--- a/target/i386/hax-all.c
+++ b/target/i386/hax-all.c
@@ -367,7 +367,7 @@ static int hax_accel_init(MachineState *ms)
static int hax_handle_fastmmio(CPUArchState *env, struct hax_fastmmio *hft)
{
if (hft->direction < 2) {
- cpu_physical_memory_rw(hft->gpa, (uint8_t *) &hft->value, hft->size,
+ cpu_physical_memory_rw(hft->gpa, &hft->value, hft->size,
hft->direction);
} else {
/*
@@ -376,8 +376,8 @@ static int hax_handle_fastmmio(CPUArchState *env, struct hax_fastmmio *hft)
* hft->direction == 2: gpa ==> gpa2
*/
uint64_t value;
- cpu_physical_memory_rw(hft->gpa, (uint8_t *) &value, hft->size, 0);
- cpu_physical_memory_rw(hft->gpa2, (uint8_t *) &value, hft->size, 1);
+ cpu_physical_memory_rw(hft->gpa, &value, hft->size, 0);
+ cpu_physical_memory_rw(hft->gpa2, &value, hft->size, 1);
}
return 0;
--
2.21.1
^ permalink raw reply related
* [LTP] [PATCH v2] syscalls/quotactl07: add regresstion test for Q_XQTUOTARM
From: Xiao Yang @ 2020-02-20 13:13 UTC (permalink / raw)
To: ltp
In-Reply-To: <1575526664-25738-1-git-send-email-xuyang2018.jy@cn.fujitsu.com>
Hi Cyril,
Thank you for pushing it.
Sorry, forgot to review and push the v2 patch.
Thanks,
Xiao Yang
On 2019/12/5 14:17, Yang Xu wrote:
> This is a regresstion test to check Q_XQUOTARM whether has
> quota flags check.
>
> Signed-off-by: Yang Xu<xuyang2018.jy@cn.fujitsu.com>
>
> ---------------------
> 1.Simplify test code
> 2.add comment for invalid_type,
> ---------------------
> ---
> include/lapi/quotactl.h | 4 ++
> runtest/syscalls | 1 +
> testcases/kernel/syscalls/quotactl/.gitignore | 1 +
> .../kernel/syscalls/quotactl/quotactl07.c | 71 +++++++++++++++++++
> 4 files changed, 77 insertions(+)
> create mode 100644 testcases/kernel/syscalls/quotactl/quotactl07.c
>
> diff --git a/include/lapi/quotactl.h b/include/lapi/quotactl.h
> index d3223b863..c1ec9d6e1 100644
> --- a/include/lapi/quotactl.h
> +++ b/include/lapi/quotactl.h
> @@ -59,6 +59,10 @@ struct fs_quota_statv {
> # define PRJQUOTA 2
> #endif
>
> +#ifndef Q_XQUOTARM
> +# define Q_XQUOTARM XQM_CMD(6)
> +#endif
> +
> #ifndef Q_XGETQSTATV
> # define Q_XGETQSTATV XQM_CMD(8)
> #endif
> diff --git a/runtest/syscalls b/runtest/syscalls
> index 15dbd9971..0f75cf3f6 100644
> --- a/runtest/syscalls
> +++ b/runtest/syscalls
> @@ -958,6 +958,7 @@ quotactl03 quotactl03
> quotactl04 quotactl04
> quotactl05 quotactl05
> quotactl06 quotactl06
> +quotactl07 quotactl07
>
> read01 read01
> read02 read02
> diff --git a/testcases/kernel/syscalls/quotactl/.gitignore b/testcases/kernel/syscalls/quotactl/.gitignore
> index 12896d6ad..8d2ef94d9 100644
> --- a/testcases/kernel/syscalls/quotactl/.gitignore
> +++ b/testcases/kernel/syscalls/quotactl/.gitignore
> @@ -4,3 +4,4 @@
> /quotactl04
> /quotactl05
> /quotactl06
> +/quotactl07
> diff --git a/testcases/kernel/syscalls/quotactl/quotactl07.c b/testcases/kernel/syscalls/quotactl/quotactl07.c
> new file mode 100644
> index 000000000..cd9f629ea
> --- /dev/null
> +++ b/testcases/kernel/syscalls/quotactl/quotactl07.c
> @@ -0,0 +1,71 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Copyright (c) 2019 FUJITSU LIMITED. All rights reserved.
> + * Author: Yang Xu<xuyang2018.jy@cn.fujitsu.com>
> + *
> + * This is a regresstion test for kernel commit 3dd4d40b4208
> + * ("xfs: Sanity check flags of Q_XQUOTARM call").
> + */
> +
> +#include "config.h"
> +#include<errno.h>
> +#include<unistd.h>
> +#include<stdio.h>
> +#include<sys/quota.h>
> +#include "lapi/quotactl.h"
> +#include "tst_test.h"
> +
> +#ifdef HAVE_XFS_XQM_H
> +# include<xfs/xqm.h>
> +
> +#define MNTPOINT "mntpoint"
> +
> +static uint32_t qflag_acct = XFS_QUOTA_UDQ_ACCT;
> +static unsigned int valid_type = XFS_USER_QUOTA;
> +/*Include a valid quota type to avoid other EINVAL error*/
> +static unsigned int invalid_type = XFS_GROUP_QUOTA<< 1 | XFS_USER_QUOTA;
> +
> +static void verify_quota(void)
> +{
> + TEST(quotactl(QCMD(Q_XQUOTARM, USRQUOTA), tst_device->dev, 0, (void *)&invalid_type));
> + if (TST_ERR == EINVAL)
> + tst_res(TPASS, "Q_XQUOTARM has quota type check");
> + else
> + tst_res(TFAIL, "Q_XQUOTARM doesn't have quota type check");
> +}
> +
> +static void setup(void)
> +{
> + TEST(quotactl(QCMD(Q_XQUOTAOFF, USRQUOTA), tst_device->dev, 0, (void *)&qflag_acct));
> + if (TST_RET == -1)
> + tst_brk(TBROK | TTERRNO, "quotactl with Q_XQUOTAOFF failed");
> +
> + TEST(quotactl(QCMD(Q_XQUOTARM, USRQUOTA), tst_device->dev, 0, (void *)&valid_type));
> + if (TST_ERR == EINVAL) {
> + tst_res(TCONF, "current system doesn't support Q_XQUOTARM, skip it");
> + return;
> + }
> +}
> +
> +static const char *kconfigs[] = {
> + "CONFIG_XFS_QUOTA",
> + NULL
> +};
> +
> +static struct tst_test test = {
> + .setup = setup,
> + .needs_root = 1,
> + .needs_kconfigs = kconfigs,
> + .test_all = verify_quota,
> + .mount_device = 1,
> + .dev_fs_type = "xfs",
> + .mnt_data = "usrquota",
> + .mntpoint = MNTPOINT,
> + .tags = (const struct tst_tag[]) {
> + {"linux-git", "3dd4d40b4208"},
> + {}
> + }
> +};
> +#else
> + TST_TEST_TCONF("System doesn't have<xfs/xqm.h>");
> +#endif
^ permalink raw reply
* Re: [for-next][PATCH 12/26] Documentation: bootconfig: Add a doc for extended boot config
From: Masami Hiramatsu @ 2020-02-20 13:13 UTC (permalink / raw)
To: Markus Elfring
Cc: Steven Rostedt, linux-doc, linux-fsdevel, kernel-janitors,
linux-kernel, Alexey Dobriyan, Andrew Morton,
Arnaldo Carvalho de Melo, Frank Rowand, Greg Kroah-Hartman,
Ingo Molnar, Jiri Olsa, Jonathan Corbet, Linus Torvalds,
Namhyung Kim, Randy Dunlap, Rob Herring, Thomas Gleixner,
Tim Bird, Tom Zanussi
In-Reply-To: <23e371ca-5df8-3ae3-c685-b01c07b55540@web.de>
Hi,
On Thu, 20 Feb 2020 10:10:20 +0100
Markus Elfring <Markus.Elfring@web.de> wrote:
> I wonder about a few details in the added text.
>
>
> …
> > +++ b/Documentation/admin-guide/bootconfig.rst
> …
> > +C onfig File Limitation
>
> How do you think about to omit a space character at the beginning
> of this line?
That was my mistake. I used restructured text extension for vim
which collapsed all sections and use "space" key to expand.
Accidentally, I run into edit mode and hit "space" to expand it.
(it actually expanded but also put a space there and I missed it...)
Anyway, it has been fixed (pointed by Rundy)
> > +Currently the maximum config size size is 32KB …
>
> Would you like to avoid a word duplication here?
Oops, still exist. Thanks!
> > +Note: this is not the number of entries but nodes, an entry must consume
> > +more than 2 nodes (a key-word and a value). …
>
> I find the relevance of the term “nodes” unclear at the moment.
Indeed, "node" is not well defined. What about this?
---
Each key consists of words separated by dot, and value also consists of
values separated by comma. Here, each word and each value is generally
called a "node".
---
>
> Could an other wording be nicer than the abbreviation “a doc for … config”
> in the commit subject?
OK, I'll try next time.
Thank you,
--
Masami Hiramatsu <mhiramat@kernel.org>
^ permalink raw reply
* Re: [Intel-gfx] [PATCH v17 3/7] drm/i915: Init obj state in intel_atomic_get_old/new_global_obj_state
From: Lisovskiy, Stanislav @ 2020-02-20 13:14 UTC (permalink / raw)
To: intel-gfx@lists.freedesktop.org, jani.nikula@linux.intel.com
In-Reply-To: <87tv3ltos4.fsf@intel.com>
On Thu, 2020-02-20 at 14:40 +0200, Jani Nikula wrote:
> On Thu, 20 Feb 2020, Stanislav Lisovskiy <
> stanislav.lisovskiy@intel.com> wrote:
> > We might be willing to call intel_atomic_get_old_global_obj_state
> > and intel_atomic_get_new_global_obj_state right away, however
> > those are not initializing global obj state as
> > intel_atomic_get_global_obj_state does.
> > Extracted initializing part to separate function and now using this
> > also in intel_atomic_get_old_global_obj_state and
> > intel_atomic_get_new_global_obj_state
> >
> > v2: - Fixed typo in function call
> >
> > Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> > ---
> > drivers/gpu/drm/i915/display/intel_bw.c | 28
> > ++++++++++++++++++++++++-
> > drivers/gpu/drm/i915/display/intel_bw.h | 9 ++++++++
> > 2 files changed, 36 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_bw.c
> > b/drivers/gpu/drm/i915/display/intel_bw.c
> > index 58b264bc318d..ff57277e8880 100644
> > --- a/drivers/gpu/drm/i915/display/intel_bw.c
> > +++ b/drivers/gpu/drm/i915/display/intel_bw.c
> > @@ -374,7 +374,33 @@ static unsigned int intel_bw_data_rate(struct
> > drm_i915_private *dev_priv,
> > return data_rate;
> > }
> >
> > -static struct intel_bw_state *
> > +struct intel_bw_state *
> > +intel_atomic_get_old_bw_state(struct intel_atomic_state *state)
> > +{
> > + struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> > + struct intel_global_state *bw_state;
> > +
> > + bw_state = intel_atomic_get_old_global_obj_state(state,
> > &dev_priv->bw_obj);
> > + if (IS_ERR(bw_state))
> > + return ERR_CAST(bw_state);
> > +
> > + return to_intel_bw_state(bw_state);
> > +}
> > +
> > +struct intel_bw_state *
> > +intel_atomic_get_new_bw_state(struct intel_atomic_state *state)
> > +{
> > + struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> > + struct intel_global_state *bw_state;
> > + bw_state = intel_atomic_get_new_global_obj_state(state,
> > &dev_priv->bw_obj);
> > +
> > + if (IS_ERR(bw_state))
> > + return ERR_CAST(bw_state);
> > +
> > + return to_intel_bw_state(bw_state);
> > +}
> > +
> > +struct intel_bw_state *
> > intel_atomic_get_bw_state(struct intel_atomic_state *state)
> > {
> > struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> > diff --git a/drivers/gpu/drm/i915/display/intel_bw.h
> > b/drivers/gpu/drm/i915/display/intel_bw.h
> > index a8aa7624c5aa..ac004d6f4276 100644
> > --- a/drivers/gpu/drm/i915/display/intel_bw.h
> > +++ b/drivers/gpu/drm/i915/display/intel_bw.h
> > @@ -24,6 +24,15 @@ struct intel_bw_state {
> >
> > #define to_intel_bw_state(x) container_of((x), struct
> > intel_bw_state, base)
> >
> > +struct intel_bw_state *
> > +intel_atomic_get_old_bw_state(struct intel_atomic_state *state);
> > +
> > +struct intel_bw_state *
> > +intel_atomic_get_new_bw_state(struct intel_atomic_state *state);
> > +
> > +struct intel_bw_state *
> > +intel_atomic_get_bw_state(struct intel_atomic_state *state);
> > +
>
> I'm trying to promote a convention that a module foo_bar.[ch] would
> export functions prefixed foo_bar_. Here, intel_bw_* like below.
I'm fine with that. However most of the functions in this file have
intel_atomic_* prefix, so if I now follow this convention it won't be
consistent with current naming in the file.
Anyway if this is now mandatory, will change it. Just will wait now
first if CI doesn't blow up with this series, as I haven't rebased it
for a while..
Stan
>
> BR,
> Jani.
>
>
> > void intel_bw_init_hw(struct drm_i915_private *dev_priv);
> > int intel_bw_init(struct drm_i915_private *dev_priv);
> > int intel_bw_atomic_check(struct intel_atomic_state *state);
>
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
* [PATCH v3 07/20] hw/net: Avoid casting non-const pointer, use address_space_write()
From: Philippe Mathieu-Daudé @ 2020-02-20 13:05 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
Cc: Fam Zheng, Dmitry Fleytman, kvm, Michael S. Tsirkin, Jason Wang,
Gerd Hoffmann, Edgar E. Iglesias, Stefano Stabellini,
Matthew Rosato, qemu-block, David Hildenbrand, Halil Pasic,
Christian Borntraeger, Hervé Poussineau, Anthony Perard,
xen-devel, Aleksandar Rikalo, Richard Henderson,
Philippe Mathieu-Daudé, Laurent Vivier, Thomas Huth,
Eduardo Habkost, Stefan Weil, Alistair Francis, Richard Henderson,
Paul Durrant, Eric Auger, qemu-s390x, qemu-arm,
Cédric Le Goater, John Snow, David Gibson, Igor Mitsyanko,
Cornelia Huck, Michael Walle, qemu-ppc, Paolo Bonzini
In-Reply-To: <20200220130548.29974-1-philmd@redhat.com>
The NetReceive prototype gets a const buffer:
typedef ssize_t (NetReceive)(NetClientState *, const uint8_t *, size_t);
We already have the address_space_write() method to write a const
buffer to an address space. Use it to avoid:
hw/net/i82596.c: In function ‘i82596_receive’:
hw/net/i82596.c:644:54: error: passing argument 4 of ‘address_space_rw’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
This commit was produced with the included Coccinelle script
scripts/coccinelle/exec_rw_const.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
scripts/coccinelle/exec_rw_const.cocci | 14 ++++++++++++++
hw/net/dp8393x.c | 3 +--
hw/net/i82596.c | 4 ++--
3 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/scripts/coccinelle/exec_rw_const.cocci b/scripts/coccinelle/exec_rw_const.cocci
index a0054f009d..4e459d915b 100644
--- a/scripts/coccinelle/exec_rw_const.cocci
+++ b/scripts/coccinelle/exec_rw_const.cocci
@@ -1,6 +1,20 @@
// Usage:
// spatch --sp-file scripts/coccinelle/exec_rw_const.cocci --dir . --in-place
+// Use address_space_write instead of casting to non-const
+@@
+type T;
+const T *V;
+expression E1, E2, E3, E4;
+@@
+(
+- address_space_rw(E1, E2, E3, (T *)V, E4, 1)
++ address_space_write(E1, E2, E3, V, E4)
+|
+- address_space_rw(E1, E2, E3, (void *)V, E4, 1)
++ address_space_write(E1, E2, E3, V, E4)
+)
+
// Remove useless cast
@@
expression E1, E2, E3, E4;
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index a134d431ae..580ae4437e 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -787,8 +787,7 @@ static ssize_t dp8393x_receive(NetClientState *nc, const uint8_t * buf,
/* Put packet into RBA */
DPRINTF("Receive packet at %08x\n", dp8393x_crba(s));
address = dp8393x_crba(s);
- address_space_rw(&s->as, address,
- MEMTXATTRS_UNSPECIFIED, (uint8_t *)buf, rx_len, 1);
+ address_space_write(&s->as, address, MEMTXATTRS_UNSPECIFIED, buf, rx_len);
address += rx_len;
address_space_rw(&s->as, address,
MEMTXATTRS_UNSPECIFIED, (uint8_t *)&checksum, 4, 1);
diff --git a/hw/net/i82596.c b/hw/net/i82596.c
index 3a0e1ec4c0..a292984e06 100644
--- a/hw/net/i82596.c
+++ b/hw/net/i82596.c
@@ -640,8 +640,8 @@ ssize_t i82596_receive(NetClientState *nc, const uint8_t *buf, size_t sz)
}
rba = get_uint32(rbd + 8);
/* printf("rba is 0x%x\n", rba); */
- address_space_rw(&address_space_memory, rba,
- MEMTXATTRS_UNSPECIFIED, (void *)buf, num, 1);
+ address_space_write(&address_space_memory, rba,
+ MEMTXATTRS_UNSPECIFIED, buf, num);
rba += num;
buf += num;
len -= num;
--
2.21.1
^ permalink raw reply related
* Re: [Xen-devel] [PATCH v3 01/20] scripts/git.orderfile: Display Cocci scripts before code modifications
From: Laurent Vivier @ 2020-02-20 13:10 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Peter Maydell, qemu-devel
Cc: Fam Zheng, Dmitry Fleytman, kvm, Michael S. Tsirkin, Jason Wang,
Gerd Hoffmann, Edgar E. Iglesias, Stefano Stabellini,
Matthew Rosato, qemu-block, David Hildenbrand, Halil Pasic,
Christian Borntraeger, Hervé Poussineau, Marcel Apfelbaum,
Anthony Perard, xen-devel, Aleksandar Rikalo, Richard Henderson,
Thomas Huth, Eduardo Habkost, Stefan Weil, Alistair Francis,
Richard Henderson, Paul Durrant, Eric Auger, qemu-s390x, qemu-arm,
Cédric Le Goater, John Snow, David Gibson, Igor Mitsyanko,
Cornelia Huck, Michael Walle, qemu-ppc, Paolo Bonzini
In-Reply-To: <20200220130548.29974-2-philmd@redhat.com>
On 20/02/2020 14:05, Philippe Mathieu-Daudé wrote:
> When we use a Coccinelle semantic script to do automatic
> code modifications, it makes sense to look at the semantic
> patch first.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> scripts/git.orderfile | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/scripts/git.orderfile b/scripts/git.orderfile
> index 1f747b583a..7cf22e0bf5 100644
> --- a/scripts/git.orderfile
> +++ b/scripts/git.orderfile
> @@ -22,6 +22,9 @@ Makefile*
> qapi/*.json
> qga/*.json
>
> +# semantic patches
> +*.cocci
> +
> # headers
> *.h
>
>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply
* [PATCH v3 13/20] hw/virtio: Let virtqueue_map_iovec() use a boolean 'is_write' argument
From: Philippe Mathieu-Daudé @ 2020-02-20 13:05 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
Cc: Fam Zheng, Dmitry Fleytman, kvm, Michael S. Tsirkin, Jason Wang,
Gerd Hoffmann, Edgar E. Iglesias, Stefano Stabellini,
Matthew Rosato, qemu-block, David Hildenbrand, Halil Pasic,
Christian Borntraeger, Hervé Poussineau, Anthony Perard,
xen-devel, Aleksandar Rikalo, Richard Henderson,
Philippe Mathieu-Daudé, Laurent Vivier, Thomas Huth,
Eduardo Habkost, Stefan Weil, Alistair Francis, Richard Henderson,
Paul Durrant, Eric Auger, qemu-s390x, qemu-arm,
Cédric Le Goater, John Snow, David Gibson, Igor Mitsyanko,
Cornelia Huck, Michael Walle, qemu-ppc, Paolo Bonzini
In-Reply-To: <20200220130548.29974-1-philmd@redhat.com>
The 'is_write' argument is either 0 or 1.
Convert it to a boolean type.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/virtio/virtio.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 2c5410e981..9d06dbe3ef 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -1293,7 +1293,7 @@ static void virtqueue_undo_map_desc(unsigned int out_num, unsigned int in_num,
static void virtqueue_map_iovec(VirtIODevice *vdev, struct iovec *sg,
hwaddr *addr, unsigned int num_sg,
- int is_write)
+ bool is_write)
{
unsigned int i;
hwaddr len;
@@ -1317,8 +1317,9 @@ static void virtqueue_map_iovec(VirtIODevice *vdev, struct iovec *sg,
void virtqueue_map(VirtIODevice *vdev, VirtQueueElement *elem)
{
- virtqueue_map_iovec(vdev, elem->in_sg, elem->in_addr, elem->in_num, 1);
- virtqueue_map_iovec(vdev, elem->out_sg, elem->out_addr, elem->out_num, 0);
+ virtqueue_map_iovec(vdev, elem->in_sg, elem->in_addr, elem->in_num, true);
+ virtqueue_map_iovec(vdev, elem->out_sg, elem->out_addr, elem->out_num,
+ false);
}
static void *virtqueue_alloc_element(size_t sz, unsigned out_num, unsigned in_num)
--
2.21.1
^ permalink raw reply related
* [PATCH v5 6/6] doc: board: add rockchip subfolder
From: Bin Meng @ 2020-02-20 13:14 UTC (permalink / raw)
To: u-boot
In-Reply-To: <20200212151433.9713-7-igor.opaniuk@gmail.com>
On Wed, Feb 12, 2020 at 11:14 PM Igor Opaniuk <igor.opaniuk@gmail.com> wrote:
>
> From: Igor Opaniuk <igor.opaniuk@toradex.com>
>
> This fixes a warning when invoking make htmldocs:
> checking consistency...
> doc/board/rockchip/index.rst: WARNING: document isn't included in any toctree
>
> Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>
> doc/board/index.rst | 1 +
> 1 file changed, 1 insertion(+)
>
This patch does not apply as there is one already in the mainline.
Heinrich did the same below, but not sure how he gave a RB tag to this
one as well :)
Will drop this patch.
commit 7d92204bc0eb0a775810f887838a93a218a22f96
Author: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Fri Feb 7 21:25:09 2020 +0100
doc: board: add Rockchip to doc/board/index.rst
Fix a build error
Regards,
Bin
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.