Skip to content

Commit f8440e2

Browse files
authored
Merge pull request #188 from ojeda/gpl
Export everything as GPL
2 parents 48069b3 + da968f8 commit f8440e2

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

rust/Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,14 @@ quiet_cmd_exports = EXPORTS $@
8888
$(NM) -p --defined-only $< \
8989
| grep -E ' (T|R|D) ' | cut -d ' ' -f 3 | grep -E '^(__rust_|_R)' \
9090
| xargs -n1 -Isymbol \
91-
echo 'EXPORT_SYMBOL$(exports_target_type)(symbol);' > $@
91+
echo 'EXPORT_SYMBOL_RUST_GPL(symbol);' > $@
9292

93-
$(objtree)/rust/exports_core_generated.h: private exports_target_type := _RUST
9493
$(objtree)/rust/exports_core_generated.h: $(objtree)/rust/core.o FORCE
9594
$(call if_changed,exports)
9695

97-
$(objtree)/rust/exports_alloc_generated.h: private exports_target_type := _RUST
9896
$(objtree)/rust/exports_alloc_generated.h: $(objtree)/rust/alloc.o FORCE
9997
$(call if_changed,exports)
10098

101-
$(objtree)/rust/exports_kernel_generated.h: private exports_target_type := _RUST_GPL
10299
$(objtree)/rust/exports_kernel_generated.h: $(objtree)/rust/kernel.o FORCE
103100
$(call if_changed,exports)
104101

rust/exports.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
#include <linux/module.h>
1111

12-
#define EXPORT_SYMBOL_RUST(sym) extern int sym; EXPORT_SYMBOL(sym);
1312
#define EXPORT_SYMBOL_RUST_GPL(sym) extern int sym; EXPORT_SYMBOL_GPL(sym);
1413

1514
#include "exports_core_generated.h"

rust/helpers.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,55 +31,55 @@ void rust_helper_spin_lock_init(spinlock_t *lock, const char *name,
3131
spin_lock_init(lock);
3232
#endif
3333
}
34-
EXPORT_SYMBOL(rust_helper_spin_lock_init);
34+
EXPORT_SYMBOL_GPL(rust_helper_spin_lock_init);
3535

3636
void rust_helper_spin_lock(spinlock_t *lock)
3737
{
3838
spin_lock(lock);
3939
}
40-
EXPORT_SYMBOL(rust_helper_spin_lock);
40+
EXPORT_SYMBOL_GPL(rust_helper_spin_lock);
4141

4242
void rust_helper_spin_unlock(spinlock_t *lock)
4343
{
4444
spin_unlock(lock);
4545
}
46-
EXPORT_SYMBOL(rust_helper_spin_unlock);
46+
EXPORT_SYMBOL_GPL(rust_helper_spin_unlock);
4747

4848
void rust_helper_init_wait(struct wait_queue_entry *wq_entry)
4949
{
5050
init_wait(wq_entry);
5151
}
52-
EXPORT_SYMBOL(rust_helper_init_wait);
52+
EXPORT_SYMBOL_GPL(rust_helper_init_wait);
5353

5454
int rust_helper_current_pid(void)
5555
{
5656
return current->pid;
5757
}
58-
EXPORT_SYMBOL(rust_helper_current_pid);
58+
EXPORT_SYMBOL_GPL(rust_helper_current_pid);
5959

6060
int rust_helper_signal_pending(void)
6161
{
6262
return signal_pending(current);
6363
}
64-
EXPORT_SYMBOL(rust_helper_signal_pending);
64+
EXPORT_SYMBOL_GPL(rust_helper_signal_pending);
6565

6666
struct page *rust_helper_alloc_pages(gfp_t gfp_mask, unsigned int order)
6767
{
6868
return alloc_pages(gfp_mask, order);
6969
}
70-
EXPORT_SYMBOL(rust_helper_alloc_pages);
70+
EXPORT_SYMBOL_GPL(rust_helper_alloc_pages);
7171

7272
void *rust_helper_kmap(struct page *page)
7373
{
7474
return kmap(page);
7575
}
76-
EXPORT_SYMBOL(rust_helper_kmap);
76+
EXPORT_SYMBOL_GPL(rust_helper_kmap);
7777

7878
void rust_helper_kunmap(struct page *page)
7979
{
8080
return kunmap(page);
8181
}
82-
EXPORT_SYMBOL(rust_helper_kunmap);
82+
EXPORT_SYMBOL_GPL(rust_helper_kunmap);
8383

8484
// See https://github.com/rust-lang/rust-bindgen/issues/1671
8585
static_assert(__builtin_types_compatible_p(size_t, uintptr_t),

0 commit comments

Comments
 (0)