From patchwork Tue Sep 23 00:54:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John David Anglin X-Patchwork-Id: 4951531 Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8F533BEEA5 for ; Tue, 23 Sep 2014 00:55:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EE3EB20154 for ; Tue, 23 Sep 2014 00:55:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0D5B1201FA for ; Tue, 23 Sep 2014 00:55:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755537AbaIWAzM (ORCPT ); Mon, 22 Sep 2014 20:55:12 -0400 Received: from blu004-omc4s21.hotmail.com ([65.55.111.160]:63769 "EHLO BLU004-OMC4S21.hotmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755514AbaIWAzJ (ORCPT ); Mon, 22 Sep 2014 20:55:09 -0400 Received: from BLU437-SMTP4 ([65.55.111.135]) by BLU004-OMC4S21.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22724); Mon, 22 Sep 2014 17:55:08 -0700 X-TMN: [M4OjqUXziuwT/ppXf6zLpCsQy2Smt3LQ] X-Originating-Email: [dave.anglin@bell.net] Message-ID: Received: from [192.168.2.16] ([174.92.95.53]) by smtphm.sympatico.ca over TLS secured channel with Microsoft SMTPSVC(8.0.9200.16384); Mon, 22 Sep 2014 17:55:07 -0700 From: John David Anglin To: linux-parisc List Subject: [PATCH] parisc: Only use -mfast-indirect-calls option for 32-bit kernel builds MIME-Version: 1.0 (Apple Message framework v936) Date: Mon, 22 Sep 2014 20:54:50 -0400 CC: Helge Deller , James Bottomley X-Mailer: Apple Mail (2.936) X-OriginalArrivalTime: 23 Sep 2014 00:55:07.0381 (UTC) FILETIME=[04C4CA50:01CFD6C9] Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 is the same kernel code as before. Signed-of-by: John David Anglin --- -- John David Anglin dave.anglin@bell.net diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index 7187664..5db8882 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile @@ -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