public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: stable-review@kernel.org, torvalds@linux-foundation.org,
	akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk,
	David Woodhouse <dwmw2@infradead.org>,
	Jesse Barnes <jbarnes@virtuousgeek.org>
Subject: [28/68] drivers/pci/intel-iommu.c: fix build with older gccs
Date: Fri, 24 Sep 2010 09:31:52 -0700	[thread overview]
Message-ID: <20100924163346.533522427@clark.site> (raw)
In-Reply-To: <20100924163357.GA15741@kroah.com>

2.6.32-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Andrew Morton <akpm@linux-foundation.org>

commit df08cdc7ef606509debe7677c439be0ca48790e4 upstream.

drivers/pci/intel-iommu.c: In function `__iommu_calculate_agaw':
drivers/pci/intel-iommu.c:437: sorry, unimplemented: inlining failed in call to 'width_to_agaw': function body not available
drivers/pci/intel-iommu.c:445: sorry, unimplemented: called from here

Move the offending function (and its siblings) to top-of-file, remove the
forward declaration.

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=17441

Reported-by: Martin Mokrejs <mmokrejs@ribosome.natur.cuni.cz>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/pci/intel-iommu.c |   90 +++++++++++++++++++++-------------------------
 1 file changed, 43 insertions(+), 47 deletions(-)

--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -71,6 +71,49 @@
 #define DMA_32BIT_PFN		IOVA_PFN(DMA_BIT_MASK(32))
 #define DMA_64BIT_PFN		IOVA_PFN(DMA_BIT_MASK(64))
 
+/* page table handling */
+#define LEVEL_STRIDE		(9)
+#define LEVEL_MASK		(((u64)1 << LEVEL_STRIDE) - 1)
+
+static inline int agaw_to_level(int agaw)
+{
+	return agaw + 2;
+}
+
+static inline int agaw_to_width(int agaw)
+{
+	return 30 + agaw * LEVEL_STRIDE;
+}
+
+static inline int width_to_agaw(int width)
+{
+	return (width - 30) / LEVEL_STRIDE;
+}
+
+static inline unsigned int level_to_offset_bits(int level)
+{
+	return (level - 1) * LEVEL_STRIDE;
+}
+
+static inline int pfn_level_offset(unsigned long pfn, int level)
+{
+	return (pfn >> level_to_offset_bits(level)) & LEVEL_MASK;
+}
+
+static inline unsigned long level_mask(int level)
+{
+	return -1UL << level_to_offset_bits(level);
+}
+
+static inline unsigned long level_size(int level)
+{
+	return 1UL << level_to_offset_bits(level);
+}
+
+static inline unsigned long align_to_level(unsigned long pfn, int level)
+{
+	return (pfn + level_size(level) - 1) & level_mask(level);
+}
 
 /* VT-d pages must always be _smaller_ than MM pages. Otherwise things
    are never going to work. */
@@ -449,8 +492,6 @@ void free_iova_mem(struct iova *iova)
 }
 
 
-static inline int width_to_agaw(int width);
-
 static int __iommu_calculate_agaw(struct intel_iommu *iommu, int max_gaw)
 {
 	unsigned long sagaw;
@@ -664,51 +705,6 @@ out:
 	spin_unlock_irqrestore(&iommu->lock, flags);
 }
 
-/* page table handling */
-#define LEVEL_STRIDE		(9)
-#define LEVEL_MASK		(((u64)1 << LEVEL_STRIDE) - 1)
-
-static inline int agaw_to_level(int agaw)
-{
-	return agaw + 2;
-}
-
-static inline int agaw_to_width(int agaw)
-{
-	return 30 + agaw * LEVEL_STRIDE;
-
-}
-
-static inline int width_to_agaw(int width)
-{
-	return (width - 30) / LEVEL_STRIDE;
-}
-
-static inline unsigned int level_to_offset_bits(int level)
-{
-	return (level - 1) * LEVEL_STRIDE;
-}
-
-static inline int pfn_level_offset(unsigned long pfn, int level)
-{
-	return (pfn >> level_to_offset_bits(level)) & LEVEL_MASK;
-}
-
-static inline unsigned long level_mask(int level)
-{
-	return -1UL << level_to_offset_bits(level);
-}
-
-static inline unsigned long level_size(int level)
-{
-	return 1UL << level_to_offset_bits(level);
-}
-
-static inline unsigned long align_to_level(unsigned long pfn, int level)
-{
-	return (pfn + level_size(level) - 1) & level_mask(level);
-}
-
 static struct dma_pte *pfn_to_dma_pte(struct dmar_domain *domain,
 				      unsigned long pfn)
 {



  parent reply	other threads:[~2010-09-24 16:35 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-24 16:33 [00/68] 2.6.32.23 stable review Greg KH
2010-09-24 16:31 ` [01/68] USB: serial/mos*: prevent reading uninitialized stack memory Greg KH
2010-09-24 16:31 ` [02/68] sparc: Provide io{read,write}{16,32}be() Greg KH
2010-09-24 16:31 ` [03/68] gro: fix different skb headrooms Greg KH
2010-09-24 16:31 ` [04/68] gro: Re-fix " Greg KH
2010-09-24 16:31 ` [05/68] irda: Correctly clean up self->ias_obj on irda_bind() failure Greg KH
2010-09-24 16:31 ` [06/68] tcp: select(writefds) dont hang up when a peer close connection Greg KH
2010-09-24 16:31 ` [07/68] tcp: Combat per-cpu skew in orphan tests Greg KH
2010-09-24 16:31 ` [08/68] tcp: fix three tcp sysctls tuning Greg KH
2010-09-24 16:31 ` [09/68] bridge: Clear IPCB before possible entry into IP stack Greg KH
2010-09-24 16:31 ` [10/68] bridge: Clear INET control block of SKBs passed into ip_fragment() Greg KH
2010-09-24 16:31 ` [11/68] net: Fix oops from tcp_collapse() when using splice() Greg KH
2010-09-24 16:31 ` [12/68] rds: fix a leak of kernel memory Greg KH
2010-10-01  0:50   ` David Miller
2010-09-24 16:31 ` [13/68] tcp: Prevent overzealous packetization by SWS logic Greg KH
2010-09-24 16:31 ` [14/68] UNIX: Do not loop forever at unix_autobind() Greg KH
2010-09-24 16:31 ` [15/68] r8169: fix random mdio_write failures Greg KH
2010-09-24 16:31 ` [16/68] r8169: fix mdio_read and update mdio_write according to hw specs Greg KH
2010-09-24 16:31 ` [17/68] sparc64: Get rid of indirect p1275 PROM call buffer Greg KH
2010-09-24 16:31 ` [18/68] drivers/net/usb/hso.c: prevent reading uninitialized memory Greg KH
2010-09-24 16:31 ` [19/68] drivers/net/cxgb3/cxgb3_main.c: prevent reading uninitialized stack memory Greg KH
2010-09-24 16:31 ` [20/68] drivers/net/eql.c: " Greg KH
2010-09-24 16:31 ` [21/68] bonding: correctly process non-linear skbs Greg KH
2010-09-24 16:31 ` [22/68] Staging: vt6655: fix buffer overflow Greg KH
2010-09-24 16:31 ` [23/68] net/llc: make opt unsigned in llc_ui_setsockopt() Greg KH
2010-09-24 16:31 ` [24/68] pid: make setpgid() system call use RCU read-side critical section Greg KH
2010-09-24 16:31 ` [25/68] sched: Fix user time incorrectly accounted as system time on 32-bit Greg KH
2010-09-24 16:31 ` [26/68] oprofile: Add Support for Intel CPU Family 6 / Model 22 (Intel Celeron 540) Greg KH
2010-09-24 16:31 ` [27/68] char: Mark /dev/zero and /dev/kmem as not capable of writeback Greg KH
2010-09-24 16:31 ` Greg KH [this message]
2010-09-24 16:31 ` [29/68] drivers/video/sis/sis_main.c: prevent reading uninitialized stack memory Greg KH
2010-09-24 16:31 ` [30/68] percpu: fix pcpu_last_unit_cpu Greg KH
2010-09-24 16:31 ` [31/68] aio: check for multiplication overflow in do_io_submit Greg KH
2010-09-24 16:31 ` [32/68] inotify: send IN_UNMOUNT events Greg KH
2010-09-24 16:31 ` [33/68] SCSI: mptsas: fix hangs caused by ATA pass-through Greg KH
2010-09-24 16:31 ` [34/68] ext4: Fix remaining racy updates of EXT4_I(inode)->i_flags Greg KH
2010-09-24 16:31 ` [35/68] IA64: fix siglock Greg KH
2010-09-24 16:32 ` [36/68] IA64: Optimize ticket spinlocks in fsys_rt_sigprocmask Greg KH
2010-09-24 16:32 ` [37/68] KEYS: Fix RCU no-lock warning in keyctl_session_to_parent() Greg KH
2010-09-24 16:32 ` [38/68] KEYS: Fix bug in keyctl_session_to_parent() if parent has no session keyring Greg KH
2010-09-24 16:32 ` [39/68] xfs: prevent reading uninitialized stack memory Greg KH
2010-09-24 16:32 ` [40/68] drivers/video/via/ioctl.c: " Greg KH
2010-09-24 16:32 ` [41/68] ACPI: disable _OSI(Windows 2009) on Asus K50IJ Greg KH
2010-09-24 16:32 ` [42/68] bnx2: Fix netpoll crash Greg KH
2010-09-24 16:32 ` [43/68] bnx2: Fix hang during rmmod bnx2 Greg KH
2010-09-24 16:32 ` [44/68] AT91: change dma resource index Greg KH
2010-09-24 16:32 ` [45/68] cxgb3: fix hot plug removal crash Greg KH
2010-09-24 16:32 ` [46/68] mm: page allocator: drain per-cpu lists after direct reclaim allocation fails Greg KH
2010-09-24 16:32 ` [47/68] mm: page allocator: calculate a better estimate of NR_FREE_PAGES when memory is low and kswapd is awake Greg KH
2010-09-24 16:32 ` [48/68] mm: page allocator: update free page counters after pages are placed on the free list Greg KH
2010-09-24 16:32 ` [49/68] guard page for stacks that grow upwards Greg KH
2010-09-24 16:32 ` [50/68] Fix unprotected access to task credentials in waitid() Greg KH
2010-09-24 16:32 ` [51/68] sctp: Do not reset the packet during sctp_packet_config() Greg KH
2010-09-24 16:32 ` [52/68] 3c503: Fix IRQ probing Greg KH
2010-09-24 16:32 ` [53/68] asix: fix setting mac address for AX88772 Greg KH
2010-09-24 16:32 ` [54/68] [S390] dasd: use correct label location for diag fba disks Greg KH
2010-09-24 16:32 ` [55/68] [PATCH] clocksource: sh_tmu: compute mult and shift before registration Greg KH
2010-09-24 16:32 ` [56/68] gro: Fix bogus gso_size on the first fraglist entry Greg KH
2010-09-24 16:32 ` [57/68] hostap_pci: set dev->base_addr during probe Greg KH
2010-09-24 16:32 ` [58/68] [PATCH] inotify: fix inotify oneshot support Greg KH
2010-09-24 16:32 ` [59/68] Input: add compat support for sysfs and /proc capabilities output Greg KH
2010-09-24 16:32 ` [60/68] MIPS: Quit using undefined behavior of ADDU in 64-bit atomic operations Greg KH
2010-09-24 16:32 ` [61/68] MIPS: Set io_map_base for several PCI bridges lacking it Greg KH
2010-09-24 16:32 ` [62/68] [PATCH] MIPS: uasm: Add OR instruction Greg KH
2010-09-24 16:32 ` [63/68] pata_pdc202xx_old: fix UDMA mode for Promise UDMA33 cards Greg KH
2010-09-24 16:32 ` [64/68] [PATCH] pata_pdc202xx_old: fix UDMA mode for PDC2026x chipsets Greg KH
2010-09-24 16:32 ` [65/68] MIPS: Sibyte: Fix M3 TLB exception handler workaround Greg KH
2010-09-24 16:32 ` [66/68] sis-agp: Remove SIS 760, handled by amd64-agp Greg KH
2010-09-24 16:32 ` [67/68] alpha: Fix printk format errors Greg KH
2010-09-24 16:32 ` [68/68] x86: Add memory modify constraints to xchg() and cmpxchg() Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100924163346.533522427@clark.site \
    --to=gregkh@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=dwmw2@infradead.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable-review@kernel.org \
    --cc=stable@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox