Skip to content

Commit

Permalink
Merge tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu int…
Browse files Browse the repository at this point in the history
…o staging

trivial patches for 2024-02-22

# -----BEGIN PGP SIGNATURE-----
#
# iQFDBAABCAAtFiEEe3O61ovnosKJMUsicBtPaxppPlkFAmXXLtwPHG1qdEB0bHMu
# bXNrLnJ1AAoJEHAbT2saaT5ZKH0H/0qdQXdoc/ZTdAtUPFJGhEc6KMeOO1w9928w
# OSOB7w4dJiKt6I53WtmY9f2+7/CMJHyscV3xlClRaaZeJVFzgwOo8Wjqkmwa8uOw
# Nl5GcL2egBPuY7Ucc1eNIj/I4RbS1pX5vURkUfTG3AH1SEbFAv9Gk6qBtrmer2YA
# hg2DdCskvPd8EOovx3sWQRH+Ra4w3hxaAELS9sa9ZKLBAaYvucYan9IjLaJqSY84
# b441QXu3ht/DpLw6d/HDWUqwYUOJD0HUhPSvba1xCsrzQVXFE7VhR5O/cDrqs2qm
# 2fcMW6j62raPdK1u77WaRdslPy34YUmjk7lwZ8wiS7fmDx0Aqcg=
# =0va1
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 22 Feb 2024 11:24:12 GMT
# gpg:                using RSA key 7B73BAD68BE7A2C289314B22701B4F6B1A693E59
# gpg:                issuer "mjt@tls.msk.ru"
# gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" [full]
# gpg:                 aka "Michael Tokarev <mjt@corpit.ru>" [full]
# gpg:                 aka "Michael Tokarev <mjt@debian.org>" [full]
# Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 8044 65C5
#      Subkey fingerprint: 7B73 BAD6 8BE7 A2C2 8931  4B22 701B 4F6B 1A69 3E59

* tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu: (34 commits)
  system/vl: Update description for input grab key
  docs/system: Update description for input grab key
  hw/hppa/Kconfig: Fix building with "configure --without-default-devices"
  target/sparc: correct typos
  s390x: correct typos
  m68k: correct typos
  hexagon: correct typos
  ci/gitlab-pipeline-status: correct typos
  qemu-options.hx: correct typos
  qapi/ui: correct typos
  pc-bios/README: correct typos
  hw/riscv/virt.h: correct typos
  hw/net/npcm_gmac.h: correct typos
  hw/cxl/cxl_device.h: correct typos
  hw/arm/omap.h: correct typos
  include/exec/memory.h: correct typos
  sh4: correct typos
  ppc: correct typos
  loongson3: correct typos
  accel/tcg: correct typos
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
pm215 committed Feb 22, 2024
2 parents 5cd3ae4 + 1853111 commit 6630bc0
Show file tree
Hide file tree
Showing 46 changed files with 88 additions and 88 deletions.
2 changes: 1 addition & 1 deletion accel/tcg/ldst_atomicity.c.inc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static int required_atomicity(CPUState *cpu, uintptr_t p, MemOp memop)
/*
* Examine the alignment of p to determine if there are subobjects
* that must be aligned. Note that we only really need ctz4() --
* any more sigificant bits are discarded by the immediately
* any more significant bits are discarded by the immediately
* following comparison.
*/
tmp = ctz32(p);
Expand Down
2 changes: 1 addition & 1 deletion docs/devel/ci-jobs.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Set this variable to 1 to create the pipelines, but leave all
the jobs to be manually started from the UI

Set this variable to 2 to create the pipelines and run all
the jobs immediately, as was historicaly behaviour
the jobs immediately, as was the historical behaviour

QEMU_CI_AVOCADO_TESTING
~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion docs/devel/docs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ are processed in two ways:

The syntax of these ``.hx`` files is simple. It is broadly an
alternation of C code put into the C output and rST format text
put into the documention. A few special directives are recognised;
put into the documentation. A few special directives are recognised;
these are all-caps and must be at the beginning of the line.

``HXCOMM`` is the comment marker. The line, including any arbitrary
Expand Down
2 changes: 1 addition & 1 deletion docs/devel/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ For example to setup the HPPA ports builds of Debian::
EXECUTABLE=(pwd)/qemu-hppa V=1

The ``DEB_`` variables are substitutions used by
``debian-boostrap.pre`` which is called to do the initial debootstrap
``debian-bootstrap.pre`` which is called to do the initial debootstrap
of the rootfs before it is copied into the container. The second stage
is run as part of the build. The final image will be tagged as
``qemu/debian-sid-hppa``.
Expand Down
2 changes: 1 addition & 1 deletion docs/interop/prl-xml.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Each Image element has following child elements:
* Type - image type of the element. It can be:
"Plain" for raw files.
"Compressed" for expanding disks.
* File - path to image file. Path can be relative to DiskDecriptor.xml or
* File - path to image file. Path can be relative to DiskDescriptor.xml or
absolute.

== Snapshots element ==
Expand Down
2 changes: 1 addition & 1 deletion docs/interop/vhost-user.rst
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ When reconnecting:

#. If ``d.flags`` is not equal to the calculated flags value (means
back-end has submitted the buffer to guest driver before crash, so
it has to commit the in-progres update), set ``old_free_head``,
it has to commit the in-progress update), set ``old_free_head``,
``old_used_idx``, ``old_used_wrap_counter`` to ``free_head``,
``used_idx``, ``used_wrap_counter``

Expand Down
2 changes: 1 addition & 1 deletion docs/system/devices/canokey.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ CanoKey [1]_ is an open-source secure key with supports of
All these platform-independent features are in canokey-core [3]_.

For different platforms, CanoKey has different implementations,
including both hardware implementions and virtual cards:
including both hardware implementations and virtual cards:

* CanoKey STM32 [4]_
* CanoKey Pigeon [5]_
Expand Down
2 changes: 1 addition & 1 deletion docs/system/keys.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Ctrl-Alt-n
*3*
Serial port

Ctrl-Alt
Ctrl-Alt-g
Toggle mouse and keyboard grab.

In the virtual consoles, you can use Ctrl-Up, Ctrl-Down, Ctrl-PageUp and
Expand Down
4 changes: 2 additions & 2 deletions hw/acpi/cpu_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#include "hw/acpi/cpu_hotplug.h"
#include "qapi/error.h"
#include "hw/core/cpu.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
#include "hw/i386/x86.h"
#include "hw/pci/pci_device.h"
#include "qemu/error-report.h"

#define CPU_EJECT_METHOD "CPEJ"
Expand Down
2 changes: 2 additions & 0 deletions hw/hppa/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ config HPPA_B160L
select DINO
select LASI
select SERIAL
select SERIAL_PCI
select ISA_BUS
select I8259
select IDE_CMD646
Expand All @@ -16,3 +17,4 @@ config HPPA_B160L
select LASIPS2
select PARALLEL
select ARTIST
select USB_OHCI_PCI
1 change: 0 additions & 1 deletion hw/i386/acpi-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "hw/acpi/acpi.h"
#include "hw/acpi/aml-build.h"
#include "hw/acpi/utils.h"
#include "hw/i386/pc.h"
#include "target/i386/cpu.h"

#include "acpi-build.h"
Expand Down
3 changes: 3 additions & 0 deletions hw/i386/acpi-common.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
#ifndef HW_I386_ACPI_COMMON_H
#define HW_I386_ACPI_COMMON_H

#include "hw/boards.h"
#include "hw/acpi/bios-linker-loader.h"
#include "hw/i386/x86.h"

/* Default IOAPIC ID */
#define ACPI_BUILD_IOAPIC_ID 0x0

void pc_madt_cpu_entry(int uid, const CPUArchIdList *apic_ids,
GArray *entry, bool force_enabled);
void acpi_build_madt(GArray *table_data, BIOSLinker *linker,
X86MachineState *x86ms,
const char *oem_id, const char *oem_table_id);
Expand Down
2 changes: 1 addition & 1 deletion hw/i386/kvm/ioapic.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void kvm_pc_setup_irq_routing(bool pci_enabled)
kvm_irqchip_add_irq_route(s, i, KVM_IRQCHIP_PIC_SLAVE, i - 8);
}
if (pci_enabled) {
for (i = 0; i < 24; ++i) {
for (i = 0; i < KVM_IOAPIC_NUM_PINS; ++i) {
if (i == 0) {
kvm_irqchip_add_irq_route(s, i, KVM_IRQCHIP_IOAPIC, 2);
} else if (i != 2) {
Expand Down
1 change: 1 addition & 0 deletions hw/i386/port92.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "sysemu/runstate.h"
#include "migration/vmstate.h"
#include "hw/irq.h"
#include "hw/isa/isa.h"
#include "hw/i386/pc.h"
#include "trace.h"
#include "qom/object.h"
Expand Down
1 change: 0 additions & 1 deletion hw/isa/lpc_ich9.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include "hw/isa/apm.h"
#include "hw/pci/pci.h"
#include "hw/southbridge/ich9.h"
#include "hw/i386/pc.h"
#include "hw/acpi/acpi.h"
#include "hw/acpi/ich9.h"
#include "hw/pci/pci_bus.h"
Expand Down
4 changes: 2 additions & 2 deletions hw/mips/loongson3_bootp.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
struct efi_memory_map_loongson {
uint16_t vers; /* version of efi_memory_map */
uint32_t nr_map; /* number of memory_maps */
uint32_t mem_freq; /* memory frequence */
uint32_t mem_freq; /* memory frequency */
struct mem_map {
uint32_t node_id; /* node_id which memory attached to */
uint32_t mem_type; /* system memory, pci memory, pci io, etc. */
Expand Down Expand Up @@ -156,7 +156,7 @@ struct board_devices {

struct loongson_special_attribute {
uint16_t vers; /* version of this special */
char special_name[64]; /* special_atribute_name */
char special_name[64]; /* special_attribute_name */
uint32_t loongson_special_type; /* type of special device */
/* for each device's resource */
struct resource_loongson resource[MAX_RESOURCE_NUMBER];
Expand Down
2 changes: 1 addition & 1 deletion hw/sh4/sh7750_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@


/*
* Exeption-related registers
* Exception-related registers
*/

/* Immediate data for TRAPA instruction - TRA */
Expand Down
1 change: 0 additions & 1 deletion hw/timer/hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
*/

#include "qemu/osdep.h"
#include "hw/i386/pc.h"
#include "hw/irq.h"
#include "qapi/error.h"
#include "qemu/error-report.h"
Expand Down
2 changes: 1 addition & 1 deletion hw/usb/hcd-ehci-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static void usb_ehci_pci_init(Object *obj)
s->capsbase = 0x00;
s->opregbase = 0x20;
s->portscbase = 0x44;
s->portnr = NB_PORTS;
s->portnr = EHCI_PORTS;

if (!dc->hotpluggable) {
s->companion_enable = true;
Expand Down
2 changes: 1 addition & 1 deletion hw/usb/hcd-ehci-sysbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static void ehci_sysbus_class_init(ObjectClass *klass, void *data)
SysBusEHCIClass *sec = SYS_BUS_EHCI_CLASS(klass);

sec->portscbase = 0x44;
sec->portnr = NB_PORTS;
sec->portnr = EHCI_PORTS;

dc->realize = usb_ehci_sysbus_realize;
dc->vmsd = &vmstate_ehci_sysbus;
Expand Down
21 changes: 11 additions & 10 deletions hw/usb/hcd-ehci.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,9 +783,9 @@ static void ehci_register_companion(USBBus *bus, USBPort *ports[],
EHCIState *s = container_of(bus, EHCIState, bus);
uint32_t i;

if (firstport + portcount > NB_PORTS) {
if (firstport + portcount > EHCI_PORTS) {
error_setg(errp, "firstport must be between 0 and %u",
NB_PORTS - portcount);
EHCI_PORTS - portcount);
return;
}

Expand Down Expand Up @@ -831,7 +831,7 @@ static USBDevice *ehci_find_device(EHCIState *ehci, uint8_t addr)
USBPort *port;
int i;

for (i = 0; i < NB_PORTS; i++) {
for (i = 0; i < EHCI_PORTS; i++) {
port = &ehci->ports[i];
if (!(ehci->portsc[i] & PORTSC_PED)) {
DPRINTF("Port %d not enabled\n", i);
Expand All @@ -850,15 +850,15 @@ void ehci_reset(void *opaque)
{
EHCIState *s = opaque;
int i;
USBDevice *devs[NB_PORTS];
USBDevice *devs[EHCI_PORTS];

trace_usb_ehci_reset();

/*
* Do the detach before touching portsc, so that it correctly gets send to
* us or to our companion based on PORTSC_POWNER before the reset.
*/
for(i = 0; i < NB_PORTS; i++) {
for(i = 0; i < EHCI_PORTS; i++) {
devs[i] = s->ports[i].dev;
if (devs[i] && devs[i]->attached) {
usb_detach(&s->ports[i]);
Expand All @@ -877,7 +877,7 @@ void ehci_reset(void *opaque)
s->astate = EST_INACTIVE;
s->pstate = EST_INACTIVE;

for(i = 0; i < NB_PORTS; i++) {
for(i = 0; i < EHCI_PORTS; i++) {
if (s->companion_ports[i]) {
s->portsc[i] = PORTSC_POWNER | PORTSC_PPOWER;
} else {
Expand Down Expand Up @@ -1086,8 +1086,9 @@ static void ehci_opreg_write(void *ptr, hwaddr addr,
case CONFIGFLAG:
val &= 0x1;
if (val) {
for(i = 0; i < NB_PORTS; i++)
for (i = 0; i < EHCI_PORTS; i++) {
handle_port_owner_write(s, i, 0);
}
}
break;

Expand Down Expand Up @@ -2426,7 +2427,7 @@ static int usb_ehci_post_load(void *opaque, int version_id)
EHCIState *s = opaque;
int i;

for (i = 0; i < NB_PORTS; i++) {
for (i = 0; i < EHCI_PORTS; i++) {
USBPort *companion = s->companion_ports[i];
if (companion == NULL) {
continue;
Expand Down Expand Up @@ -2508,9 +2509,9 @@ void usb_ehci_realize(EHCIState *s, DeviceState *dev, Error **errp)
{
int i;

if (s->portnr > NB_PORTS) {
if (s->portnr > EHCI_PORTS) {
error_setg(errp, "Too many ports! Max. port number is %d.",
NB_PORTS);
EHCI_PORTS);
return;
}
if (s->maxframes < 8 || s->maxframes > 512) {
Expand Down
8 changes: 4 additions & 4 deletions hw/usb/hcd-ehci.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#define MMIO_SIZE 0x1000
#define CAPA_SIZE 0x10

#define NB_PORTS 6 /* Max. Number of downstream ports */
#define EHCI_PORTS 6 /* Max. Number of downstream ports */

typedef struct EHCIPacket EHCIPacket;
typedef struct EHCIQueue EHCIQueue;
Expand Down Expand Up @@ -288,7 +288,7 @@ struct EHCIState {
uint32_t configflag;
};
};
uint32_t portsc[NB_PORTS];
uint32_t portsc[EHCI_PORTS];

/*
* Internal states, shadow registers, etc
Expand All @@ -298,8 +298,8 @@ struct EHCIState {
bool working;
uint32_t astate; /* Current state in asynchronous schedule */
uint32_t pstate; /* Current state in periodic schedule */
USBPort ports[NB_PORTS];
USBPort *companion_ports[NB_PORTS];
USBPort ports[EHCI_PORTS];
USBPort *companion_ports[EHCI_PORTS];
uint32_t usbsts_pending;
uint32_t usbsts_frindex;
EHCIQueueHead aqueues;
Expand Down
24 changes: 13 additions & 11 deletions hw/usb/hcd-uhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ static void uhci_reset(DeviceState *dev)
s->fl_base_addr = 0;
s->sof_timing = 64;

for(i = 0; i < NB_PORTS; i++) {
for(i = 0; i < UHCI_PORTS; i++) {
port = &s->ports[i];
port->ctrl = 0x0080;
if (port->port.dev && port->port.dev->attached) {
Expand Down Expand Up @@ -364,7 +364,7 @@ static const VMStateDescription vmstate_uhci = {
.fields = (const VMStateField[]) {
VMSTATE_PCI_DEVICE(dev, UHCIState),
VMSTATE_UINT8_EQUAL(num_ports_vmstate, UHCIState, NULL),
VMSTATE_STRUCT_ARRAY(ports, UHCIState, NB_PORTS, 1,
VMSTATE_STRUCT_ARRAY(ports, UHCIState, UHCI_PORTS, 1,
vmstate_uhci_port, UHCIPort),
VMSTATE_UINT16(cmd, UHCIState),
VMSTATE_UINT16(status, UHCIState),
Expand Down Expand Up @@ -404,7 +404,7 @@ static void uhci_port_write(void *opaque, hwaddr addr,
int i;

/* send reset on the USB bus */
for(i = 0; i < NB_PORTS; i++) {
for(i = 0; i < UHCI_PORTS; i++) {
port = &s->ports[i];
usb_device_reset(port->port.dev);
}
Expand Down Expand Up @@ -457,8 +457,9 @@ static void uhci_port_write(void *opaque, hwaddr addr,
int n;

n = (addr >> 1) & 7;
if (n >= NB_PORTS)
if (n >= UHCI_PORTS) {
return;
}
port = &s->ports[n];
dev = port->port.dev;
if (dev && dev->attached) {
Expand Down Expand Up @@ -513,8 +514,9 @@ static uint64_t uhci_port_read(void *opaque, hwaddr addr, unsigned size)
UHCIPort *port;
int n;
n = (addr >> 1) & 7;
if (n >= NB_PORTS)
if (n >= UHCI_PORTS) {
goto read_default;
}
port = &s->ports[n];
val = port->ctrl;
}
Expand Down Expand Up @@ -607,7 +609,7 @@ static USBDevice *uhci_find_device(UHCIState *s, uint8_t addr)
USBDevice *dev;
int i;

for (i = 0; i < NB_PORTS; i++) {
for (i = 0; i < UHCI_PORTS; i++) {
UHCIPort *port = &s->ports[i];
if (!(port->ctrl & UHCI_PORT_EN)) {
continue;
Expand Down Expand Up @@ -1171,11 +1173,11 @@ void usb_uhci_common_realize(PCIDevice *dev, Error **errp)
s->irq = pci_allocate_irq(dev);

if (s->masterbus) {
USBPort *ports[NB_PORTS];
for(i = 0; i < NB_PORTS; i++) {
USBPort *ports[UHCI_PORTS];
for(i = 0; i < UHCI_PORTS; i++) {
ports[i] = &s->ports[i].port;
}
usb_register_companion(s->masterbus, ports, NB_PORTS,
usb_register_companion(s->masterbus, ports, UHCI_PORTS,
s->firstport, s, &uhci_port_ops,
USB_SPEED_MASK_LOW | USB_SPEED_MASK_FULL,
&err);
Expand All @@ -1185,14 +1187,14 @@ void usb_uhci_common_realize(PCIDevice *dev, Error **errp)
}
} else {
usb_bus_new(&s->bus, sizeof(s->bus), &uhci_bus_ops, DEVICE(dev));
for (i = 0; i < NB_PORTS; i++) {
for (i = 0; i < UHCI_PORTS; i++) {
usb_register_port(&s->bus, &s->ports[i].port, s, i, &uhci_port_ops,
USB_SPEED_MASK_LOW | USB_SPEED_MASK_FULL);
}
}
s->bh = qemu_bh_new_guarded(uhci_bh, s, &DEVICE(dev)->mem_reentrancy_guard);
s->frame_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, uhci_frame_timer, s);
s->num_ports_vmstate = NB_PORTS;
s->num_ports_vmstate = UHCI_PORTS;
QTAILQ_INIT(&s->queues);

memory_region_init_io(&s->io_bar, OBJECT(s), &uhci_ioport_ops, s,
Expand Down

0 comments on commit 6630bc0

Please sign in to comment.