All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-3.1 2/2] acpi: Decouple ACPI hotplug callbacks from HotplugHandler
From: Eduardo Habkost @ 2018-07-23 19:31 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marcel Apfelbaum, Igor Mammedov, Xiao Guangrong, Ben Warren,
	Michael S. Tsirkin
In-Reply-To: <20180723193145.24705-1-ehabkost@redhat.com>

The ACPI hotplug callbacks get a HotplugHandler object as
argument.  This has two problems:

1) The functions require a TYPE_ACPI_DEVICE_IF object, but the
   function prototype doesn't indicate that.  It's possible to
   pass an object that would make the function crash.
2) The function does not require the object to implement
   TYPE_HOTPLUG_HANDLER at all, but the function prototype
   imposes that for no reason.

Change the argument type to AcpiDeviceIf instead of
HotplugHandler.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 include/hw/acpi/cpu.h            |  5 ++---
 include/hw/acpi/cpu_hotplug.h    |  2 +-
 include/hw/acpi/memory_hotplug.h |  4 ++--
 include/hw/acpi/pcihp.h          |  4 ++--
 include/hw/mem/nvdimm.h          |  3 ++-
 hw/acpi/cpu.c                    |  8 ++++----
 hw/acpi/cpu_hotplug.c            |  4 ++--
 hw/acpi/ich9.c                   | 14 ++++++++------
 hw/acpi/memory_hotplug.c         |  8 ++++----
 hw/acpi/nvdimm.c                 |  4 ++--
 hw/acpi/pcihp.c                  |  8 ++++----
 hw/acpi/piix4.c                  | 18 ++++++++++--------
 12 files changed, 43 insertions(+), 39 deletions(-)

diff --git a/include/hw/acpi/cpu.h b/include/hw/acpi/cpu.h
index 89ce172941..3ae6504c24 100644
--- a/include/hw/acpi/cpu.h
+++ b/include/hw/acpi/cpu.h
@@ -15,7 +15,6 @@
 #include "hw/qdev-core.h"
 #include "hw/acpi/acpi.h"
 #include "hw/acpi/aml-build.h"
-#include "hw/hotplug.h"
 
 typedef struct AcpiCpuStatus {
     struct CPUState *cpu;
@@ -34,10 +33,10 @@ typedef struct CPUHotplugState {
     AcpiCpuStatus *devs;
 } CPUHotplugState;
 
-void acpi_cpu_plug_cb(HotplugHandler *hotplug_dev,
+void acpi_cpu_plug_cb(AcpiDeviceIf *acpi_dev,
                       CPUHotplugState *cpu_st, DeviceState *dev, Error **errp);
 
-void acpi_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
+void acpi_cpu_unplug_request_cb(AcpiDeviceIf *acpi_dev,
                                 CPUHotplugState *cpu_st,
                                 DeviceState *dev, Error **errp);
 
diff --git a/include/hw/acpi/cpu_hotplug.h b/include/hw/acpi/cpu_hotplug.h
index 3b932abbbb..8e663b0606 100644
--- a/include/hw/acpi/cpu_hotplug.h
+++ b/include/hw/acpi/cpu_hotplug.h
@@ -25,7 +25,7 @@ typedef struct AcpiCpuHotplug {
     uint8_t sts[ACPI_GPE_PROC_LEN];
 } AcpiCpuHotplug;
 
-void legacy_acpi_cpu_plug_cb(HotplugHandler *hotplug_dev,
+void legacy_acpi_cpu_plug_cb(AcpiDeviceIf *acpi_dev,
                              AcpiCpuHotplug *g, DeviceState *dev, Error **errp);
 
 void legacy_acpi_cpu_hotplug_init(MemoryRegion *parent, Object *owner,
diff --git a/include/hw/acpi/memory_hotplug.h b/include/hw/acpi/memory_hotplug.h
index 77c65765d6..ebd97093dd 100644
--- a/include/hw/acpi/memory_hotplug.h
+++ b/include/hw/acpi/memory_hotplug.h
@@ -31,9 +31,9 @@ typedef struct MemHotplugState {
 void acpi_memory_hotplug_init(MemoryRegion *as, Object *owner,
                               MemHotplugState *state, uint16_t io_base);
 
-void acpi_memory_plug_cb(HotplugHandler *hotplug_dev, MemHotplugState *mem_st,
+void acpi_memory_plug_cb(AcpiDeviceIf *acpi_dev, MemHotplugState *mem_st,
                          DeviceState *dev, Error **errp);
-void acpi_memory_unplug_request_cb(HotplugHandler *hotplug_dev,
+void acpi_memory_unplug_request_cb(AcpiDeviceIf *acpi_dev,
                                    MemHotplugState *mem_st,
                                    DeviceState *dev, Error **errp);
 void acpi_memory_unplug_cb(MemHotplugState *mem_st,
diff --git a/include/hw/acpi/pcihp.h b/include/hw/acpi/pcihp.h
index 8a65f99fc8..bba37b81dc 100644
--- a/include/hw/acpi/pcihp.h
+++ b/include/hw/acpi/pcihp.h
@@ -56,9 +56,9 @@ typedef struct AcpiPciHpState {
 void acpi_pcihp_init(Object *owner, AcpiPciHpState *, PCIBus *root,
                      MemoryRegion *address_space_io, bool bridges_enabled);
 
-void acpi_pcihp_device_plug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
+void acpi_pcihp_device_plug_cb(AcpiDeviceIf *acpi_dev, AcpiPciHpState *s,
                                DeviceState *dev, Error **errp);
-void acpi_pcihp_device_unplug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
+void acpi_pcihp_device_unplug_cb(AcpiDeviceIf *acpi_dev, AcpiPciHpState *s,
                                  DeviceState *dev, Error **errp);
 
 /* Called on reset */
diff --git a/include/hw/mem/nvdimm.h b/include/hw/mem/nvdimm.h
index c5c9b3c7f8..0d80497efe 100644
--- a/include/hw/mem/nvdimm.h
+++ b/include/hw/mem/nvdimm.h
@@ -25,6 +25,7 @@
 
 #include "hw/mem/pc-dimm.h"
 #include "hw/acpi/bios-linker-loader.h"
+#include "hw/acpi/acpi_dev_interface.h"
 
 #define NVDIMM_DEBUG 0
 #define nvdimm_debug(fmt, ...)                                \
@@ -149,5 +150,5 @@ void nvdimm_build_acpi(GArray *table_offsets, GArray *table_data,
                        BIOSLinker *linker, AcpiNVDIMMState *state,
                        uint32_t ram_slots);
 void nvdimm_plug(AcpiNVDIMMState *state);
-void nvdimm_acpi_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev);
+void nvdimm_acpi_plug_cb(AcpiDeviceIf *acpi_dev, DeviceState *dev);
 #endif
diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c
index 2eb9b5a032..71aec1d655 100644
--- a/hw/acpi/cpu.c
+++ b/hw/acpi/cpu.c
@@ -220,7 +220,7 @@ static AcpiCpuStatus *get_cpu_status(CPUHotplugState *cpu_st, DeviceState *dev)
     return NULL;
 }
 
-void acpi_cpu_plug_cb(HotplugHandler *hotplug_dev,
+void acpi_cpu_plug_cb(AcpiDeviceIf *acpi_dev,
                       CPUHotplugState *cpu_st, DeviceState *dev, Error **errp)
 {
     AcpiCpuStatus *cdev;
@@ -233,11 +233,11 @@ void acpi_cpu_plug_cb(HotplugHandler *hotplug_dev,
     cdev->cpu = CPU(dev);
     if (dev->hotplugged) {
         cdev->is_inserting = true;
-        acpi_send_event(ACPI_DEVICE_IF(hotplug_dev), ACPI_CPU_HOTPLUG_STATUS);
+        acpi_send_event(acpi_dev, ACPI_CPU_HOTPLUG_STATUS);
     }
 }
 
-void acpi_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
+void acpi_cpu_unplug_request_cb(AcpiDeviceIf *acpi_dev,
                                 CPUHotplugState *cpu_st,
                                 DeviceState *dev, Error **errp)
 {
@@ -249,7 +249,7 @@ void acpi_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
     }
 
     cdev->is_removing = true;
-    acpi_send_event(ACPI_DEVICE_IF(hotplug_dev), ACPI_CPU_HOTPLUG_STATUS);
+    acpi_send_event(acpi_dev, ACPI_CPU_HOTPLUG_STATUS);
 }
 
 void acpi_cpu_unplug_cb(CPUHotplugState *cpu_st,
diff --git a/hw/acpi/cpu_hotplug.c b/hw/acpi/cpu_hotplug.c
index 5a1599796b..d9277e27de 100644
--- a/hw/acpi/cpu_hotplug.c
+++ b/hw/acpi/cpu_hotplug.c
@@ -72,14 +72,14 @@ static void acpi_set_cpu_present_bit(AcpiCpuHotplug *g, CPUState *cpu,
     g->sts[cpu_id / 8] |= (1 << (cpu_id % 8));
 }
 
-void legacy_acpi_cpu_plug_cb(HotplugHandler *hotplug_dev,
+void legacy_acpi_cpu_plug_cb(AcpiDeviceIf *acpi_dev,
                              AcpiCpuHotplug *g, DeviceState *dev, Error **errp)
 {
     acpi_set_cpu_present_bit(g, CPU(dev), errp);
     if (*errp != NULL) {
         return;
     }
-    acpi_send_event(ACPI_DEVICE_IF(hotplug_dev), ACPI_CPU_HOTPLUG_STATUS);
+    acpi_send_event(acpi_dev, ACPI_CPU_HOTPLUG_STATUS);
 }
 
 void legacy_acpi_cpu_hotplug_init(MemoryRegion *parent, Object *owner,
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index c5d8646abc..c53b8bb508 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -487,20 +487,21 @@ void ich9_pm_device_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
                             Error **errp)
 {
     ICH9LPCState *lpc = ICH9_LPC_DEVICE(hotplug_dev);
+    AcpiDeviceIf *acpi_dev = ACPI_DEVICE_IF(hotplug_dev);
 
     if (lpc->pm.acpi_memory_hotplug.is_enabled &&
         object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) {
         if (object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM)) {
-            nvdimm_acpi_plug_cb(hotplug_dev, dev);
+            nvdimm_acpi_plug_cb(acpi_dev, dev);
         } else {
-            acpi_memory_plug_cb(hotplug_dev, &lpc->pm.acpi_memory_hotplug,
+            acpi_memory_plug_cb(acpi_dev, &lpc->pm.acpi_memory_hotplug,
                                 dev, errp);
         }
     } else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) {
         if (lpc->pm.cpu_hotplug_legacy) {
-            legacy_acpi_cpu_plug_cb(hotplug_dev, &lpc->pm.gpe_cpu, dev, errp);
+            legacy_acpi_cpu_plug_cb(acpi_dev, &lpc->pm.gpe_cpu, dev, errp);
         } else {
-            acpi_cpu_plug_cb(hotplug_dev, &lpc->pm.cpuhp_state, dev, errp);
+            acpi_cpu_plug_cb(acpi_dev, &lpc->pm.cpuhp_state, dev, errp);
         }
     } else {
         error_setg(errp, "acpi: device plug request for not supported device"
@@ -512,15 +513,16 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev,
                                       DeviceState *dev, Error **errp)
 {
     ICH9LPCState *lpc = ICH9_LPC_DEVICE(hotplug_dev);
+    AcpiDeviceIf *acpi_dev = ACPI_DEVICE_IF(hotplug_dev);
 
     if (lpc->pm.acpi_memory_hotplug.is_enabled &&
         object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) {
-        acpi_memory_unplug_request_cb(hotplug_dev,
+        acpi_memory_unplug_request_cb(acpi_dev,
                                       &lpc->pm.acpi_memory_hotplug, dev,
                                       errp);
     } else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU) &&
                !lpc->pm.cpu_hotplug_legacy) {
-        acpi_cpu_unplug_request_cb(hotplug_dev, &lpc->pm.cpuhp_state,
+        acpi_cpu_unplug_request_cb(acpi_dev, &lpc->pm.cpuhp_state,
                                    dev, errp);
     } else {
         error_setg(errp, "acpi: device unplug request for not supported device"
diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
index 24b2aa0301..c0a4c39432 100644
--- a/hw/acpi/memory_hotplug.c
+++ b/hw/acpi/memory_hotplug.c
@@ -261,7 +261,7 @@ acpi_memory_slot_status(MemHotplugState *mem_st,
     return &mem_st->devs[slot];
 }
 
-void acpi_memory_plug_cb(HotplugHandler *hotplug_dev, MemHotplugState *mem_st,
+void acpi_memory_plug_cb(AcpiDeviceIf *acpi_dev, MemHotplugState *mem_st,
                          DeviceState *dev, Error **errp)
 {
     MemStatus *mdev;
@@ -280,11 +280,11 @@ void acpi_memory_plug_cb(HotplugHandler *hotplug_dev, MemHotplugState *mem_st,
     mdev->is_enabled = true;
     if (dev->hotplugged) {
         mdev->is_inserting = true;
-        acpi_send_event(ACPI_DEVICE_IF(hotplug_dev), ACPI_MEMORY_HOTPLUG_STATUS);
+        acpi_send_event(acpi_dev, ACPI_MEMORY_HOTPLUG_STATUS);
     }
 }
 
-void acpi_memory_unplug_request_cb(HotplugHandler *hotplug_dev,
+void acpi_memory_unplug_request_cb(AcpiDeviceIf *acpi_dev,
                                    MemHotplugState *mem_st,
                                    DeviceState *dev, Error **errp)
 {
@@ -296,7 +296,7 @@ void acpi_memory_unplug_request_cb(HotplugHandler *hotplug_dev,
     }
 
     mdev->is_removing = true;
-    acpi_send_event(ACPI_DEVICE_IF(hotplug_dev), ACPI_MEMORY_HOTPLUG_STATUS);
+    acpi_send_event(acpi_dev, ACPI_MEMORY_HOTPLUG_STATUS);
 }
 
 void acpi_memory_unplug_cb(MemHotplugState *mem_st,
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index bdc373696d..b4708dc746 100644
--- a/hw/acpi/nvdimm.c
+++ b/hw/acpi/nvdimm.c
@@ -918,10 +918,10 @@ static const MemoryRegionOps nvdimm_dsm_ops = {
     },
 };
 
-void nvdimm_acpi_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev)
+void nvdimm_acpi_plug_cb(AcpiDeviceIf *acpi_dev, DeviceState *dev)
 {
     if (dev->hotplugged) {
-        acpi_send_event(ACPI_DEVICE_IF(hotplug_dev), ACPI_NVDIMM_HOTPLUG_STATUS);
+        acpi_send_event(acpi_dev, ACPI_NVDIMM_HOTPLUG_STATUS);
     }
 }
 
diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c
index b3bb11dac5..c094d86de3 100644
--- a/hw/acpi/pcihp.c
+++ b/hw/acpi/pcihp.c
@@ -217,7 +217,7 @@ void acpi_pcihp_reset(AcpiPciHpState *s)
     acpi_pcihp_update(s);
 }
 
-void acpi_pcihp_device_plug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
+void acpi_pcihp_device_plug_cb(AcpiDeviceIf *acpi_dev, AcpiPciHpState *s,
                                DeviceState *dev, Error **errp)
 {
     PCIDevice *pdev = PCI_DEVICE(dev);
@@ -237,10 +237,10 @@ void acpi_pcihp_device_plug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
     }
 
     s->acpi_pcihp_pci_status[bsel].up |= (1U << slot);
-    acpi_send_event(ACPI_DEVICE_IF(hotplug_dev), ACPI_PCI_HOTPLUG_STATUS);
+    acpi_send_event(acpi_dev, ACPI_PCI_HOTPLUG_STATUS);
 }
 
-void acpi_pcihp_device_unplug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
+void acpi_pcihp_device_unplug_cb(AcpiDeviceIf *acpi_dev, AcpiPciHpState *s,
                                  DeviceState *dev, Error **errp)
 {
     PCIDevice *pdev = PCI_DEVICE(dev);
@@ -253,7 +253,7 @@ void acpi_pcihp_device_unplug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
     }
 
     s->acpi_pcihp_pci_status[bsel].down |= (1U << slot);
-    acpi_send_event(ACPI_DEVICE_IF(hotplug_dev), ACPI_PCI_HOTPLUG_STATUS);
+    acpi_send_event(acpi_dev, ACPI_PCI_HOTPLUG_STATUS);
 }
 
 static uint64_t pci_read(void *opaque, hwaddr addr, unsigned int size)
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index 6404af5f33..c26c66242f 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -374,22 +374,23 @@ static void piix4_device_plug_cb(HotplugHandler *hotplug_dev,
                                  DeviceState *dev, Error **errp)
 {
     PIIX4PMState *s = PIIX4_PM(hotplug_dev);
+    AcpiDeviceIf *acpi_dev = ACPI_DEVICE_IF(hotplug_dev);
 
     if (s->acpi_memory_hotplug.is_enabled &&
         object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) {
         if (object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM)) {
-            nvdimm_acpi_plug_cb(hotplug_dev, dev);
+            nvdimm_acpi_plug_cb(acpi_dev, dev);
         } else {
-            acpi_memory_plug_cb(hotplug_dev, &s->acpi_memory_hotplug,
+            acpi_memory_plug_cb(acpi_dev, &s->acpi_memory_hotplug,
                                 dev, errp);
         }
     } else if (object_dynamic_cast(OBJECT(dev), TYPE_PCI_DEVICE)) {
-        acpi_pcihp_device_plug_cb(hotplug_dev, &s->acpi_pci_hotplug, dev, errp);
+        acpi_pcihp_device_plug_cb(acpi_dev, &s->acpi_pci_hotplug, dev, errp);
     } else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) {
         if (s->cpu_hotplug_legacy) {
-            legacy_acpi_cpu_plug_cb(hotplug_dev, &s->gpe_cpu, dev, errp);
+            legacy_acpi_cpu_plug_cb(acpi_dev, &s->gpe_cpu, dev, errp);
         } else {
-            acpi_cpu_plug_cb(hotplug_dev, &s->cpuhp_state, dev, errp);
+            acpi_cpu_plug_cb(acpi_dev, &s->cpuhp_state, dev, errp);
         }
     } else {
         error_setg(errp, "acpi: device plug request for not supported device"
@@ -401,17 +402,18 @@ static void piix4_device_unplug_request_cb(HotplugHandler *hotplug_dev,
                                            DeviceState *dev, Error **errp)
 {
     PIIX4PMState *s = PIIX4_PM(hotplug_dev);
+    AcpiDeviceIf *acpi_dev = ACPI_DEVICE_IF(hotplug_dev);
 
     if (s->acpi_memory_hotplug.is_enabled &&
         object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) {
-        acpi_memory_unplug_request_cb(hotplug_dev, &s->acpi_memory_hotplug,
+        acpi_memory_unplug_request_cb(acpi_dev, &s->acpi_memory_hotplug,
                                       dev, errp);
     } else if (object_dynamic_cast(OBJECT(dev), TYPE_PCI_DEVICE)) {
-        acpi_pcihp_device_unplug_cb(hotplug_dev, &s->acpi_pci_hotplug, dev,
+        acpi_pcihp_device_unplug_cb(acpi_dev, &s->acpi_pci_hotplug, dev,
                                     errp);
     } else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU) &&
                !s->cpu_hotplug_legacy) {
-        acpi_cpu_unplug_request_cb(hotplug_dev, &s->cpuhp_state, dev, errp);
+        acpi_cpu_unplug_request_cb(acpi_dev, &s->cpuhp_state, dev, errp);
     } else {
         error_setg(errp, "acpi: device unplug request for not supported device"
                    " type: %s", object_get_typename(OBJECT(dev)));
-- 
2.18.0.rc1.1.g3f1ff2140

^ permalink raw reply related

* [Qemu-devel] [PATCH for-3.1 1/2] acpi: Improve acpi_send_event() type safety
From: Eduardo Habkost @ 2018-07-23 19:31 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marcel Apfelbaum, Igor Mammedov, Xiao Guangrong, Ben Warren,
	Michael S. Tsirkin
In-Reply-To: <20180723193145.24705-1-ehabkost@redhat.com>

acpi_send_event() requires an object that implements
TYPE_ACPI_DEVICE_IF.  Indicate that in the function prototype.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 include/hw/acpi/acpi_dev_interface.h | 2 +-
 hw/acpi/acpi_interface.c             | 5 ++---
 hw/acpi/cpu.c                        | 4 ++--
 hw/acpi/cpu_hotplug.c                | 2 +-
 hw/acpi/memory_hotplug.c             | 4 ++--
 hw/acpi/nvdimm.c                     | 2 +-
 hw/acpi/pcihp.c                      | 4 ++--
 hw/acpi/vmgenid.c                    | 2 +-
 8 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/include/hw/acpi/acpi_dev_interface.h b/include/hw/acpi/acpi_dev_interface.h
index dabf4c4fc9..bab71f9d60 100644
--- a/include/hw/acpi/acpi_dev_interface.h
+++ b/include/hw/acpi/acpi_dev_interface.h
@@ -31,7 +31,7 @@ typedef struct AcpiDeviceIf {
     Object Parent;
 } AcpiDeviceIf;
 
-void acpi_send_event(DeviceState *dev, AcpiEventStatusBits event);
+void acpi_send_event(AcpiDeviceIf *dev, AcpiEventStatusBits event);
 
 /**
  * AcpiDeviceIfClass:
diff --git a/hw/acpi/acpi_interface.c b/hw/acpi/acpi_interface.c
index 6583917b8e..f9b538293e 100644
--- a/hw/acpi/acpi_interface.c
+++ b/hw/acpi/acpi_interface.c
@@ -2,12 +2,11 @@
 #include "hw/acpi/acpi_dev_interface.h"
 #include "qemu/module.h"
 
-void acpi_send_event(DeviceState *dev, AcpiEventStatusBits event)
+void acpi_send_event(AcpiDeviceIf *dev, AcpiEventStatusBits event)
 {
     AcpiDeviceIfClass *adevc = ACPI_DEVICE_IF_GET_CLASS(dev);
     if (adevc->send_event) {
-        AcpiDeviceIf *adev = ACPI_DEVICE_IF(dev);
-        adevc->send_event(adev, event);
+        adevc->send_event(dev, event);
     }
 }
 
diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c
index 5ae595ecbe..2eb9b5a032 100644
--- a/hw/acpi/cpu.c
+++ b/hw/acpi/cpu.c
@@ -233,7 +233,7 @@ void acpi_cpu_plug_cb(HotplugHandler *hotplug_dev,
     cdev->cpu = CPU(dev);
     if (dev->hotplugged) {
         cdev->is_inserting = true;
-        acpi_send_event(DEVICE(hotplug_dev), ACPI_CPU_HOTPLUG_STATUS);
+        acpi_send_event(ACPI_DEVICE_IF(hotplug_dev), ACPI_CPU_HOTPLUG_STATUS);
     }
 }
 
@@ -249,7 +249,7 @@ void acpi_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
     }
 
     cdev->is_removing = true;
-    acpi_send_event(DEVICE(hotplug_dev), ACPI_CPU_HOTPLUG_STATUS);
+    acpi_send_event(ACPI_DEVICE_IF(hotplug_dev), ACPI_CPU_HOTPLUG_STATUS);
 }
 
 void acpi_cpu_unplug_cb(CPUHotplugState *cpu_st,
diff --git a/hw/acpi/cpu_hotplug.c b/hw/acpi/cpu_hotplug.c
index 5243918125..5a1599796b 100644
--- a/hw/acpi/cpu_hotplug.c
+++ b/hw/acpi/cpu_hotplug.c
@@ -79,7 +79,7 @@ void legacy_acpi_cpu_plug_cb(HotplugHandler *hotplug_dev,
     if (*errp != NULL) {
         return;
     }
-    acpi_send_event(DEVICE(hotplug_dev), ACPI_CPU_HOTPLUG_STATUS);
+    acpi_send_event(ACPI_DEVICE_IF(hotplug_dev), ACPI_CPU_HOTPLUG_STATUS);
 }
 
 void legacy_acpi_cpu_hotplug_init(MemoryRegion *parent, Object *owner,
diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
index 0ff1712c4c..24b2aa0301 100644
--- a/hw/acpi/memory_hotplug.c
+++ b/hw/acpi/memory_hotplug.c
@@ -280,7 +280,7 @@ void acpi_memory_plug_cb(HotplugHandler *hotplug_dev, MemHotplugState *mem_st,
     mdev->is_enabled = true;
     if (dev->hotplugged) {
         mdev->is_inserting = true;
-        acpi_send_event(DEVICE(hotplug_dev), ACPI_MEMORY_HOTPLUG_STATUS);
+        acpi_send_event(ACPI_DEVICE_IF(hotplug_dev), ACPI_MEMORY_HOTPLUG_STATUS);
     }
 }
 
@@ -296,7 +296,7 @@ void acpi_memory_unplug_request_cb(HotplugHandler *hotplug_dev,
     }
 
     mdev->is_removing = true;
-    acpi_send_event(DEVICE(hotplug_dev), ACPI_MEMORY_HOTPLUG_STATUS);
+    acpi_send_event(ACPI_DEVICE_IF(hotplug_dev), ACPI_MEMORY_HOTPLUG_STATUS);
 }
 
 void acpi_memory_unplug_cb(MemHotplugState *mem_st,
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index 27eeb6609f..bdc373696d 100644
--- a/hw/acpi/nvdimm.c
+++ b/hw/acpi/nvdimm.c
@@ -921,7 +921,7 @@ static const MemoryRegionOps nvdimm_dsm_ops = {
 void nvdimm_acpi_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev)
 {
     if (dev->hotplugged) {
-        acpi_send_event(DEVICE(hotplug_dev), ACPI_NVDIMM_HOTPLUG_STATUS);
+        acpi_send_event(ACPI_DEVICE_IF(hotplug_dev), ACPI_NVDIMM_HOTPLUG_STATUS);
     }
 }
 
diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c
index 80d42e12ff..b3bb11dac5 100644
--- a/hw/acpi/pcihp.c
+++ b/hw/acpi/pcihp.c
@@ -237,7 +237,7 @@ void acpi_pcihp_device_plug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
     }
 
     s->acpi_pcihp_pci_status[bsel].up |= (1U << slot);
-    acpi_send_event(DEVICE(hotplug_dev), ACPI_PCI_HOTPLUG_STATUS);
+    acpi_send_event(ACPI_DEVICE_IF(hotplug_dev), ACPI_PCI_HOTPLUG_STATUS);
 }
 
 void acpi_pcihp_device_unplug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
@@ -253,7 +253,7 @@ void acpi_pcihp_device_unplug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
     }
 
     s->acpi_pcihp_pci_status[bsel].down |= (1U << slot);
-    acpi_send_event(DEVICE(hotplug_dev), ACPI_PCI_HOTPLUG_STATUS);
+    acpi_send_event(ACPI_DEVICE_IF(hotplug_dev), ACPI_PCI_HOTPLUG_STATUS);
 }
 
 static uint64_t pci_read(void *opaque, hwaddr addr, unsigned int size)
diff --git a/hw/acpi/vmgenid.c b/hw/acpi/vmgenid.c
index d78b579a20..74caedde79 100644
--- a/hw/acpi/vmgenid.c
+++ b/hw/acpi/vmgenid.c
@@ -158,7 +158,7 @@ static void vmgenid_update_guest(VmGenIdState *vms)
             cpu_physical_memory_write(vmgenid_addr, guid_le.data,
                                       sizeof(guid_le.data));
             /* Send _GPE.E05 event */
-            acpi_send_event(DEVICE(obj), ACPI_VMGENID_CHANGE_STATUS);
+            acpi_send_event(ACPI_DEVICE_IF(obj), ACPI_VMGENID_CHANGE_STATUS);
         }
     }
 }
-- 
2.18.0.rc1.1.g3f1ff2140

^ permalink raw reply related

* [Qemu-devel] [PATCH for-3.1 0/2] ACPI type safety cleanup
From: Eduardo Habkost @ 2018-07-23 19:31 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marcel Apfelbaum, Igor Mammedov, Xiao Guangrong, Ben Warren,
	Michael S. Tsirkin

Small cleanup to make the ACPI callback functions harder to
misuse.

Eduardo Habkost (2):
  acpi: Improve acpi_send_event() type safety
  acpi: Decouple ACPI hotplug callbacks from HotplugHandler

 include/hw/acpi/acpi_dev_interface.h |  2 +-
 include/hw/acpi/cpu.h                |  5 ++---
 include/hw/acpi/cpu_hotplug.h        |  2 +-
 include/hw/acpi/memory_hotplug.h     |  4 ++--
 include/hw/acpi/pcihp.h              |  4 ++--
 include/hw/mem/nvdimm.h              |  3 ++-
 hw/acpi/acpi_interface.c             |  5 ++---
 hw/acpi/cpu.c                        |  8 ++++----
 hw/acpi/cpu_hotplug.c                |  4 ++--
 hw/acpi/ich9.c                       | 14 ++++++++------
 hw/acpi/memory_hotplug.c             |  8 ++++----
 hw/acpi/nvdimm.c                     |  4 ++--
 hw/acpi/pcihp.c                      |  8 ++++----
 hw/acpi/piix4.c                      | 18 ++++++++++--------
 hw/acpi/vmgenid.c                    |  2 +-
 15 files changed, 47 insertions(+), 44 deletions(-)

-- 
2.18.0.rc1.1.g3f1ff2140

^ permalink raw reply

* Re: [PATCH 2/2] cpufreq: Fix a circular lock dependency problem
From: Waiman Long @ 2018-07-23 19:27 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Rafael J. Wysocki, Viresh Kumar, Thomas Gleixner, Ingo Molnar,
	linux-kernel, linux-pm, Paul E. McKenney, Greg Kroah-Hartman,
	Konrad Rzeszutek Wilk
In-Reply-To: <20180723191627.GJ2494@hirez.programming.kicks-ass.net>

On 07/23/2018 03:16 PM, Peter Zijlstra wrote:
> On Mon, Jul 23, 2018 at 01:49:39PM -0400, Waiman Long wrote:
>>  drivers/cpufreq/cpufreq.c | 16 +++++++++++++++-
>>  1 file changed, 15 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
>> index b0dfd32..9cf02d7 100644
>> --- a/drivers/cpufreq/cpufreq.c
>> +++ b/drivers/cpufreq/cpufreq.c
>> @@ -922,8 +922,22 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
>>  	struct cpufreq_policy *policy = to_policy(kobj);
>>  	struct freq_attr *fattr = to_attr(attr);
>>  	ssize_t ret = -EINVAL;
>> +	int retries = 3;
>>  
>> -	cpus_read_lock();
>> +	/*
>> +	 * cpus_read_trylock() is used here to work around a circular lock
>> +	 * dependency problem with respect to the cpufreq_register_driver().
>> +	 * With a simple retry loop, the chance of not able to get the
>> +	 * read lock is extremely small.
>> +	 */
>> +	while (!cpus_read_trylock()) {
>> +		if (retries-- <= 0)
>> +			return -EBUSY;
>> +		/*
>> +		 * Sleep for about 50ms and retry again.
>> +		 */
>> +		msleep(50);
>> +	}
> That's atrocious.
>
>
I had thought about just returning an error if the trylock fails as CPU
hotplug rarely happened. I can revert to that simple case if others have
no objection.

Cheers,
Longman

^ permalink raw reply

* Re: [PATCH net] ipv6: use fib6_info_hold_safe() when necessary
From: Martin KaFai Lau @ 2018-07-23 18:25 UTC (permalink / raw)
  To: Wei Wang; +Cc: David Miller, netdev, Eric Dumazet, David Ahern
In-Reply-To: <20180722035632.136090-1-tracywwnj@gmail.com>

On Sat, Jul 21, 2018 at 08:56:32PM -0700, Wei Wang wrote:
> From: Wei Wang <weiwan@google.com>
> 
> In the code path where only rcu read lock is held, e.g. in the route
> lookup code path, it is not safe to directly call fib6_info_hold()
> because the fib6_info may already have been deleted but still exists
> in the rcu grace period. Holding reference to it could cause double
> free and crash the kernel.
> 
> This patch adds a new function fib6_info_hold_safe() and replace
> fib6_info_hold() in all necessary places.
Acked-by: Martin KaFai Lau <kafai@fb.com>

^ permalink raw reply

* [U-Boot] [PATCH V2 29/32] fsl_esdhc: Update usdhc driver to support i.MX8
From: Fabio Estevam @ 2018-07-23 19:26 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <HE1PR04MB300482D714638B1159F970A488520@HE1PR04MB3004.eurprd04.prod.outlook.com>

Hi Peng,

On Thu, Jul 19, 2018 at 11:04 AM, Peng Fan <peng.fan@nxp.com> wrote:

> There is i.MX8/8X/8M, 8M is for i.MX8MQ and i.MX8MM
> i.MX8/8X has different SoC architecture compared with i.MX8M,
> such as there is SCU inside i.MX8/8X.
> So add a new macro dedicated for i.MX8/8X.

Yes, I understand the differences between the MX8 family.

Couldn't you make CONFIG_IMX8 instead of CONFIG_ARCH_IMX8 for consistency?

Also, for consistency: should CONFIG_MX8M be changed to CONFIG_IMX8M?

Thanks

^ permalink raw reply

* Re: [PATCH net-next 1/2] be2net: Collect the transmit queue data in Tx timeout
From: David Miller @ 2018-07-23 18:23 UTC (permalink / raw)
  To: suresh.reddy; +Cc: netdev
In-Reply-To: <20180723142524.24224-2-suresh.reddy@broadcom.com>

From: Suresh Reddy <suresh.reddy@broadcom.com>
Date: Mon, 23 Jul 2018 10:25:23 -0400

> Driver dumps tx_queue, tx_compl, pending SKBs information in tx_timeout.
> This debug data used to idenfiy the cause of the time out.
> 
> Also reset Lancer chip in tx_timeout.
> 
> Signed-off-by: Suresh Reddy <suresh.reddy@broadcom.com>

The purpose of the tx timeout NDO operation is to do whatever is
necessary to handle the TX timeout.

Outputting debugging information is useful, but is secondary.

I see that you do reset the Lancer, but that is far from what really
needs to happen here.

When you get a TX timeout, the hardware is not processing TX ring
entries, nor signalling completion any longer.

Therefore the only way to get things going again is to reset all of
the TX side data structure and logic.  This means shutting down the TX
engine, freeing up all of the TX SKBs in the ring, resetting the TX
ring software state, and then finally reprogramming the head/tail
pointer registers and re-enabling TX DMA processing.

^ permalink raw reply

* Re: [PATCH net] ipv6: use fib6_info_hold_safe() when necessary
From: David Miller @ 2018-07-23 18:19 UTC (permalink / raw)
  To: weiwan; +Cc: netdev, edumazet, dsahern, kafai
In-Reply-To: <20180722035632.136090-1-tracywwnj@gmail.com>

From: Wei Wang <weiwan@google.com>
Date: Sat, 21 Jul 2018 20:56:32 -0700

> From: Wei Wang <weiwan@google.com>
> 
> In the code path where only rcu read lock is held, e.g. in the route
> lookup code path, it is not safe to directly call fib6_info_hold()
> because the fib6_info may already have been deleted but still exists
> in the rcu grace period. Holding reference to it could cause double
> free and crash the kernel.
> 
> This patch adds a new function fib6_info_hold_safe() and replace
> fib6_info_hold() in all necessary places.
> 
> Syzbot reported 3 crash traces because of this. One of them is:
 ...
> Fixes: 93531c674315 (net/ipv6: separate handling of FIB entries from dst based routes)
> Reported-by: syzbot+902e2a1bcd4f7808cef5@syzkaller.appspotmail.com
> Reported-by: syzbot+8ae62d67f647abeeceb9@syzkaller.appspotmail.com
> Reported-by: syzbot+3f08feb14086930677d0@syzkaller.appspotmail.com
> Signed-off-by: Wei Wang <weiwan@google.com>
> Acked-by: Eric Dumazet <edumazet@google.com>

Applied, thank you.

^ permalink raw reply

* Re: [PATCH 1/2] Add sw2_sw4 voltage table to cpcap regulator.
From: Dmitry Osipenko @ 2018-07-23 19:20 UTC (permalink / raw)
  To: Peter Geis
  Cc: Mark Brown, lgirdwood, robh+dt, mark.rutland, linux-kernel,
	devicetree, linux-tegra
In-Reply-To: <95929e34-eeb4-f3a4-daa1-0b89dd60f570@gmail.com>

On Monday, 23 July 2018 21:37:50 MSK Peter Geis wrote:
> On 07/23/2018 02:13 PM, Mark Brown wrote:
> > On Mon, Jul 23, 2018 at 01:58:26PM -0400, Peter Geis wrote:
> >> SW2 and SW4 use a shared table to provide voltage to the cpu core and
> >> devices on Tegra hardware.
> >> Added this table to the cpcap regulator driver as the first step to
> >> supporting this device on Tegra.
> > 
> > This also doesn't apply against current code (though it does now parse
> > OK), please check and resend - make sure you don't have other out of
> > tree changes and are using an up to date kernel (ideally my regulator
> > for-next branch) as a base.
> 
> Good Afternoon,
> 
> I thought it was my error in the patches being stripped, unfortunately
> it seems to be a known Gmail behavior.
> Any ideas on how to get around it?

Use the "git send-email" instead of email client.

You need to create and send out patches using git, that will be something like 
this:

1) "git format-patch -v1 -2 ..." to make patches
2) "git send-email --smtp-server=smtp.gmail.com --smtp-
user=pgwipeout@gmail.com --smtp-encryption=tls --smtp-server-port=587 --
suppress-cc=all --confirm=always --to 'Mark Brown <broonie@kernel.org>' --cc 
'linux-tegra@vger.kernel.org' --cc 'linux-kernel@vger.kernel.org' ... 
00*.patch" to send out the patches

^ permalink raw reply

* [U-Boot] [PATCH v2] gpio: xilinx: Convert driver to DM
From: Stefan Herbrechtsmeier @ 2018-07-23 19:19 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <397eb159-d47d-1657-39ed-9c6b0b1795ff@xilinx.com>

Hi Michal,

Am 23.07.2018 um 13:43 schrieb Michal Simek:
> On 20.7.2018 22:05, Stefan Herbrechtsmeier wrote:
>> Am 13.07.2018 um 17:20 schrieb Michal Simek:
>>> This patch is enabling GPIO_DM support to have an option to use this
>>> driver together with zynq gpio driver.
>>> !DM part is kept there till Microblaze is cleanup which will be done
>>> hopefully soon.
>>>
>>> Just a note:
>>> There is no reason to initialize uc-priv->name because it is completely
>>> unused.
>>>
>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>> ---
>>>
>>> Changes in v2:
>>> - Show value in set_value when debug is enabled
>>> - Implement xlate function
>>> - Remove tabs from structures for alignment (to be consistent with the
>>>     rest of code)
>>>
>>>    drivers/gpio/xilinx_gpio.c | 265
>>> ++++++++++++++++++++++++++++++++++++++++++++-
>>>    1 file changed, 264 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpio/xilinx_gpio.c b/drivers/gpio/xilinx_gpio.c
>>> index 74c5be0865d1..48b52c985a55 100644
>>> --- a/drivers/gpio/xilinx_gpio.c
>>> +++ b/drivers/gpio/xilinx_gpio.c

[snip]

>>> +static int xilinx_gpio_probe(struct udevice *dev)
>>> +{
>>> +    struct xilinx_gpio_platdata *platdata = dev_get_platdata(dev);
>>> +    struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
>>> +
>>> +    uc_priv->bank_name = dev->name;
>> Have you check the "gpio status -a" output? Maybe you could use a
>> gpio-bank-name from the device tree.
> The same as for zynq. gpio-bank-name is not in Linux. And yes I was
> checking output. If you know better way please let me know.

Please see my other answer.

>>> +
>>> +    uc_priv->gpio_count = platdata->bank_max[0] + platdata->bank_max[1];
>>> +
>>> +    return 0;
>>> +}
>>> +
>>> +static int xilinx_gpio_ofdata_to_platdata(struct udevice *dev)
>>> +{
>>> +    struct xilinx_gpio_platdata *platdata = dev_get_platdata(dev);
>>> +    int is_dual;
>>> +
>>> +    platdata->regs = (struct gpio_regs *)dev_read_addr(dev);
>>> +
>>> +    platdata->bank_max[0] = dev_read_u32_default(dev,
>>> +                             "xlnx,gpio-width", 0);
>> The default value of the Linux driver is 32.
> but not in binding doc.

Okay

>>> +    platdata->bank_input[0] = dev_read_u32_default(dev,
>>> +                               "xlnx,all-inputs", 0);
>> This isn't supported by the Linux driver but documented in the device
>> tree bindings.
> correct.
>
>>> +    platdata->bank_output[0] = dev_read_u32_default(dev,
>>> +                            "xlnx,all-outputs", 0);
>> This isn't supported by the Linux driver neither documented in the
>> device tree bindings.
> This IP, driver and dt binding was done pretty long time ago. I could be
> one of the first dt driver that's why there could issues with dt bindings.
> DTG is generating all these properties from day one and in Linux only
> documented property where that one which are used by Linux.
> All that old dt binding docs should be checked again and there is
> actually 22 patches sent to gpio mailing list
> https://patchwork.ozlabs.org/patch/947371/
> but I haven't looked at them yet.

Okay

>>> +
>>> +    is_dual = dev_read_u32_default(dev, "xlnx,is-dual", 0);
>>> +    if (is_dual) {
>>> +        platdata->bank_max[1] = dev_read_u32_default(dev,
>>> +                        "xlnx,gpio2-width", 0);
>>> +        platdata->bank_input[1] = dev_read_u32_default(dev,
>>> +                        "xlnx,all-inputs-2", 0);
>>> +        platdata->bank_output[1] = dev_read_u32_default(dev,
>>> +                        "xlnx,all-outputs-2", 0);
>>> +    }
>>> +
>>> +    return 0;
>>> +}
>>> +
>>> +static const struct udevice_id xilinx_gpio_ids[] = {
>>> +    { .compatible = "xlnx,xps-gpio-1.00.a",},
>>> +    { }
>>> +};
>>> +
>>> +U_BOOT_DRIVER(xilinx_gpio) = {
>>> +    .name = "xlnx_gpio",
>>> +    .id = UCLASS_GPIO,
>>> +    .ops = &xilinx_gpio_ops,
>>> +    .of_match = xilinx_gpio_ids,
>>> +    .ofdata_to_platdata = xilinx_gpio_ofdata_to_platdata,
>>> +    .probe = xilinx_gpio_probe,
>>> +    .platdata_auto_alloc_size = sizeof(struct xilinx_gpio_platdata),
>>> +};
>>> +#endif
>> Maybe the Xilinx AXI GPIO LogiCore IP driver could be integrated into
>> the generic gpio-mmio driver. This driver is compatible to the hardware
>> and doesn't need a default value for the data register in the device tree.
> There is no support for irq that's why I don't think this is going to fly.

I wasn't aware of the irq because the irq support is missing in the 
xilinx driver at the moment. I only realized that the xilinx driver use 
a subset of the generic gpio driver with a different binding.

Best regards
   Stefan

^ permalink raw reply

* Re: [PATCH 02/14] format-patch: add --interdiff option to embed diff in cover letter
From: Eric Sunshine @ 2018-07-23 19:18 UTC (permalink / raw)
  To: Nguyễn Thái Ngọc Duy
  Cc: Git List, Johannes Schindelin,
	Ævar Arnfjörð Bjarmason, Stefan Beller
In-Reply-To: <CACsJy8C8RK6HkfoEYJGZg=sgtJS0WksHD3=7Souw3jYebRo=Sg@mail.gmail.com>

On Mon, Jul 23, 2018 at 12:03 PM Duy Nguyen <pclouds@gmail.com> wrote:
> On Sun, Jul 22, 2018 at 11:57 AM Eric Sunshine <sunshine@sunshineco.com> wrote:
> > @@ -0,0 +1,17 @@
> > +void show_interdiff(struct rev_info *rev)
> > +{
> > +       struct diff_options opts;
> > +
> > +       memcpy(&opts, &rev->diffopt, sizeof(opts));
> > +       opts.output_format = DIFF_FORMAT_PATCH;
> > +       diff_setup_done(&opts);
> > +
> > +       diff_tree_oid(rev->idiff_oid1, rev->idiff_oid2, "", &opts);
> > +       diffcore_std(&opts);
> > +       diff_flush(&opts);
> > +}
>
> Is it worth adding a new file just for a single function? I haven't
> read the rest of the series, but the cover letter's diffstat suggests
> this is it. Is interdiff intended to become a lot more complicated in
> the future? If not maybe just add this function in diff-lib.c

Good question. The functionality originally lived in builtin/log.c but
moved to log-tree.c when I added the ability to embed an interdiff in
a single patch. However, it didn't "feel" right in log-tree.c, so I
moved it to its own file to mirror how the range-diff engine resides
in its own file.

And, the function actually did several more things as originally
implemented. For instance, it took care of not clobbering global
diff-queue state, and consulting 'reroll_count' and printing the
"Interdiff:" header, but those bits eventually moved to live at more
"correct" locations, leaving this relatively minimal function behind.
It does get a bit more complex in a later patch, but not significantly
so.

I wasn't aware of diff-lib.c, but it does seem like show_interdiff()
could be at home there.

^ permalink raw reply

* [PATCH 5/5] sh_eth: make sh_eth_tsu_{read|write}_entry() prototypes symmetric
From: Sergei Shtylyov @ 2018-07-23 18:15 UTC (permalink / raw)
  To: netdev, David S. Miller; +Cc: linux-renesas-soc
In-Reply-To: <24093fd0-1b9b-a211-f988-0272483185d6@cogentembedded.com>

sh_eth_tsu_read_entry() is still asymmetric with sh_eth_tsu_write_entry()
WRT their prototypes -- make them symmetric by passing to the former a TSU
register offset instead of its address and also adding the (now necessary)
'ndev' parameter...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 drivers/net/ethernet/renesas/sh_eth.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -2695,16 +2695,17 @@ static int sh_eth_tsu_write_entry(struct
 	return 0;
 }
 
-static void sh_eth_tsu_read_entry(void *reg, u8 *addr)
+static void sh_eth_tsu_read_entry(struct net_device *ndev, u16 offset, u8 *addr)
 {
+	struct sh_eth_private *mdp = netdev_priv(ndev);
 	u32 val;
 
-	val = ioread32(reg);
+	val = ioread32(mdp->tsu_addr + offset);
 	addr[0] = (val >> 24) & 0xff;
 	addr[1] = (val >> 16) & 0xff;
 	addr[2] = (val >> 8) & 0xff;
 	addr[3] = val & 0xff;
-	val = ioread32(reg + 4);
+	val = ioread32(mdp->tsu_addr + offset + 4);
 	addr[4] = (val >> 8) & 0xff;
 	addr[5] = val & 0xff;
 }
@@ -2718,7 +2719,7 @@ static int sh_eth_tsu_find_entry(struct
 	u8 c_addr[ETH_ALEN];
 
 	for (i = 0; i < SH_ETH_TSU_CAM_ENTRIES; i++, reg_offset += 8) {
-		sh_eth_tsu_read_entry(mdp->tsu_addr + reg_offset, c_addr);
+		sh_eth_tsu_read_entry(ndev, reg_offset, c_addr);
 		if (ether_addr_equal(addr, c_addr))
 			return i;
 	}
@@ -2839,7 +2840,7 @@ static void sh_eth_tsu_purge_mcast(struc
 		return;
 
 	for (i = 0; i < SH_ETH_TSU_CAM_ENTRIES; i++, reg_offset += 8) {
-		sh_eth_tsu_read_entry(mdp->tsu_addr + reg_offset, addr);
+		sh_eth_tsu_read_entry(ndev, reg_offset, addr);
 		if (is_multicast_ether_addr(addr))
 			sh_eth_tsu_del_entry(ndev, addr);
 	}

^ permalink raw reply

* Re: [PATCH v4 net-next 2/3] rds: Enable RDS IPv6 support
From: David Miller @ 2018-07-23 18:15 UTC (permalink / raw)
  To: ka-cheong.poon; +Cc: netdev, santosh.shilimkar, rds-devel, sowmini.varadhan
In-Reply-To: <4dc7ee44840f6166cec8847aefc2bc51e072a7ac.1532318752.git.ka-cheong.poon@oracle.com>

From: Ka-Cheong Poon <ka-cheong.poon@oracle.com>
Date: Mon, 23 Jul 2018 07:16:11 -0700

> @@ -163,15 +165,29 @@ int rds_tcp_accept_one(struct socket *sock)
>  
>  	inet = inet_sk(new_sock->sk);
>  
> +	my_addr = &new_sock->sk->sk_v6_rcv_saddr;
> +	peer_addr = &new_sock->sk->sk_v6_daddr,
>  	rdsdebug("accepted tcp %pI6c:%u -> %pI6c:%u\n",

Note that comma, instead of a semicolon, at the end of the peer_addr
assignment.

This doesn't even compile.

^ permalink raw reply

* [PATCH 4/5] sh_eth: make sh_eth_tsu_write_entry() take 'offset' parameter
From: Sergei Shtylyov @ 2018-07-23 18:14 UTC (permalink / raw)
  To: netdev, David S. Miller; +Cc: linux-renesas-soc
In-Reply-To: <24093fd0-1b9b-a211-f988-0272483185d6@cogentembedded.com>

We can add the TSU register base address to a TSU register offset right
in sh_eth_tsu_write_entry(),  no need to do it in its callers...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 drivers/net/ethernet/renesas/sh_eth.c |   15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -2676,18 +2676,19 @@ static int sh_eth_tsu_busy(struct net_de
 	return 0;
 }
 
-static int sh_eth_tsu_write_entry(struct net_device *ndev, void *reg,
+static int sh_eth_tsu_write_entry(struct net_device *ndev, u16 offset,
 				  const u8 *addr)
 {
+	struct sh_eth_private *mdp = netdev_priv(ndev);
 	u32 val;
 
 	val = addr[0] << 24 | addr[1] << 16 | addr[2] << 8 | addr[3];
-	iowrite32(val, reg);
+	iowrite32(val, mdp->tsu_addr + offset);
 	if (sh_eth_tsu_busy(ndev) < 0)
 		return -EBUSY;
 
 	val = addr[4] << 8 | addr[5];
-	iowrite32(val, reg + 4);
+	iowrite32(val, mdp->tsu_addr + offset + 4);
 	if (sh_eth_tsu_busy(ndev) < 0)
 		return -EBUSY;
 
@@ -2747,9 +2748,7 @@ static int sh_eth_tsu_disable_cam_entry_
 			 ~(1 << (31 - entry)), TSU_TEN);
 
 	memset(blank, 0, sizeof(blank));
-	ret = sh_eth_tsu_write_entry(ndev,
-				     mdp->tsu_addr + reg_offset + entry * 8,
-				     blank);
+	ret = sh_eth_tsu_write_entry(ndev, reg_offset + entry * 8, blank);
 	if (ret < 0)
 		return ret;
 	return 0;
@@ -2770,9 +2769,7 @@ static int sh_eth_tsu_add_entry(struct n
 		i = sh_eth_tsu_find_empty(ndev);
 		if (i < 0)
 			return -ENOMEM;
-		ret = sh_eth_tsu_write_entry(ndev,
-					     mdp->tsu_addr + reg_offset + i * 8,
-					     addr);
+		ret = sh_eth_tsu_write_entry(ndev, reg_offset + i * 8, addr);
 		if (ret < 0)
 			return ret;
 

^ permalink raw reply

* Re: [PATCH 2/2] cpufreq: Fix a circular lock dependency problem
From: Peter Zijlstra @ 2018-07-23 19:16 UTC (permalink / raw)
  To: Waiman Long
  Cc: Rafael J. Wysocki, Viresh Kumar, Thomas Gleixner, Ingo Molnar,
	linux-kernel, linux-pm, Paul E. McKenney, Greg Kroah-Hartman,
	Konrad Rzeszutek Wilk
In-Reply-To: <1532368179-15263-3-git-send-email-longman@redhat.com>

On Mon, Jul 23, 2018 at 01:49:39PM -0400, Waiman Long wrote:
>  drivers/cpufreq/cpufreq.c | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index b0dfd32..9cf02d7 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -922,8 +922,22 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
>  	struct cpufreq_policy *policy = to_policy(kobj);
>  	struct freq_attr *fattr = to_attr(attr);
>  	ssize_t ret = -EINVAL;
> +	int retries = 3;
>  
> -	cpus_read_lock();
> +	/*
> +	 * cpus_read_trylock() is used here to work around a circular lock
> +	 * dependency problem with respect to the cpufreq_register_driver().
> +	 * With a simple retry loop, the chance of not able to get the
> +	 * read lock is extremely small.
> +	 */
> +	while (!cpus_read_trylock()) {
> +		if (retries-- <= 0)
> +			return -EBUSY;
> +		/*
> +		 * Sleep for about 50ms and retry again.
> +		 */
> +		msleep(50);
> +	}

That's atrocious.

^ permalink raw reply

* [PATCH] drm/i915/icl: Add DSS_CTL Registers
From: Anusha Srivatsa @ 2018-07-23 19:11 UTC (permalink / raw)
  To: intel-gfx; +Cc: Rodrigo Vivi

From: "Srivatsa, Anusha" <anusha.srivatsa@intel.com>

Add defines for DSS_CTL registers.
These registers specify the big joiner, splitter,
overlap pixels and info regarding display stream
compression enabled on left or right branch.

v2:
- Add define to conditionally check the buffer target depth (James Ausmus)

Suggested-by: Madhav Chauhan <madhav.chauhan@intel.com>
Cc: Madhav Chauhan <madhav.chauhan@intel.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
---
 drivers/gpu/drm/i915/i915_reg.h | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 7394605..0a0e07c 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -7707,6 +7707,39 @@ enum {
 #define RC_MAX_QP_SHIFT				5
 #define RC_MIN_QP_SHIFT				0
 
+/* Display Stream Splitter Control */
+#define DSS_CTL1				_MMIO(0x67400)
+#define  SPLITTER_ENABLE			(1 << 31)
+#define  JOINER_ENABLE				(1 << 30)
+#define  DUAL_LINK_MODE_INTERLEAVE		(1 << 24)
+#define  DUAL_LINK_MODE_FRONTBACK		(0 << 24)
+#define  OVERLAP_PIXELS_MASK			(0xf << 16)
+#define  OVERLAP_PIXELS(pixels)			((pixels) << 16)
+#define  LEFT_DL_BUF_TARGET_DEPTH_MASK		(0xfff << 0)
+#define  LEFT_DL_BUF_TARGET_DEPTH(pixels)	((pixels) << 0)
+#define  MAX_DL_BUFFER_TARGET_DEPTH		0x5A0
+
+#define DSS_CTL2				_MMIO(0x67404)
+#define  LEFT_BRANCH_VDSC_ENABLE		(1 << 31)
+#define  RIGHT_BRANCH_VDSC_ENABLE		(1 << 15)
+#define  RIGHT_DL_BUF_TARGET_DEPTH_MASK		(0xfff << 0)
+#define  RIGHT_DL_BUF_TARGET_DEPTH(pixels)	((pixels) << 0)
+
+#define _ICL_PIPE_DSS_CTL1_PB			0x78200
+#define _ICL_PIPE_DSS_CTL1_PC			0x78400
+#define ICL_PIPE_DSS_CTL1(pipe)			_MMIO_PIPE((pipe) - PIPE_B, \
+							   _ICL_PIPE_DSS_CTL1_PB, \
+							   _ICL_PIPE_DSS_CTL1_PC)
+#define  BIG_JOINER_ENABLE			(1 << 29)
+#define  MASTER_BIG_JOINER_ENABLE		(1 << 28)
+#define  VGA_CENTERING_ENABLE			(1 << 27)
+
+#define _ICL_PIPE_DSS_CTL2_PB			0x78204
+#define _ICL_PIPE_DSS_CTL2_PC			0x78404
+#define ICL_PIPE_DSS_CTL2(pipe)			_MMIO_PIPE((pipe) - PIPE_B, \
+							   _ICL_PIPE_DSS_CTL2_PB, \
+							   _ICL_PIPE_DSS_CTL2_PC)
+
 #define DSCA_RC_RANGE_PARAMETERS_1		_MMIO(0x6B248)
 #define DSCA_RC_RANGE_PARAMETERS_1_UDW		_MMIO(0x6B248 + 4)
 #define DSCC_RC_RANGE_PARAMETERS_1		_MMIO(0x6BA48)
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related

* [PATCH 3/5] sh_eth: call sh_eth_tsu_get_offset() from TSU register accessors
From: Sergei Shtylyov @ 2018-07-23 18:12 UTC (permalink / raw)
  To: netdev, David S. Miller; +Cc: linux-renesas-soc
In-Reply-To: <24093fd0-1b9b-a211-f988-0272483185d6@cogentembedded.com>

With sh_eth_tsu_get_offset() now actually returning TSU register's offset,
we  can at last use it in sh_eth_tsu_{read|write}(). Somehow this saves 248
bytes of object code with AArch64 gcc 4.8.5... :-)

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 drivers/net/ethernet/renesas/sh_eth.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -447,7 +447,7 @@ static u16 sh_eth_tsu_get_offset(struct
 static void sh_eth_tsu_write(struct sh_eth_private *mdp, u32 data,
 			     int enum_index)
 {
-	u16 offset = mdp->reg_offset[enum_index];
+	u16 offset = sh_eth_tsu_get_offset(mdp, enum_index);
 
 	if (WARN_ON(offset == SH_ETH_OFFSET_INVALID))
 		return;
@@ -457,7 +457,7 @@ static void sh_eth_tsu_write(struct sh_e
 
 static u32 sh_eth_tsu_read(struct sh_eth_private *mdp, int enum_index)
 {
-	u16 offset = mdp->reg_offset[enum_index];
+	u16 offset = sh_eth_tsu_get_offset(mdp, enum_index);
 
 	if (WARN_ON(offset == SH_ETH_OFFSET_INVALID))
 		return ~0U;

^ permalink raw reply

* Re: [Qemu-devel] [PULL for-3.0 0/1] tcg-next patches
From: Peter Maydell @ 2018-07-23 19:14 UTC (permalink / raw)
  To: Richard Henderson; +Cc: QEMU Developers
In-Reply-To: <20180723172311.11316-1-richard.henderson@linaro.org>

On 23 July 2018 at 18:23, Richard Henderson
<richard.henderson@linaro.org> wrote:
> One more tcg/i386 patch for 3.0, fixing a testcase
> reported over the weekend.
>
>
> r~
>
>
> The following changes since commit e596be90393389405c96a5c9534c4c4e2e0b5675:
>
>   Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180723' into staging (2018-07-23 16:15:24 +0100)
>
> are available in the Git repository at:
>
>   https://github.com/rth7680/qemu.git tags/pull-tcg-20180723
>
> for you to fetch changes up to 672189cd586ea38a2c1d8ab91eb1f9dcff5ceb05:
>
>   tcg/i386: Mark xmm registers call-clobbered (2018-07-23 09:21:14 -0700)
>
> ----------------------------------------------------------------
> Mark xmm registers call-clobbered.
>
> ----------------------------------------------------------------
> Richard Henderson (1):
>       tcg/i386: Mark xmm registers call-clobbered
>
>  tcg/i386/tcg-target.inc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)


Applied, thanks.

-- PMM

^ permalink raw reply

* Re: [PATCH 1/1] t7406: avoid failures solely due to timing issues
From: Junio C Hamano @ 2018-07-23 19:14 UTC (permalink / raw)
  To: Johannes Schindelin via GitGitGadget
  Cc: git, Johannes Schindelin, Stefan Beller
In-Reply-To: <78f7a5e4baae162d1dff18701a25903b304adf9e.1532353179.git.gitgitgadget@gmail.com>

"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
writes:

> To prevent such false positives from unnecessarily costing time when
> investigating test failures, let's take the exact order of the lines out
> of the equation by sorting them before comparing them.
> ...
>  cat <<EOF >expect2
> +Cloning into '$pwd/recursivesuper/super/merging'...
> +Cloning into '$pwd/recursivesuper/super/none'...
> +Cloning into '$pwd/recursivesuper/super/rebasing'...
> +Cloning into '$pwd/recursivesuper/super/submodule'...
>  Submodule 'merging' ($pwd/merging) registered for path '../super/merging'
>  Submodule 'none' ($pwd/none) registered for path '../super/none'
>  Submodule 'rebasing' ($pwd/rebasing) registered for path '../super/rebasing'
>  Submodule 'submodule' ($pwd/submodule) registered for path '../super/submodule'

Thanks.  It obviously goes in the right direction to loosen the
ordering requirement that fundamentally cannot be met, as the log
message cleanly analizes.

Do we know that the write(2)s that show these lines are atomic, or
are we merely lucky that we don't see them intermixed in the middle
of lines (sbeller cc'ed).  I _think_ they are but just wanted to
double check.



^ permalink raw reply

* Re: kernel BUG at mm/shmem.c:LINE!
From: Hugh Dickins @ 2018-07-23 19:14 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Hugh Dickins, syzbot, Kirill A. Shutemov, Andrew Morton,
	linux-kernel, linux-mm, syzkaller-bugs
In-Reply-To: <20180723140150.GA31843@bombadil.infradead.org>

On Mon, 23 Jul 2018, Matthew Wilcox wrote:
> On Sun, Jul 22, 2018 at 07:28:01PM -0700, Hugh Dickins wrote:
> > Whether or not that fixed syzbot's kernel BUG at mm/shmem.c:815!
> > I don't know, but I'm afraid it has not fixed linux-next breakage of
> > huge tmpfs: I get a similar page_to_pgoff BUG at mm/filemap.c:1466!
> > 
> > Please try something like
> > mount -o remount,huge=always /dev/shm
> > cp /dev/zero /dev/shm
> > 
> > Writing soon crashes in find_lock_entry(), looking up offset 0x201
> > but getting the page for offset 0x3c1 instead.
> 
> Hmm.  I don't see a crash while running that command,

Thanks for looking.

It is the VM_BUG_ON_PAGE(page_to_pgoff(page) != offset, page)
in find_lock_entry(). Perhaps you didn't have CONFIG_DEBUG_VM=y
on this occasion? Or you don't think of an oops as a kernel crash,
and didn't notice it in dmesg? I see now that I've arranged for oops
to crash, since I don't like to miss them myself; but it is a very
clean oops, no locks held, so can just kill the process and continue.

I recommend CONFIG_DEBUG_VM=y (for developers, not for distros), but
if you'd prefer to avoid it for now, just edit that VM_BUG_ON_PAGE()
in find_lock_entry() to a BUG_ON().

Or is there something more mysterious stopping it from showing up for
you? It's repeatable for me. When not crashing, that "cp" should fill
up about half of RAM before it hits the implicit tmpfs volume limit;
but I am assuming a not entirely fragmented machine - it does need
to allocate two 2MB pages before hitting the VM_BUG_ON_PAGE().

If you still can't see the crash, look to see how long /dev/shm/zero
is after the "cp": mine crashes a page or two over 2MB (I'm being
vague because I'm typing from the laptop I'd prefer not to reproduce
it on at the moment: I think it would be 1 page over, i_size not yet
updated for the page of index 0x201). But the xarray should by that
stage have been populated for two 2MB pages (by your "goto next" loop
in shmem_add_to_page_cache()).

> but I do see an RCU
> stall in find_get_entries() called from shmem_undo_range() when running
> 'cp' the second time -- ie while truncating the /dev/shm/zero file.

When I stopped oops crashing, I did indeed hang on that second attempt:
no "RCU stall" seen, but I've probably missed the relevant config option.

I wouldn't like to predict what happens if find_get_entry() returns the
wrong page when that VM_BUG_ON_PAGE() is compiled out, very confusing.
If it's compiled in, but just killed the process and dmesg was missed,
then there's an unlocked page lock which will indeed hang a subsequent
truncate (if the xarray yields the same wrong page again), though I
don't know if that would amount to an RCU stall.

> Maybe I'm seeing the same bug as you, and maybe I'm seeing a different
> one.  Do we have a shmem test suite somewhere?

Not as such. xfstests works on tmpfs, huge or not, but I'd have to write
up a few instructions, note one or two "-g auto" tests to patch out since
they take forever on tmpfs, and the few failures expected; and update my
snapshot of the tree to check that over first (I pulled it last mid-May).

I'd rather not get into that at present: a working "cp" will be a great
step forward, then I can easily run xfstests on the fixed kernel.

> 
> > I've spent a while on it, but better turn over to you, Matthew:
> > my guess is that xas_create_range() does not create the layout
> > you expect from it.
> 
> I've dumped the XArray tree on my machine and it actually looks fine
> *except* that the pages pointed to are free!  That indicates to me I
> screwed up somebody's reference count somewhere.

I don't actually know what a good xarray for two 2MB pages should look
like, since the best I can find seems to be a bad one!

Are you sure that those pages are free, rather than most of them tails
of one of the two compound pages involved? I think it's the same in your
rewrite of struct page, the compound_head field (lru.next), with its low
bit set, were how to recognize a tail page.

Hugh

^ permalink raw reply

* [PATCH 2/5] sh_eth: make sh_eth_tsu_get_offset() match its name
From: Sergei Shtylyov @ 2018-07-23 18:11 UTC (permalink / raw)
  To: netdev, David S. Miller; +Cc: linux-renesas-soc
In-Reply-To: <24093fd0-1b9b-a211-f988-0272483185d6@cogentembedded.com>

sh_eth_tsu_get_offset(), despite its name, returns a TSU register's address,
not its offset.  Make this  function match its name and return a register's
offset  from the TSU  registers base address instead.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 drivers/net/ethernet/renesas/sh_eth.c |   24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -439,9 +439,9 @@ static void sh_eth_modify(struct net_dev
 		     enum_index);
 }
 
-static void *sh_eth_tsu_get_offset(struct sh_eth_private *mdp, int enum_index)
+static u16 sh_eth_tsu_get_offset(struct sh_eth_private *mdp, int enum_index)
 {
-	return mdp->tsu_addr + mdp->reg_offset[enum_index];
+	return mdp->reg_offset[enum_index];
 }
 
 static void sh_eth_tsu_write(struct sh_eth_private *mdp, u32 data,
@@ -2712,12 +2712,12 @@ static void sh_eth_tsu_read_entry(void *
 static int sh_eth_tsu_find_entry(struct net_device *ndev, const u8 *addr)
 {
 	struct sh_eth_private *mdp = netdev_priv(ndev);
-	void *reg_offset = sh_eth_tsu_get_offset(mdp, TSU_ADRH0);
+	u16 reg_offset = sh_eth_tsu_get_offset(mdp, TSU_ADRH0);
 	int i;
 	u8 c_addr[ETH_ALEN];
 
 	for (i = 0; i < SH_ETH_TSU_CAM_ENTRIES; i++, reg_offset += 8) {
-		sh_eth_tsu_read_entry(reg_offset, c_addr);
+		sh_eth_tsu_read_entry(mdp->tsu_addr + reg_offset, c_addr);
 		if (ether_addr_equal(addr, c_addr))
 			return i;
 	}
@@ -2739,7 +2739,7 @@ static int sh_eth_tsu_disable_cam_entry_
 					      int entry)
 {
 	struct sh_eth_private *mdp = netdev_priv(ndev);
-	void *reg_offset = sh_eth_tsu_get_offset(mdp, TSU_ADRH0);
+	u16 reg_offset = sh_eth_tsu_get_offset(mdp, TSU_ADRH0);
 	int ret;
 	u8 blank[ETH_ALEN];
 
@@ -2747,7 +2747,9 @@ static int sh_eth_tsu_disable_cam_entry_
 			 ~(1 << (31 - entry)), TSU_TEN);
 
 	memset(blank, 0, sizeof(blank));
-	ret = sh_eth_tsu_write_entry(ndev, reg_offset + entry * 8, blank);
+	ret = sh_eth_tsu_write_entry(ndev,
+				     mdp->tsu_addr + reg_offset + entry * 8,
+				     blank);
 	if (ret < 0)
 		return ret;
 	return 0;
@@ -2756,7 +2758,7 @@ static int sh_eth_tsu_disable_cam_entry_
 static int sh_eth_tsu_add_entry(struct net_device *ndev, const u8 *addr)
 {
 	struct sh_eth_private *mdp = netdev_priv(ndev);
-	void *reg_offset = sh_eth_tsu_get_offset(mdp, TSU_ADRH0);
+	u16 reg_offset = sh_eth_tsu_get_offset(mdp, TSU_ADRH0);
 	int i, ret;
 
 	if (!mdp->cd->tsu)
@@ -2768,7 +2770,9 @@ static int sh_eth_tsu_add_entry(struct n
 		i = sh_eth_tsu_find_empty(ndev);
 		if (i < 0)
 			return -ENOMEM;
-		ret = sh_eth_tsu_write_entry(ndev, reg_offset + i * 8, addr);
+		ret = sh_eth_tsu_write_entry(ndev,
+					     mdp->tsu_addr + reg_offset + i * 8,
+					     addr);
 		if (ret < 0)
 			return ret;
 
@@ -2830,15 +2834,15 @@ static int sh_eth_tsu_purge_all(struct n
 static void sh_eth_tsu_purge_mcast(struct net_device *ndev)
 {
 	struct sh_eth_private *mdp = netdev_priv(ndev);
+	u16 reg_offset = sh_eth_tsu_get_offset(mdp, TSU_ADRH0);
 	u8 addr[ETH_ALEN];
-	void *reg_offset = sh_eth_tsu_get_offset(mdp, TSU_ADRH0);
 	int i;
 
 	if (!mdp->cd->tsu)
 		return;
 
 	for (i = 0; i < SH_ETH_TSU_CAM_ENTRIES; i++, reg_offset += 8) {
-		sh_eth_tsu_read_entry(reg_offset, addr);
+		sh_eth_tsu_read_entry(mdp->tsu_addr + reg_offset, addr);
 		if (is_multicast_ether_addr(addr))
 			sh_eth_tsu_del_entry(ndev, addr);
 	}

^ permalink raw reply

* [PATCH 1/5] sh_eth: uninline sh_eth_tsu_get_offset()
From: Sergei Shtylyov @ 2018-07-23 18:10 UTC (permalink / raw)
  To: netdev, David S. Miller; +Cc: linux-renesas-soc
In-Reply-To: <24093fd0-1b9b-a211-f988-0272483185d6@cogentembedded.com>

sh_eth_tsu_get_offset() is called several  times  by the driver, remove
*inline* and move  that function  from the header to the driver  itself
to let gcc decide  whether to expand it inline or not...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 drivers/net/ethernet/renesas/sh_eth.c |    5 +++++
 drivers/net/ethernet/renesas/sh_eth.h |    6 ------
 2 files changed, 5 insertions(+), 6 deletions(-)

Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -439,6 +439,11 @@ static void sh_eth_modify(struct net_dev
 		     enum_index);
 }
 
+static void *sh_eth_tsu_get_offset(struct sh_eth_private *mdp, int enum_index)
+{
+	return mdp->tsu_addr + mdp->reg_offset[enum_index];
+}
+
 static void sh_eth_tsu_write(struct sh_eth_private *mdp, u32 data,
 			     int enum_index)
 {
Index: net-next/drivers/net/ethernet/renesas/sh_eth.h
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.h
+++ net-next/drivers/net/ethernet/renesas/sh_eth.h
@@ -558,10 +558,4 @@ struct sh_eth_private {
 	unsigned wol_enabled:1;
 };
 
-static inline void *sh_eth_tsu_get_offset(struct sh_eth_private *mdp,
-					  int enum_index)
-{
-	return mdp->tsu_addr + mdp->reg_offset[enum_index];
-}
-
 #endif	/* #ifndef __SH_ETH_H__ */

^ permalink raw reply

* Re: [PATCH] l10n: de.po: translate 108 new messages
From: Matthias Rüster @ 2018-07-23 19:12 UTC (permalink / raw)
  To: Ralf Thielow, Phillip Szelat; +Cc: git
In-Reply-To: <20180719171512.11039-1-ralf.thielow@gmail.com>

Acked-by: Matthias Rüster <matthias.ruester@gmail.com>

Thanks!



Am 19.07.2018 um 19:15 schrieb Ralf Thielow:
> Translate 108 new messages came from git.pot update in 9b7388a85 (l10n:
> git.pot: v2.18.0 round 1 (108 new, 14 removed)).
> 
> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
> ---
>   po/de.po | 373 +++++++++++++++++++++++++++++--------------------------
>   1 file changed, 194 insertions(+), 179 deletions(-)
> 
> diff --git a/po/de.po b/po/de.po
> index bdc5830e1..47986814c 100644
> --- a/po/de.po
> +++ b/po/de.po
> @@ -10,25 +10,25 @@ msgstr ""
>   "POT-Creation-Date: 2018-05-31 23:32+0800\n"
>   "PO-Revision-Date: 2016-11-28 18:10+0100\n"
>   "Last-Translator: Ralf Thielow <ralf.thielow@gmail.com>\n"
>   "Language-Team: German <>\n"
>   "Language: de\n"
>   "MIME-Version: 1.0\n"
>   "Content-Type: text/plain; charset=UTF-8\n"
>   "Content-Transfer-Encoding: 8bit\n"
>   "Plural-Forms: nplurals=2; plural=(n!=1);\n"
>   
>   #: advice.c:92
> -#, fuzzy, c-format
> +#, c-format
>   msgid "%shint: %.*s%s\n"
> -msgstr "Hinweis: %.*s\n"
> +msgstr "%sHinweis: %.*s%s\n"
>   
>   #: advice.c:137
>   msgid "Cherry-picking is not possible because you have unmerged files."
>   msgstr ""
>   "Cherry-Picken ist nicht möglich, weil Sie nicht zusammengeführte Dateien "
>   "haben."
>   
>   #: advice.c:139
>   msgid "Committing is not possible because you have unmerged files."
>   msgstr ""
>   "Committen ist nicht möglich, weil Sie nicht zusammengeführte Dateien haben."
> @@ -1284,44 +1284,52 @@ msgstr "%s %s ist kein Commit!"
>   #: commit.c:182
>   msgid ""
>   "Support for <GIT_DIR>/info/grafts is deprecated\n"
>   "and will be removed in a future Git version.\n"
>   "\n"
>   "Please use \"git replace --convert-graft-file\"\n"
>   "to convert the grafts into replace refs.\n"
>   "\n"
>   "Turn this message off by running\n"
>   "\"git config advice.graftFileDeprecated false\""
>   msgstr ""
> +"Die Unterstützung für <GIT_DIR>/info/grafts ist veraltet\n"
> +"und wird in zukünftigen Git Versionen entfernt.\n"
> +"\n"
> +"Bitte benutzen Sie \"git replace --convert-graft-file\"\n"
> +"zum Konvertieren der künstlichen Vorgänger (\"grafts\")\n"
> +"in ersetzende Referenzen.<\n"
> +"\n"
> +"Sie können diese Meldung unterdrücken, indem Sie\n"
> +"\"git config advice.graftFileDeprecated false\" ausführen."
>   
>   #: commit.c:1537
>   msgid ""
>   "Warning: commit message did not conform to UTF-8.\n"
>   "You may want to amend it after fixing the message, or set the config\n"
>   "variable i18n.commitencoding to the encoding your project uses.\n"
>   msgstr ""
>   "Warnung: Die Commit-Beschreibung ist nicht UTF-8 konform.\n"
>   "Sie können das nachbessern, nachdem Sie die Beschreibung korrigiert haben,\n"
>   "oder Sie setzen die Konfigurationsvariable i18n.commitencoding auf das "
>   "Encoding,\n"
>   "welches von ihrem Projekt verwendet wird.\n"
>   
>   #: commit-graph.c:669
>   #, c-format
>   msgid "the commit graph format cannot write %d commits"
> -msgstr ""
> +msgstr "Das Commit-Graph Format kann nicht %d Commits schreiben."
>   
>   #: commit-graph.c:696
> -#, fuzzy
>   msgid "too many commits to write graph"
> -msgstr "nur Commits anzeigen, die sich nicht im ersten Branch befinden"
> +msgstr "Zu viele Commits zum Schreiben des Graphen."
>   
>   #: commit-graph.c:707 builtin/init-db.c:516 builtin/init-db.c:521
>   #, c-format
>   msgid "cannot mkdir %s"
>   msgstr "kann Verzeichnis %s nicht erstellen"
>   
>   #: compat/obstack.c:405 compat/obstack.c:407
>   msgid "memory exhausted"
>   msgstr "Speicher verbraucht"
>   
>   #: config.c:187
> @@ -1554,56 +1562,61 @@ msgstr "LF würde in %s durch CRLF ersetzt werden."
>   msgid ""
>   "LF will be replaced by CRLF in %s.\n"
>   "The file will have its original line endings in your working directory."
>   msgstr ""
>   "LF wird in %s durch CRLF ersetzt.\n"
>   "Die Datei wird ihre ursprünglichen Zeilenenden im Arbeitsverzeichnis "
>   "behalten."
>   
>   #: convert.c:279
>   #, c-format
>   msgid "BOM is prohibited in '%s' if encoded as %s"
> -msgstr ""
> +msgstr "BOM ist in '%s' unzulässig, wenn als %s codiert."
>   
>   #: convert.c:286
>   #, c-format
>   msgid ""
>   "The file '%s' contains a byte order mark (BOM). Please use UTF-%s as working-"
>   "tree-encoding."
>   msgstr ""
> +"Die Datei '%s' enthält ein Byte-Order-Mark (BOM). Bitte benutzen Sie UTF-%s\n"
> +"als Codierung im Arbeitsverzeichnis."
>   
>   #: convert.c:304
>   #, c-format
>   msgid "BOM is required in '%s' if encoded as %s"
> -msgstr ""
> +msgstr "BOM ist erforderlich in '%s', wenn als %s codiert."
>   
>   #: convert.c:306
>   #, c-format
>   msgid ""
>   "The file '%s' is missing a byte order mark (BOM). Please use UTF-%sBE or UTF-"
>   "%sLE (depending on the byte order) as working-tree-encoding."
>   msgstr ""
> +"Der Datei '%s' fehlt ein Byte-Order-Mark (BOM). Bitte benutzen Sie UTF-%sBE\n"
> +"oder UTF-%sLE (abhängig von der Byte-Reihenfolge) als Codierung im\n"
> +"Arbeitsverzeichnis."
>   
>   #: convert.c:424
> -#, fuzzy, c-format
> +#, c-format
>   msgid "failed to encode '%s' from %s to %s"
> -msgstr "Fehler beim Kopieren der Notizen von '%s' nach '%s'"
> +msgstr "Fehler beim Codieren von '%s' von %s nach %s."
>   
>   #: convert.c:467
>   #, c-format
>   msgid "encoding '%s' from %s to %s and back is not the same"
> -msgstr ""
> +msgstr "Die Codierung '%s' von %s nach %s und zurück ist nicht dasselbe."
>   
>   #: convert.c:1225
>   msgid "true/false are no valid working-tree-encodings"
> -msgstr ""
> +msgstr "true/false sind keine gültigen Codierungen im Arbeitsverzeichnis."
>   
>   #: date.c:116
>   msgid "in the future"
>   msgstr "in der Zukunft"
>   
>   #: date.c:122
>   #, c-format
>   msgid "%<PRIuMAX> second ago"
>   msgid_plural "%<PRIuMAX> seconds ago"
>   msgstr[0] "vor %<PRIuMAX> Sekunde"
>   msgstr[1] "vor %<PRIuMAX> Sekunden"
> @@ -1970,25 +1983,24 @@ msgid "Server does not support --deepen"
>   msgstr "Server unterstützt kein --deepen"
>   
>   #: fetch-pack.c:1065
>   msgid "no common commits"
>   msgstr "keine gemeinsamen Commits"
>   
>   #: fetch-pack.c:1077 fetch-pack.c:1414
>   msgid "git fetch-pack: fetch failed."
>   msgstr "git fetch-pack: Abholen fehlgeschlagen."
>   
>   #: fetch-pack.c:1199
> -#, fuzzy
>   msgid "Server does not support shallow requests"
> -msgstr "Server unterstützt keine shallow-Clients"
> +msgstr "Server unterstützt keine shallow-Anfragen."
>   
>   #: fetch-pack.c:1584
>   msgid "no matching remote head"
>   msgstr "kein übereinstimmender Remote-Branch"
>   
>   #: fetch-pack.c:1610
>   #, c-format
>   msgid "no such remote ref %s"
>   msgstr "keine solche Remote-Referenz %s"
>   
>   #: fetch-pack.c:1613
> @@ -2212,30 +2224,32 @@ msgstr "Lesen des Zwischenspeichers fehlgeschlagen"
>   
>   #: merge.c:136 builtin/am.c:1946 builtin/am.c:1980 builtin/checkout.c:378
>   #: builtin/checkout.c:606 builtin/clone.c:761
>   msgid "unable to write new index file"
>   msgstr "Konnte neue Index-Datei nicht schreiben."
>   
>   #: merge-recursive.c:298
>   msgid "(bad commit)\n"
>   msgstr "(ungültiger Commit)\n"
>   
>   #: merge-recursive.c:320
> -#, fuzzy, c-format
> +#, c-format
>   msgid "add_cacheinfo failed for path '%s'; merge aborting."
> -msgstr "addinfo_cache für Pfad '%s' fehlgeschlagen"
> +msgstr "add_cacheinfo für Pfad '%s' fehlgeschlagen; Merge wird abgebrochen."
>   
>   #: merge-recursive.c:328
> -#, fuzzy, c-format
> +#, c-format
>   msgid "add_cacheinfo failed to refresh for path '%s'; merge aborting."
> -msgstr "addinfo_cache für Pfad '%s' fehlgeschlagen"
> +msgstr ""
> +"add_cacheinfo zur Aktualisierung für Pfad '%s' fehlgeschlagen;\n"
> +"Merge wird abgebrochen."
>   
>   #: merge-recursive.c:410
>   msgid "error building trees"
>   msgstr "Fehler beim Erstellen der \"Tree\"-Objekte"
>   
>   #: merge-recursive.c:881
>   #, c-format
>   msgid "failed to create path '%s'%s"
>   msgstr "Fehler beim Erstellen des Pfades '%s'%s"
>   
>   #: merge-recursive.c:892
> @@ -2270,94 +2284,101 @@ msgstr "Fehler beim Öffnen von '%s': %s"
>   #: merge-recursive.c:994
>   #, c-format
>   msgid "failed to symlink '%s': %s"
>   msgstr "Fehler beim Erstellen einer symbolischen Verknüpfung für '%s': %s"
>   
>   #: merge-recursive.c:999
>   #, c-format
>   msgid "do not know what to do with %06o %s '%s'"
>   msgstr "weiß nicht was mit %06o %s '%s' zu machen ist"
>   
>   #: merge-recursive.c:1186
> -#, fuzzy, c-format
> +#, c-format
>   msgid "Failed to merge submodule %s (not checked out)"
> -msgstr "Fehler beim Eintragen von Submodul '$sm_path' in die Konfiguration."
> +msgstr "Fehler beim Merge von Submodul %s (nicht ausgecheckt)."
>   
>   #: merge-recursive.c:1193
> -#, fuzzy, c-format
> +#, c-format
>   msgid "Failed to merge submodule %s (commits not present)"
> -msgstr "Fehler beim Eintragen von Submodul '$sm_path' in die Konfiguration."
> +msgstr "Fehler beim Merge von Submodul %s (Commits nicht vorhanden)."
>   
>   #: merge-recursive.c:1200
>   #, c-format
>   msgid "Failed to merge submodule %s (commits don't follow merge-base)"
> -msgstr ""
> +msgstr "Fehler beim Merge von Submodul %s (Commits folgen keiner Merge-Basis)"
>   
>   #: merge-recursive.c:1208 merge-recursive.c:1220
>   #, c-format
>   msgid "Fast-forwarding submodule %s to the following commit:"
> -msgstr ""
> +msgstr "Spule Submodul %s zu dem folgenden Commit vor:"
>   
>   #: merge-recursive.c:1211 merge-recursive.c:1223
> -#, fuzzy, c-format
> +#, c-format
>   msgid "Fast-forwarding submodule %s to %s"
> -msgstr "Spule vor zu $sha1"
> +msgstr "Spule Submodul %s vor zu %s"
>   
>   #: merge-recursive.c:1245
>   #, c-format
>   msgid "Failed to merge submodule %s (merge following commits not found)"
> -msgstr ""
> +msgstr "Fehler beim Merge von Submodule %s (dem Merge nachfolgende Commits nicht gefunden)"
>   
>   #: merge-recursive.c:1249
> -#, fuzzy, c-format
> +#, c-format
>   msgid "Failed to merge submodule %s (not fast-forward)"
> -msgstr "Fehler beim Eintragen von Submodul '$sm_path' in die Konfiguration."
> +msgstr "Fehler beim Merge von Submodul %s (kein Vorspulen)"
>   
>   #: merge-recursive.c:1250
>   msgid "Found a possible merge resolution for the submodule:\n"
> -msgstr ""
> +msgstr "Mögliche Auflösung des Merges für Submodul gefunden:\n"
>   
>   #: merge-recursive.c:1253
>   #, c-format
>   msgid ""
>   "If this is correct simply add it to the index for example\n"
>   "by using:\n"
>   "\n"
>   "  git update-index --cacheinfo 160000 %s \"%s\"\n"
>   "\n"
>   "which will accept this suggestion.\n"
>   msgstr ""
> +"Falls das korrekt ist, fügen Sie es einfach der Staging-Area, zum Beispiel mit:\n"
> +"\n"
> +"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"\n"
> +"hinzu, um diesen Vorschlag zu akzeptieren.\n"
>   
>   #: merge-recursive.c:1262
>   #, c-format
>   msgid "Failed to merge submodule %s (multiple merges found)"
> -msgstr ""
> +msgstr "Fehler beim Merge von Submodul %s (mehrere Merges gefunden)"
>   
>   #: merge-recursive.c:1321
>   msgid "Failed to execute internal merge"
>   msgstr "Fehler bei Ausführung des internen Merges"
>   
>   #: merge-recursive.c:1326
>   #, c-format
>   msgid "Unable to add %s to database"
>   msgstr "Konnte %s nicht zur Datenbank hinzufügen"
>   
>   #: merge-recursive.c:1358
>   #, c-format
>   msgid "Auto-merging %s"
>   msgstr "automatischer Merge von %s"
>   
>   #: merge-recursive.c:1423
> -#, fuzzy, c-format
> +#, c-format
>   msgid "Error: Refusing to lose untracked file at %s; writing to %s instead."
> -msgstr "verweigere, da unversionierte Dateien in '%s' verloren gehen würden"
> +msgstr ""
> +"Fehler: Verweigere unversionierte Datei bei %s zu verlieren;\n"
> +"schreibe stattdessen nach %s."
>   
>   #: merge-recursive.c:1475
>   #, c-format
>   msgid ""
>   "CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left "
>   "in tree."
>   msgstr ""
>   "KONFLIKT (%s/löschen): %s gelöscht in %s und %s in %s. Stand %s von %s wurde "
>   "im Arbeitsbereich gelassen."
>   
>   #: merge-recursive.c:1480
> @@ -2389,35 +2410,35 @@ msgstr ""
>   
>   #: merge-recursive.c:1526
>   msgid "rename"
>   msgstr "umbenennen"
>   
>   #: merge-recursive.c:1526
>   msgid "renamed"
>   msgstr "umbenannt"
>   
>   #: merge-recursive.c:1580 merge-recursive.c:1736 merge-recursive.c:2368
>   #: merge-recursive.c:3086
> -#, fuzzy, c-format
> +#, c-format
>   msgid "Refusing to lose dirty file at %s"
> -msgstr "verweigere, da unversionierte Dateien in '%s' verloren gehen würden"
> +msgstr "Verweigere geänderte Datei bei %s zu verlieren."
>   
>   #: merge-recursive.c:1594
>   #, c-format
>   msgid "%s is a directory in %s adding as %s instead"
>   msgstr "%s ist ein Verzeichnis in %s, füge es stattdessen als %s hinzu"
>   
>   #: merge-recursive.c:1599
> -#, fuzzy, c-format
> +#, c-format
>   msgid "Refusing to lose untracked file at %s; adding as %s instead"
> -msgstr "verweigere, da unversionierte Dateien in '%s' verloren gehen würden"
> +msgstr "Verweigere unversionierte Datei bei %s zu verlieren; füge stattdessen %s hinzu"
>   
>   #: merge-recursive.c:1625
>   #, c-format
>   msgid ""
>   "CONFLICT (rename/rename): Rename \"%s\"->\"%s\" in branch \"%s\" rename \"%s"
>   "\"->\"%s\" in \"%s\"%s"
>   msgstr ""
>   "KONFLIKT (umbenennen/umbenennen): Benenne um \"%s\"->\"%s\" in Branch \"%s\" "
>   "und \"%s\"->\"%s\" in Branch \"%s\"%s"
>   
>   #: merge-recursive.c:1630
> @@ -2429,63 +2450,72 @@ msgstr " (bleibt unaufgelöst)"
>   msgid "CONFLICT (rename/rename): Rename %s->%s in %s. Rename %s->%s in %s"
>   msgstr ""
>   "KONFLIKT (umbenennen/umbenennen): Benenne um %s->%s in %s. Benenne um %s->%s "
>   "in %s"
>   
>   #: merge-recursive.c:1733
>   #, c-format
>   msgid "Renaming %s to %s and %s to %s instead"
>   msgstr "Benenne stattdessen %s nach %s und %s nach %s um"
>   
>   #: merge-recursive.c:1745
> -#, fuzzy, c-format
> +#, c-format
>   msgid "Refusing to lose untracked file at %s, even though it's in the way."
> -msgstr "verweigere, da unversionierte Dateien in '%s' verloren gehen würden"
> +msgstr "Verweigere unversionierte Datei bei %s zu verlieren, auch wenn diese im Weg ist."
>   
>   #: merge-recursive.c:1951
>   #, c-format
>   msgid ""
>   "CONFLICT (directory rename split): Unclear where to place %s because "
>   "directory %s was renamed to multiple other directories, with no destination "
>   "getting a majority of the files."
>   msgstr ""
> +"KONFLIKT (Aufteilung Verzeichnisumbenennung): Unklar, wo %s zu platzieren ist,\n"
> +"weil Verzeichnis %s zu mehreren anderen Verzeichnissen umbenannt wurde, wobei\n"
> +"keines dieser Ziele die Mehrheit der Dateien erhielt."
>   
>   #: merge-recursive.c:1983
>   #, c-format
>   msgid ""
>   "CONFLICT (implicit dir rename): Existing file/dir at %s in the way of "
>   "implicit directory rename(s) putting the following path(s) there: %s."
>   msgstr ""
> +"KONFLIKT (implizite Verzeichnisumbenennung): Existierende Datei/Pfad bei %s im\n"
> +"Weg von impliziter Verzeichnisumbenennung, die versucht, einen oder mehrere\n"
> +"Pfade dahin zu setzen: %s."
>   
>   #: merge-recursive.c:1993
>   #, c-format
>   msgid ""
>   "CONFLICT (implicit dir rename): Cannot map more than one path to %s; "
>   "implicit directory renames tried to put these paths there: %s"
>   msgstr ""
> +"KONFLIKT (implizite Verzeichnisumbenennung): Kann nicht mehr als ein Pfad zu\n"
> +"%s mappen; implizite Verzeichnisumbenennungen versuchten diese Pfade dahin\n"
> +"zu setzen: %s"
>   
>   #: merge-recursive.c:2085
> -#, fuzzy, c-format
> +#, c-format
>   msgid ""
>   "CONFLICT (rename/rename): Rename directory %s->%s in %s. Rename directory %s-"
>   ">%s in %s"
>   msgstr ""
> -"KONFLIKT (umbenennen/umbenennen): Benenne um %s->%s in %s. Benenne um %s->%s "
> -"in %s"
> +"KONFLIKT (umbenennen/umbenennen): Benenne Verzeichnis um %s->%s in %s.\n"
> +"Benenne Verzeichnis um %s->%s in %s"
>   
>   #: merge-recursive.c:2330
>   #, c-format
>   msgid ""
>   "WARNING: Avoiding applying %s -> %s rename to %s, because %s itself was "
>   "renamed."
> -msgstr ""
> +msgstr "WARNUNG: Vermeide Umbenennung %s -> %s von %s, weil %s selbst umbenannt wurde."
>   
>   #: merge-recursive.c:2736
>   #, c-format
>   msgid "CONFLICT (rename/add): Rename %s->%s in %s. %s added in %s"
>   msgstr ""
>   "KONFLIKT (umbenennen/hinzufügen): Benenne um %s->%s in %s. %s hinzugefügt in "
>   "%s"
>   
>   #: merge-recursive.c:2751
>   #, c-format
>   msgid "Adding merged %s"
> @@ -2682,25 +2712,25 @@ msgstr "      oder: %s"
>   
>   #: parse-options.c:649
>   #, c-format
>   msgid "    %s"
>   msgstr "    %s"
>   
>   #: parse-options.c:688
>   msgid "-NUM"
>   msgstr "-NUM"
>   
>   #: parse-options-cb.c:44
> -#, fuzzy, c-format
> +#, c-format
>   msgid "malformed expiration date '%s'"
> -msgstr "Fehlerhaftes Optionsblatt: '%s'"
> +msgstr "Fehlerhaftes Ablaufdatum '%s'"
>   
>   #: parse-options-cb.c:112
>   #, c-format
>   msgid "malformed object name '%s'"
>   msgstr "fehlerhafter Objekt-Name '%s'"
>   
>   #: path.c:892
>   #, c-format
>   msgid "Could not make %s writable by group"
>   msgstr "Konnte Gruppenschreibrecht für %s nicht setzen."
>   
> @@ -3012,25 +3042,25 @@ msgstr "Format: %%(end) Atom ohne zugehöriges Atom verwendet"
>   #: ref-filter.c:779
>   #, c-format
>   msgid "malformed format string %s"
>   msgstr "Fehlerhafter Formatierungsstring %s"
>   
>   #: ref-filter.c:1387
>   #, c-format
>   msgid "(no branch, rebasing %s)"
>   msgstr "(kein Branch, Rebase von Branch %s im Gange)"
>   
>   #: ref-filter.c:1390
> -#, fuzzy, c-format
> +#, c-format
>   msgid "(no branch, rebasing detached HEAD %s)"
> -msgstr "(kein Branch, Rebase von Branch %s im Gange)"
> +msgstr "(kein Branch, Rebase von losgelöstem HEAD %s)"
>   
>   #: ref-filter.c:1393
>   #, c-format
>   msgid "(no branch, bisect started on %s)"
>   msgstr "(kein Branch, binäre Suche begonnen bei %s)"
>   
>   #. TRANSLATORS: make sure this matches "HEAD
>   #. detached at " in wt-status.c
>   #.
>   #: ref-filter.c:1401
>   #, c-format
> @@ -3283,25 +3313,25 @@ msgstr "die Gegenseite unterstützt keinen atomaren Versand (\"--atomic push\")"
>   
>   #: send-pack.c:440
>   msgid "the receiving end does not support push options"
>   msgstr "die Gegenseite unterstützt keine Push-Optionen"
>   
>   #: sequencer.c:174
>   #, c-format
>   msgid "invalid commit message cleanup mode '%s'"
>   msgstr "Ungültiger \"cleanup\"-Modus '%s' für Commit-Beschreibungen."
>   
>   #: sequencer.c:274
> -#, fuzzy, c-format
> +#, c-format
>   msgid "could not delete '%s'"
> -msgstr "Konnte %s nicht entfernen"
> +msgstr "Konnte '%s' nicht löschen."
>   
>   #: sequencer.c:300
>   msgid "revert"
>   msgstr "Revert"
>   
>   #: sequencer.c:302
>   msgid "cherry-pick"
>   msgstr "Cherry-Pick"
>   
>   #: sequencer.c:304
>   msgid "rebase -i"
> @@ -3414,25 +3444,24 @@ msgstr ""
>   "  git commit --amend %s\n"
>   "\n"
>   "Wenn daraus ein neuer Commit erzeugt werden soll, führen Sie aus:\n"
>   "\n"
>   "  git commit %s\n"
>   "\n"
>   "Im Anschluss führen Sie zum Fortfahren aus:\n"
>   "\n"
>   "  git rebase --continue\n"
>   
>   #: sequencer.c:817
> -#, fuzzy
>   msgid "writing root commit"
> -msgstr "nichts zu committen\n"
> +msgstr "Root-Commit schreiben"
>   
>   #: sequencer.c:1042
>   msgid "'prepare-commit-msg' hook failed"
>   msgstr "'prepare-commit-msg' Hook fehlgeschlagen."
>   
>   #: sequencer.c:1049
>   msgid ""
>   "Your name and email address were configured automatically based\n"
>   "on your username and hostname. Please check that they are accurate.\n"
>   "You can suppress this message by setting them explicitly. Run the\n"
>   "following command and follow the instructions in your editor to edit\n"
> @@ -3588,25 +3617,24 @@ msgstr "Die Commit-Beschreibung #%d wird ausgelassen:"
>   
>   #: sequencer.c:1552
>   #, c-format
>   msgid "unknown command: %d"
>   msgstr "Unbekannter Befehl: %d"
>   
>   #: sequencer.c:1630
>   msgid "your index file is unmerged."
>   msgstr "Ihre Index-Datei ist nicht zusammengeführt."
>   
>   #: sequencer.c:1637
> -#, fuzzy
>   msgid "cannot fixup root commit"
> -msgstr "kann Commit %s (%s) nicht finden"
> +msgstr "kann fixup nicht auf Root-Commit anwenden"
>   
>   #: sequencer.c:1656
>   #, c-format
>   msgid "commit %s is a merge but no -m option was given."
>   msgstr "Commit %s ist ein Merge, aber die Option -m wurde nicht angegeben."
>   
>   #: sequencer.c:1664
>   #, c-format
>   msgid "commit %s does not have parent %d"
>   msgstr "Commit %s hat keinen Eltern-Commit %d"
>   
> @@ -3707,23 +3735,23 @@ msgstr "Kann Revert nicht während eines Cherry-Picks ausführen."
>   #, c-format
>   msgid "invalid key: %s"
>   msgstr "Ungültiger Schlüssel: %s"
>   
>   #: sequencer.c:2197
>   #, c-format
>   msgid "invalid value for %s: %s"
>   msgstr "Ungültiger Wert für %s: %s"
>   
>   #: sequencer.c:2268
>   msgid "unusable squash-onto"
> -msgstr ""
> +msgstr "Unbenutzbares squash-onto."
>   
>   #: sequencer.c:2284
>   #, c-format
>   msgid "malformed options sheet: '%s'"
>   msgstr "Fehlerhaftes Optionsblatt: '%s'"
>   
>   #: sequencer.c:2322
>   msgid "a cherry-pick or revert is already in progress"
>   msgstr "\"cherry-pick\" oder \"revert\" ist bereits im Gang"
>   
>   #: sequencer.c:2323
> @@ -3824,69 +3852,65 @@ msgid ""
>   "\n"
>   msgstr ""
>   "Ausführung erfolgreich: %s\n"
>   "Aber Änderungen in Index oder Arbeitsverzeichnis verblieben.\n"
>   "Committen Sie Ihre Änderungen oder benutzen Sie \"stash\".\n"
>   "Führen Sie dann aus:\n"
>   "\n"
>   "  git rebase --continue\n"
>   "\n"
>   
>   #: sequencer.c:2770
> -#, fuzzy
>   msgid "writing fake root commit"
> -msgstr "nichts zu committen\n"
> +msgstr "unechten Root-Commit schreiben"
>   
>   #: sequencer.c:2775
>   msgid "writing squash-onto"
> -msgstr ""
> +msgstr "squash-onto schreiben"
>   
>   #: sequencer.c:2810
> -#, fuzzy, c-format
> +#, c-format
>   msgid "failed to find tree of %s"
>   msgstr "Fehler beim Finden des \"Tree\"-Objektes von %s."
>   
>   #: sequencer.c:2828
> -#, fuzzy
>   msgid "could not write index"
> -msgstr "Konnte den Index nicht lesen."
> +msgstr "Konnte Index nicht schreiben."
>   
>   #: sequencer.c:2860
> -#, fuzzy
>   msgid "cannot merge without a current revision"
> -msgstr "Kann '%s' nicht ohne vorherigen Commit ausführen"
> +msgstr "Kann nicht ohne einen aktuellen Commit mergen."
>   
>   #: sequencer.c:2883
> -#, fuzzy, c-format
> +#, c-format
>   msgid "could not resolve '%s'"
> -msgstr "Konnte '%s' nicht löschen"
> +msgstr "Konnte '%s' nicht auflösen."
>   
>   #: sequencer.c:2905
> -#, fuzzy, c-format
> +#, c-format
>   msgid "could not get commit message of '%s'"
> -msgstr "Konnte Commit-Beschreibung von %s nicht lesen."
> +msgstr "Konnte keine Commit-Beschreibung von '%s' bekommen."
>   
>   #: sequencer.c:2915 sequencer.c:2940
> -#, fuzzy, c-format
> +#, c-format
>   msgid "could not write '%s'"
> -msgstr "Konnte nicht nach '%s' schreiben."
> +msgstr "Konnte '%s' nicht schreiben."
>   
>   #: sequencer.c:3004
> -#, fuzzy, c-format
> +#, c-format
>   msgid "could not even attempt to merge '%.*s'"
> -msgstr "konnte '%s' nicht öffnen oder lesen"
> +msgstr "Konnte nicht einmal versuchen '%.*s' zu mergen."
>   
>   #: sequencer.c:3020
> -#, fuzzy
>   msgid "merge: Unable to write new index file"
> -msgstr "%s: Konnte neue Index-Datei nicht schreiben"
> +msgstr "merge: Konnte neue Index-Datei nicht schreiben."
>   
>   #: sequencer.c:3087
>   #, c-format
>   msgid "Applied autostash.\n"
>   msgstr "Automatischen Stash angewendet.\n"
>   
>   #: sequencer.c:3099
>   #, c-format
>   msgid "cannot store %s"
>   msgstr "kann %s nicht speichern"
>   
> @@ -3905,22 +3929,30 @@ msgstr ""
>   #, c-format
>   msgid ""
>   "Could not execute the todo command\n"
>   "\n"
>   "    %.*s\n"
>   "It has been rescheduled; To edit the command before continuing, please\n"
>   "edit the todo list first:\n"
>   "\n"
>   "    git rebase --edit-todo\n"
>   "    git rebase --continue\n"
>   msgstr ""
> +"Konnte TODO-Befehl nicht ausführen\n"
> +"\n"
> +"    %.*s\n"
> +"Dieser wurde neu angesetzt; Um den Befehl zu bearbeiten, bevor fortgesetzt wird,\n"
> +"bearbeiten Sie bitte zuerst die TODO-Liste:\n"
> +"\n"
> +"    git rebase --edit-todo\n"
> +"    git rebase --continue\n"
>   
>   #: sequencer.c:3201
>   #, c-format
>   msgid "Stopped at %s...  %.*s\n"
>   msgstr "Angehalten bei %s... %.*s\n"
>   
>   #: sequencer.c:3263
>   #, c-format
>   msgid "unknown command %d"
>   msgstr "Unbekannter Befehl %d"
>   
> @@ -3961,25 +3993,25 @@ msgstr "Ungültige Inhalte: '%s'"
>   msgid ""
>   "\n"
>   "You have uncommitted changes in your working tree. Please, commit them\n"
>   "first and then run 'git rebase --continue' again."
>   msgstr ""
>   "\n"
>   "Sie haben nicht committete Änderungen in Ihrem Arbeitsverzeichnis. Bitte\n"
>   "committen Sie diese zuerst und führen Sie dann 'git rebase --continue'\n"
>   "erneut aus."
>   
>   #: sequencer.c:3454 sequencer.c:3492
> -#, fuzzy, c-format
> +#, c-format
>   msgid "could not write file: '%s'"
> -msgstr "konnte Datei '%s' nicht erstellen"
> +msgstr "Konnte Datei nicht schreiben: '%s'"
>   
>   #: sequencer.c:3507
>   msgid "could not remove CHERRY_PICK_HEAD"
>   msgstr "Konnte CHERRY_PICK_HEAD nicht löschen."
>   
>   #: sequencer.c:3514
>   msgid "could not commit staged changes."
>   msgstr "Konnte Änderungen aus der Staging-Area nicht committen."
>   
>   #: sequencer.c:3611
>   #, c-format
> @@ -4388,25 +4420,25 @@ msgstr "Fehler bei Rekursion in Submodul-Pfad '%s'"
>   
>   #: submodule.c:1863
>   msgid "could not start ls-files in .."
>   msgstr "Konnte 'ls-files' nicht in .. starten"
>   
>   #: submodule.c:1902
>   #, c-format
>   msgid "ls-tree returned unexpected return code %d"
>   msgstr "ls-tree mit unerwartetem Rückgabewert %d beendet"
>   
>   #: submodule-config.c:230
> -#, fuzzy, c-format
> +#, c-format
>   msgid "ignoring suspicious submodule name: %s"
> -msgstr "Ignoriere Referenz mit fehlerhaftem Namen %s"
> +msgstr "Ignoriere verdächtigen Submodulnamen: %s"
>   
>   #: submodule-config.c:294
>   msgid "negative values not allowed for submodule.fetchjobs"
>   msgstr "Negative Werte für submodule.fetchjobs nicht erlaubt."
>   
>   #: submodule-config.c:467
>   #, c-format
>   msgid "invalid value for %s"
>   msgstr "Ungültiger Wert für %s"
>   
>   #: trailer.c:238
> @@ -4466,25 +4498,24 @@ msgstr "konnte temporäre Datei nicht zu %s umbenennen"
>   #: transport.c:116
>   #, c-format
>   msgid "Would set upstream of '%s' to '%s' of '%s'\n"
>   msgstr "Würde Upstream-Branch von '%s' zu '%s' von '%s' setzen\n"
>   
>   #: transport.c:208
>   #, c-format
>   msgid "transport: invalid depth option '%s'"
>   msgstr "transport: ungültige --depth Option '%s'"
>   
>   #: transport.c:584
> -#, fuzzy
>   msgid "could not parse transport.color.* config"
> -msgstr "konnte Autor-Skript nicht parsen"
> +msgstr "Konnte transport.color.* Konfiguration nicht parsen."
>   
>   #: transport.c:996
>   #, c-format
>   msgid ""
>   "The following submodule paths contain changes that can\n"
>   "not be found on any remote:\n"
>   msgstr ""
>   "Die folgenden Submodul-Pfade enthalten Änderungen, die in keinem\n"
>   "Remote-Repository gefunden wurden:\n"
>   
>   #: transport.c:1000
> @@ -6090,51 +6121,50 @@ msgid "--bisect-clean-state requires no arguments"
>   msgstr "--bisect-clean-state erwartet keine Argumente."
>   
>   #: builtin/blame.c:29
>   msgid "git blame [<options>] [<rev-opts>] [<rev>] [--] <file>"
>   msgstr "git blame [<Optionen>] [<rev-opts>] [<Commit>] [--] <Datei>"
>   
>   #: builtin/blame.c:34
>   msgid "<rev-opts> are documented in git-rev-list(1)"
>   msgstr "<rev-opts> sind dokumentiert in git-rev-list(1)"
>   
>   #: builtin/blame.c:404
> -#, fuzzy, c-format
> +#, c-format
>   msgid "expecting a color: %s"
> -msgstr "Formatfarben beachten"
> +msgstr "Erwarte eine Farbe: %s"
>   
>   #: builtin/blame.c:411
>   msgid "must end with a color"
> -msgstr ""
> +msgstr "Muss mit einer Farbe enden."
>   
>   #: builtin/blame.c:697
> -#, fuzzy, c-format
> +#, c-format
>   msgid "invalid color '%s' in color.blame.repeatedLines"
> -msgstr "Ignoriere ungültige Farbe '%.*s' in log.graphColors"
> +msgstr "Ungültige Farbe '%s' in color.blame.repeatedLines."
>   
>   #: builtin/blame.c:715
> -#, fuzzy
>   msgid "invalid value for blame.coloring"
> -msgstr "Ungültiger Wert für --missing."
> +msgstr "Ungültiger Wert für blame.coloring."
>   
>   #: builtin/blame.c:786
>   msgid "Show blame entries as we find them, incrementally"
>   msgstr "\"blame\"-Einträge schrittweise anzeigen, während wir sie generieren"
>   
>   #: builtin/blame.c:787
>   msgid "Show blank SHA-1 for boundary commits (Default: off)"
>   msgstr "leere SHA-1 für Grenz-Commits anzeigen (Standard: aus)"
>   
>   #: builtin/blame.c:788
>   msgid "Do not treat root commits as boundaries (Default: off)"
> -msgstr "Ursprungs-Commits nicht als Grenzen behandeln (Standard: aus)"
> +msgstr "Root-Commits nicht als Grenzen behandeln (Standard: aus)"
>   
>   #: builtin/blame.c:789
>   msgid "Show work cost statistics"
>   msgstr "Statistiken zum Arbeitsaufwand anzeigen"
>   
>   #: builtin/blame.c:790
>   msgid "Force progress reporting"
>   msgstr "Fortschrittsanzeige erzwingen"
>   
>   #: builtin/blame.c:791
>   msgid "Show output score for blame entries"
> @@ -6177,27 +6207,27 @@ msgstr "Den Namen des Autors und den Zeitstempel unterdrücken (Standard: aus)"
>   #: builtin/blame.c:800
>   msgid "Show author email instead of name (Default: off)"
>   msgstr ""
>   "Anstatt des Namens die E-Mail-Adresse des Autors anzeigen (Standard: aus)"
>   
>   #: builtin/blame.c:801
>   msgid "Ignore whitespace differences"
>   msgstr "Unterschiede im Whitespace ignorieren"
>   
>   #: builtin/blame.c:802
>   msgid "color redundant metadata from previous line differently"
> -msgstr ""
> +msgstr "redundante Metadaten der vorherigen Zeile unterschiedlich einfärben"
>   
>   #: builtin/blame.c:803
>   msgid "color lines by age"
> -msgstr ""
> +msgstr "Zeilen nach Alter einfärben"
>   
>   #: builtin/blame.c:810
>   msgid "Use an experimental heuristic to improve diffs"
>   msgstr ""
>   "eine experimentelle Heuristik zur Verbesserung der Darstellung\n"
>   "von Unterschieden verwenden"
>   
>   #: builtin/blame.c:812
>   msgid "Spend extra cycles to find better match"
>   msgstr "Länger arbeiten, um bessere Übereinstimmungen zu finden"
>   
> @@ -8147,29 +8177,28 @@ msgid ""
>   "ignore changes to submodules, optional when: all, dirty, untracked. "
>   "(Default: all)"
>   msgstr ""
>   "Änderungen in Submodulen ignorieren, optional wenn: all, dirty, untracked. "
>   "(Standard: all)"
>   
>   #: builtin/commit.c:1329
>   msgid "list untracked files in columns"
>   msgstr "unversionierte Dateien in Spalten auflisten"
>   
>   #: builtin/commit.c:1330
> -#, fuzzy
>   msgid "do not detect renames"
> -msgstr "keine Abfrage von Remote-Repositories"
> +msgstr "keine Umbenennungen ermitteln"
>   
>   #: builtin/commit.c:1332
>   msgid "detect renames, optionally set similarity index"
> -msgstr ""
> +msgstr "Umbenennungen erkennen, optional Index für Gleichheit setzen"
>   
>   #: builtin/commit.c:1352
>   msgid "Unsupported combination of ignored and untracked-files arguments"
>   msgstr ""
>   "Nicht unterstützte Kombination von ignored und untracked-files Argumenten."
>   
>   #: builtin/commit.c:1450
>   msgid "suppress summary after successful commit"
>   msgstr "Zusammenfassung nach erfolgreichem Commit unterdrücken"
>   
>   #: builtin/commit.c:1451
> @@ -8346,68 +8375,68 @@ msgid ""
>   "Repository has been updated, but unable to write\n"
>   "new_index file. Check that disk is not full and quota is\n"
>   "not exceeded, and then \"git reset HEAD\" to recover."
>   msgstr ""
>   "Das Repository wurde aktualisiert, aber die \"new_index\"-Datei\n"
>   "konnte nicht geschrieben werden. Prüfen Sie, dass Ihre Festplatte nicht\n"
>   "voll und Ihr Kontingent nicht aufgebraucht ist und führen Sie\n"
>   "anschließend \"git reset HEAD\" zu Wiederherstellung aus."
>   
>   #: builtin/commit-graph.c:9
>   msgid "git commit-graph [--object-dir <objdir>]"
> -msgstr ""
> +msgstr "git commit-graph [--object-dir <Objektverzeichnis>]"
>   
>   #: builtin/commit-graph.c:10 builtin/commit-graph.c:16
>   msgid "git commit-graph read [--object-dir <objdir>]"
> -msgstr ""
> +msgstr "git commit-graph read [--object-dir <Objektverzeichnis>]"
>   
>   #: builtin/commit-graph.c:11 builtin/commit-graph.c:21
>   msgid ""
>   "git commit-graph write [--object-dir <objdir>] [--append] [--stdin-packs|--"
>   "stdin-commits]"
> -msgstr ""
> +msgstr "git commit-graph write [--object-dir <Objektverzeichnis>] [--append] [--stdin-packs|--stdin-commits]"
>   
>   #: builtin/commit-graph.c:39 builtin/commit-graph.c:92
>   #: builtin/commit-graph.c:147 builtin/fetch.c:161 builtin/log.c:1466
>   msgid "dir"
>   msgstr "Verzeichnis"
>   
>   #: builtin/commit-graph.c:40 builtin/commit-graph.c:93
>   #: builtin/commit-graph.c:148
>   msgid "The object directory to store the graph"
> -msgstr ""
> +msgstr "Das Objektverzeichnis zum Speichern des Graphen."
>   
>   #: builtin/commit-graph.c:95
>   msgid "scan pack-indexes listed by stdin for commits"
> -msgstr ""
> +msgstr "durch Standard-Eingabe gelistete Pack-Indexe nach Commits scannen"
>   
>   #: builtin/commit-graph.c:97
>   msgid "start walk at commits listed by stdin"
> -msgstr ""
> +msgstr "Lauf bei Commits beginnen, die über die Standard-Eingabe gelistet sind"
>   
>   #: builtin/commit-graph.c:99
>   msgid "include all commits already in the commit-graph file"
> -msgstr ""
> +msgstr "alle Commits einschließen, die sich bereits in der Commit-Graph-Datei befinden"
>   
>   #: builtin/commit-graph.c:108
>   msgid "cannot use both --stdin-commits and --stdin-packs"
> -msgstr ""
> +msgstr "Kann nicht --stdin-commits und --stdin-packs benutzen."
>   
>   #: builtin/config.c:10
>   msgid "git config [<options>]"
>   msgstr "git config [<Optionen>]"
>   
>   #: builtin/config.c:101
> -#, fuzzy, c-format
> +#, c-format
>   msgid "unrecognized --type argument, %s"
> -msgstr "nicht erkanntes Argument: %s"
> +msgstr "nicht erkanntes --type Argument, %s"
>   
>   #: builtin/config.c:123
>   msgid "Config file location"
>   msgstr "Ort der Konfigurationsdatei"
>   
>   #: builtin/config.c:124
>   msgid "use global config file"
>   msgstr "globale Konfigurationsdatei verwenden"
>   
>   #: builtin/config.c:125
>   msgid "use system config file"
> @@ -8486,25 +8515,24 @@ msgid "find the color configured: slot [default]"
>   msgstr "die konfigurierte Farbe finden: Slot [Standard]"
>   
>   #: builtin/config.c:143
>   msgid "find the color setting: slot [stdout-is-tty]"
>   msgstr "die Farbeinstellung finden: Slot [Standard-Ausgabe-ist-Terminal]"
>   
>   #: builtin/config.c:144
>   msgid "Type"
>   msgstr "Typ"
>   
>   #: builtin/config.c:145
> -#, fuzzy
>   msgid "value is given this type"
> -msgstr "Wert ist ein Verfallsdatum"
> +msgstr "Wert ist mit diesem Typ angegeben"
>   
>   #: builtin/config.c:146
>   msgid "value is \"true\" or \"false\""
>   msgstr "Wert ist \"true\" oder \"false\""
>   
>   #: builtin/config.c:147
>   msgid "value is decimal number"
>   msgstr "Wert ist eine Dezimalzahl"
>   
>   #: builtin/config.c:148
>   msgid "value is --bool or --int"
> @@ -8533,34 +8561,33 @@ msgstr "nur Variablennamen anzeigen"
>   #: builtin/config.c:154
>   msgid "respect include directives on lookup"
>   msgstr "beachtet \"include\"-Direktiven beim Nachschlagen"
>   
>   #: builtin/config.c:155
>   msgid "show origin of config (file, standard input, blob, command line)"
>   msgstr ""
>   "Ursprung der Konfiguration anzeigen (Datei, Standard-Eingabe, Blob, "
>   "Befehlszeile)"
>   
>   #: builtin/config.c:156
> -#, fuzzy
>   msgid "value"
> -msgstr "Schlüssel=Wert"
> +msgstr "Wert"
>   
>   #: builtin/config.c:156
>   msgid "with --get, use default value when missing entry"
> -msgstr ""
> +msgstr "mit --get, benutze den Standardwert, wenn der Eintrag fehlt"
>   
>   #: builtin/config.c:332
> -#, fuzzy, c-format
> +#, c-format
>   msgid "failed to format default config value: %s"
> -msgstr "Konnte Datei '%s' nicht erstellen"
> +msgstr "Fehler beim Formatieren des Standardkonfigurationswertes: %s"
>   
>   #: builtin/config.c:431
>   msgid "unable to parse default color value"
>   msgstr "konnte Standard-Farbwert nicht parsen"
>   
>   #: builtin/config.c:575
>   #, c-format
>   msgid ""
>   "# This is Git's per-user configuration file.\n"
>   "[user]\n"
>   "# Please adapt and uncomment the following lines:\n"
> @@ -8570,25 +8597,24 @@ msgstr ""
>   "# Das ist Git's benutzerspezifische Konfigurationsdatei.\n"
>   "[user]\n"
>   "# Bitte passen Sie die folgenden Zeilen an und kommentieren Sie diese aus:\n"
>   "#\tname = %s\n"
>   "#\temail = %s\n"
>   
>   #: builtin/config.c:603
>   msgid "--local can only be used inside a git repository"
>   msgstr "--local kann nur innerhalb eines Git-Repositories verwendet werden."
>   
>   #: builtin/config.c:606
> -#, fuzzy
>   msgid "--blob can only be used inside a git repository"
> -msgstr "--local kann nur innerhalb eines Git-Repositories verwendet werden."
> +msgstr "--blob kann nur innerhalb eines Git-Repositories verwendet werden."
>   
>   #: builtin/config.c:735
>   #, c-format
>   msgid "cannot create configuration file %s"
>   msgstr "Konnte Konfigurationsdatei '%s' nicht erstellen."
>   
>   #: builtin/config.c:748
>   #, c-format
>   msgid ""
>   "cannot overwrite multiple values with a single value\n"
>   "       Use a regexp, --add or --replace-all to change %s."
> @@ -9147,24 +9173,24 @@ msgid "non-fast-forward"
>   msgstr "kein Vorspulen"
>   
>   #: builtin/fetch.c:795
>   #, c-format
>   msgid "%s did not send all necessary objects\n"
>   msgstr "%s hat nicht alle erforderlichen Objekte gesendet\n"
>   
>   #: builtin/fetch.c:815
>   #, c-format
>   msgid "reject %s because shallow roots are not allowed to be updated"
>   msgstr ""
> -"%s wurde zurückgewiesen, da Ursprungs-Commits von Repositories mit "
> -"unvollständiger Historie (shallow) nicht aktualisiert werden dürfen."
> +"%s wurde zurückgewiesen, da Root-Commits von Repositories mit unvollständiger\n"
> +"Historie (shallow) nicht aktualisiert werden dürfen."
>   
>   #: builtin/fetch.c:903 builtin/fetch.c:999
>   #, c-format
>   msgid "From %.*s\n"
>   msgstr "Von %.*s\n"
>   
>   #: builtin/fetch.c:914
>   #, c-format
>   msgid ""
>   "some local refs could not be updated; try running\n"
>   " 'git remote prune %s' to remove any old, conflicting branches"
> @@ -9464,33 +9490,33 @@ msgstr "mehr Gründlichkeit (erhöht Laufzeit)"
>   msgid "enable auto-gc mode"
>   msgstr "\"auto-gc\" Modus aktivieren"
>   
>   #: builtin/gc.c:508
>   msgid "force running gc even if there may be another gc running"
>   msgstr ""
>   "Ausführung von \"git gc\" erzwingen, selbst wenn ein anderes\n"
>   "\"git gc\" bereits ausgeführt wird"
>   
>   #: builtin/gc.c:511
>   msgid "repack all other packs except the largest pack"
> -msgstr ""
> +msgstr "alle anderen Pakete, außer das größte Paket, neu packen"
>   
>   #: builtin/gc.c:528
> -#, fuzzy, c-format
> +#, c-format
>   msgid "failed to parse gc.logexpiry value %s"
> -msgstr "Fehler beim Parsen des Wertes '%s' von gc.logexpiry"
> +msgstr "Fehler beim Parsen des Wertes '%s' von gc.logexpiry."
>   
>   #: builtin/gc.c:539
> -#, fuzzy, c-format
> +#, c-format
>   msgid "failed to parse prune expiry value %s"
> -msgstr "Fehler beim Parsen des Wertes '%s' von gc.logexpiry"
> +msgstr "Fehler beim Parsen des \"prune expiry\" Wertes %s"
>   
>   #: builtin/gc.c:559
>   #, c-format
>   msgid "Auto packing the repository in background for optimum performance.\n"
>   msgstr ""
>   "Die Datenbank des Repositories wird für eine optimale Performance im\n"
>   "Hintergrund komprimiert.\n"
>   
>   #: builtin/gc.c:561
>   #, c-format
>   msgid "Auto packing the repository for optimum performance.\n"
> @@ -10080,25 +10106,24 @@ msgstr "Kann existierende Informationen zu Objekt %s nicht lesen."
>   #: builtin/index-pack.c:825
>   #, c-format
>   msgid "cannot read existing object %s"
>   msgstr "Kann existierendes Objekt %s nicht lesen."
>   
>   #: builtin/index-pack.c:839
>   #, c-format
>   msgid "invalid blob object %s"
>   msgstr "ungültiges Blob-Objekt %s"
>   
>   #: builtin/index-pack.c:842 builtin/index-pack.c:860
> -#, fuzzy
>   msgid "fsck error in packed object"
> -msgstr "gepackte Objekte ignorieren"
> +msgstr "fsck Fehler in gepacktem Objekt"
>   
>   #: builtin/index-pack.c:857
>   #, c-format
>   msgid "invalid %s"
>   msgstr "Ungültiger Objekt-Typ %s"
>   
>   #: builtin/index-pack.c:862
>   #, c-format
>   msgid "Not all child objects of %s are reachable"
>   msgstr "Nicht alle Kind-Objekte von %s sind erreichbar"
>   
> @@ -10243,25 +10268,24 @@ msgid "--fix-thin cannot be used without --stdin"
>   msgstr "Die Option --fix-thin kann nicht ohne --stdin verwendet werden."
>   
>   #: builtin/index-pack.c:1776
>   msgid "--stdin requires a git repository"
>   msgstr "--stdin erfordert ein Git-Repository"
>   
>   #: builtin/index-pack.c:1782
>   msgid "--verify with no packfile name given"
>   msgstr "Die Option --verify wurde ohne Namen der Paketdatei angegeben."
>   
>   #: builtin/index-pack.c:1832 builtin/unpack-objects.c:578
> -#, fuzzy
>   msgid "fsck error in pack objects"
> -msgstr "Fehler in Objekt: %s"
> +msgstr "fsck Fehler beim Packen von Objekten"
>   
>   #: builtin/init-db.c:55
>   #, c-format
>   msgid "cannot stat '%s'"
>   msgstr "Kann '%s' nicht lesen"
>   
>   #: builtin/init-db.c:61
>   #, c-format
>   msgid "cannot stat template '%s'"
>   msgstr "kann Vorlage '%s' nicht lesen"
>   
> @@ -12098,30 +12122,30 @@ msgstr "Schreibe Objekte"
>   msgid "disabling bitmap writing, as some objects are not being packed"
>   msgstr ""
>   "Deaktiviere Schreiben der Bitmap, da einige Objekte nicht in eine Pack-"
>   "Datei\n"
>   "geschrieben wurden."
>   
>   #: builtin/pack-objects.c:1765
>   msgid "Counting objects"
>   msgstr "Zähle Objekte"
>   
>   #: builtin/pack-objects.c:1895
> -#, fuzzy, c-format
> +#, c-format
>   msgid "unable to get size of %s"
> -msgstr "Konnte %s nicht nach %s verschieben"
> +msgstr "Konnte Größe von %s nicht bestimmen."
>   
>   #: builtin/pack-objects.c:1910
> -#, fuzzy, c-format
> +#, c-format
>   msgid "unable to parse object header of %s"
> -msgstr "Konnte Objekt '%s' nicht parsen."
> +msgstr "Konnte Kopfbereich von Objekt '%s' nicht parsen."
>   
>   #: builtin/pack-objects.c:2564
>   msgid "Compressing objects"
>   msgstr "Komprimiere Objekte"
>   
>   #: builtin/pack-objects.c:2735
>   msgid "invalid value for --missing"
>   msgstr "Ungültiger Wert für --missing."
>   
>   #: builtin/pack-objects.c:3067
>   #, c-format
> @@ -12253,25 +12277,24 @@ msgstr "dünnere Pakete erzeugen"
>   
>   #: builtin/pack-objects.c:3163
>   msgid "create packs suitable for shallow fetches"
>   msgstr ""
>   "Pakete geeignet für Abholung mit unvollständiger Historie (shallow) erzeugen"
>   
>   #: builtin/pack-objects.c:3165
>   msgid "ignore packs that have companion .keep file"
>   msgstr "Pakete ignorieren, die .keep Dateien haben"
>   
>   #: builtin/pack-objects.c:3167
> -#, fuzzy
>   msgid "ignore this pack"
> -msgstr "kleinere Pakete verwenden"
> +msgstr "dieses Paket ignorieren"
>   
>   #: builtin/pack-objects.c:3169
>   msgid "pack compression level"
>   msgstr "Komprimierungsgrad für Paketierung"
>   
>   #: builtin/pack-objects.c:3171
>   msgid "do not hide commits by grafts"
>   msgstr "keine künstlichen Vorgänger-Commits (\"grafts\") verbergen"
>   
>   #: builtin/pack-objects.c:3173
>   msgid "use a bitmap index if available to speed up counting objects"
> @@ -12287,33 +12310,32 @@ msgid "handling for missing objects"
>   msgstr "Behandlung für fehlende Objekte"
>   
>   #: builtin/pack-objects.c:3181
>   msgid "do not pack objects in promisor packfiles"
>   msgstr ""
>   "keine Objekte aus Packdateien von partiell geklonten Remote-Repositories "
>   "packen"
>   
>   #: builtin/pack-objects.c:3205
>   #, c-format
>   msgid "delta chain depth %d is too deep, forcing %d"
> -msgstr ""
> +msgstr "Tiefe für Verkettung von Unterschieden %d ist zu tief, erzwinge %d"
>   
>   #: builtin/pack-objects.c:3210
>   #, c-format
>   msgid "pack.deltaCacheLimit is too high, forcing %d"
> -msgstr ""
> +msgstr "pack.deltaCacheLimit ist zu hoch, erzwinge %d"
>   
>   #: builtin/pack-objects.c:3338
> -#, fuzzy
>   msgid "Enumerating objects"
> -msgstr "Schreibe Objekte"
> +msgstr "Objekte aufzählen"
>   
>   #: builtin/pack-refs.c:7
>   msgid "git pack-refs [<options>]"
>   msgstr "git pack-refs [<Optionen>]"
>   
>   #: builtin/pack-refs.c:15
>   msgid "pack everything"
>   msgstr "alles packen"
>   
>   #: builtin/pack-refs.c:16
>   msgid "prune loose refs (default)"
> @@ -12920,29 +12942,28 @@ msgid "git rebase--helper [<options>]"
>   msgstr "git rebase--helper [<Optionen>]"
>   
>   #: builtin/rebase--helper.c:24
>   msgid "keep empty commits"
>   msgstr "leere Commits behalten"
>   
>   #: builtin/rebase--helper.c:26 builtin/revert.c:123
>   msgid "allow commits with empty messages"
>   msgstr "Commits mit leerer Beschreibung erlauben"
>   
>   #: builtin/rebase--helper.c:27
> -#, fuzzy
>   msgid "rebase merge commits"
> -msgstr "ungültiger Merge-Tag in Commit '%s'"
> +msgstr "Rebase auf Merge-Commits ausführen"
>   
>   #: builtin/rebase--helper.c:29
>   msgid "keep original branch points of cousins"
> -msgstr ""
> +msgstr "originale Branch-Punkte der Cousins behalten"
>   
>   #: builtin/rebase--helper.c:30
>   msgid "continue rebase"
>   msgstr "Rebase fortsetzen"
>   
>   #: builtin/rebase--helper.c:32
>   msgid "abort rebase"
>   msgstr "Rebase abbrechen"
>   
>   #: builtin/rebase--helper.c:35
>   msgid "make rebase script"
> @@ -12966,23 +12987,23 @@ msgstr "nicht erforderliche \"pick\"-Befehle auslassen"
>   
>   #: builtin/rebase--helper.c:45
>   msgid "rearrange fixup/squash lines"
>   msgstr "fixup/squash-Zeilen umordnen"
>   
>   #: builtin/rebase--helper.c:47
>   msgid "insert exec commands in todo list"
>   msgstr "\"exec\"-Befehle in TODO-Liste einfügen"
>   
>   #: builtin/rebase--helper.c:68
>   msgid "--[no-]rebase-cousins has no effect without --rebase-merges"
> -msgstr ""
> +msgstr "--[no-]rebase-cousins hat ohne --rebase-merges keine Auswirkung"
>   
>   #: builtin/receive-pack.c:31
>   msgid "git receive-pack <git-dir>"
>   msgstr "git receive-pack <Git-Verzeichnis>"
>   
>   #: builtin/receive-pack.c:842
>   msgid ""
>   "By default, updating the current branch in a non-bare repository\n"
>   "is denied, because it will make the index and work tree inconsistent\n"
>   "with what you pushed, and will require 'git reset --hard' to match\n"
>   "the work tree to HEAD.\n"
> @@ -13288,25 +13309,25 @@ msgstr " ???"
>   #: builtin/remote.c:962
>   #, c-format
>   msgid "invalid branch.%s.merge; cannot rebase onto > 1 branch"
>   msgstr "ungültiges branch.%s.merge; kann Rebase nicht auf > 1 Branch ausführen"
>   
>   #: builtin/remote.c:971
>   #, c-format
>   msgid "rebases interactively onto remote %s"
>   msgstr "interaktiver Rebase auf Remote-Branch %s"
>   
>   #: builtin/remote.c:973
> -#, fuzzy, c-format
> +#, c-format
>   msgid "rebases interactively (with merges) onto remote %s"
> -msgstr "interaktiver Rebase auf Remote-Branch %s"
> +msgstr "interaktiver Rebase (mit Merges) auf Remote-Branch %s"
>   
>   #: builtin/remote.c:976
>   #, c-format
>   msgid "rebases onto remote %s"
>   msgstr "Rebase auf Remote-Branch %s"
>   
>   #: builtin/remote.c:980
>   #, c-format
>   msgid " merges with remote %s"
>   msgstr " führt mit Remote-Branch %s zusammen"
>   
> @@ -13650,27 +13671,24 @@ msgstr "maximale Anzahl von Threads limitieren"
>   
>   #: builtin/repack.c:210
>   msgid "maximum size of each packfile"
>   msgstr "maximale Größe für jede Paketdatei"
>   
>   #: builtin/repack.c:212
>   msgid "repack objects in packs marked with .keep"
>   msgstr ""
>   "Objekte umpacken, die sich in mit .keep markierten Pack-Dateien befinden"
>   
>   #: builtin/repack.c:214
> -#, fuzzy
>   msgid "do not repack this pack"
> -msgstr ""
> -"keine Objekte aus Packdateien von partiell geklonten Remote-Repositories "
> -"packen"
> +msgstr "dieses Paket nicht neu packen"
>   
>   #: builtin/repack.c:224
>   msgid "cannot delete packs in a precious-objects repo"
>   msgstr "kann Pack-Dateien in precious-objects Repository nicht löschen"
>   
>   #: builtin/repack.c:228
>   msgid "--keep-unreachable and -A are incompatible"
>   msgstr "--keep-unreachable und -A sind inkompatibel"
>   
>   #: builtin/repack.c:425 builtin/worktree.c:139
>   #, c-format
> @@ -13682,25 +13700,24 @@ msgid "git replace [-f] <object> <replacement>"
>   msgstr "git replace [-f] <Objekt> <Ersetzung>"
>   
>   #: builtin/replace.c:23
>   msgid "git replace [-f] --edit <object>"
>   msgstr "git replace [-f] --edit <Objekt>"
>   
>   #: builtin/replace.c:24
>   msgid "git replace [-f] --graft <commit> [<parent>...]"
>   msgstr "git replace [-f] --graft <Commit> [<Eltern-Commit>...]"
>   
>   #: builtin/replace.c:25
> -#, fuzzy
>   msgid "git replace [-f] --convert-graft-file"
> -msgstr "git replace [-f] --edit <Objekt>"
> +msgstr "git replace [-f] --convert-graft-file"
>   
>   #: builtin/replace.c:26
>   msgid "git replace -d <object>..."
>   msgstr "git replace -d <Objekt>..."
>   
>   #: builtin/replace.c:27
>   msgid "git replace [--format=<format>] [-l [<pattern>]]"
>   msgstr "git replace [--format=<Format>] [-l [<Muster>]]"
>   
>   #: builtin/replace.c:371 builtin/replace.c:415 builtin/replace.c:445
>   #, c-format
> @@ -13733,48 +13750,49 @@ msgstr "Der ursprüngliche Commit '%s' hat eine GPG-Signatur."
>   
>   #: builtin/replace.c:461
>   msgid "the signature will be removed in the replacement commit!"
>   msgstr "Die Signatur wird in dem Ersetzungs-Commit entfernt!"
>   
>   #: builtin/replace.c:471
>   #, c-format
>   msgid "could not write replacement commit for: '%s'"
>   msgstr "Konnte Ersetzungs-Commit für '%s' nicht schreiben"
>   
>   #: builtin/replace.c:514
> -#, fuzzy, c-format
> +#, c-format
>   msgid ""
>   "could not convert the following graft(s):\n"
>   "%s"
> -msgstr "Würde das folgende Element entfernen:"
> +msgstr ""
> +"Konnte die folgenden künstlichen Vorgänger (\"grafts\") nicht konvertieren:\n"
> +"%s"
>   
>   #: builtin/replace.c:535
>   msgid "list replace refs"
>   msgstr "ersetzende Referenzen auflisten"
>   
>   #: builtin/replace.c:536
>   msgid "delete replace refs"
>   msgstr "ersetzende Referenzen löschen"
>   
>   #: builtin/replace.c:537
>   msgid "edit existing object"
>   msgstr "existierendes Objekt bearbeiten"
>   
>   #: builtin/replace.c:538
>   msgid "change a commit's parents"
>   msgstr "Eltern-Commits eines Commits ändern"
>   
>   #: builtin/replace.c:539
> -#, fuzzy
>   msgid "convert existing graft file"
> -msgstr "das Überschreiben bereits existierender Dateien erzwingen"
> +msgstr "existierende Datei des künstlichen Vorgängers (\"graft\") konvertieren"
>   
>   #: builtin/replace.c:540
>   msgid "replace the ref if it exists"
>   msgstr "die Referenz ersetzen, wenn sie existiert"
>   
>   #: builtin/replace.c:542
>   msgid "do not pretty-print contents for --edit"
>   msgstr "keine ansprechende Anzeige des Objektinhaltes für --edit"
>   
>   #: builtin/replace.c:543
>   msgid "use this format"
> @@ -14157,44 +14175,40 @@ msgid "use stateless RPC protocol"
>   msgstr "zustandsloses RPC-Protokoll verwenden"
>   
>   #: builtin/send-pack.c:178
>   msgid "read refs from stdin"
>   msgstr "Referenzen von der Standard-Eingabe lesen"
>   
>   #: builtin/send-pack.c:179
>   msgid "print status from remote helper"
>   msgstr "Status des Remote-Helpers ausgeben"
>   
>   #: builtin/serve.c:7
> -#, fuzzy
>   msgid "git serve [<options>]"
> -msgstr "git repack [<Optionen>]"
> +msgstr "git serve [<Optionen>]"
>   
>   #: builtin/serve.c:17 builtin/upload-pack.c:23
>   msgid "quit after a single request/response exchange"
>   msgstr "nach einem einzigen Request/Response-Austausch beenden"
>   
>   #: builtin/serve.c:19
> -#, fuzzy
>   msgid "exit immediately after advertising capabilities"
> -msgstr "direkt nach der initialen Angabe der Commits beenden"
> +msgstr "direkt nach Anzeige der angebotenen Fähigkeiten beenden"
>   
>   #: builtin/shortlog.c:14
> -#, fuzzy
>   msgid "git shortlog [<options>] [<revision-range>] [[--] <path>...]"
> -msgstr "git shortlog [<Optionen>] [<Commitbereich>] [[--] [<Pfad>...]]"
> +msgstr "git shortlog [<Optionen>] [<Commitbereich>] [[--] <Pfad>...]"
>   
>   #: builtin/shortlog.c:15
> -#, fuzzy
>   msgid "git log --pretty=short | git shortlog [<options>]"
> -msgstr "git worktree list [<Optionen>]"
> +msgstr "git log --pretty=short | git shortlog [<Optionen>]"
>   
>   #: builtin/shortlog.c:264
>   msgid "Group by committer rather than author"
>   msgstr "über Commit-Ersteller anstatt Autor gruppieren"
>   
>   #: builtin/shortlog.c:266
>   msgid "sort output according to the number of commits per author"
>   msgstr "die Ausgabe entsprechend der Anzahl von Commits pro Autor sortieren"
>   
>   #: builtin/shortlog.c:268
>   msgid "Suppress commit descriptions, only provides commit count"
> @@ -14205,27 +14219,24 @@ msgid "Show the email address of each author"
>   msgstr "die E-Mail-Adresse von jedem Autor anzeigen"
>   
>   #: builtin/shortlog.c:271
>   msgid "w[,i1[,i2]]"
>   msgstr "w[,i1[,i2]]"
>   
>   #: builtin/shortlog.c:272
>   msgid "Linewrap output"
>   msgstr "Ausgabe mit Zeilenumbrüchen"
>   
>   #: builtin/shortlog.c:298
> -#, fuzzy
>   msgid "too many arguments given outside repository"
> -msgstr ""
> -"zu viele Argumente angegeben, um Konfiguration zu Upstream-Branch zu "
> -"entfernen"
> +msgstr "zu viele Argumente außerhalb des Repositories angegeben"
>   
>   #: builtin/show-branch.c:12
>   msgid ""
>   "git show-branch [-a | --all] [-r | --remotes] [--topo-order | --date-order]\n"
>   "\t\t[--current] [--color[=<when>] | --no-color] [--sparse]\n"
>   "\t\t[--more=<n> | --list | --independent | --merge-base]\n"
>   "\t\t[--no-name | --sha1-name] [--topics] [(<rev> | <glob>)...]"
>   msgstr ""
>   "git show-branch [-a | --all] [-r | --remotes] [--topo-order | --date-order]\n"
>   "\t\t[--current] [--color[=<Wann>] | --no-color] [--sparse]\n"
>   "\t\t[--more=<n> | --list | --independent | --merge-base]\n"
> @@ -15457,40 +15468,40 @@ msgstr "Arbeitsverzeichnisse älter als <Zeit> verfallen lassen"
>   #: builtin/worktree.c:229
>   #, c-format
>   msgid "'%s' already exists"
>   msgstr "'%s' existiert bereits"
>   
>   #: builtin/worktree.c:260
>   #, c-format
>   msgid "could not create directory of '%s'"
>   msgstr "Konnte Verzeichnis '%s' nicht erstellen."
>   
>   #: builtin/worktree.c:373 builtin/worktree.c:379
> -#, fuzzy, c-format
> +#, c-format
>   msgid "Preparing worktree (new branch '%s')"
> -msgstr "Fehler beim Entfernen des Branches '%s'"
> +msgstr "Bereite Arbeitsverzeichnis vor (neuer Branch '%s')"
>   
>   #: builtin/worktree.c:375
>   #, c-format
>   msgid "Preparing worktree (resetting branch '%s'; was at %s)"
> -msgstr ""
> +msgstr "Bereite Arbeitsverzeichnis vor (setze Branch '%s' um; war bei %s)"
>   
>   #: builtin/worktree.c:384
>   #, c-format
>   msgid "Preparing worktree (checking out '%s')"
> -msgstr ""
> +msgstr "Bereite Arbeitsverzeichnis vor (checke '%s' aus)"
>   
>   #: builtin/worktree.c:390
> -#, fuzzy, c-format
> +#, c-format
>   msgid "Preparing worktree (detached HEAD %s)"
> -msgstr "Bereite %s vor (Identifikation %s)"
> +msgstr "Bereite Arbeitsverzeichnis vor (losgelöster HEAD %s)"
>   
>   #: builtin/worktree.c:431
>   msgid "checkout <branch> even if already checked out in other worktree"
>   msgstr ""
>   "<Branch> auschecken, auch wenn dieser bereits in einem anderen "
>   "Arbeitsverzeichnis ausgecheckt ist"
>   
>   #: builtin/worktree.c:434
>   msgid "create a new branch"
>   msgstr "neuen Branch erstellen"
>   
> @@ -15661,34 +15672,33 @@ msgstr ""
>   "Ziehen Sie in Betracht\n"
>   "\n"
>   "\tchmod 0700 %s\n"
>   "\n"
>   "auszuführen."
>   
>   #: credential-cache--daemon.c:271
>   msgid "print debugging messages to stderr"
>   msgstr "Meldungen zur Fehlersuche in Standard-Fehlerausgabe ausgeben"
>   
>   #: git.c:26
> -#, fuzzy
>   msgid ""
>   "git [--version] [--help] [-C <path>] [-c <name>=<value>]\n"
>   "           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n"
>   "           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--"
>   "bare]\n"
>   "           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n"
>   "           <command> [<args>]"
>   msgstr ""
>   "git [--version] [--help] [-C <Pfad>] [-c <Name>=<Wert>]\n"
>   "           [--exec-path[=<Pfad>]] [--html-path] [--man-path] [--info-path]\n"
> -"           [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]\n"
> +"           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]\n"
>   "           [--git-dir=<Pfad>] [--work-tree=<Pfad>] [--namespace=<Name>]\n"
>   "           <Befehl> [<Argumente>]"
>   
>   #: git.c:33
>   msgid ""
>   "'git help -a' and 'git help -g' list available subcommands and some\n"
>   "concept guides. See 'git help <command>' or 'git help <concept>'\n"
>   "to read about a specific subcommand or concept."
>   msgstr ""
>   "'git help -a' und 'git help -g' listet verfügbare Unterbefehle und\n"
>   "einige Anleitungen zu Git-Konzepten auf. Benutzen Sie 'git help <Befehl>'\n"
> @@ -16223,23 +16233,23 @@ msgstr ""
>   "Es sieht so aus, als ob es das Verzeichnis $state_dir_base bereits gibt\n"
>   "und es könnte ein anderer Rebase im Gange sein. Wenn das der Fall ist,\n"
>   "probieren Sie bitte\n"
>   "\t$cmd_live_rebase\n"
>   "Wenn das nicht der Fall ist, probieren Sie bitte\n"
>   "\t$cmd_clear_stale_rebase\n"
>   "und führen Sie diesen Befehl nochmal aus. Es wird angehalten, falls noch\n"
>   "etwas Schützenswertes vorhanden ist."
>   
>   #: git-rebase.sh:509
>   msgid "error: cannot combine '--signoff' with '--preserve-merges'"
> -msgstr ""
> +msgstr "Fehler: '--signoff' und '--preserve-merges' können nicht kombiniert werden."
>   
>   #: git-rebase.sh:537
>   #, sh-format
>   msgid "invalid upstream '$upstream_name'"
>   msgstr "Ungültiger Upstream-Branch '$upstream_name'."
>   
>   #: git-rebase.sh:561
>   #, sh-format
>   msgid "$onto_name: there are more than one merge bases"
>   msgstr "$onto_name: es gibt mehr als eine Merge-Basis"
>   
> @@ -16664,51 +16674,57 @@ msgstr ""
>   #: git-parse-remote.sh:89
>   #, sh-format
>   msgid "See git-${cmd}(1) for details."
>   msgstr "Siehe git-${cmd}(1) für weitere Details."
>   
>   #: git-rebase--interactive.sh:142
>   #, sh-format
>   msgid "Rebasing ($new_count/$total)"
>   msgstr "Führe Rebase aus ($new_count/$total)"
>   
>   #: git-rebase--interactive.sh:158
> -#, fuzzy
>   msgid ""
>   "\n"
>   "Commands:\n"
>   "p, pick <commit> = use commit\n"
>   "r, reword <commit> = use commit, but edit the commit message\n"
>   "e, edit <commit> = use commit, but stop for amending\n"
>   "s, squash <commit> = use commit, but meld into previous commit\n"
>   "f, fixup <commit> = like \"squash\", but discard this commit's log message\n"
>   "x, exec <commit> = run command (the rest of the line) using shell\n"
>   "d, drop <commit> = remove commit\n"
>   "l, label <label> = label current HEAD with a name\n"
>   "t, reset <label> = reset HEAD to a label\n"
>   "m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]\n"
>   ".       create a merge commit using the original merge commit's\n"
>   ".       message (or the oneline, if no original merge commit was\n"
>   ".       specified). Use -c <commit> to reword the commit message.\n"
>   "\n"
>   "These lines can be re-ordered; they are executed from top to bottom.\n"
>   msgstr ""
>   "\n"
>   "Befehle:\n"
> -"p, pick = Commit verwenden\n"
> -"r, reword = Commit verwenden, aber Commit-Beschreibung bearbeiten\n"
> -"e, edit = Commit verwenden, aber zum Nachbessern anhalten\n"
> -"s, squash = Commit verwenden, aber mit vorherigem Commit vereinen\n"
> -"f, fixup = wie \"squash\", aber diese Commit-Beschreibung verwerfen\n"
> -"x, exec = Befehl (Rest der Zeile) mittels Shell ausführen\n"
> -"d, drop = Commit entfernen\n"
> +"p, pick <Commit> = Commit verwenden\n"
> +"r, reword <Commit> = Commit verwenden, aber Commit-Beschreibung bearbeiten\n"
> +"e, edit <Commit> = Commit verwenden, aber zum Nachbessern anhalten\n"
> +"s, squash <Commit> = Commit verwenden, aber mit vorherigem Commit vereinen\n"
> +"f, fixup <Commit> = wie \"squash\", aber diese Commit-Beschreibung verwerfen\n"
> +"x, exec <Commit> = Befehl (Rest der Zeile) mittels Shell ausführen\n"
> +"d, drop <Commit> = Commit entfernen\n"
> +"l, label <Label> = aktuellen HEAD mit Label versehen\n"
> +"t, reset <Label> = HEAD zu einem Label umsetzen\n"
> +"m, merge [-C <Commit> | -c <Commit>] <Label> [# <eineZeile>]\n"
> +".       Merge-Commit mit der originalen Merge-Commit-Beschreibung erstellen\n"
> +".       (oder die eine Zeile, wenn keine originale Merge-Commit-Beschreibung\n"
> +".       spezifiziert ist). Benutzen Sie -c <Commit> zum Bearbeiten der\n"
> +".       Commit-Beschreibung.\n"
>   "\n"
>   "Diese Zeilen können umsortiert werden; Sie werden von oben nach unten\n"
>   "ausgeführt.\n"
>   
>   #: git-rebase--interactive.sh:179
>   msgid ""
>   "\n"
>   "Do not remove any line. Use 'drop' explicitly to remove a commit.\n"
>   msgstr ""
>   "\n"
>   "Keine Zeile entfernen. Benutzen Sie 'drop', um explizit einen Commit zu\n"
> @@ -16997,32 +17013,32 @@ msgstr "Konnte temporäres Verzeichnis $state_dir nicht erstellen."
>   msgid "Could not mark as interactive"
>   msgstr "Konnte nicht als interaktiven Rebase markieren."
>   
>   #: git-rebase--interactive.sh:915
>   #, sh-format
>   msgid "Rebase $shortrevisions onto $shortonto ($todocount command)"
>   msgid_plural "Rebase $shortrevisions onto $shortonto ($todocount commands)"
>   msgstr[0] "Rebase von $shortrevisions auf $shortonto ($todocount Kommando)"
>   msgstr[1] "Rebase von $shortrevisions auf $shortonto ($todocount Kommandos)"
>   
>   #: git-rebase--interactive.sh:920
> -#, fuzzy
>   msgid ""
>   "\n"
>   "\tHowever, if you remove everything, the rebase will be aborted.\n"
>   "\n"
>   "\t"
>   msgstr ""
>   "\n"
> -"Wenn Sie jedoch alles löschen, wird der Rebase abgebrochen.\n"
> +"\tWenn Sie jedoch alles löschen, wird der Rebase abgebrochen.\n"
>   "\n"
> +"\t"
>   
>   #: git-rebase--interactive.sh:927
>   msgid "Note that empty commits are commented out"
>   msgstr "Leere Commits sind auskommentiert."
>   
>   #: git-rebase--interactive.sh:980
>   msgid "Could not generate todo list"
>   msgstr "Konnte TODO-Liste nicht erzeugen."
>   
>   #: git-rebase--interactive.sh:1001 git-rebase--interactive.sh:1006
>   msgid "Could not init rewritten commits"
> @@ -17899,25 +17915,24 @@ msgstr ""
>   "\n"
>   "    Für weitere Informationen, führen Sie 'git send-email --help' aus.\n"
>   "    Um das aktuelle Verhalten beizubehalten, aber diese Meldung zu "
>   "unterdrücken,\n"
>   "    führen Sie 'git config --global sendemail.confirm auto' aus.\n"
>   "\n"
>   
>   #. TRANSLATORS: Make sure to include [y] [n] [e] [q] [a] in your
>   #. translation. The program will only accept English input
>   #. at this point.
>   #: git-send-email.perl:1415
> -#, fuzzy
>   msgid "Send this email? ([y]es|[n]o|[e]dit|[q]uit|[a]ll): "
> -msgstr "Diese E-Mail versenden? (Ja [y]|Nein [n]|Beenden [q]|Alle [a]): "
> +msgstr "Diese E-Mail versenden? (Ja [y]|Nein [n]|Bearbeiten [e]|Beenden [q]|Alle [a]): "
>   
>   #: git-send-email.perl:1418
>   msgid "Send this email reply required"
>   msgstr "Zum Versenden dieser E-Mail ist eine Antwort erforderlich."
>   
>   #: git-send-email.perl:1446
>   msgid "The required SMTP server is not properly defined."
>   msgstr "Der erforderliche SMTP-Server ist nicht korrekt definiert."
>   
>   #: git-send-email.perl:1493
>   #, perl-format
> 

^ permalink raw reply

* Re: [PATCH v6 5/5] mailbox: Add support for i.MX7D messaging unit
From: Oleksij Rempel @ 2018-07-23 19:11 UTC (permalink / raw)
  To: Lucas Stach
  Cc: Mark Rutland, A.s. Dong, devicetree, Rob Herring, dl-linux-imx,
	kernel, Fabio Estevam, Shawn Guo, Vladimir Zapolskiy,
	linux-arm-kernel
In-Reply-To: <1532366380.3163.109.camel@pengutronix.de>


[-- Attachment #1.1: Type: text/plain, Size: 12269 bytes --]

On Mon, Jul 23, 2018 at 07:19:40PM +0200, Lucas Stach wrote:
> Am Sonntag, den 22.07.2018, 08:39 +0200 schrieb Oleksij Rempel:
> > The Mailbox controller is able to send messages (up to 4 32 bit words)
> > between the endpoints.
> > 
> > This driver was tested using the mailbox-test driver sending messages
> > between the Cortex-A7 and the Cortex-M4.
> > 
> > > Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
> > > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> > ---
> >  drivers/mailbox/Kconfig       |   6 +
> >  drivers/mailbox/Makefile      |   2 +
> >  drivers/mailbox/imx-mailbox.c | 273 ++++++++++++++++++++++++++++++++++
> >  3 files changed, 281 insertions(+)
> >  create mode 100644 drivers/mailbox/imx-mailbox.c
> > 
> > diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig
> > index a2bb27446dce..79060ddc380d 100644
> > --- a/drivers/mailbox/Kconfig
> > +++ b/drivers/mailbox/Kconfig
> > @@ -15,6 +15,12 @@ config ARM_MHU
> > >  	  The controller has 3 mailbox channels, the last of which can be
> > >  	  used in Secure mode only.
> >  
> > +config IMX_MBOX
> > > +	tristate "i.MX Mailbox"
> > > +	depends on ARCH_MXC || COMPILE_TEST
> > > +	help
> > > +	  Mailbox implementation for i.MX Messaging Unit (MU).
> > +
> >  config PLATFORM_MHU
> > >  	tristate "Platform MHU Mailbox"
> > >  	depends on OF
> > diff --git a/drivers/mailbox/Makefile b/drivers/mailbox/Makefile
> > index cc23c3a43fcd..ba2fe1b6dd62 100644
> > --- a/drivers/mailbox/Makefile
> > +++ b/drivers/mailbox/Makefile
> > > @@ -7,6 +7,8 @@ obj-$(CONFIG_MAILBOX_TEST)	+= mailbox-test.o
> >  
> > >  obj-$(CONFIG_ARM_MHU)	+= arm_mhu.o
> >  
> > > +obj-$(CONFIG_IMX_MBOX)	+= imx-mailbox.o
> > +
> > >  obj-$(CONFIG_PLATFORM_MHU)	+= platform_mhu.o
> >  
> > >  obj-$(CONFIG_PL320_MBOX)	+= pl320-ipc.o
> > diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c
> > new file mode 100644
> > index 000000000000..29cf2876db01
> > --- /dev/null
> > +++ b/drivers/mailbox/imx-mailbox.c
> > @@ -0,0 +1,273 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Copyright (c) 2018 Pengutronix, Oleksij Rempel <o.rempel@pengutronix.de>
> > + */
> > +
> > +#include <linux/clk.h>
> > +#include <linux/interrupt.h>
> > +#include <linux/io.h>
> > +#include <linux/kernel.h>
> > +#include <linux/mailbox_controller.h>
> > +#include <linux/module.h>
> > +#include <linux/of_device.h>
> > +
> > +/* Transmit Register */
> > > +#define IMX_MU_xTRn(x)		(0x00 + 4 * (x))
> > +/* Receive Register */
> > > +#define IMX_MU_xRRn(x)		(0x10 + 4 * (x))
> > +/* Status Register */
> > > +#define IMX_MU_xSR		0x20
> > > +#define IMX_MU_xSR_TEn(x)	BIT(20 + (3 - (x)))
> > > +#define IMX_MU_xSR_RFn(x)	BIT(24 + (3 - (x)))
> > > +#define IMX_MU_xSR_BRDIP	BIT(9)
> > +
> > +/* Control Register */
> > > +#define IMX_MU_xCR		0x24
> > +/* Transmit Interrupt Enable */
> > > +#define IMX_MU_xCR_TIEn(x)	BIT(20 + (3 - (x)))
> > +/* Receive Interrupt Enable */
> > > +#define IMX_MU_xCR_RIEn(x)	BIT(24 + (3 - (x)))
> > +
> > > +#define IMX_MU_CHANS	4u
> > +
> > +struct imx_mu_con_priv {
> > > > +	int			irq;
> > > > +	unsigned int		idx;
> > > > +	char			*irq_desc;
> > +};
> > +
> > +struct imx_mu_priv {
> > > > +	struct device		*dev;
> > > > +	void __iomem		*base;
> > +
> > > > +	struct mbox_controller	mbox;
> > > > +	struct mbox_chan	mbox_chans[IMX_MU_CHANS];
> > +
> > > +	struct imx_mu_con_priv  con_priv[IMX_MU_CHANS];
> > > > +	struct clk		*clk;
> > +
> > > > +	bool			side_b;
> > +};
> > +
> > +static struct imx_mu_priv *to_imx_mu_priv(struct mbox_controller *mbox)
> > +{
> > > +	return container_of(mbox, struct imx_mu_priv, mbox);
> > +}
> > +
> > +static void imx_mu_write(struct imx_mu_priv *priv, u32 val, u32 offs)
> > +{
> > +	iowrite32(val, priv->base + offs);
> 
> This driver is never going to be used on a device with port based IO,
> so iowrite doesn't make much sense here, just use writel. Same comment
> applies to the below read function.

I read this and do not understand what is actual problem:
https://lwn.net/Articles/102232/
"By default, these functions are simply wrappers around readb() and friends.
The explicit pointer type for the argument will generate warnings, however,
if a driver passes in an integer type."

So, is it wrong or not? If yes, why?

> Also, given that those functions are not really shortening the code in
> the user they may also be removed completely IMHO.

Is it subjective or technical issue?

> > +}
> > +
> > +static u32 imx_mu_read(struct imx_mu_priv *priv, u32 offs)
> > +{
> > > +	return ioread32(priv->base + offs);
> > +}
> > +
> > +static u32 imx_mu_rmw(struct imx_mu_priv *priv, u32 offs, u32 set, u32 clr)
> > +{
> > > +	u32 val;
> > +
> > > +	val = imx_mu_read(priv, offs);
> > > +	val &= ~clr;
> > > +	val |= set;
> > > +	imx_mu_write(priv, val, offs);
> > +
> > > +	return val;
> > +}
> > +
> > +static irqreturn_t imx_mu_isr(int irq, void *p)
> > +{
> > > +	struct mbox_chan *chan = p;
> > > +	struct imx_mu_priv *priv = to_imx_mu_priv(chan->mbox);
> > > +	struct imx_mu_con_priv *cp = chan->con_priv;
> > > +	u32 val, ctrl, dat;
> > +
> > > +	ctrl = imx_mu_read(priv, IMX_MU_xCR);
> > > +	val = imx_mu_read(priv, IMX_MU_xSR);
> > > +	val &= IMX_MU_xSR_TEn(cp->idx) | IMX_MU_xSR_RFn(cp->idx);
> > > +	val &= ctrl & (IMX_MU_xCR_TIEn(cp->idx) | IMX_MU_xCR_RIEn(cp->idx));
> > > +	if (!val)
> > > +		return IRQ_NONE;
> > +
> > > +	if (val & IMX_MU_xSR_TEn(cp->idx)) {
> > > +		imx_mu_rmw(priv, IMX_MU_xCR, 0, IMX_MU_xCR_TIEn(cp->idx));
> > > +		mbox_chan_txdone(chan, 0);
> > > +	}
> > +
> > > +	if (val & IMX_MU_xSR_RFn(cp->idx)) {
> > > +		dat = imx_mu_read(priv, IMX_MU_xRRn(cp->idx));
> > > +		mbox_chan_received_data(chan, (void *)&dat);
> > > +	}
> > +
> > > +	return IRQ_HANDLED;
> > +}
> > +
> > +static bool imx_mu_last_tx_done(struct mbox_chan *chan)
> > +{
> > > +	struct imx_mu_priv *priv = to_imx_mu_priv(chan->mbox);
> > > +	struct imx_mu_con_priv *cp = chan->con_priv;
> > > +	u32 val;
> > +
> > > +	val = imx_mu_read(priv, IMX_MU_xSR);
> > > +	/* test if transmit register is empty */
> > +	return val & IMX_MU_xSR_TEn(cp->idx);
> 
> I guess
> "return imx_mu_read(priv, IMX_MU_xSR) & IMX_MU_xSR_TEn(cp->idx);" is
> shorter and equally well understood.

Same as before:
Is it subjective or technical issue?

> > +}
> > +
> > +static int imx_mu_send_data(struct mbox_chan *chan, void *data)
> > +{
> > > +	struct imx_mu_priv *priv = to_imx_mu_priv(chan->mbox);
> > > +	struct imx_mu_con_priv *cp = chan->con_priv;
> > > +	u32 *arg = data;
> > +
> > > +	if (!imx_mu_last_tx_done(chan))
> > > +		return -EBUSY;
> > +
> > > +	imx_mu_write(priv, *arg, IMX_MU_xTRn(cp->idx));
> > +	imx_mu_rmw(priv, IMX_MU_xCR, IMX_MU_xSR_TEn(cp->idx), 0);
> 
> In multi-channel mode this RMW cycle needs some kind of locking. As
> this register is also changed from the irq handler, this probably needs
> to be a irqsave spinlock.

ok.

> > +
> > > +	return 0;
> > +}
> > +
> > +static int imx_mu_startup(struct mbox_chan *chan)
> > +{
> > > +	struct imx_mu_priv *priv = to_imx_mu_priv(chan->mbox);
> > > +	struct imx_mu_con_priv *cp = chan->con_priv;
> > > +	int ret;
> > +
> > > +	cp->irq_desc = devm_kasprintf(priv->dev, GFP_KERNEL, "imx_mu_chan[%i]",
> > > +				      cp->idx);
> > > +	if (!cp->irq_desc)
> > > +		return -ENOMEM;
> > +
> > > +	ret = devm_request_irq(priv->dev, cp->irq, imx_mu_isr,
> > +			       IRQF_SHARED, cp->irq_desc, chan);
> 
> Using the devm_ variants of those functions doesn't make sense when the
> resources aren't tied to the device lifetime. As you are tearing them
> down manually in imx_mu_shutdown anyways, just use the raw variants of
> those functions.

So, it is not a problem and there is no advantage. Right?

> > +	if (ret) {
> > > +		dev_err(priv->dev,
> > > +			"Unable to acquire IRQ %d\n", cp->irq);
> > > +		return ret;
> > > +	}
> > +
> > > +	imx_mu_rmw(priv, IMX_MU_xCR, IMX_MU_xCR_RIEn(cp->idx), 0);
> > +
> > > +	return 0;
> > +}
> > +
> > +static void imx_mu_shutdown(struct mbox_chan *chan)
> > +{
> > > +	struct imx_mu_priv *priv = to_imx_mu_priv(chan->mbox);
> > > +	struct imx_mu_con_priv *cp = chan->con_priv;
> > +
> > > +	imx_mu_rmw(priv, IMX_MU_xCR, 0,
> > > +		   IMX_MU_xCR_TIEn(cp->idx) | IMX_MU_xCR_RIEn(cp->idx));
> > +
> > > +	devm_free_irq(priv->dev, cp->irq, chan);
> > > +	devm_kfree(priv->dev, cp->irq_desc);
> > +}
> > +
> > +static const struct mbox_chan_ops imx_mu_ops = {
> > > +	.send_data = imx_mu_send_data,
> > > +	.startup = imx_mu_startup,
> > > +	.shutdown = imx_mu_shutdown,
> > +};
> > +
> > +static void imx_mu_init_generic(struct imx_mu_priv *priv)
> > +{
> > > +	if (priv->side_b)
> > > +		return;
> > +
> > > +	/* Set default MU configuration */
> > > +	imx_mu_write(priv, 0, IMX_MU_xCR);
> > +}
> > +
> > +static int imx_mu_probe(struct platform_device *pdev)
> > +{
> > > +	struct device *dev = &pdev->dev;
> > > +	struct device_node *np = dev->of_node;
> > > +	struct resource *iomem;
> > > +	struct imx_mu_priv *priv;
> > > +	unsigned int i;
> > > +	int irq, ret;
> > +
> > > +	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> > > +	if (!priv)
> > > +		return -ENOMEM;
> > +
> > > +	priv->dev = dev;
> > +
> > > +	iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > > +	priv->base = devm_ioremap_resource(&pdev->dev, iomem);
> > > +	if (IS_ERR(priv->base))
> > > +		return PTR_ERR(priv->base);
> > +
> > > +	irq = platform_get_irq(pdev, 0);
> > > +	if (irq < 0)
> > > +		return irq;
> > +
> > > +	priv->clk = devm_clk_get(dev, NULL);
> > > +	if (IS_ERR(priv->clk)) {
> > > +		if (PTR_ERR(priv->clk) != -ENOENT)
> > > +			return PTR_ERR(priv->clk);
> > +
> > > +		priv->clk = NULL;
> > > +	}
> > +
> > > +	ret = clk_prepare_enable(priv->clk);
> > > +	if (ret) {
> > > +		dev_err(dev, "Failed to enable clock\n");
> > > +		return ret;
> > > +	}
> > +
> > > +	for (i = 0; i < IMX_MU_CHANS; i++) {
> > > +		struct imx_mu_con_priv *cp = &priv->con_priv[i];
> > +
> > > +		cp->idx = i;
> > > +		cp->irq = irq;
> > > +		priv->mbox_chans[i].con_priv = cp;
> > > +	}
> > +
> > > +	if (of_property_read_bool(np, "fsl,mu-side-b"))
> > +		priv->side_b = true;
> 
> No need for the if clause here. Just assign the return value from
> of_property_read_bool to priv->side_b.

Not against kernel style and not broken.
Is it subjective or technical issue? I assume I like more red color...

> > +
> > > +	priv->mbox.dev = dev;
> > > +	priv->mbox.ops = &imx_mu_ops;
> > > +	priv->mbox.chans = priv->mbox_chans;
> > > +	priv->mbox.num_chans = IMX_MU_CHANS;
> > > +	priv->mbox.txdone_irq = true;
> > +
> > > +	platform_set_drvdata(pdev, priv);
> > +
> > > +	imx_mu_init_generic(priv);
> > +
> > > +	return mbox_controller_register(&priv->mbox);
> > +}
> > +
> > +static int imx_mu_remove(struct platform_device *pdev)
> > +{
> > > +	struct imx_mu_priv *priv = platform_get_drvdata(pdev);
> > +
> > > +	mbox_controller_unregister(&priv->mbox);
> > > +	clk_disable_unprepare(priv->clk);
> > +
> > > +	return 0;
> > +}
> > +
> > +static const struct of_device_id imx_mu_dt_ids[] = {
> > > +	{ .compatible = "fsl,imx6sx-mu" },
> > > +	{ },
> > +};
> > +MODULE_DEVICE_TABLE(of, imx_mu_dt_ids);
> > +
> > +static struct platform_driver imx_mu_driver = {
> > > > +	.probe		= imx_mu_probe,
> > > > +	.remove		= imx_mu_remove,
> > > +	.driver = {
> > > > +		.name	= "imx_mu",
> > > +		.of_match_table = imx_mu_dt_ids,
> > > +	},
> > +};
> > +module_platform_driver(imx_mu_driver);
> > +
> > > +MODULE_AUTHOR("Oleksij Rempel <o.rempel@pengutronix.de>");
> > +MODULE_DESCRIPTION("Message Unit driver for i.MX");
> > +MODULE_LICENSE("GPL v2");
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply

* [PATCH v6 5/5] mailbox: Add support for i.MX7D messaging unit
From: Oleksij Rempel @ 2018-07-23 19:11 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1532366380.3163.109.camel@pengutronix.de>

On Mon, Jul 23, 2018 at 07:19:40PM +0200, Lucas Stach wrote:
> Am Sonntag, den 22.07.2018, 08:39 +0200 schrieb Oleksij Rempel:
> > The Mailbox controller is able to send messages (up to 4 32 bit words)
> > between the endpoints.
> > 
> > This driver was tested using the mailbox-test driver sending messages
> > between the Cortex-A7 and the Cortex-M4.
> > 
> > > Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
> > > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> > ---
> > ?drivers/mailbox/Kconfig???????|???6 +
> > ?drivers/mailbox/Makefile??????|???2 +
> > ?drivers/mailbox/imx-mailbox.c | 273 ++++++++++++++++++++++++++++++++++
> > ?3 files changed, 281 insertions(+)
> > ?create mode 100644 drivers/mailbox/imx-mailbox.c
> > 
> > diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig
> > index a2bb27446dce..79060ddc380d 100644
> > --- a/drivers/mailbox/Kconfig
> > +++ b/drivers/mailbox/Kconfig
> > @@ -15,6 +15,12 @@ config ARM_MHU
> > > ?	??The controller has 3 mailbox channels, the last of which can be
> > > ?	??used in Secure mode only.
> > ?
> > +config IMX_MBOX
> > > +	tristate "i.MX Mailbox"
> > > +	depends on ARCH_MXC || COMPILE_TEST
> > > +	help
> > > +	??Mailbox implementation for i.MX Messaging Unit (MU).
> > +
> > ?config PLATFORM_MHU
> > > ?	tristate "Platform MHU Mailbox"
> > > ?	depends on OF
> > diff --git a/drivers/mailbox/Makefile b/drivers/mailbox/Makefile
> > index cc23c3a43fcd..ba2fe1b6dd62 100644
> > --- a/drivers/mailbox/Makefile
> > +++ b/drivers/mailbox/Makefile
> > > @@ -7,6 +7,8 @@ obj-$(CONFIG_MAILBOX_TEST)	+= mailbox-test.o
> > ?
> > > ?obj-$(CONFIG_ARM_MHU)	+= arm_mhu.o
> > ?
> > > +obj-$(CONFIG_IMX_MBOX)	+= imx-mailbox.o
> > +
> > > ?obj-$(CONFIG_PLATFORM_MHU)	+= platform_mhu.o
> > ?
> > > ?obj-$(CONFIG_PL320_MBOX)	+= pl320-ipc.o
> > diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c
> > new file mode 100644
> > index 000000000000..29cf2876db01
> > --- /dev/null
> > +++ b/drivers/mailbox/imx-mailbox.c
> > @@ -0,0 +1,273 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Copyright (c) 2018 Pengutronix, Oleksij Rempel <o.rempel@pengutronix.de>
> > + */
> > +
> > +#include <linux/clk.h>
> > +#include <linux/interrupt.h>
> > +#include <linux/io.h>
> > +#include <linux/kernel.h>
> > +#include <linux/mailbox_controller.h>
> > +#include <linux/module.h>
> > +#include <linux/of_device.h>
> > +
> > +/* Transmit Register */
> > > +#define IMX_MU_xTRn(x)		(0x00 + 4 * (x))
> > +/* Receive Register */
> > > +#define IMX_MU_xRRn(x)		(0x10 + 4 * (x))
> > +/* Status Register */
> > > +#define IMX_MU_xSR		0x20
> > > +#define IMX_MU_xSR_TEn(x)	BIT(20 + (3 - (x)))
> > > +#define IMX_MU_xSR_RFn(x)	BIT(24 + (3 - (x)))
> > > +#define IMX_MU_xSR_BRDIP	BIT(9)
> > +
> > +/* Control Register */
> > > +#define IMX_MU_xCR		0x24
> > +/* Transmit Interrupt Enable */
> > > +#define IMX_MU_xCR_TIEn(x)	BIT(20 + (3 - (x)))
> > +/* Receive Interrupt Enable */
> > > +#define IMX_MU_xCR_RIEn(x)	BIT(24 + (3 - (x)))
> > +
> > > +#define IMX_MU_CHANS	4u
> > +
> > +struct imx_mu_con_priv {
> > > > +	int			irq;
> > > > +	unsigned int		idx;
> > > > +	char			*irq_desc;
> > +};
> > +
> > +struct imx_mu_priv {
> > > > +	struct device		*dev;
> > > > +	void __iomem		*base;
> > +
> > > > +	struct mbox_controller	mbox;
> > > > +	struct mbox_chan	mbox_chans[IMX_MU_CHANS];
> > +
> > > +	struct imx_mu_con_priv??con_priv[IMX_MU_CHANS];
> > > > +	struct clk		*clk;
> > +
> > > > +	bool			side_b;
> > +};
> > +
> > +static struct imx_mu_priv *to_imx_mu_priv(struct mbox_controller *mbox)
> > +{
> > > +	return container_of(mbox, struct imx_mu_priv, mbox);
> > +}
> > +
> > +static void imx_mu_write(struct imx_mu_priv *priv, u32 val, u32 offs)
> > +{
> > +	iowrite32(val, priv->base + offs);
> 
> This driver is never going to be used on a device with port based IO,
> so iowrite doesn't make much sense here, just use writel. Same comment
> applies to the below read function.

I read this and do not understand what is actual problem:
https://lwn.net/Articles/102232/
"By default, these functions are simply wrappers around readb() and friends.
The explicit pointer type for the argument will generate warnings, however,
if a driver passes in an integer type."

So, is it wrong or not? If yes, why?

> Also, given that those functions are not really shortening the code in
> the user they may also be removed completely IMHO.

Is it subjective or technical issue?

> > +}
> > +
> > +static u32 imx_mu_read(struct imx_mu_priv *priv, u32 offs)
> > +{
> > > +	return ioread32(priv->base + offs);
> > +}
> > +
> > +static u32 imx_mu_rmw(struct imx_mu_priv *priv, u32 offs, u32 set, u32 clr)
> > +{
> > > +	u32 val;
> > +
> > > +	val = imx_mu_read(priv, offs);
> > > +	val &= ~clr;
> > > +	val |= set;
> > > +	imx_mu_write(priv, val, offs);
> > +
> > > +	return val;
> > +}
> > +
> > +static irqreturn_t imx_mu_isr(int irq, void *p)
> > +{
> > > +	struct mbox_chan *chan = p;
> > > +	struct imx_mu_priv *priv = to_imx_mu_priv(chan->mbox);
> > > +	struct imx_mu_con_priv *cp = chan->con_priv;
> > > +	u32 val, ctrl, dat;
> > +
> > > +	ctrl = imx_mu_read(priv, IMX_MU_xCR);
> > > +	val = imx_mu_read(priv, IMX_MU_xSR);
> > > +	val &= IMX_MU_xSR_TEn(cp->idx) | IMX_MU_xSR_RFn(cp->idx);
> > > +	val &= ctrl & (IMX_MU_xCR_TIEn(cp->idx) | IMX_MU_xCR_RIEn(cp->idx));
> > > +	if (!val)
> > > +		return IRQ_NONE;
> > +
> > > +	if (val & IMX_MU_xSR_TEn(cp->idx)) {
> > > +		imx_mu_rmw(priv, IMX_MU_xCR, 0, IMX_MU_xCR_TIEn(cp->idx));
> > > +		mbox_chan_txdone(chan, 0);
> > > +	}
> > +
> > > +	if (val & IMX_MU_xSR_RFn(cp->idx)) {
> > > +		dat = imx_mu_read(priv, IMX_MU_xRRn(cp->idx));
> > > +		mbox_chan_received_data(chan, (void *)&dat);
> > > +	}
> > +
> > > +	return IRQ_HANDLED;
> > +}
> > +
> > +static bool imx_mu_last_tx_done(struct mbox_chan *chan)
> > +{
> > > +	struct imx_mu_priv *priv = to_imx_mu_priv(chan->mbox);
> > > +	struct imx_mu_con_priv *cp = chan->con_priv;
> > > +	u32 val;
> > +
> > > +	val = imx_mu_read(priv, IMX_MU_xSR);
> > > +	/* test if transmit register is empty */
> > +	return val & IMX_MU_xSR_TEn(cp->idx);
> 
> I guess
> "return imx_mu_read(priv, IMX_MU_xSR) & IMX_MU_xSR_TEn(cp->idx);" is
> shorter and equally well understood.

Same as before:
Is it subjective or technical issue?

> > +}
> > +
> > +static int imx_mu_send_data(struct mbox_chan *chan, void *data)
> > +{
> > > +	struct imx_mu_priv *priv = to_imx_mu_priv(chan->mbox);
> > > +	struct imx_mu_con_priv *cp = chan->con_priv;
> > > +	u32 *arg = data;
> > +
> > > +	if (!imx_mu_last_tx_done(chan))
> > > +		return -EBUSY;
> > +
> > > +	imx_mu_write(priv, *arg, IMX_MU_xTRn(cp->idx));
> > +	imx_mu_rmw(priv, IMX_MU_xCR, IMX_MU_xSR_TEn(cp->idx), 0);
> 
> In multi-channel mode this RMW cycle needs some kind of locking. As
> this register is also changed from the irq handler, this probably needs
> to be a irqsave spinlock.

ok.

> > +
> > > +	return 0;
> > +}
> > +
> > +static int imx_mu_startup(struct mbox_chan *chan)
> > +{
> > > +	struct imx_mu_priv *priv = to_imx_mu_priv(chan->mbox);
> > > +	struct imx_mu_con_priv *cp = chan->con_priv;
> > > +	int ret;
> > +
> > > +	cp->irq_desc = devm_kasprintf(priv->dev, GFP_KERNEL, "imx_mu_chan[%i]",
> > > +				??????cp->idx);
> > > +	if (!cp->irq_desc)
> > > +		return -ENOMEM;
> > +
> > > +	ret = devm_request_irq(priv->dev, cp->irq, imx_mu_isr,
> > +			???????IRQF_SHARED, cp->irq_desc, chan);
> 
> Using the devm_ variants of those functions doesn't make sense when the
> resources aren't tied to the device lifetime. As you are tearing them
> down manually in imx_mu_shutdown anyways, just use the raw variants of
> those functions.

So, it is not a problem and there is no advantage. Right?

> > +	if (ret) {
> > > +		dev_err(priv->dev,
> > > +			"Unable to acquire IRQ %d\n", cp->irq);
> > > +		return ret;
> > > +	}
> > +
> > > +	imx_mu_rmw(priv, IMX_MU_xCR, IMX_MU_xCR_RIEn(cp->idx), 0);
> > +
> > > +	return 0;
> > +}
> > +
> > +static void imx_mu_shutdown(struct mbox_chan *chan)
> > +{
> > > +	struct imx_mu_priv *priv = to_imx_mu_priv(chan->mbox);
> > > +	struct imx_mu_con_priv *cp = chan->con_priv;
> > +
> > > +	imx_mu_rmw(priv, IMX_MU_xCR, 0,
> > > +		???IMX_MU_xCR_TIEn(cp->idx) | IMX_MU_xCR_RIEn(cp->idx));
> > +
> > > +	devm_free_irq(priv->dev, cp->irq, chan);
> > > +	devm_kfree(priv->dev, cp->irq_desc);
> > +}
> > +
> > +static const struct mbox_chan_ops imx_mu_ops = {
> > > +	.send_data = imx_mu_send_data,
> > > +	.startup = imx_mu_startup,
> > > +	.shutdown = imx_mu_shutdown,
> > +};
> > +
> > +static void imx_mu_init_generic(struct imx_mu_priv *priv)
> > +{
> > > +	if (priv->side_b)
> > > +		return;
> > +
> > > +	/* Set default MU configuration */
> > > +	imx_mu_write(priv, 0, IMX_MU_xCR);
> > +}
> > +
> > +static int imx_mu_probe(struct platform_device *pdev)
> > +{
> > > +	struct device *dev = &pdev->dev;
> > > +	struct device_node *np = dev->of_node;
> > > +	struct resource *iomem;
> > > +	struct imx_mu_priv *priv;
> > > +	unsigned int i;
> > > +	int irq, ret;
> > +
> > > +	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> > > +	if (!priv)
> > > +		return -ENOMEM;
> > +
> > > +	priv->dev = dev;
> > +
> > > +	iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > > +	priv->base = devm_ioremap_resource(&pdev->dev, iomem);
> > > +	if (IS_ERR(priv->base))
> > > +		return PTR_ERR(priv->base);
> > +
> > > +	irq = platform_get_irq(pdev, 0);
> > > +	if (irq < 0)
> > > +		return irq;
> > +
> > > +	priv->clk = devm_clk_get(dev, NULL);
> > > +	if (IS_ERR(priv->clk)) {
> > > +		if (PTR_ERR(priv->clk) != -ENOENT)
> > > +			return PTR_ERR(priv->clk);
> > +
> > > +		priv->clk = NULL;
> > > +	}
> > +
> > > +	ret = clk_prepare_enable(priv->clk);
> > > +	if (ret) {
> > > +		dev_err(dev, "Failed to enable clock\n");
> > > +		return ret;
> > > +	}
> > +
> > > +	for (i = 0; i < IMX_MU_CHANS; i++) {
> > > +		struct imx_mu_con_priv *cp = &priv->con_priv[i];
> > +
> > > +		cp->idx = i;
> > > +		cp->irq = irq;
> > > +		priv->mbox_chans[i].con_priv = cp;
> > > +	}
> > +
> > > +	if (of_property_read_bool(np, "fsl,mu-side-b"))
> > +		priv->side_b = true;
> 
> No need for the if clause here. Just assign the return value from
> of_property_read_bool to priv->side_b.

Not against kernel style and not broken.
Is it subjective or technical issue? I assume I like more red color...

> > +
> > > +	priv->mbox.dev = dev;
> > > +	priv->mbox.ops = &imx_mu_ops;
> > > +	priv->mbox.chans = priv->mbox_chans;
> > > +	priv->mbox.num_chans = IMX_MU_CHANS;
> > > +	priv->mbox.txdone_irq = true;
> > +
> > > +	platform_set_drvdata(pdev, priv);
> > +
> > > +	imx_mu_init_generic(priv);
> > +
> > > +	return mbox_controller_register(&priv->mbox);
> > +}
> > +
> > +static int imx_mu_remove(struct platform_device *pdev)
> > +{
> > > +	struct imx_mu_priv *priv = platform_get_drvdata(pdev);
> > +
> > > +	mbox_controller_unregister(&priv->mbox);
> > > +	clk_disable_unprepare(priv->clk);
> > +
> > > +	return 0;
> > +}
> > +
> > +static const struct of_device_id imx_mu_dt_ids[] = {
> > > +	{ .compatible = "fsl,imx6sx-mu" },
> > > +	{ },
> > +};
> > +MODULE_DEVICE_TABLE(of, imx_mu_dt_ids);
> > +
> > +static struct platform_driver imx_mu_driver = {
> > > > +	.probe		= imx_mu_probe,
> > > > +	.remove		= imx_mu_remove,
> > > +	.driver = {
> > > > +		.name	= "imx_mu",
> > > +		.of_match_table = imx_mu_dt_ids,
> > > +	},
> > +};
> > +module_platform_driver(imx_mu_driver);
> > +
> > > +MODULE_AUTHOR("Oleksij Rempel <o.rempel@pengutronix.de>");
> > +MODULE_DESCRIPTION("Message Unit driver for i.MX");
> > +MODULE_LICENSE("GPL v2");
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180723/06b2537f/attachment.sig>

^ permalink raw reply


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.