summaryrefslogtreecommitdiffstats
path: root/sys/contrib
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2012-11-13 07:33:45 +0000
committerjmallett <jmallett@FreeBSD.org>2012-11-13 07:33:45 +0000
commit069178a3755d27256a0a8a2ff4af40643bfdc653 (patch)
treefa13cc2e646c34744d95a6e3d3abf8c7ece59aff /sys/contrib
parentac29316d9ab81a8f1bd6cb54bf35253cfb748876 (diff)
downloadFreeBSD-src-069178a3755d27256a0a8a2ff4af40643bfdc653.zip
FreeBSD-src-069178a3755d27256a0a8a2ff4af40643bfdc653.tar.gz
Fix build for FreeBSD kernel.
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/octeon-sdk/octeon-pci-console.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/contrib/octeon-sdk/octeon-pci-console.c b/sys/contrib/octeon-sdk/octeon-pci-console.c
index ee260a9..85f0816 100644
--- a/sys/contrib/octeon-sdk/octeon-pci-console.c
+++ b/sys/contrib/octeon-sdk/octeon-pci-console.c
@@ -75,7 +75,7 @@
/* The following code is only used in standalone CVMX applications. It does
not apply for kernel or Linux programming */
-#if defined(OCTEON_TARGET) && !defined(__linux__)
+#if defined(OCTEON_TARGET) && !defined(__linux__) && !defined(CVMX_BUILD_FOR_LINUX_KERNEL)
static int cvmx_pci_console_num = 0;
static int per_core_pci_consoles = 0;
@@ -110,14 +110,14 @@ int __cvmx_pci_console_write (int fd, char *buf, int nbytes)
#if !defined(CONFIG_OCTEON_U_BOOT) || (defined(CONFIG_OCTEON_U_BOOT) && (defined(CFG_PCI_CONSOLE) || defined(CONFIG_SYS_PCI_CONSOLE)))
-int octeon_pci_console_buffer_free_bytes(uint32_t buffer_size, uint32_t wr_idx, uint32_t rd_idx)
+static int octeon_pci_console_buffer_free_bytes(uint32_t buffer_size, uint32_t wr_idx, uint32_t rd_idx)
{
if (rd_idx >= buffer_size || wr_idx >= buffer_size)
return -1;
return (((buffer_size -1) - (wr_idx - rd_idx))%buffer_size);
}
-int octeon_pci_console_buffer_avail_bytes(uint32_t buffer_size, uint32_t wr_idx, uint32_t rd_idx)
+static int octeon_pci_console_buffer_avail_bytes(uint32_t buffer_size, uint32_t wr_idx, uint32_t rd_idx)
{
if (rd_idx >= buffer_size || wr_idx >= buffer_size)
return -1;
@@ -287,7 +287,7 @@ int octeon_pci_console_host_read_avail(uint64_t console_desc_addr, unsigned int
/* This code is only available in a kernel or CVMX standalone. It can't be used
from userspace */
-#if (!defined(CONFIG_OCTEON_U_BOOT) && (!defined(__linux__) || defined(__KERNEL__))) || (defined(CONFIG_OCTEON_U_BOOT) && (defined(CFG_PCI_CONSOLE) || defined(CONFIG_SYS_PCI_CONSOLE)))
+#if (!defined(CONFIG_OCTEON_U_BOOT) && (!defined(__linux__) || defined(__KERNEL__))) || (defined(CONFIG_OCTEON_U_BOOT) && (defined(CFG_PCI_CONSOLE) || defined(CONFIG_SYS_PCI_CONSOLE))) || defined(CVMX_BUILD_FOR_LINUX_KERNEL)
static octeon_pci_console_t *octeon_pci_console_get_ptr(uint64_t console_desc_addr, unsigned int console_num)
{
OpenPOWER on IntegriCloud