[lkml]   [2017]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/3] pci: Add a generic, weakly-linked pcibios_align_resource
Hi Palmer,

On Sat, Jun 24, 2017 at 3:50 AM, Palmer Dabbelt <> wrote:
> Multiple architectures define this as trivial function, and I'm adding
> another one as part of the RISC-V port. This adds a __weak version of
> pcibios_align_resource and deletes the now obselete ones in a handful of
> ports.
> The only functional change should be that a handful of ports used to
> export pcibios_fixup_bus. Only some architectures export this, so I
> just dropped it.
> Signed-off-by: Palmer Dabbelt <>

This function is only ever used as a pointer passed to

What about having

#ifndef pcibios_fixup_bus
#define pcibios_fixup_bus NULL

in asm-generic/pci.h, letting the architecture with a non-trivial
implementation predefine the preprocessor symbol, and teaching
pci_bus_alloc_resource() to handle NULL?


Oh, the latter eventually calls into allocate_resource(), which already falls
back to simple_align_resource() if the alignment function is NULL, which
does the same thing.
So NULL should already work.



Geert Uytterhoeven -- There's lots of Linux beyond ia32 --

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

 \ /
  Last update: 2017-06-24 11:42    [W:0.134 / U:3.836 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site