mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-28 21:46:02 -04:00
net: liquidio: fix mixed module-builtin object
With CONFIG_LIQUIDIO=m and CONFIG_LIQUIDIO_VF=y (or vice versa),
$(common-objs) are linked to a module and also to vmlinux even though
the expected CFLAGS are different between builtins and modules.
This is the same situation as fixed by commit 637a642f5c ("zstd:
Fixing mixed module-builtin objects").
Introduce the new module, liquidio-core, to provide the common functions
to liquidio and liquidio-vf.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
0824a987a5
commit
f71be9d084
@@ -185,6 +185,7 @@ int octeon_delete_instr_queue(struct octeon_device *oct, u32 iq_no)
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(octeon_delete_instr_queue);
|
||||
|
||||
/* Return 0 on success, 1 on failure */
|
||||
int octeon_setup_iq(struct octeon_device *oct,
|
||||
@@ -258,6 +259,7 @@ int lio_wait_for_instr_fetch(struct octeon_device *oct)
|
||||
|
||||
return instr_cnt;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(lio_wait_for_instr_fetch);
|
||||
|
||||
static inline void
|
||||
ring_doorbell(struct octeon_device *oct, struct octeon_instr_queue *iq)
|
||||
@@ -282,6 +284,7 @@ octeon_ring_doorbell_locked(struct octeon_device *oct, u32 iq_no)
|
||||
ring_doorbell(oct, iq);
|
||||
spin_unlock(&iq->post_lock);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(octeon_ring_doorbell_locked);
|
||||
|
||||
static inline void __copy_cmd_into_iq(struct octeon_instr_queue *iq,
|
||||
u8 *cmd)
|
||||
@@ -345,6 +348,7 @@ octeon_register_reqtype_free_fn(struct octeon_device *oct, int reqtype,
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(octeon_register_reqtype_free_fn);
|
||||
|
||||
static inline void
|
||||
__add_to_request_list(struct octeon_instr_queue *iq,
|
||||
@@ -430,6 +434,7 @@ lio_process_iq_request_list(struct octeon_device *oct,
|
||||
|
||||
return inst_count;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(lio_process_iq_request_list);
|
||||
|
||||
/* Can only be called from process context */
|
||||
int
|
||||
@@ -566,6 +571,7 @@ octeon_send_command(struct octeon_device *oct, u32 iq_no,
|
||||
|
||||
return st.status;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(octeon_send_command);
|
||||
|
||||
void
|
||||
octeon_prepare_soft_command(struct octeon_device *oct,
|
||||
@@ -673,6 +679,7 @@ octeon_prepare_soft_command(struct octeon_device *oct,
|
||||
}
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(octeon_prepare_soft_command);
|
||||
|
||||
int octeon_send_soft_command(struct octeon_device *oct,
|
||||
struct octeon_soft_command *sc)
|
||||
@@ -726,6 +733,7 @@ int octeon_send_soft_command(struct octeon_device *oct,
|
||||
return (octeon_send_command(oct, sc->iq_no, 1, &sc->cmd, sc,
|
||||
len, REQTYPE_SOFT_COMMAND));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(octeon_send_soft_command);
|
||||
|
||||
int octeon_setup_sc_buffer_pool(struct octeon_device *oct)
|
||||
{
|
||||
@@ -755,6 +763,7 @@ int octeon_setup_sc_buffer_pool(struct octeon_device *oct)
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(octeon_setup_sc_buffer_pool);
|
||||
|
||||
int octeon_free_sc_done_list(struct octeon_device *oct)
|
||||
{
|
||||
@@ -794,6 +803,7 @@ int octeon_free_sc_done_list(struct octeon_device *oct)
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(octeon_free_sc_done_list);
|
||||
|
||||
int octeon_free_sc_zombie_list(struct octeon_device *oct)
|
||||
{
|
||||
@@ -818,6 +828,7 @@ int octeon_free_sc_zombie_list(struct octeon_device *oct)
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(octeon_free_sc_zombie_list);
|
||||
|
||||
int octeon_free_sc_buffer_pool(struct octeon_device *oct)
|
||||
{
|
||||
@@ -842,6 +853,7 @@ int octeon_free_sc_buffer_pool(struct octeon_device *oct)
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(octeon_free_sc_buffer_pool);
|
||||
|
||||
struct octeon_soft_command *octeon_alloc_soft_command(struct octeon_device *oct,
|
||||
u32 datasize,
|
||||
@@ -913,6 +925,7 @@ struct octeon_soft_command *octeon_alloc_soft_command(struct octeon_device *oct,
|
||||
|
||||
return sc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(octeon_alloc_soft_command);
|
||||
|
||||
void octeon_free_soft_command(struct octeon_device *oct,
|
||||
struct octeon_soft_command *sc)
|
||||
@@ -925,3 +938,4 @@ void octeon_free_soft_command(struct octeon_device *oct,
|
||||
|
||||
spin_unlock_bh(&oct->sc_buf_pool.lock);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(octeon_free_soft_command);
|
||||
|
||||
Reference in New Issue
Block a user