[PATCH 3/3] perf symbol: Remove arch__symbols__fixup_end()

2022-04-15 Thread Namhyung Kim
Now the generic code can handle kallsyms fixup properly so no need to keep the arch-functions anymore. Signed-off-by: Namhyung Kim --- tools/perf/arch/arm64/util/machine.c | 21 - tools/perf/arch/powerpc/util/Build | 1 - tools/perf/arch/powerpc/util/machine.c | 25

[PATCH 2/3] perf symbol: Update symbols__fixup_end()

2022-04-15 Thread Namhyung Kim
Now arch-specific functions all do the same thing. When it fixes the symbol address it needs to check the boundary between the kernel image and modules. For the last symbol in the previous region, it cannot know the exact size as it's discarded already. Thus it just uses a small page size

[PATCH 1/3] perf symbol: Pass is_kallsyms to symbols__fixup_end()

2022-04-15 Thread Namhyung Kim
The symbol fixup is necessary for symbols in kallsyms since they don't have size info. So we use the next symbol's address to calculate the size. Now it's also used for user binaries because sometimes they miss size for hand-written asm functions. There's a arch-specific function to handle

[PATCH 0/3] perf tools: Tidy up symbol end fixup (v3)

2022-04-15 Thread Namhyung Kim
Hello, This work is a follow-up of Ian's previous one at https://lore.kernel.org/all/20220412154817.2728324-1-irog...@google.com/ Fixing up more symbol ends as introduced in: https://lore.kernel.org/lkml/20220317135536.805-1-mpet...@redhat.com/ it caused perf annotate to run into memory

Re: [PATCH] i2c: pasemi: Wait for write xfers to finish

2022-04-15 Thread Wolfram Sang
On Tue, Mar 29, 2022 at 08:38:17PM +0200, Martin Povišer wrote: > Wait for completion of write transfers before returning from the driver. > At first sight it may seem advantageous to leave write transfers queued > for the controller to carry out on its own time, but there's a couple of > issues

[PATCH 7/7] alpha: remove unused __SLOW_DOWN_IO and SLOW_DOWN_IO definitions

2022-04-15 Thread Bjorn Helgaas
From: Bjorn Helgaas Remove unused __SLOW_DOWN_IO and SLOW_DOWN_IO definitions. Signed-off-by: Bjorn Helgaas --- arch/alpha/include/asm/io.h | 4 1 file changed, 4 deletions(-) diff --git a/arch/alpha/include/asm/io.h b/arch/alpha/include/asm/io.h index c9cb554fbe54..338dd24400bd 100644

[PATCH 6/7] ia64: remove unused __SLOW_DOWN_IO and SLOW_DOWN_IO definitions

2022-04-15 Thread Bjorn Helgaas
From: Bjorn Helgaas Remove unused __SLOW_DOWN_IO and SLOW_DOWN_IO definitions. Signed-off-by: Bjorn Helgaas --- arch/ia64/include/asm/io.h | 4 1 file changed, 4 deletions(-) diff --git a/arch/ia64/include/asm/io.h b/arch/ia64/include/asm/io.h index 6d93b923b379..1069e1730b2e 100644 ---

[PATCH 5/7] powerpc: Remove unused SLOW_DOWN_IO definition

2022-04-15 Thread Bjorn Helgaas
From: Bjorn Helgaas Remove unused SLOW_DOWN_IO definition. Signed-off-by: Bjorn Helgaas --- arch/powerpc/include/asm/io.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h index fee979d3a1aa..c5a5f7c9b231 100644 ---

[PATCH 3/7] net: remove comments that mention obsolete __SLOW_DOWN_IO

2022-04-15 Thread Bjorn Helgaas
From: Bjorn Helgaas Signed-off-by: Bjorn Helgaas --- drivers/atm/nicstarmac.c | 5 - drivers/net/ethernet/dec/tulip/winbond-840.c | 2 -- drivers/net/ethernet/natsemi/natsemi.c | 2 -- 3 files changed, 9 deletions(-) diff --git a/drivers/atm/nicstarmac.c

[PATCH 4/7] sh: remove unused SLOW_DOWN_IO

2022-04-15 Thread Bjorn Helgaas
From: Bjorn Helgaas io.h defines SLOW_DOWN_IO only when CONF_SLOWDOWN_IO is defined, but CONF_SLOWDOWN_IO is never defined and is in fact explicitly undefined. Remove SLOW_DOWN_IO and related code. N.B. 37b7a97884ba ("sh: machvec IO death.") went to some trouble to add CONF_SLOWDOWN_IO and

[PATCH 1/7] net: wan: atp: remove unused eeprom_delay()

2022-04-15 Thread Bjorn Helgaas
From: Bjorn Helgaas atp.h is included only by atp.c, which does not use eeprom_delay(). Remove the unused definition. Signed-off-by: Bjorn Helgaas --- drivers/net/ethernet/realtek/atp.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/realtek/atp.h

[PATCH 2/7] net: wan: lmc: remove unused DELAY()

2022-04-15 Thread Bjorn Helgaas
From: Bjorn Helgaas lmc_var.h is included only by files in drivers/net/wan/lmc/, and none of them uses DELAY(). Remove the unused definition and related comments. Signed-off-by: Bjorn Helgaas --- drivers/net/wan/lmc/lmc_main.c | 8 drivers/net/wan/lmc/lmc_var.h | 8 2

[PATCH 0/7] Remove unused SLOW_DOWN_IO

2022-04-15 Thread Bjorn Helgaas
From: Bjorn Helgaas Only alpha, ia64, powerpc, and sh define SLOW_DOWN_IO, and there are no actual uses of it. The few references to it are in situations that are themselves unused. Remove them all. It should be safe to apply these independently and in any order. The only place SLOW_DOWN_IO

Re: [PATCH net-next v4 07/18] net: dsa: Replace usage of found with dedicated list iterator variable

2022-04-15 Thread Vladimir Oltean
On Fri, Apr 15, 2022 at 02:29:36PM +0200, Jakob Koschel wrote: > To move the list iterator variable into the list_for_each_entry_*() > macro in the future it should be avoided to use the list iterator > variable after the loop body. > > To *never* use the list iterator variable after the loop it

[PATCH net-next v4 18/18] team: Remove use of list iterator variable for list_for_each_entry_from()

2022-04-15 Thread Jakob Koschel
In preparation to limit the scope of the list iterator variable to the list traversal loop, use a dedicated pointer to iterate through the list [1]. Since that variable should not be used past the loop iteration, a separate variable is used to 'remember the current location within the loop'. To

[PATCH net-next v4 17/18] ipvlan: Remove usage of list iterator variable for the loop body

2022-04-15 Thread Jakob Koschel
In preparation to limit the scope of the list iterator variable to the list traversal loop, use a dedicated pointer to iterate through the list [1]. Since that variable should not be used past the loop iteration, a separate variable is used to 'remember the current location within the loop'. To

[PATCH net-next v4 16/18] ps3_gelic: Replace usage of found with dedicated list iterator variable

2022-04-15 Thread Jakob Koschel
To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body. To *never* use the list iterator variable after the loop it was concluded to use a separate iterator variable instead of a found

[PATCH net-next v4 15/18] net: netcp: Remove usage of list iterator for list_add() after loop body

2022-04-15 Thread Jakob Koschel
In preparation to limit the scope of a list iterator to the list traversal loop, use a dedicated pointer pointing to the location where the element should be inserted [1]. Before, the code implicitly used the head when no element was found when using >list. The new 'pos' variable is set to the

[PATCH net-next v4 14/18] sfc: Remove usage of list iterator for list_add() after the loop body

2022-04-15 Thread Jakob Koschel
In preparation to limit the scope of a list iterator to the list traversal loop, use a dedicated pointer pointing to the location where the element should be inserted [1]. Before, the code implicitly used the head when no element was found when using >list. The new 'pos' variable is set to the

[PATCH net-next v4 13/18] net: qede: Remove check of list iterator against head past the loop body

2022-04-15 Thread Jakob Koschel
When list_for_each_entry() completes the iteration over the whole list without breaking the loop, the iterator value will be a bogus pointer computed based on the head element. While it is safe to use the pointer to determine if it was computed based on the head element, either with

[PATCH net-next v4 12/18] net: qede: Replace usage of found with dedicated list iterator variable

2022-04-15 Thread Jakob Koschel
To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body. To *never* use the list iterator variable after the loop it was concluded to use a separate iterator variable instead of a found

[PATCH net-next v4 11/18] qed: Remove usage of list iterator variable after the loop

2022-04-15 Thread Jakob Koschel
To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body. Since "found" and "p_ent" need to be equal, "found" should be used consistently to limit the scope of "p_ent" to the list traversal

[PATCH net-next v4 10/18] qed: Replace usage of found with dedicated list iterator variable

2022-04-15 Thread Jakob Koschel
To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body. To *never* use the list iterator variable after the loop it was concluded to use a separate iterator variable instead of a found

[PATCH net-next v4 09/18] qed: Use dedicated list iterator variable

2022-04-15 Thread Jakob Koschel
To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body. To *never* use the list iterator variable after the loop it was concluded to use a separate iterator variable [1]. Link:

[PATCH net-next v4 08/18] net: sparx5: Replace usage of found with dedicated list iterator variable

2022-04-15 Thread Jakob Koschel
To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body. To *never* use the list iterator variable after the loop it was concluded to use a separate iterator variable instead of a found

[PATCH net-next v4 07/18] net: dsa: Replace usage of found with dedicated list iterator variable

2022-04-15 Thread Jakob Koschel
To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body. To *never* use the list iterator variable after the loop it was concluded to use a separate iterator variable instead of a found

[PATCH net-next v4 06/18] net: dsa: mv88e6xxx: refactor mv88e6xxx_port_vlan()

2022-04-15 Thread Jakob Koschel
From: Vladimir Oltean To avoid bugs and speculative execution exploits due to type-confused pointers at the end of a list_for_each_entry() loop, one measure is to restrict code to not use the iterator variable outside the loop block. In the case of mv88e6xxx_port_vlan(), this isn't a problem,

[PATCH net-next v4 05/18] net: dsa: mv88e6xxx: remove redundant check in mv88e6xxx_port_vlan()

2022-04-15 Thread Jakob Koschel
From: Vladimir Oltean We know that "dev > dst->last_switch" in the "else" block. In other words, that "dev - dst->last_switch" is > 0. dsa_port_bridge_num_get(dp) can be 0, but the check "if (bridge_num + dst->last_switch != dev) continue", rewritten as "if (bridge_num != dev -

[PATCH net-next v4 04/18] net: dsa: sja1105: use list_add_tail(pos) instead of list_add(pos->prev)

2022-04-15 Thread Jakob Koschel
From: Vladimir Oltean When passed a non-head list element, list_add_tail() actually adds the new element to its left, which is what we want. Despite the slightly confusing name, use the dedicated function which does the same thing as the open-coded list_add(pos->prev). Suggested-by: Jakub

[PATCH net-next v4 03/18] net: dsa: sja1105: reorder sja1105_first_entry_longer_than with memory allocation

2022-04-15 Thread Jakob Koschel
From: Vladimir Oltean sja1105_first_entry_longer_than() does not make use of the full struct sja1105_gate_entry *e, just of e->interval which is set from the passed entry_time. This means that if there is a gate conflict, we have allocated e for nothing, just to free it later. Reorder the

[PATCH net-next v4 02/18] net: dsa: sja1105: remove use of iterator after list_for_each_entry() loop

2022-04-15 Thread Jakob Koschel
From: Vladimir Oltean The link below explains that there is a desire to syntactically change list_for_each_entry() and list_for_each() such that it becomes impossible to use the iterator variable outside the scope of the loop. Although sja1105_insert_gate_entry() makes legitimate use of the

[PATCH net-next v4 00/18] Remove use of list iterator after loop body

2022-04-15 Thread Jakob Koschel
When the list iterator loop does not exit early the list iterator variable contains a type-confused pointer to a 'bogus' list element computed based on the head [1]. Often a 'found' variable is used to ensure the list iterator variable is only accessed after the loop body if the loop did exit

[PATCH net-next v4 01/18] connector: Replace usage of found with dedicated list iterator variable

2022-04-15 Thread Jakob Koschel
To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body. To *never* use the list iterator variable after the loop it was concluded to use a separate iterator variable instead of a found

Re: [PATCH 1/1] powerpc: Update MAINTAINERS for ibmvnic and VAS

2022-04-15 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (master) by David S. Miller : On Wed, 13 Apr 2022 12:45:15 -0700 you wrote: > Signed-off-by: Sukadev Bhattiprolu > --- > MAINTAINERS | 2 -- > 1 file changed, 2 deletions(-) Here is the summary with links: - [1/1] powerpc: Update MAINTAINERS

Re: [PATCH] char: tpm: Prepare cleanup of powerpc's asm/prom.h

2022-04-15 Thread Christophe Leroy
Le 03/04/2022 à 12:23, Jarkko Sakkinen a écrit : > On Sat, Apr 02, 2022 at 12:29:19PM +0200, Christophe Leroy wrote: >> powerpc's asm/prom.h brings some headers that it doesn't >> need itself. >> >> In order to clean it up, first add missing headers in >> users of asm/prom.h >> >> Signed-off-by:

[PATCH v2] char: tpm: Prepare cleanup of powerpc's asm/prom.h

2022-04-15 Thread Christophe Leroy
powerpc's asm/prom.h brings some headers that it doesn't need itself. In order to clean it up in a further step, first clean all files that include asm/prom.h Some files don't need asm/prom.h at all. For those ones, just remove inclusion of asm/prom.h Some files don't need any of the items

[PATCH net-next v2] net: ethernet: Prepare cleanup of powerpc's asm/prom.h

2022-04-15 Thread Christophe Leroy
powerpc's asm/prom.h brings some headers that it doesn't need itself. In order to clean it up in a further step, first clean all files that include asm/prom.h Some files don't need asm/prom.h at all. For those ones, just remove inclusion of asm/prom.h Some files don't need any of the items