Skip to content

Commit

Permalink
parisc: Only use -mfast-indirect-calls option for 32-bit kernel builds
Browse files Browse the repository at this point in the history
In spite of what the GCC manual says, the -mfast-indirect-calls has
never been supported in the 64-bit parisc compiler. Indirect calls have
always been done using function descriptors irrespective of the
-mfast-indirect-calls option.

Recently, it was noticed that a function descriptor was always requested
when the -mfast-indirect-calls option was specified. This caused
problems when the option was used in  application code and doesn't make
any sense because the whole point of the option is to avoid using a
function descriptor for indirect calls.

Fixing this broke 64-bit kernel builds.

I will fix GCC but for now we need the attached change. This results in
the same kernel code as before.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Cc: stable@vger.kernel.org  # v3.0+
Signed-off-by: Helge Deller <deller@gmx.de>
  • Loading branch information
John David Anglin authored and Helge Deller committed Sep 23, 2014
1 parent c735483 commit d26a773
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion arch/parisc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ cflags-y := -pipe

# These flags should be implied by an hppa-linux configuration, but they
# are not in gcc 3.2.
cflags-y += -mno-space-regs -mfast-indirect-calls
cflags-y += -mno-space-regs

# -mfast-indirect-calls is only relevant for 32-bit kernels.
ifndef CONFIG_64BIT
cflags-y += -mfast-indirect-calls
endif

# Currently we save and restore fpregs on all kernel entry/interruption paths.
# If that gets optimized, we might need to disable the use of fpregs in the
Expand Down

0 comments on commit d26a773

Please sign in to comment.