* [PATCH net v2 1/2] ibmvnic: Ensure that SCRQ entry reads are correctly ordered
From: Thomas Falcon @ 2020-11-30 19:07 UTC (permalink / raw)
To: mpe
Cc: cforno12, netdev, ljp, ricklind, dnbanerg, tlfalcon, drt, brking,
sukadev, linuxppc-dev
In-Reply-To: <1606763244-28111-1-git-send-email-tlfalcon@linux.ibm.com>
Ensure that received Subordinate Command-Response Queue (SCRQ)
entries are properly read in order by the driver. These queues
are used in the ibmvnic device to process RX buffer and TX completion
descriptors. dma_rmb barriers have been added after checking for a
pending descriptor to ensure the correct descriptor entry is checked
and after reading the SCRQ descriptor to ensure the entire
descriptor is read before processing.
Fixes: 032c5e828 ("Driver for IBM System i/p VNIC protocol")
Signed-off-by: Thomas Falcon <tlfalcon@linux.ibm.com>
---
drivers/net/ethernet/ibm/ibmvnic.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 2aa40b2..5ea9f5c 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2403,6 +2403,12 @@ static int ibmvnic_poll(struct napi_struct *napi, int budget)
if (!pending_scrq(adapter, adapter->rx_scrq[scrq_num]))
break;
+ /* The queue entry at the current index is peeked at above
+ * to determine that there is a valid descriptor awaiting
+ * processing. We want to be sure that the current slot
+ * holds a valid descriptor before reading its contents.
+ */
+ dma_rmb();
next = ibmvnic_next_scrq(adapter, adapter->rx_scrq[scrq_num]);
rx_buff =
(struct ibmvnic_rx_buff *)be64_to_cpu(next->
@@ -3098,6 +3104,13 @@ static int ibmvnic_complete_tx(struct ibmvnic_adapter *adapter,
unsigned int pool = scrq->pool_index;
int num_entries = 0;
+ /* The queue entry at the current index is peeked at above
+ * to determine that there is a valid descriptor awaiting
+ * processing. We want to be sure that the current slot
+ * holds a valid descriptor before reading its contents.
+ */
+ dma_rmb();
+
next = ibmvnic_next_scrq(adapter, scrq);
for (i = 0; i < next->tx_comp.num_comps; i++) {
if (next->tx_comp.rcs[i]) {
@@ -3498,6 +3511,11 @@ static union sub_crq *ibmvnic_next_scrq(struct ibmvnic_adapter *adapter,
}
spin_unlock_irqrestore(&scrq->lock, flags);
+ /* Ensure that the entire buffer descriptor has been
+ * loaded before reading its contents
+ */
+ dma_rmb();
+
return entry;
}
--
1.8.3.1
^ permalink raw reply related
* [PATCH net v2 0/2] ibmvnic: Bug fixes for queue descriptor processing
From: Thomas Falcon @ 2020-11-30 19:07 UTC (permalink / raw)
To: mpe
Cc: cforno12, netdev, ljp, ricklind, dnbanerg, tlfalcon, drt, brking,
sukadev, linuxppc-dev
This series resolves a few issues in the ibmvnic driver's
RX buffer and TX completion processing. The first patch
includes memory barriers to synchronize queue descriptor
reads. The second patch fixes a memory leak that could
occur if the device returns a TX completion with an error
code in the descriptor, in which case the respective socket
buffer and other relevant data structures may not be freed
or updated properly.
v2: Provide more detailed comments explaining specifically what
reads are being ordered, suggested by Michael Ellerman
Thomas Falcon (2):
ibmvnic: Ensure that SCRQ entry reads are correctly ordered
ibmvnic: Fix TX completion error handling
drivers/net/ethernet/ibm/ibmvnic.c | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
--
1.8.3.1
^ permalink raw reply
* [PATCH net v2 2/2] ibmvnic: Fix TX completion error handling
From: Thomas Falcon @ 2020-11-30 19:07 UTC (permalink / raw)
To: mpe
Cc: cforno12, netdev, ljp, ricklind, dnbanerg, tlfalcon, drt, brking,
sukadev, linuxppc-dev
In-Reply-To: <1606763244-28111-1-git-send-email-tlfalcon@linux.ibm.com>
TX completions received with an error return code are not
being processed properly. When an error code is seen, do not
proceed to the next completion before cleaning up the existing
entry's data structures.
Fixes: 032c5e828 ("Driver for IBM System i/p VNIC protocol")
Signed-off-by: Thomas Falcon <tlfalcon@linux.ibm.com>
---
drivers/net/ethernet/ibm/ibmvnic.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 5ea9f5c..10878f8 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -3113,11 +3113,9 @@ static int ibmvnic_complete_tx(struct ibmvnic_adapter *adapter,
next = ibmvnic_next_scrq(adapter, scrq);
for (i = 0; i < next->tx_comp.num_comps; i++) {
- if (next->tx_comp.rcs[i]) {
+ if (next->tx_comp.rcs[i])
dev_err(dev, "tx error %x\n",
next->tx_comp.rcs[i]);
- continue;
- }
index = be32_to_cpu(next->tx_comp.correlators[i]);
if (index & IBMVNIC_TSO_POOL_MASK) {
tx_pool = &adapter->tso_pool[pool];
--
1.8.3.1
^ permalink raw reply related
* Re: [PATCH 0/5] drop unused BACKLIGHT_GENERIC option
From: Sam Ravnborg @ 2020-11-30 19:11 UTC (permalink / raw)
To: Andrey Zhizhikin
Cc: alexandre.belloni, tony, linux-kernel, James.Bottomley,
thierry.reding, paulus, lee.jones, daniel.thompson, linux-omap,
Arnd Bergmann, deller, linux, krzk, jonathanh, ludovic.desroches,
catalin.marinas, linux-mips, will, mripard, linux-tegra, wens,
linux-arm-kernel, jernej.skrabec, tsbogend, linux-parisc,
emil.l.velikov, nicolas.ferre, Olof Johansson, linuxppc-dev
In-Reply-To: <20201130152137.24909-1-andrey.zhizhikin@leica-geosystems.com>
On Mon, Nov 30, 2020 at 03:21:32PM +0000, Andrey Zhizhikin wrote:
> Since the removal of generic_bl driver from the source tree in commit
> 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is
> unused") BACKLIGHT_GENERIC config option became obsolete as well and
> therefore subject to clean-up from all configuration files.
>
> This series introduces patches to address this removal, separated by
> architectures in the kernel tree.
>
> Andrey Zhizhikin (5):
> ARM: configs: drop unused BACKLIGHT_GENERIC option
> arm64: defconfig: drop unused BACKLIGHT_GENERIC option
> MIPS: configs: drop unused BACKLIGHT_GENERIC option
> parisc: configs: drop unused BACKLIGHT_GENERIC option
> powerpc/configs: drop unused BACKLIGHT_GENERIC option
For defconfigs I expect arch maintainers to do a make xxxdefconfig / make
savedefconfig / cp defconfig ... run now and then - this will remove
all such symbols.
If the patches goes in like they are submitted then:
Acked-by: Sam Ravnborg <sam@ravnborg.org>
>
> arch/arm/configs/at91_dt_defconfig | 1 -
> arch/arm/configs/cm_x300_defconfig | 1 -
> arch/arm/configs/colibri_pxa300_defconfig | 1 -
> arch/arm/configs/jornada720_defconfig | 1 -
> arch/arm/configs/magician_defconfig | 1 -
> arch/arm/configs/mini2440_defconfig | 1 -
> arch/arm/configs/omap2plus_defconfig | 1 -
> arch/arm/configs/pxa3xx_defconfig | 1 -
> arch/arm/configs/qcom_defconfig | 1 -
> arch/arm/configs/sama5_defconfig | 1 -
> arch/arm/configs/sunxi_defconfig | 1 -
> arch/arm/configs/tegra_defconfig | 1 -
> arch/arm/configs/u8500_defconfig | 1 -
> arch/arm64/configs/defconfig | 1 -
> arch/mips/configs/gcw0_defconfig | 1 -
> arch/mips/configs/gpr_defconfig | 1 -
> arch/mips/configs/lemote2f_defconfig | 1 -
> arch/mips/configs/loongson3_defconfig | 1 -
> arch/mips/configs/mtx1_defconfig | 1 -
> arch/mips/configs/rs90_defconfig | 1 -
> arch/parisc/configs/generic-64bit_defconfig | 1 -
> arch/powerpc/configs/powernv_defconfig | 1 -
> 22 files changed, 22 deletions(-)
>
>
> base-commit: b65054597872ce3aefbc6a666385eabdf9e288da
> prerequisite-patch-id: bfd382cf1dc021d20204f10ea9403319c1c32b12
> prerequisite-patch-id: 5397c0c8648bb3e0b830207ea867138c11c6e644
> prerequisite-patch-id: a3c284dff5fe6d02828918a886db6a8ed3197e20
> --
> 2.17.1
^ permalink raw reply
* Re: [PATCH v8 11/12] mm/vmalloc: Hugepage vmalloc mappings
From: Edgecombe, Rick P @ 2020-11-30 20:21 UTC (permalink / raw)
To: npiggin@gmail.com, linux-mm@kvack.org, akpm@linux-foundation.org
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
hch@infradead.org, lizefan@huawei.com,
Jonathan.Cameron@Huawei.com, linuxppc-dev@lists.ozlabs.org
In-Reply-To: <20201128152559.999540-12-npiggin@gmail.com>
On Sun, 2020-11-29 at 01:25 +1000, Nicholas Piggin wrote:
> Support huge page vmalloc mappings. Config option
> HAVE_ARCH_HUGE_VMALLOC
> enables support on architectures that define HAVE_ARCH_HUGE_VMAP and
> supports PMD sized vmap mappings.
>
> vmalloc will attempt to allocate PMD-sized pages if allocating PMD
> size
> or larger, and fall back to small pages if that was unsuccessful.
>
> Allocations that do not use PAGE_KERNEL prot are not permitted to use
> huge pages, because not all callers expect this (e.g., module
> allocations vs strict module rwx).
Several architectures (x86, arm64, others?) allocate modules initially
with PAGE_KERNEL and so I think this test will not exclude module
allocations in those cases.
[snip]
> @@ -2400,6 +2453,7 @@ static inline void set_area_direct_map(const
> struct vm_struct *area,
> {
> int i;
>
> + /* HUGE_VMALLOC passes small pages to set_direct_map */
> for (i = 0; i < area->nr_pages; i++)
> if (page_address(area->pages[i]))
> set_direct_map(area->pages[i]);
> @@ -2433,11 +2487,12 @@ static void vm_remove_mappings(struct
> vm_struct *area, int deallocate_pages)
> * map. Find the start and end range of the direct mappings to
> make sure
> * the vm_unmap_aliases() flush includes the direct map.
> */
> - for (i = 0; i < area->nr_pages; i++) {
> + for (i = 0; i < area->nr_pages; i += 1U << area->page_order) {
> unsigned long addr = (unsigned long)page_address(area-
> >pages[i]);
> if (addr) {
> + unsigned long page_size = PAGE_SIZE << area-
> >page_order;
> start = min(addr, start);
> - end = max(addr + PAGE_SIZE, end);
> + end = max(addr + page_size, end);
> flush_dmap = 1;
> }
> }
The logic around this is a bit tangled. The reset of the direct map has
to succeed, but if the set_direct_map_() functions require a split they
could fail. For x86, set_memory_ro() calls on a vmalloc alias will
mirror the page size and permission on the direct map and so the direct
map will be broken to 4k pages if it's a RO vmalloc allocation.
But after this, module vmalloc()'s could have large pages which would
result in large RO pages on the direct map. Then it could possibly fail
when trying to reset a 4k page out of a large RO direct map mapping.
I think either module allocations need to be actually excluded from
having large pages (seems like you might have seen other issues as
well?), or another option could be to use the changes here:
https://lore.kernel.org/lkml/20201125092208.12544-4-rppt@kernel.org/
to reset the direct map for a large page range at a time for large
vmalloc pages.
^ permalink raw reply
* Re: [PATCH 0/5] drop unused BACKLIGHT_GENERIC option
From: Krzysztof Kozlowski @ 2020-11-30 20:25 UTC (permalink / raw)
To: Sam Ravnborg
Cc: alexandre.belloni, tony, linux-kernel, James.Bottomley,
thierry.reding, paulus, lee.jones, daniel.thompson, linux-omap,
Arnd Bergmann, deller, linux, jonathanh, ludovic.desroches,
catalin.marinas, linux-mips, will, mripard, Andrey Zhizhikin,
linux-tegra, wens, linux-arm-kernel, jernej.skrabec, tsbogend,
linux-parisc, emil.l.velikov, nicolas.ferre, Olof Johansson,
linuxppc-dev
In-Reply-To: <20201130191133.GA1565464@ravnborg.org>
On Mon, Nov 30, 2020 at 08:11:33PM +0100, Sam Ravnborg wrote:
> On Mon, Nov 30, 2020 at 03:21:32PM +0000, Andrey Zhizhikin wrote:
> > Since the removal of generic_bl driver from the source tree in commit
> > 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is
> > unused") BACKLIGHT_GENERIC config option became obsolete as well and
> > therefore subject to clean-up from all configuration files.
> >
> > This series introduces patches to address this removal, separated by
> > architectures in the kernel tree.
> >
> > Andrey Zhizhikin (5):
> > ARM: configs: drop unused BACKLIGHT_GENERIC option
> > arm64: defconfig: drop unused BACKLIGHT_GENERIC option
> > MIPS: configs: drop unused BACKLIGHT_GENERIC option
> > parisc: configs: drop unused BACKLIGHT_GENERIC option
> > powerpc/configs: drop unused BACKLIGHT_GENERIC option
>
> For defconfigs I expect arch maintainers to do a make xxxdefconfig / make
> savedefconfig / cp defconfig ... run now and then - this will remove
> all such symbols.
savedefconfig can be tricky because of risk of loosing options:
1. it will remove options which became the default or became selected,
2. later when the default is changed or selecting option is removed, the
first option from #1 will not be brought back.
This was already for example with DEBUG_FS and the conclusion that time
was - do not run savedefconfig automatically.
Therefore if some symbol(s) can be safely removed, patch is welcomed.
Best regards,
Krzysztof
>
> If the patches goes in like they are submitted then:
> Acked-by: Sam Ravnborg <sam@ravnborg.org>
^ permalink raw reply
* [RFC Qemu PATCH v2 0/2] spapr: nvdimm: Asynchronus flush hcall support
From: Shivaprasad G Bhat @ 2020-11-30 15:16 UTC (permalink / raw)
To: xiaoguangrong.eric, mst, imammedo, david, qemu-devel, qemu-ppc
Cc: linux-nvdimm, aneesh.kumar, kvm-ppc, shivaprasadbhat, bharata,
linuxppc-dev
The nvdimm devices are expected to ensure write persistent during power
failure kind of scenarios.
The libpmem has architecture specific instructions like dcbf on power
to flush the cache data to backend nvdimm device during normal writes.
Qemu - virtual nvdimm devices are memory mapped. The dcbf in the guest
doesn't traslate to actual flush to the backend file on the host in case
of file backed vnvdimms. This is addressed by virtio-pmem in case of x86_64
by making asynchronous flushes.
On PAPR, issue is addressed by adding a new hcall to
request for an explicit asynchronous flush requests from the guest ndctl
driver when the backend nvdimm cannot ensure write persistence with dcbf
alone. So, the approach here is to convey when the asynchronous flush is
required in a device tree property. The guest makes the hcall when the
property is found, instead of relying on dcbf.
The first patch adds the necessary asynchronous hcall support infrastructure
code at the DRC level. Second patch implements the hcall using the
infrastructure.
Hcall semantics are in review and not final.
A new device property sync-dax is added to the nvdimm device. When the
sync-dax is off(default), the asynchronous hcalls will be called.
With respect to save from new qemu to restore on old qemu, having the
sync-dax by default off(when not specified) causes IO errors in guests as
the async-hcall would not be supported on old qemu. The new hcall
implementation being supported only on the new pseries machine version,
the current machine version checks may be sufficient to prevent
such migration. Please suggest what should be done.
The below demonstration shows the map_sync behavior with sync-dax on & off.
(https://github.com/avocado-framework-tests/avocado-misc-tests/blob/master/memory/ndctl.py.data/map_sync.c)
The pmem0 is from nvdimm with With sync-dax=on, and pmem1 is from nvdimm with syn-dax=off, mounted as
/dev/pmem0 on /mnt1 type xfs (rw,relatime,attr2,dax=always,inode64,logbufs=8,logbsize=32k,noquota)
/dev/pmem1 on /mnt2 type xfs (rw,relatime,attr2,dax=always,inode64,logbufs=8,logbsize=32k,noquota)
[root@atest-guest ~]# ./mapsync /mnt1/newfile ----> When sync-dax=off
[root@atest-guest ~]# ./mapsync /mnt2/newfile ----> when sync-dax=on
Failed to mmap with Operation not supported
---
v1 - https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg06330.html
Changes from v1
- Fixed a missed-out unlock
- using QLIST_FOREACH instead of QLIST_FOREACH_SAFE while generating token
Shivaprasad G Bhat (2):
spapr: drc: Add support for async hcalls at the drc level
spapr: nvdimm: Implement async flush hcalls
hw/mem/nvdimm.c | 1
hw/ppc/spapr_drc.c | 146 ++++++++++++++++++++++++++++++++++++++++++++
hw/ppc/spapr_nvdimm.c | 79 ++++++++++++++++++++++++
include/hw/mem/nvdimm.h | 10 +++
include/hw/ppc/spapr.h | 3 +
include/hw/ppc/spapr_drc.h | 25 ++++++++
6 files changed, 263 insertions(+), 1 deletion(-)
--
Signature
^ permalink raw reply
* [RFC Qemu PATCH v2 1/2] spapr: drc: Add support for async hcalls at the drc level
From: Shivaprasad G Bhat @ 2020-11-30 15:16 UTC (permalink / raw)
To: xiaoguangrong.eric, mst, imammedo, david, qemu-devel, qemu-ppc
Cc: linux-nvdimm, aneesh.kumar, kvm-ppc, shivaprasadbhat, bharata,
linuxppc-dev
In-Reply-To: <160674929554.2492771.17651548703390170573.stgit@lep8c.aus.stglabs.ibm.com>
The patch adds support for async hcalls at the DRC level for the
spapr devices. To be used by spapr-scm devices in the patch/es to follow.
Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
---
hw/ppc/spapr_drc.c | 149 ++++++++++++++++++++++++++++++++++++++++++++
include/hw/ppc/spapr_drc.h | 25 +++++++
2 files changed, 174 insertions(+)
diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c
index 77718cde1f..4ecd04f686 100644
--- a/hw/ppc/spapr_drc.c
+++ b/hw/ppc/spapr_drc.c
@@ -15,6 +15,7 @@
#include "qapi/qmp/qnull.h"
#include "cpu.h"
#include "qemu/cutils.h"
+#include "qemu/guest-random.h"
#include "hw/ppc/spapr_drc.h"
#include "qom/object.h"
#include "migration/vmstate.h"
@@ -421,6 +422,148 @@ void spapr_drc_detach(SpaprDrc *drc)
spapr_drc_release(drc);
}
+
+/*
+ * @drc : device DRC targetting which the async hcalls to be made.
+ *
+ * All subsequent requests to run/query the status should use the
+ * unique token returned here.
+ */
+uint64_t spapr_drc_get_new_async_hcall_token(SpaprDrc *drc)
+{
+ Error *err = NULL;
+ uint64_t token;
+ SpaprDrcDeviceAsyncHCallState *tmp, *next, *state;
+
+ state = g_malloc0(sizeof(*state));
+ state->pending = true;
+
+ qemu_mutex_lock(&drc->async_hcall_states_lock);
+retry:
+ if (qemu_guest_getrandom(&token, sizeof(token), &err) < 0) {
+ error_report_err(err);
+ g_free(state);
+ qemu_mutex_unlock(&drc->async_hcall_states_lock);
+ return 0;
+ }
+
+ if (!token) /* Token should be non-zero */
+ goto retry;
+
+ if (!QLIST_EMPTY(&drc->async_hcall_states)) {
+ QLIST_FOREACH_SAFE(tmp, &drc->async_hcall_states, node, next) {
+ if (tmp->continue_token == token) {
+ /* If the token already in use, get a new one */
+ goto retry;
+ }
+ }
+ }
+
+ state->continue_token = token;
+ QLIST_INSERT_HEAD(&drc->async_hcall_states, state, node);
+
+ qemu_mutex_unlock(&drc->async_hcall_states_lock);
+
+ return state->continue_token;
+}
+
+static void *spapr_drc_async_hcall_runner(void *opaque)
+{
+ int response = -1;
+ SpaprDrcDeviceAsyncHCallState *state = opaque;
+
+ /*
+ * state is freed only after this thread finishes(after pthread_join()),
+ * don't worry about it becoming NULL.
+ */
+
+ response = state->func(state->data);
+
+ state->hcall_ret = response;
+ state->pending = 0;
+
+ return NULL;
+}
+
+/*
+ * @drc : device DRC targetting which the async hcalls to be made.
+ * token : The continue token to be used for tracking as recived from
+ * spapr_drc_get_new_async_hcall_token
+ * @func() : the worker function which needs to be executed asynchronously
+ * @data : data to be passed to the asynchronous function. Worker is supposed
+ * to free/cleanup the data that is passed here
+ */
+void spapr_drc_run_async_hcall(SpaprDrc *drc, uint64_t token,
+ SpaprDrcAsyncHcallWorkerFunc *func, void *data)
+{
+ SpaprDrcDeviceAsyncHCallState *state;
+
+ qemu_mutex_lock(&drc->async_hcall_states_lock);
+ QLIST_FOREACH(state, &drc->async_hcall_states, node) {
+ if (state->continue_token == token) {
+ state->func = func;
+ state->data = data;
+ qemu_thread_create(&state->thread, "sPAPR Async HCALL",
+ spapr_drc_async_hcall_runner, state,
+ QEMU_THREAD_JOINABLE);
+ break;
+ }
+ }
+ qemu_mutex_unlock(&drc->async_hcall_states_lock);
+}
+
+/*
+ * spapr_drc_finish_async_hcalls
+ * Waits for all pending async requests to complete
+ * thier execution and free the states
+ */
+static void spapr_drc_finish_async_hcalls(SpaprDrc *drc)
+{
+ SpaprDrcDeviceAsyncHCallState *state, *next;
+
+ if (QLIST_EMPTY(&drc->async_hcall_states)) {
+ return;
+ }
+
+ qemu_mutex_lock(&drc->async_hcall_states_lock);
+ QLIST_FOREACH_SAFE(state, &drc->async_hcall_states, node, next) {
+ qemu_thread_join(&state->thread);
+ QLIST_REMOVE(state, node);
+ g_free(state);
+ }
+ qemu_mutex_unlock(&drc->async_hcall_states_lock);
+}
+
+/*
+ * spapr_drc_get_async_hcall_status
+ * Fetches the status of the hcall worker and returns H_BUSY
+ * if the worker is still running.
+ */
+int spapr_drc_get_async_hcall_status(SpaprDrc *drc, uint64_t token)
+{
+ int ret = H_PARAMETER;
+ SpaprDrcDeviceAsyncHCallState *state, *node;
+
+ qemu_mutex_lock(&drc->async_hcall_states_lock);
+ QLIST_FOREACH_SAFE(state, &drc->async_hcall_states, node, node) {
+ if (state->continue_token == token) {
+ if (state->pending) {
+ ret = H_BUSY;
+ break;
+ } else {
+ ret = state->hcall_ret;
+ qemu_thread_join(&state->thread);
+ QLIST_REMOVE(state, node);
+ g_free(state);
+ break;
+ }
+ }
+ }
+ qemu_mutex_unlock(&drc->async_hcall_states_lock);
+
+ return ret;
+}
+
void spapr_drc_reset(SpaprDrc *drc)
{
SpaprDrcClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);
@@ -448,6 +591,7 @@ void spapr_drc_reset(SpaprDrc *drc)
drc->ccs_offset = -1;
drc->ccs_depth = -1;
}
+ spapr_drc_finish_async_hcalls(drc);
}
static bool spapr_drc_unplug_requested_needed(void *opaque)
@@ -558,6 +702,7 @@ SpaprDrc *spapr_dr_connector_new(Object *owner, const char *type,
drc->owner = owner;
prop_name = g_strdup_printf("dr-connector[%"PRIu32"]",
spapr_drc_index(drc));
+
object_property_add_child(owner, prop_name, OBJECT(drc));
object_unref(OBJECT(drc));
qdev_realize(DEVICE(drc), NULL, NULL);
@@ -577,6 +722,10 @@ static void spapr_dr_connector_instance_init(Object *obj)
object_property_add(obj, "fdt", "struct", prop_get_fdt,
NULL, NULL, NULL);
drc->state = drck->empty_state;
+
+ qemu_mutex_init(&drc->async_hcall_states_lock);
+ QLIST_INIT(&drc->async_hcall_states);
+
}
static void spapr_dr_connector_class_init(ObjectClass *k, void *data)
diff --git a/include/hw/ppc/spapr_drc.h b/include/hw/ppc/spapr_drc.h
index 165b281496..77f6e4386c 100644
--- a/include/hw/ppc/spapr_drc.h
+++ b/include/hw/ppc/spapr_drc.h
@@ -18,6 +18,7 @@
#include "sysemu/runstate.h"
#include "hw/qdev-core.h"
#include "qapi/error.h"
+#include "block/thread-pool.h"
#define TYPE_SPAPR_DR_CONNECTOR "spapr-dr-connector"
#define SPAPR_DR_CONNECTOR_GET_CLASS(obj) \
@@ -168,6 +169,21 @@ typedef enum {
SPAPR_DRC_STATE_PHYSICAL_CONFIGURED = 8,
} SpaprDrcState;
+typedef struct SpaprDrc SpaprDrc;
+
+typedef int SpaprDrcAsyncHcallWorkerFunc(void *opaque);
+typedef struct SpaprDrcDeviceAsyncHCallState {
+ uint64_t continue_token;
+ bool pending;
+
+ int hcall_ret;
+ SpaprDrcAsyncHcallWorkerFunc *func;
+ void *data;
+
+ QemuThread thread;
+
+ QLIST_ENTRY(SpaprDrcDeviceAsyncHCallState) node;
+} SpaprDrcDeviceAsyncHCallState;
typedef struct SpaprDrc {
/*< private >*/
DeviceState parent;
@@ -182,6 +198,10 @@ typedef struct SpaprDrc {
int ccs_offset;
int ccs_depth;
+ /* async hcall states */
+ QemuMutex async_hcall_states_lock;
+ QLIST_HEAD(, SpaprDrcDeviceAsyncHCallState) async_hcall_states;
+
/* device pointer, via link property */
DeviceState *dev;
bool unplug_requested;
@@ -241,6 +261,11 @@ void spapr_drc_detach(SpaprDrc *drc);
/* Returns true if a hot plug/unplug request is pending */
bool spapr_drc_transient(SpaprDrc *drc);
+uint64_t spapr_drc_get_new_async_hcall_token(SpaprDrc *drc);
+void spapr_drc_run_async_hcall(SpaprDrc *drc, uint64_t token,
+ SpaprDrcAsyncHcallWorkerFunc, void *data);
+int spapr_drc_get_async_hcall_status(SpaprDrc *drc, uint64_t token);
+
static inline bool spapr_drc_unplug_requested(SpaprDrc *drc)
{
return drc->unplug_requested;
^ permalink raw reply related
* [RFC Qemu PATCH v2 2/2] spapr: nvdimm: Implement async flush hcalls
From: Shivaprasad G Bhat @ 2020-11-30 15:17 UTC (permalink / raw)
To: xiaoguangrong.eric, mst, imammedo, david, qemu-devel, qemu-ppc
Cc: linux-nvdimm, aneesh.kumar, kvm-ppc, shivaprasadbhat, bharata,
linuxppc-dev
In-Reply-To: <160674929554.2492771.17651548703390170573.stgit@lep8c.aus.stglabs.ibm.com>
When the persistent memory beacked by a file, a cpu cache flush instruction
is not sufficient to ensure the stores are correctly flushed to the media.
The patch implements the async hcalls for flush operation on demand from the
guest kernel.
The device option sync-dax is by default off and enables explicit asynchronous
flush requests from guest. It can be disabled by setting syn-dax=on.
Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
---
hw/mem/nvdimm.c | 1 +
hw/ppc/spapr_nvdimm.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++
include/hw/mem/nvdimm.h | 10 ++++++
include/hw/ppc/spapr.h | 3 +-
4 files changed, 92 insertions(+), 1 deletion(-)
diff --git a/hw/mem/nvdimm.c b/hw/mem/nvdimm.c
index 03c2201b56..37a4db0135 100644
--- a/hw/mem/nvdimm.c
+++ b/hw/mem/nvdimm.c
@@ -220,6 +220,7 @@ static void nvdimm_write_label_data(NVDIMMDevice *nvdimm, const void *buf,
static Property nvdimm_properties[] = {
DEFINE_PROP_BOOL(NVDIMM_UNARMED_PROP, NVDIMMDevice, unarmed, false),
+ DEFINE_PROP_BOOL(NVDIMM_SYNC_DAX_PROP, NVDIMMDevice, sync_dax, false),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ppc/spapr_nvdimm.c b/hw/ppc/spapr_nvdimm.c
index a833a63b5e..557e36aa98 100644
--- a/hw/ppc/spapr_nvdimm.c
+++ b/hw/ppc/spapr_nvdimm.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qemu/cutils.h"
#include "qapi/error.h"
#include "hw/ppc/spapr_drc.h"
#include "hw/ppc/spapr_nvdimm.h"
@@ -155,6 +156,11 @@ static int spapr_dt_nvdimm(SpaprMachineState *spapr, void *fdt,
"operating-system")));
_FDT(fdt_setprop(fdt, child_offset, "ibm,cache-flush-required", NULL, 0));
+ if (!nvdimm->sync_dax) {
+ _FDT(fdt_setprop(fdt, child_offset, "ibm,async-flush-required",
+ NULL, 0));
+ }
+
return child_offset;
}
@@ -370,6 +376,78 @@ static target_ulong h_scm_bind_mem(PowerPCCPU *cpu, SpaprMachineState *spapr,
return H_SUCCESS;
}
+typedef struct SCMAsyncFlushData {
+ int fd;
+ uint64_t token;
+} SCMAsyncFlushData;
+
+static int flush_worker_cb(void *opaque)
+{
+ int ret = H_SUCCESS;
+ SCMAsyncFlushData *req_data = opaque;
+
+ /* flush raw backing image */
+ if (qemu_fdatasync(req_data->fd) < 0) {
+ error_report("papr_scm: Could not sync nvdimm to backend file: %s",
+ strerror(errno));
+ ret = H_HARDWARE;
+ }
+
+ g_free(req_data);
+
+ return ret;
+}
+
+static target_ulong h_scm_async_flush(PowerPCCPU *cpu, SpaprMachineState *spapr,
+ target_ulong opcode, target_ulong *args)
+{
+ int ret;
+ uint32_t drc_index = args[0];
+ uint64_t continue_token = args[1];
+ SpaprDrc *drc = spapr_drc_by_index(drc_index);
+ PCDIMMDevice *dimm;
+ HostMemoryBackend *backend = NULL;
+ SCMAsyncFlushData *req_data = NULL;
+
+ if (!drc || !drc->dev ||
+ spapr_drc_type(drc) != SPAPR_DR_CONNECTOR_TYPE_PMEM) {
+ return H_PARAMETER;
+ }
+
+ if (continue_token != 0) {
+ ret = spapr_drc_get_async_hcall_status(drc, continue_token);
+ if (ret == H_BUSY) {
+ args[0] = continue_token;
+ return H_LONG_BUSY_ORDER_1_SEC;
+ }
+
+ return ret;
+ }
+
+ dimm = PC_DIMM(drc->dev);
+ backend = MEMORY_BACKEND(dimm->hostmem);
+
+ req_data = g_malloc0(sizeof(SCMAsyncFlushData));
+ req_data->fd = memory_region_get_fd(&backend->mr);
+
+ continue_token = spapr_drc_get_new_async_hcall_token(drc);
+ if (!continue_token) {
+ g_free(req_data);
+ return H_P2;
+ }
+ req_data->token = continue_token;
+
+ spapr_drc_run_async_hcall(drc, continue_token, &flush_worker_cb, req_data);
+
+ ret = spapr_drc_get_async_hcall_status(drc, continue_token);
+ if (ret == H_BUSY) {
+ args[0] = req_data->token;
+ return ret;
+ }
+
+ return ret;
+}
+
static target_ulong h_scm_unbind_mem(PowerPCCPU *cpu, SpaprMachineState *spapr,
target_ulong opcode, target_ulong *args)
{
@@ -486,6 +564,7 @@ static void spapr_scm_register_types(void)
spapr_register_hypercall(H_SCM_BIND_MEM, h_scm_bind_mem);
spapr_register_hypercall(H_SCM_UNBIND_MEM, h_scm_unbind_mem);
spapr_register_hypercall(H_SCM_UNBIND_ALL, h_scm_unbind_all);
+ spapr_register_hypercall(H_SCM_ASYNC_FLUSH, h_scm_async_flush);
}
type_init(spapr_scm_register_types)
diff --git a/include/hw/mem/nvdimm.h b/include/hw/mem/nvdimm.h
index c699842dd0..9e8795766e 100644
--- a/include/hw/mem/nvdimm.h
+++ b/include/hw/mem/nvdimm.h
@@ -51,6 +51,7 @@ OBJECT_DECLARE_TYPE(NVDIMMDevice, NVDIMMClass, NVDIMM)
#define NVDIMM_LABEL_SIZE_PROP "label-size"
#define NVDIMM_UUID_PROP "uuid"
#define NVDIMM_UNARMED_PROP "unarmed"
+#define NVDIMM_SYNC_DAX_PROP "sync-dax"
struct NVDIMMDevice {
/* private */
@@ -85,6 +86,15 @@ struct NVDIMMDevice {
*/
bool unarmed;
+ /*
+ * On PPC64,
+ * The 'off' value results in the async-flush-required property set
+ * in the device tree for pseries machines. When 'off', the guest
+ * initiates explicity flush requests to the backend device ensuring
+ * write persistence.
+ */
+ bool sync_dax;
+
/*
* The PPC64 - spapr requires each nvdimm device have a uuid.
*/
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 2e89e36cfb..6d7110b7dc 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -535,8 +535,9 @@ struct SpaprMachineState {
#define H_SCM_BIND_MEM 0x3EC
#define H_SCM_UNBIND_MEM 0x3F0
#define H_SCM_UNBIND_ALL 0x3FC
+#define H_SCM_ASYNC_FLUSH 0x4A0
-#define MAX_HCALL_OPCODE H_SCM_UNBIND_ALL
+#define MAX_HCALL_OPCODE H_SCM_ASYNC_FLUSH
/* The hcalls above are standardized in PAPR and implemented by pHyp
* as well.
^ permalink raw reply related
* [PATCH 0/5] drop unused BACKLIGHT_GENERIC option
From: Andrey Zhizhikin @ 2020-11-30 15:21 UTC (permalink / raw)
To: linux, nicolas.ferre, alexandre.belloni, ludovic.desroches, tony,
mripard, wens, jernej.skrabec, thierry.reding, jonathanh,
catalin.marinas, will, tsbogend, James.Bottomley, deller, mpe,
benh, paulus, lee.jones, sam, emil.l.velikov, daniel.thompson,
krzk, linux-arm-kernel, linux-kernel, linux-omap, linux-tegra,
linux-mips, linux-parisc, linuxppc-dev
Since the removal of generic_bl driver from the source tree in commit
7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is
unused") BACKLIGHT_GENERIC config option became obsolete as well and
therefore subject to clean-up from all configuration files.
This series introduces patches to address this removal, separated by
architectures in the kernel tree.
Andrey Zhizhikin (5):
ARM: configs: drop unused BACKLIGHT_GENERIC option
arm64: defconfig: drop unused BACKLIGHT_GENERIC option
MIPS: configs: drop unused BACKLIGHT_GENERIC option
parisc: configs: drop unused BACKLIGHT_GENERIC option
powerpc/configs: drop unused BACKLIGHT_GENERIC option
arch/arm/configs/at91_dt_defconfig | 1 -
arch/arm/configs/cm_x300_defconfig | 1 -
arch/arm/configs/colibri_pxa300_defconfig | 1 -
arch/arm/configs/jornada720_defconfig | 1 -
arch/arm/configs/magician_defconfig | 1 -
arch/arm/configs/mini2440_defconfig | 1 -
arch/arm/configs/omap2plus_defconfig | 1 -
arch/arm/configs/pxa3xx_defconfig | 1 -
arch/arm/configs/qcom_defconfig | 1 -
arch/arm/configs/sama5_defconfig | 1 -
arch/arm/configs/sunxi_defconfig | 1 -
arch/arm/configs/tegra_defconfig | 1 -
arch/arm/configs/u8500_defconfig | 1 -
arch/arm64/configs/defconfig | 1 -
arch/mips/configs/gcw0_defconfig | 1 -
arch/mips/configs/gpr_defconfig | 1 -
arch/mips/configs/lemote2f_defconfig | 1 -
arch/mips/configs/loongson3_defconfig | 1 -
arch/mips/configs/mtx1_defconfig | 1 -
arch/mips/configs/rs90_defconfig | 1 -
arch/parisc/configs/generic-64bit_defconfig | 1 -
arch/powerpc/configs/powernv_defconfig | 1 -
22 files changed, 22 deletions(-)
base-commit: b65054597872ce3aefbc6a666385eabdf9e288da
prerequisite-patch-id: bfd382cf1dc021d20204f10ea9403319c1c32b12
prerequisite-patch-id: 5397c0c8648bb3e0b830207ea867138c11c6e644
prerequisite-patch-id: a3c284dff5fe6d02828918a886db6a8ed3197e20
--
2.17.1
^ permalink raw reply
* [PATCH 2/5] arm64: defconfig: drop unused BACKLIGHT_GENERIC option
From: Andrey Zhizhikin @ 2020-11-30 15:21 UTC (permalink / raw)
To: linux, nicolas.ferre, alexandre.belloni, ludovic.desroches, tony,
mripard, wens, jernej.skrabec, thierry.reding, jonathanh,
catalin.marinas, will, tsbogend, James.Bottomley, deller, mpe,
benh, paulus, lee.jones, sam, emil.l.velikov, daniel.thompson,
krzk, linux-arm-kernel, linux-kernel, linux-omap, linux-tegra,
linux-mips, linux-parisc, linuxppc-dev
In-Reply-To: <20201130152137.24909-1-andrey.zhizhikin@leica-geosystems.com>
Commit 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is
unused") removed geenric_bl driver from the tree, together with
corresponding config option.
Remove BACKLIGHT_GENERIC config item from arm64 configuration.
Fixes: 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is unused")
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
---
arch/arm64/configs/defconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 8e3f7ae71de5..280ed7404a1d 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -681,7 +681,6 @@ CONFIG_DRM_PANFROST=m
CONFIG_FB=y
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_EFI=y
-CONFIG_BACKLIGHT_GENERIC=m
CONFIG_BACKLIGHT_PWM=m
CONFIG_BACKLIGHT_LP855X=m
CONFIG_LOGO=y
--
2.17.1
^ permalink raw reply related
* [PATCH 3/5] MIPS: configs: drop unused BACKLIGHT_GENERIC option
From: Andrey Zhizhikin @ 2020-11-30 15:21 UTC (permalink / raw)
To: linux, nicolas.ferre, alexandre.belloni, ludovic.desroches, tony,
mripard, wens, jernej.skrabec, thierry.reding, jonathanh,
catalin.marinas, will, tsbogend, James.Bottomley, deller, mpe,
benh, paulus, lee.jones, sam, emil.l.velikov, daniel.thompson,
krzk, linux-arm-kernel, linux-kernel, linux-omap, linux-tegra,
linux-mips, linux-parisc, linuxppc-dev
In-Reply-To: <20201130152137.24909-1-andrey.zhizhikin@leica-geosystems.com>
Commit 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is
unused") removed geenric_bl driver from the tree, together with
corresponding config option.
Remove BACKLIGHT_GENERIC config item from all MIPS configurations.
Fixes: 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is unused")
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
---
arch/mips/configs/gcw0_defconfig | 1 -
arch/mips/configs/gpr_defconfig | 1 -
arch/mips/configs/lemote2f_defconfig | 1 -
arch/mips/configs/loongson3_defconfig | 1 -
arch/mips/configs/mtx1_defconfig | 1 -
arch/mips/configs/rs90_defconfig | 1 -
6 files changed, 6 deletions(-)
diff --git a/arch/mips/configs/gcw0_defconfig b/arch/mips/configs/gcw0_defconfig
index 7e28a4fe9d84..460683b52285 100644
--- a/arch/mips/configs/gcw0_defconfig
+++ b/arch/mips/configs/gcw0_defconfig
@@ -73,7 +73,6 @@ CONFIG_DRM_PANEL_NOVATEK_NT39016=y
CONFIG_DRM_INGENIC=y
CONFIG_DRM_ETNAVIV=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
-# CONFIG_BACKLIGHT_GENERIC is not set
CONFIG_BACKLIGHT_PWM=y
# CONFIG_VGA_CONSOLE is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
diff --git a/arch/mips/configs/gpr_defconfig b/arch/mips/configs/gpr_defconfig
index 9085f4d6c698..87e20f3391ed 100644
--- a/arch/mips/configs/gpr_defconfig
+++ b/arch/mips/configs/gpr_defconfig
@@ -251,7 +251,6 @@ CONFIG_SSB_DRIVER_PCICORE=y
# CONFIG_VGA_ARB is not set
# CONFIG_LCD_CLASS_DEVICE is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
-# CONFIG_BACKLIGHT_GENERIC is not set
# CONFIG_VGA_CONSOLE is not set
CONFIG_USB_HID=m
CONFIG_USB_HIDDEV=y
diff --git a/arch/mips/configs/lemote2f_defconfig b/arch/mips/configs/lemote2f_defconfig
index 3a9a453b1264..688c91918db2 100644
--- a/arch/mips/configs/lemote2f_defconfig
+++ b/arch/mips/configs/lemote2f_defconfig
@@ -145,7 +145,6 @@ CONFIG_FB_SIS_300=y
CONFIG_FB_SIS_315=y
# CONFIG_LCD_CLASS_DEVICE is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
-CONFIG_BACKLIGHT_GENERIC=m
# CONFIG_VGA_CONSOLE is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
diff --git a/arch/mips/configs/loongson3_defconfig b/arch/mips/configs/loongson3_defconfig
index 38a817ead8e7..9c5fadef38cb 100644
--- a/arch/mips/configs/loongson3_defconfig
+++ b/arch/mips/configs/loongson3_defconfig
@@ -286,7 +286,6 @@ CONFIG_DRM_VIRTIO_GPU=y
CONFIG_FB_RADEON=y
CONFIG_LCD_CLASS_DEVICE=y
CONFIG_LCD_PLATFORM=m
-CONFIG_BACKLIGHT_GENERIC=m
# CONFIG_VGA_CONSOLE is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
diff --git a/arch/mips/configs/mtx1_defconfig b/arch/mips/configs/mtx1_defconfig
index 914af125a7fa..0ef2373404e5 100644
--- a/arch/mips/configs/mtx1_defconfig
+++ b/arch/mips/configs/mtx1_defconfig
@@ -450,7 +450,6 @@ CONFIG_WDT_MTX1=y
# CONFIG_VGA_ARB is not set
# CONFIG_LCD_CLASS_DEVICE is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
-# CONFIG_BACKLIGHT_GENERIC is not set
# CONFIG_VGA_CONSOLE is not set
CONFIG_SOUND=m
CONFIG_SND=m
diff --git a/arch/mips/configs/rs90_defconfig b/arch/mips/configs/rs90_defconfig
index dfbb9fed9a42..4f540bb94628 100644
--- a/arch/mips/configs/rs90_defconfig
+++ b/arch/mips/configs/rs90_defconfig
@@ -97,7 +97,6 @@ CONFIG_DRM_FBDEV_OVERALLOC=300
CONFIG_DRM_PANEL_SIMPLE=y
CONFIG_DRM_INGENIC=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
-# CONFIG_BACKLIGHT_GENERIC is not set
CONFIG_BACKLIGHT_PWM=y
# CONFIG_VGA_CONSOLE is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
--
2.17.1
^ permalink raw reply related
* [PATCH 4/5] parisc: configs: drop unused BACKLIGHT_GENERIC option
From: Andrey Zhizhikin @ 2020-11-30 15:21 UTC (permalink / raw)
To: linux, nicolas.ferre, alexandre.belloni, ludovic.desroches, tony,
mripard, wens, jernej.skrabec, thierry.reding, jonathanh,
catalin.marinas, will, tsbogend, James.Bottomley, deller, mpe,
benh, paulus, lee.jones, sam, emil.l.velikov, daniel.thompson,
krzk, linux-arm-kernel, linux-kernel, linux-omap, linux-tegra,
linux-mips, linux-parisc, linuxppc-dev
In-Reply-To: <20201130152137.24909-1-andrey.zhizhikin@leica-geosystems.com>
Commit 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is
unused") removed geenric_bl driver from the tree, together with
corresponding config option.
Remove BACKLIGHT_GENERIC config item from generic-64bit_defconfig.
Fixes: 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is unused")
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
---
arch/parisc/configs/generic-64bit_defconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/parisc/configs/generic-64bit_defconfig b/arch/parisc/configs/generic-64bit_defconfig
index 7e2d7026285e..8f81fcbf04c4 100644
--- a/arch/parisc/configs/generic-64bit_defconfig
+++ b/arch/parisc/configs/generic-64bit_defconfig
@@ -191,7 +191,6 @@ CONFIG_DRM=y
CONFIG_DRM_RADEON=y
CONFIG_FIRMWARE_EDID=y
CONFIG_FB_MODE_HELPERS=y
-# CONFIG_BACKLIGHT_GENERIC is not set
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
CONFIG_HIDRAW=y
CONFIG_HID_PID=y
--
2.17.1
^ permalink raw reply related
* [PATCH 1/5] ARM: configs: drop unused BACKLIGHT_GENERIC option
From: Andrey Zhizhikin @ 2020-11-30 15:21 UTC (permalink / raw)
To: linux, nicolas.ferre, alexandre.belloni, ludovic.desroches, tony,
mripard, wens, jernej.skrabec, thierry.reding, jonathanh,
catalin.marinas, will, tsbogend, James.Bottomley, deller, mpe,
benh, paulus, lee.jones, sam, emil.l.velikov, daniel.thompson,
krzk, linux-arm-kernel, linux-kernel, linux-omap, linux-tegra,
linux-mips, linux-parisc, linuxppc-dev
In-Reply-To: <20201130152137.24909-1-andrey.zhizhikin@leica-geosystems.com>
Commit 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is
unused") removed geenric_bl driver from the tree, together with
corresponding config option.
Remove BACKLIGHT_GENERIC config item from all ARM configurations.
Fixes: 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is unused")
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
---
arch/arm/configs/at91_dt_defconfig | 1 -
arch/arm/configs/cm_x300_defconfig | 1 -
arch/arm/configs/colibri_pxa300_defconfig | 1 -
arch/arm/configs/jornada720_defconfig | 1 -
arch/arm/configs/magician_defconfig | 1 -
arch/arm/configs/mini2440_defconfig | 1 -
arch/arm/configs/omap2plus_defconfig | 1 -
arch/arm/configs/pxa3xx_defconfig | 1 -
arch/arm/configs/qcom_defconfig | 1 -
arch/arm/configs/sama5_defconfig | 1 -
arch/arm/configs/sunxi_defconfig | 1 -
arch/arm/configs/tegra_defconfig | 1 -
arch/arm/configs/u8500_defconfig | 1 -
13 files changed, 13 deletions(-)
diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig
index 4a0ba2ae1a25..6e52c9c965e6 100644
--- a/arch/arm/configs/at91_dt_defconfig
+++ b/arch/arm/configs/at91_dt_defconfig
@@ -132,7 +132,6 @@ CONFIG_DRM_ATMEL_HLCDC=y
CONFIG_DRM_PANEL_SIMPLE=y
CONFIG_FB_ATMEL=y
CONFIG_BACKLIGHT_ATMEL_LCDC=y
-# CONFIG_BACKLIGHT_GENERIC is not set
CONFIG_BACKLIGHT_PWM=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_LOGO=y
diff --git a/arch/arm/configs/cm_x300_defconfig b/arch/arm/configs/cm_x300_defconfig
index 2f7acde2d921..502a9d870ca4 100644
--- a/arch/arm/configs/cm_x300_defconfig
+++ b/arch/arm/configs/cm_x300_defconfig
@@ -87,7 +87,6 @@ CONFIG_FB=y
CONFIG_FB_PXA=y
CONFIG_LCD_CLASS_DEVICE=y
CONFIG_LCD_TDO24M=y
-# CONFIG_BACKLIGHT_GENERIC is not set
CONFIG_BACKLIGHT_DA903X=m
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
diff --git a/arch/arm/configs/colibri_pxa300_defconfig b/arch/arm/configs/colibri_pxa300_defconfig
index 0dae3b185284..26e5a67f8e2d 100644
--- a/arch/arm/configs/colibri_pxa300_defconfig
+++ b/arch/arm/configs/colibri_pxa300_defconfig
@@ -34,7 +34,6 @@ CONFIG_FB=y
CONFIG_FB_PXA=y
# CONFIG_LCD_CLASS_DEVICE is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
-# CONFIG_BACKLIGHT_GENERIC is not set
# CONFIG_VGA_CONSOLE is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_LOGO=y
diff --git a/arch/arm/configs/jornada720_defconfig b/arch/arm/configs/jornada720_defconfig
index 9f079be2b84b..069f60ffdcd8 100644
--- a/arch/arm/configs/jornada720_defconfig
+++ b/arch/arm/configs/jornada720_defconfig
@@ -48,7 +48,6 @@ CONFIG_FB=y
CONFIG_FB_S1D13XXX=y
CONFIG_LCD_CLASS_DEVICE=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
-# CONFIG_BACKLIGHT_GENERIC is not set
# CONFIG_VGA_CONSOLE is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
diff --git a/arch/arm/configs/magician_defconfig b/arch/arm/configs/magician_defconfig
index d2e684f6565a..b4670d42f378 100644
--- a/arch/arm/configs/magician_defconfig
+++ b/arch/arm/configs/magician_defconfig
@@ -95,7 +95,6 @@ CONFIG_FB_PXA_OVERLAY=y
CONFIG_FB_W100=y
CONFIG_LCD_CLASS_DEVICE=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
-# CONFIG_BACKLIGHT_GENERIC is not set
CONFIG_BACKLIGHT_PWM=y
# CONFIG_VGA_CONSOLE is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
diff --git a/arch/arm/configs/mini2440_defconfig b/arch/arm/configs/mini2440_defconfig
index 301f29a1fcc3..898490aaa39e 100644
--- a/arch/arm/configs/mini2440_defconfig
+++ b/arch/arm/configs/mini2440_defconfig
@@ -158,7 +158,6 @@ CONFIG_FB_S3C2410=y
CONFIG_LCD_CLASS_DEVICE=y
CONFIG_LCD_PLATFORM=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
-# CONFIG_BACKLIGHT_GENERIC is not set
CONFIG_BACKLIGHT_PWM=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index de3b7813a1ce..7eae097a75d2 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -388,7 +388,6 @@ CONFIG_FB_TILEBLITTING=y
CONFIG_LCD_CLASS_DEVICE=y
CONFIG_LCD_PLATFORM=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
-CONFIG_BACKLIGHT_GENERIC=m
CONFIG_BACKLIGHT_PWM=m
CONFIG_BACKLIGHT_PANDORA=m
CONFIG_BACKLIGHT_GPIO=m
diff --git a/arch/arm/configs/pxa3xx_defconfig b/arch/arm/configs/pxa3xx_defconfig
index 06bbc7a59b60..f0c34017f2aa 100644
--- a/arch/arm/configs/pxa3xx_defconfig
+++ b/arch/arm/configs/pxa3xx_defconfig
@@ -74,7 +74,6 @@ CONFIG_FB_PXA=y
CONFIG_LCD_CLASS_DEVICE=y
CONFIG_LCD_TDO24M=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
-# CONFIG_BACKLIGHT_GENERIC is not set
CONFIG_BACKLIGHT_DA903X=y
# CONFIG_VGA_CONSOLE is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
diff --git a/arch/arm/configs/qcom_defconfig b/arch/arm/configs/qcom_defconfig
index c882167e1496..d6733e745b80 100644
--- a/arch/arm/configs/qcom_defconfig
+++ b/arch/arm/configs/qcom_defconfig
@@ -159,7 +159,6 @@ CONFIG_FB=y
CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_LCD_CLASS_DEVICE is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
-# CONFIG_BACKLIGHT_GENERIC is not set
CONFIG_BACKLIGHT_LM3630A=y
CONFIG_BACKLIGHT_LP855X=y
CONFIG_SOUND=y
diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig
index 037d3a718a60..0a167891eb05 100644
--- a/arch/arm/configs/sama5_defconfig
+++ b/arch/arm/configs/sama5_defconfig
@@ -161,7 +161,6 @@ CONFIG_DRM_ATMEL_HLCDC=y
CONFIG_DRM_PANEL_SIMPLE=y
CONFIG_LCD_CLASS_DEVICE=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
-# CONFIG_BACKLIGHT_GENERIC is not set
CONFIG_BACKLIGHT_PWM=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_SOUND=y
diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig
index 244126172fd6..af6e80d1a0f2 100644
--- a/arch/arm/configs/sunxi_defconfig
+++ b/arch/arm/configs/sunxi_defconfig
@@ -111,7 +111,6 @@ CONFIG_DRM_SIMPLE_BRIDGE=y
CONFIG_DRM_LIMA=y
CONFIG_FB_SIMPLE=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
-# CONFIG_BACKLIGHT_GENERIC is not set
CONFIG_BACKLIGHT_PWM=y
CONFIG_SOUND=y
CONFIG_SND=y
diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig
index fff5fae0db30..74739a52a8ad 100644
--- a/arch/arm/configs/tegra_defconfig
+++ b/arch/arm/configs/tegra_defconfig
@@ -205,7 +205,6 @@ CONFIG_DRM_PANEL_SIMPLE=y
CONFIG_DRM_LVDS_CODEC=y
# CONFIG_LCD_CLASS_DEVICE is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
-# CONFIG_BACKLIGHT_GENERIC is not set
CONFIG_BACKLIGHT_PWM=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
diff --git a/arch/arm/configs/u8500_defconfig b/arch/arm/configs/u8500_defconfig
index 28dd7cf56048..24aacc255021 100644
--- a/arch/arm/configs/u8500_defconfig
+++ b/arch/arm/configs/u8500_defconfig
@@ -92,7 +92,6 @@ CONFIG_DRM_PANEL_SONY_ACX424AKP=y
CONFIG_DRM_LIMA=y
CONFIG_DRM_MCDE=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
-CONFIG_BACKLIGHT_GENERIC=m
CONFIG_BACKLIGHT_GPIO=y
CONFIG_LOGO=y
CONFIG_SOUND=y
--
2.17.1
^ permalink raw reply related
* [PATCH 5/5] powerpc/configs: drop unused BACKLIGHT_GENERIC option
From: Andrey Zhizhikin @ 2020-11-30 15:21 UTC (permalink / raw)
To: linux, nicolas.ferre, alexandre.belloni, ludovic.desroches, tony,
mripard, wens, jernej.skrabec, thierry.reding, jonathanh,
catalin.marinas, will, tsbogend, James.Bottomley, deller, mpe,
benh, paulus, lee.jones, sam, emil.l.velikov, daniel.thompson,
krzk, linux-arm-kernel, linux-kernel, linux-omap, linux-tegra,
linux-mips, linux-parisc, linuxppc-dev
In-Reply-To: <20201130152137.24909-1-andrey.zhizhikin@leica-geosystems.com>
Commit 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is
unused") removed geenric_bl driver from the tree, together with
corresponding config option.
Remove BACKLIGHT_GENERIC config item from generic-64bit_defconfig.
Fixes: 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is unused")
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
---
arch/powerpc/configs/powernv_defconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/powerpc/configs/powernv_defconfig b/arch/powerpc/configs/powernv_defconfig
index cf30fc24413b..60a30fffeda0 100644
--- a/arch/powerpc/configs/powernv_defconfig
+++ b/arch/powerpc/configs/powernv_defconfig
@@ -208,7 +208,6 @@ CONFIG_FB_MATROX_G=y
CONFIG_FB_RADEON=m
CONFIG_FB_IBM_GXT4500=m
CONFIG_LCD_PLATFORM=m
-CONFIG_BACKLIGHT_GENERIC=m
# CONFIG_VGA_CONSOLE is not set
CONFIG_LOGO=y
CONFIG_HID_A4TECH=m
--
2.17.1
^ permalink raw reply related
* RE: [PATCH 1/5] ARM: configs: drop unused BACKLIGHT_GENERIC option
From: ZHIZHIKIN Andrey @ 2020-11-30 19:50 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: alexandre.belloni@bootlin.com, tony@atomide.com,
linux-kernel@vger.kernel.org,
James.Bottomley@HansenPartnership.com, thierry.reding@gmail.com,
paulus@samba.org, sam@ravnborg.org, daniel.thompson@linaro.org,
linux-omap@vger.kernel.org, Arnd Bergmann, deller@gmx.de,
linux@armlinux.org.uk, jonathanh@nvidia.com,
ludovic.desroches@microchip.com, catalin.marinas@arm.com,
linux-mips@vger.kernel.org, will@kernel.org, mripard@kernel.org,
linux-tegra@vger.kernel.org, lee.jones@linaro.org, wens@csie.org,
linux-arm-kernel@lists.infradead.org, jernej.skrabec@siol.net,
tsbogend@alpha.franken.de, linux-parisc@vger.kernel.org,
emil.l.velikov@gmail.com, nicolas.ferre@microchip.com,
Olof Johansson, linuxppc-dev@lists.ozlabs.org
In-Reply-To: <20201130185227.GA29434@kozik-lap>
Hello Krzysztof,
> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: Monday, November 30, 2020 7:52 PM
> To: ZHIZHIKIN Andrey <andrey.zhizhikin@leica-geosystems.com>
> Cc: linux@armlinux.org.uk; nicolas.ferre@microchip.com;
> alexandre.belloni@bootlin.com; ludovic.desroches@microchip.com;
> tony@atomide.com; mripard@kernel.org; wens@csie.org;
> jernej.skrabec@siol.net; thierry.reding@gmail.com; jonathanh@nvidia.com;
> catalin.marinas@arm.com; will@kernel.org; tsbogend@alpha.franken.de;
> James.Bottomley@HansenPartnership.com; deller@gmx.de;
> mpe@ellerman.id.au; benh@kernel.crashing.org; paulus@samba.org;
> lee.jones@linaro.org; sam@ravnborg.org; emil.l.velikov@gmail.com;
> daniel.thompson@linaro.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; linux-omap@vger.kernel.org; linux-
> tegra@vger.kernel.org; linux-mips@vger.kernel.org; linux-
> parisc@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; Arnd Bergmann
> <arnd@arndb.de>; Olof Johansson <olof@lixom.net>
> Subject: Re: [PATCH 1/5] ARM: configs: drop unused BACKLIGHT_GENERIC
> option
>
> This email is not from Hexagon’s Office 365 instance. Please be careful while
> clicking links, opening attachments, or replying to this email.
>
>
> On Mon, Nov 30, 2020 at 03:21:33PM +0000, Andrey Zhizhikin wrote:
> > Commit 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it
> > is
> > unused") removed geenric_bl driver from the tree, together with
> > corresponding config option.
> >
> > Remove BACKLIGHT_GENERIC config item from all ARM configurations.
> >
> > Fixes: 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it
> > is unused")
> > Cc: Sam Ravnborg <sam@ravnborg.org>
> > Signed-off-by: Andrey Zhizhikin
> > <andrey.zhizhikin@leica-geosystems.com>
> > ---
> > arch/arm/configs/at91_dt_defconfig | 1 -
> > arch/arm/configs/cm_x300_defconfig | 1 -
> > arch/arm/configs/colibri_pxa300_defconfig | 1 -
> > arch/arm/configs/jornada720_defconfig | 1 -
> > arch/arm/configs/magician_defconfig | 1 -
> > arch/arm/configs/mini2440_defconfig | 1 -
> > arch/arm/configs/omap2plus_defconfig | 1 -
> > arch/arm/configs/pxa3xx_defconfig | 1 -
> > arch/arm/configs/qcom_defconfig | 1 -
> > arch/arm/configs/sama5_defconfig | 1 -
> > arch/arm/configs/sunxi_defconfig | 1 -
> > arch/arm/configs/tegra_defconfig | 1 -
> > arch/arm/configs/u8500_defconfig | 1 -
> > 13 files changed, 13 deletions(-)
>
> You need to send it to arm-soc maintainers, otherwise no one might feel
> responsible enough to pick it up.
Good point, thanks a lot!
I was not aware of the fact that there is a separate ML that should receive patches targeted ARM SOCs. Can you (or anyone else) please share it, so I can re-send it there as well?
> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
>
> +CC Arnd and Olof,
>
> Dear Arnd and Olof,
>
> Maybe it is worth to add arm-soc entry to the MAINTAINERS file?
> Otherwise how one could get your email address? Not mentioning the
> secret-soc address. :)
"scripts/get_maintainer.pl --no-git-fallback --no-multiline --no-rolestats --no-n --separator , " across entire series gave only the list of addresses that I've included in the series itself. If I would be given a arm-soc mailing list as output of the script - I would've included it as well.
>
> Best regards,
> Krzysztof
Regards,
Andrey
^ permalink raw reply
* RE: [PATCH 0/5] drop unused BACKLIGHT_GENERIC option
From: ZHIZHIKIN Andrey @ 2020-11-30 19:56 UTC (permalink / raw)
To: Sam Ravnborg
Cc: alexandre.belloni@bootlin.com, tony@atomide.com,
linux-kernel@vger.kernel.org,
James.Bottomley@hansenpartnership.com, thierry.reding@gmail.com,
paulus@samba.org, lee.jones@linaro.org,
daniel.thompson@linaro.org, linux-omap@vger.kernel.org,
Arnd Bergmann, deller@gmx.de, linux@armlinux.org.uk,
krzk@kernel.org, jonathanh@nvidia.com,
ludovic.desroches@microchip.com, catalin.marinas@arm.com,
linux-mips@vger.kernel.org, will@kernel.org, mripard@kernel.org,
linux-tegra@vger.kernel.org, wens@csie.org,
linux-arm-kernel@lists.infradead.org, jernej.skrabec@siol.net,
tsbogend@alpha.franken.de, linux-parisc@vger.kernel.org,
emil.l.velikov@gmail.com, nicolas.ferre@microchip.com,
Olof Johansson, linuxppc-dev@lists.ozlabs.org
In-Reply-To: <20201130191133.GA1565464@ravnborg.org>
Hello Sam,
> -----Original Message-----
> From: Sam Ravnborg <sam@ravnborg.org>
> Sent: Monday, November 30, 2020 8:12 PM
> To: ZHIZHIKIN Andrey <andrey.zhizhikin@leica-geosystems.com>
> Cc: linux@armlinux.org.uk; nicolas.ferre@microchip.com;
> alexandre.belloni@bootlin.com; ludovic.desroches@microchip.com;
> tony@atomide.com; mripard@kernel.org; wens@csie.org;
> jernej.skrabec@siol.net; thierry.reding@gmail.com; jonathanh@nvidia.com;
> catalin.marinas@arm.com; will@kernel.org; tsbogend@alpha.franken.de;
> James.Bottomley@hansenpartnership.com; deller@gmx.de;
> mpe@ellerman.id.au; benh@kernel.crashing.org; paulus@samba.org;
> lee.jones@linaro.org; emil.l.velikov@gmail.com;
> daniel.thompson@linaro.org; krzk@kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@vger.kernel.org; linux-
> omap@vger.kernel.org; linux-tegra@vger.kernel.org; linux-
> mips@vger.kernel.org; linux-parisc@vger.kernel.org; linuxppc-
> dev@lists.ozlabs.org; Arnd Bergmann <arnd@arndb.de>; Olof Johansson
> <olof@lixom.net>
> Subject: Re: [PATCH 0/5] drop unused BACKLIGHT_GENERIC option
>
>
> On Mon, Nov 30, 2020 at 03:21:32PM +0000, Andrey Zhizhikin wrote:
> > Since the removal of generic_bl driver from the source tree in commit
> > 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is
> > unused") BACKLIGHT_GENERIC config option became obsolete as well and
> > therefore subject to clean-up from all configuration files.
> >
> > This series introduces patches to address this removal, separated by
> > architectures in the kernel tree.
> >
> > Andrey Zhizhikin (5):
> > ARM: configs: drop unused BACKLIGHT_GENERIC option
> > arm64: defconfig: drop unused BACKLIGHT_GENERIC option
> > MIPS: configs: drop unused BACKLIGHT_GENERIC option
> > parisc: configs: drop unused BACKLIGHT_GENERIC option
> > powerpc/configs: drop unused BACKLIGHT_GENERIC option
>
> For defconfigs I expect arch maintainers to do a make xxxdefconfig / make
> savedefconfig / cp defconfig ... run now and then - this will remove all such
> symbols.
This series stretches across several archs, so I would expect that it could've been addressed for some of them but would take more time than submitting this "point fix" now, targeting one obsolete config option.
I've personally hit it for arm64 on the first place, and looking further into the option itself I realized that it is missing from the kernel tree completely and decided to fix all archs affected at once.
>
> If the patches goes in like they are submitted then:
> Acked-by: Sam Ravnborg <sam@ravnborg.org>
>
> >
> > arch/arm/configs/at91_dt_defconfig | 1 -
> > arch/arm/configs/cm_x300_defconfig | 1 -
> > arch/arm/configs/colibri_pxa300_defconfig | 1 -
> > arch/arm/configs/jornada720_defconfig | 1 -
> > arch/arm/configs/magician_defconfig | 1 -
> > arch/arm/configs/mini2440_defconfig | 1 -
> > arch/arm/configs/omap2plus_defconfig | 1 -
> > arch/arm/configs/pxa3xx_defconfig | 1 -
> > arch/arm/configs/qcom_defconfig | 1 -
> > arch/arm/configs/sama5_defconfig | 1 -
> > arch/arm/configs/sunxi_defconfig | 1 -
> > arch/arm/configs/tegra_defconfig | 1 -
> > arch/arm/configs/u8500_defconfig | 1 -
> > arch/arm64/configs/defconfig | 1 -
> > arch/mips/configs/gcw0_defconfig | 1 -
> > arch/mips/configs/gpr_defconfig | 1 -
> > arch/mips/configs/lemote2f_defconfig | 1 -
> > arch/mips/configs/loongson3_defconfig | 1 -
> > arch/mips/configs/mtx1_defconfig | 1 -
> > arch/mips/configs/rs90_defconfig | 1 -
> > arch/parisc/configs/generic-64bit_defconfig | 1 -
> > arch/powerpc/configs/powernv_defconfig | 1 -
> > 22 files changed, 22 deletions(-)
> >
> >
> > base-commit: b65054597872ce3aefbc6a666385eabdf9e288da
> > prerequisite-patch-id: bfd382cf1dc021d20204f10ea9403319c1c32b12
> > prerequisite-patch-id: 5397c0c8648bb3e0b830207ea867138c11c6e644
> > prerequisite-patch-id: a3c284dff5fe6d02828918a886db6a8ed3197e20
> > --
> > 2.17.1
Regards,
Andrey
^ permalink raw reply
* Re: [PATCH 0/5] drop unused BACKLIGHT_GENERIC option
From: Sam Ravnborg @ 2020-11-30 21:16 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: alexandre.belloni, tony, linux-kernel, James.Bottomley,
thierry.reding, paulus, lee.jones, daniel.thompson, linux-omap,
Arnd Bergmann, deller, linux, jonathanh, ludovic.desroches,
catalin.marinas, linux-mips, will, mripard, Andrey Zhizhikin,
linux-tegra, wens, linux-arm-kernel, jernej.skrabec, tsbogend,
linux-parisc, emil.l.velikov, nicolas.ferre, Olof Johansson,
linuxppc-dev
In-Reply-To: <20201130202501.GA32878@kozik-lap>
Hi Krzysztof,
On Mon, Nov 30, 2020 at 10:25:01PM +0200, Krzysztof Kozlowski wrote:
> On Mon, Nov 30, 2020 at 08:11:33PM +0100, Sam Ravnborg wrote:
> > On Mon, Nov 30, 2020 at 03:21:32PM +0000, Andrey Zhizhikin wrote:
> > > Since the removal of generic_bl driver from the source tree in commit
> > > 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is
> > > unused") BACKLIGHT_GENERIC config option became obsolete as well and
> > > therefore subject to clean-up from all configuration files.
> > >
> > > This series introduces patches to address this removal, separated by
> > > architectures in the kernel tree.
> > >
> > > Andrey Zhizhikin (5):
> > > ARM: configs: drop unused BACKLIGHT_GENERIC option
> > > arm64: defconfig: drop unused BACKLIGHT_GENERIC option
> > > MIPS: configs: drop unused BACKLIGHT_GENERIC option
> > > parisc: configs: drop unused BACKLIGHT_GENERIC option
> > > powerpc/configs: drop unused BACKLIGHT_GENERIC option
> >
> > For defconfigs I expect arch maintainers to do a make xxxdefconfig / make
> > savedefconfig / cp defconfig ... run now and then - this will remove
> > all such symbols.
>
> savedefconfig can be tricky because of risk of loosing options:
> 1. it will remove options which became the default or became selected,
> 2. later when the default is changed or selecting option is removed, the
> first option from #1 will not be brought back.
>
> This was already for example with DEBUG_FS and the conclusion that time
> was - do not run savedefconfig automatically.
>
> Therefore if some symbol(s) can be safely removed, patch is welcomed.
Thanks for letting me know, I have missed that discussion and
was obviously not aware.
I already acked'ed the patches and hope the soc people will pick them
up.
Sam
^ permalink raw reply
* Re: [PATCH kernel v4 2/8] genirq/irqdomain: Clean legacy IRQ allocation
From: Thomas Gleixner @ 2020-11-30 21:41 UTC (permalink / raw)
To: Alexey Kardashevskiy, linux-kernel
Cc: Alexey Kardashevskiy, Marc Zyngier, x86, linux-gpio,
Oliver O'Halloran, Cédric Le Goater, Frederic Barrat,
Michal Suchánek, linuxppc-dev, linux-arm-kernel
In-Reply-To: <20201124061720.86766-3-aik@ozlabs.ru>
Alexey,
On Tue, Nov 24 2020 at 17:17, Alexey Kardashevskiy wrote:
> There are 10 users of __irq_domain_alloc_irqs() and only one - IOAPIC -
> passes realloc==true. There is no obvious reason for handling this
> specific case in the generic code.
There is also no obvious reason for _NOT_ handling it at the core code.
> This splits out __irq_domain_alloc_irqs_data() to make it clear what
> IOAPIC does and makes __irq_domain_alloc_irqs() cleaner.
That's your interpretation of cleaner.
You need to expose __irq_domain_alloc_irqs_data() for that which is a
core only functionality, so it's not cleaner. It's exposing internals
which are not to be exposed.
The right thing to do is to get rid of the legacy allocation of x86
during early_irq_init() which is possible with the recent restructuring
of the interrupt initialization code in x86. That's a cleanup which will
actually remove code and not expose internals just because.
> This should cause no behavioral change.
Should not cause is a pretty weak statement.
You're missing a nasty detail here. Contrary to the normal irqdomain
rules virq 0 _IS_ valid on x86 for historical reasons and that's not
trivial to change.
Thanks,
tglx
^ permalink raw reply
* Re: [PATCH v8 11/12] mm/vmalloc: Hugepage vmalloc mappings
From: Edgecombe, Rick P @ 2020-11-30 21:42 UTC (permalink / raw)
To: npiggin@gmail.com, linux-mm@kvack.org, akpm@linux-foundation.org
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
hch@infradead.org, lizefan@huawei.com,
Jonathan.Cameron@Huawei.com, linuxppc-dev@lists.ozlabs.org
In-Reply-To: <e9d3a50e1b18f9ea1cdfdc221bef75db19273417.camel@intel.com>
On Mon, 2020-11-30 at 12:21 -0800, Rick Edgecombe wrote:
> another option could be to use the changes here:
> https://lore.kernel.org/lkml/20201125092208.12544-4-rppt@kernel.org/
> to reset the direct map for a large page range at a time for large
> vmalloc pages.
Oops, sorry. This wouldn't be so simple because hibernate currently
expects NP direct map pages to be 4k.
^ permalink raw reply
* Re: [PATCH v2] clk: renesas: r9a06g032: Drop __packed for portability
From: Stephen Rothwell @ 2020-11-30 21:57 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Stephen Boyd, Michael Turquette, linux-kernel, Gareth Williams,
linux-renesas-soc, Paul Mackerras, linuxppc-dev, linux-clk
In-Reply-To: <20201130085743.1656317-1-geert+renesas@glider.be>
[-- Attachment #1: Type: text/plain, Size: 1462 bytes --]
Hi Geert,
On Mon, 30 Nov 2020 09:57:43 +0100 Geert Uytterhoeven <geert+renesas@glider.be> wrote:
>
> The R9A06G032 clock driver uses an array of packed structures to reduce
> kernel size. However, this array contains pointers, which are no longer
> aligned naturally, and cannot be relocated on PPC64. Hence when
> compile-testing this driver on PPC64 with CONFIG_RELOCATABLE=y (e.g.
> PowerPC allyesconfig), the following warnings are produced:
>
> WARNING: 136 bad relocations
> c000000000616be3 R_PPC64_UADDR64 .rodata+0x00000000000cf338
> c000000000616bfe R_PPC64_UADDR64 .rodata+0x00000000000cf370
> ...
>
> Fix this by dropping the __packed attribute from the r9a06g032_clkdesc
> definition, trading a small size increase for portability.
>
> This increases the 156-entry clock table by 1 byte per entry, but due to
> the compiler generating more efficient code for unpacked accesses, the
> net size increase is only 76 bytes (gcc 9.3.0 on arm32).
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Fixes: 4c3d88526eba2143 ("clk: renesas: Renesas R9A06G032 clock driver")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v2:
> - Fix authorship.
> ---
> drivers/clk/renesas/r9a06g032-clocks.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks.
I have added that to my fixes tree until it gets picked up elsewhere.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply
* Re: [PATCH kernel v4 5/8] genirq: Add free_irq hook for IRQ descriptor and use for mapping disposal
From: Thomas Gleixner @ 2020-11-30 22:18 UTC (permalink / raw)
To: Alexey Kardashevskiy, linux-kernel
Cc: Alexey Kardashevskiy, Marc Zyngier, x86, linux-gpio,
Oliver O'Halloran, Cédric Le Goater, Frederic Barrat,
Michal Suchánek, linuxppc-dev, linux-arm-kernel
In-Reply-To: <20201124061720.86766-6-aik@ozlabs.ru>
Alexey,
On Tue, Nov 24 2020 at 17:17, Alexey Kardashevskiy wrote:
> We want to make the irq_desc.kobj's release hook free associated resources
> but we do not want to pollute the irqdesc code with domains.
Can you please describe your changelog in factual ways without 'we and I
and want'? See Documentation/process/
> This adds a free_irq hook which is called when the last reference to
> the descriptor is dropped.
>
> The first user is mapped irqs. This potentially can break the existing
> users; however they seem to do the right thing and call dispose once
> per mapping.
Q: How is this supposed to work with CONFIG_SPARSE_IRQ=n?
A: Not at all.
Also 'seem to do the right thing' is from the same quality as 'should
not break stuff'. Either you have done a proper analysis or you did
not. Aside of that how is anyone supposed to decode the subtle wreckage
which is this going to cause if 'seem to do the right thing' turns out
to be wrong?
> -void irq_domain_disassociate(struct irq_domain *domain, unsigned int irq)
> +static void irq_domain_disassociate(struct irq_domain *domain, unsigned int irq)
> {
> struct irq_data *irq_data = irq_get_irq_data(irq);
> irq_hw_number_t hwirq;
> @@ -582,6 +582,13 @@ void irq_domain_associate_many(struct irq_domain *domain, unsigned int irq_base,
> }
> EXPORT_SYMBOL_GPL(irq_domain_associate_many);
>
> +static void irq_mapped_free_desc(struct irq_desc *desc)
That function name is really misleading and badly chosen. The function
is not about freeing the irq descriptor as the name suggests. It's
called from that code in order to clean up the mapping.
> +{
> + unsigned int virq = desc->irq_data.irq;
> +
> + irq_domain_disassociate(desc->irq_data.domain, virq);
> +}
> +
> /**
> * irq_create_direct_mapping() - Allocate an irq for direct mapping
> * @domain: domain to allocate the irq for or NULL for default domain
> @@ -638,6 +645,7 @@ unsigned int irq_create_mapping(struct irq_domain *domain,
> {
> struct device_node *of_node;
> int virq;
> + struct irq_desc *desc;
This code uses reverse fir tree ordering of variables
struct device_node *of_node;
struct irq_desc *desc;
int virq;
Why? Because it's simpler to read than the vertical camel case above.
Thanks,
tglx
^ permalink raw reply
* Re: [PATCH kernel v4 5/8] genirq: Add free_irq hook for IRQ descriptor and use for mapping disposal
From: Thomas Gleixner @ 2020-11-30 22:33 UTC (permalink / raw)
To: Alexey Kardashevskiy, linux-kernel
Cc: Alexey Kardashevskiy, Marc Zyngier, x86, linux-gpio,
Oliver O'Halloran, Cédric Le Goater, Frederic Barrat,
Michal Suchánek, linuxppc-dev, linux-arm-kernel
In-Reply-To: <877dq2ij45.fsf@nanos.tec.linutronix.de>
On Mon, Nov 30 2020 at 23:18, Thomas Gleixner wrote:
> On Tue, Nov 24 2020 at 17:17, Alexey Kardashevskiy wrote:
>> We want to make the irq_desc.kobj's release hook free associated resources
>> but we do not want to pollute the irqdesc code with domains.
>
> Can you please describe your changelog in factual ways without 'we and I
> and want'? See Documentation/process/
And while we are at process. MAINTAINERS clearly says:
IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
IRQ SUBSYSTEM
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
So why are these patches not applying against that git branch?
Thanks,
tglx
^ permalink raw reply
* Re: [PATCH kernel v4 6/8] genirq/irqdomain: Move hierarchical IRQ cleanup to kobject_release
From: Thomas Gleixner @ 2020-11-30 23:13 UTC (permalink / raw)
To: Alexey Kardashevskiy, linux-kernel
Cc: Alexey Kardashevskiy, Marc Zyngier, x86, linux-gpio,
Oliver O'Halloran, Cédric Le Goater, Frederic Barrat,
Michal Suchánek, linuxppc-dev, linux-arm-kernel
In-Reply-To: <20201124061720.86766-7-aik@ozlabs.ru>
Alexey,
On Tue, Nov 24 2020 at 17:17, Alexey Kardashevskiy wrote:
> This moves hierarchical domain's irqs cleanup into the kobject release
> hook to make irq_domain_free_irqs() as simple as kobject_put.
Truly simple: Simply broken in multiple ways.
CONFIG_SPARSE_IRQ=n is now completely buggered. It does not even compile
anymore. Running core code changes through a larger set of cross
compilers is neither rocket science nor optional.
For CONFIG_SPARSE_IRQ=y, see below.
> @@ -1675,14 +1679,11 @@ void irq_domain_free_irqs(unsigned int virq, unsigned int nr_irqs)
> "NULL pointer, cannot free irq\n"))
> return;
>
> - mutex_lock(&irq_domain_mutex);
> - for (i = 0; i < nr_irqs; i++)
> - irq_domain_remove_irq(virq + i);
> - irq_domain_free_irqs_hierarchy(data->domain, virq, nr_irqs);
> - mutex_unlock(&irq_domain_mutex);
> + for (i = 0; i < nr_irqs; i++) {
> + struct irq_desc *desc = irq_to_desc(virq + i);
>
> - irq_domain_free_irq_data(virq, nr_irqs);
> - irq_free_descs(virq, nr_irqs);
> + kobject_put(&desc->kobj);
So up to this point both irq_dispose_mapping() _and_
irq_domain_free_irqs() invoked irq_free_descs().
Let's look at the call chains:
irq_domain_free_irqs()
irq_free_descs()
mutex_lock(&sparse_irq_lock);
for (i...)
free_desc(from + i)
irq_remove_debugfs_entry();
unregister_irq_proc();
irq_sysfs_del();
delete_irq_desc();
call_rcu();
bitmap_clear(allocated_irqs, ...);
mutex_unlock(&sparse_irq_lock);
with your modifications it does:
irq_domain_free_irqs()
for (i...)
kobject_put(&desc->kobj)
irq_kobj_release()
if (desc->free_irq)
desc->free_irq(desc);
irq_remove_debugfs_entry();
unregister_irq_proc();
delete_irq_desc();
call_rcu();
Can you spot the wreckage? It's not even subtle, it's more than obvious.
1) None of the operations in irq_kobj_release() is protected by
sparse_irq_lock anymore. There was a comment in free_desc() which
explained what is protected. You removed parts of that comment
and just left the sysfs portion of it above delete_irq_desc()
which is completely bogus because you removed the irq_sysfs_del()
call.
2) Nothing removes the freed interrupts from the allocation
bitmap. Run this often enough and you exhausted the interrupt
space.
And no, you cannot just go and invoke irq_free_descs() instead of
kobject_put(), simply because you'd create lock order inversion vs. the
free_irq() callback.
So no, it's not that simple and I'm not at all interested in another
respin of this with some more duct tape applied.
It can be done, but that needs way more thought, a proper design which
preserves the existing semantics completely and wants to be a fine
grained series where each patch does exactly ONE small thing which is
reviewable and testable on _ALL_ users of this code, i.e. _ALL_
architectures and irq chip implementations.
Thanks,
tglx
^ permalink raw reply
* Re: [PATCH 5/5] powerpc/configs: drop unused BACKLIGHT_GENERIC option
From: Michael Ellerman @ 2020-12-01 0:46 UTC (permalink / raw)
To: Andrey Zhizhikin, linux, nicolas.ferre, alexandre.belloni,
ludovic.desroches, tony, mripard, wens, jernej.skrabec,
thierry.reding, jonathanh, catalin.marinas, will, tsbogend,
James.Bottomley, deller, benh, paulus, lee.jones, sam,
emil.l.velikov, daniel.thompson, krzk, linux-arm-kernel,
linux-kernel, linux-omap, linux-tegra, linux-mips, linux-parisc,
linuxppc-dev
In-Reply-To: <20201130152137.24909-6-andrey.zhizhikin@leica-geosystems.com>
Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> writes:
> Commit 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is
> unused") removed geenric_bl driver from the tree, together with
> corresponding config option.
>
> Remove BACKLIGHT_GENERIC config item from generic-64bit_defconfig.
^
powernv_defconfig
> Fixes: 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is unused")
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
> ---
> arch/powerpc/configs/powernv_defconfig | 1 -
> 1 file changed, 1 deletion(-)
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
cheers
> diff --git a/arch/powerpc/configs/powernv_defconfig b/arch/powerpc/configs/powernv_defconfig
> index cf30fc24413b..60a30fffeda0 100644
> --- a/arch/powerpc/configs/powernv_defconfig
> +++ b/arch/powerpc/configs/powernv_defconfig
> @@ -208,7 +208,6 @@ CONFIG_FB_MATROX_G=y
> CONFIG_FB_RADEON=m
> CONFIG_FB_IBM_GXT4500=m
> CONFIG_LCD_PLATFORM=m
> -CONFIG_BACKLIGHT_GENERIC=m
> # CONFIG_VGA_CONSOLE is not set
> CONFIG_LOGO=y
> CONFIG_HID_A4TECH=m
> --
> 2.17.1
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox